> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developers.synthesia.io/docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers.synthesia.io/docs/_mcp/server.

# Add locales to a localization

PUT https://developers.synthesia.io/api/localizations/{localization_id}/locales
Content-Type: application/json

Add a locale for each language, and return the requested locales.

- 202 when new locales were added: poll them until each is done.
- 200 when every language already had a locale.
- A language that already has a locale is skipped, so repeating a request is safe. A failed locale isn't
  redone: create a new localization to retry it.
- Locales are never removed: a language left out keeps its locale.

**Required scope:** [`localization:write`](https://developers.synthesia.io/docs/scopes) (in Studio: Localization (write))

Reference: https://developers.synthesia.io/docs/api-reference/localization/add-localization-locales

## Authentication

- `Authorization` header (bearer token, required) — Your Synthesia API key. * Send it as `Authorization: Bearer <key>`; a bare key also works. * An endpoint that needs a scope names it in its description; [Scopes](https://developers.synthesia.io/docs/scopes) lists them all. * A `:write` scope also satisfies the same resource's `:read`. * Without the scope, the request fails with a 403 `insufficient_scope`.

## Request

### Path parameters

- `localization_id` (string, required) — The localization id, prefixed `l10n_…`.

### Body (application/json)

This endpoint expects an AddLocales.

- `locales` (list of NewLocale, required) — One entry per language. A language that already has a locale is skipped.
- `lipsyncEnabled` (boolean, optional, default: true) — Whether to lip-sync the localized videos. Lip-sync costs extra credit and needs a plan that includes it: without it, adding locales is refused, and a new localization fails once processed.
- `burnedInCaptionsEnabled` (boolean, optional, default: false) — Whether to burn captions into the localized videos.
- `videoDuration` (enum, optional) — `adaptive` adjusts the video's speed to fit the translation; `original` keeps the source's duration.
  - Allowed values: `adaptive`, `original`
- `visibility` (enum, optional) — Who can view the localized videos.
  - Allowed values: `private`, `public`

## Response

### 200

Every language already had a locale, so nothing new was started. Existing locales come back as they are, including failed ones: a failed locale isn't redone, so create a new localization to retry it.

- `data` (list of Locale, required)
- `nextCursor` (string, required, nullable)

### 202

Locales were added and their dubs are being made. Poll the locales until each is done.

- `data` (list of Locale, required)
- `nextCursor` (string, required, nullable)

## Errors

### 400 Bad Request Error

Invalid id or body, a language that is not a dubbing target, `formality` other than `auto` (not supported yet), `generate: false` on a dubbing localization, the id of a translation, lip-sync your plan doesn't include, a language that is no longer offered, a localization whose import failed, or a workspace that can't dub it (validation_error). Also a refused locale (invalid_target_language).

- `type` (string, required) — A URL identifying the error class — documentation, not a contract: branch on `code`, never parse `type`.
- `title` (string, required) — A human-readable summary of the error class.
- `status` (integer, required) — The HTTP status code, repeated from the response.
- `code` (string, required) — The stable, machine-readable error code to branch on. New codes may appear; treat an unknown one by its `status`.
- `detail` (string, optional, nullable) — Human-readable specifics; the wording may change without notice.
- `features` (list of string, optional, nullable) — On `feature_not_in_plan` only: the plan features this request needs.
- `instance` (string, optional, nullable) — The request path that produced the error.
- `requestId` (string, optional, nullable) — Identifies the request in Synthesia's logs (also the `Request-Id` header); quote it when contacting support.

### 401 Unauthorized Error

Unauthenticated

- `type` (string, required) — A URL identifying the error class — documentation, not a contract: branch on `code`, never parse `type`.
- `title` (string, required) — A human-readable summary of the error class.
- `status` (integer, required) — The HTTP status code, repeated from the response.
- `code` (string, required) — The stable, machine-readable error code to branch on. New codes may appear; treat an unknown one by its `status`.
- `detail` (string, optional, nullable) — Human-readable specifics; the wording may change without notice.
- `features` (list of string, optional, nullable) — On `feature_not_in_plan` only: the plan features this request needs.
- `instance` (string, optional, nullable) — The request path that produced the error.
- `requestId` (string, optional, nullable) — Identifies the request in Synthesia's logs (also the `Request-Id` header); quote it when contacting support.

### 402 Payment Required Error

Your workspace has no valid payment plan (payment_required), or not enough credit to dub (no_credit).

- `type` (string, required) — A URL identifying the error class — documentation, not a contract: branch on `code`, never parse `type`.
- `title` (string, required) — A human-readable summary of the error class.
- `status` (integer, required) — The HTTP status code, repeated from the response.
- `code` (string, required) — The stable, machine-readable error code to branch on. New codes may appear; treat an unknown one by its `status`.
- `detail` (string, optional, nullable) — Human-readable specifics; the wording may change without notice.
- `features` (list of string, optional, nullable) — On `feature_not_in_plan` only: the plan features this request needs.
- `instance` (string, optional, nullable) — The request path that produced the error.
- `requestId` (string, optional, nullable) — Identifies the request in Synthesia's logs (also the `Request-Id` header); quote it when contacting support.

### 403 Forbidden Error

Insufficiently scoped or forbidden, or your plan doesn't include one of these languages, or you can't edit this localization (forbidden).

- `type` (string, required) — A URL identifying the error class — documentation, not a contract: branch on `code`, never parse `type`.
- `title` (string, required) — A human-readable summary of the error class.
- `status` (integer, required) — The HTTP status code, repeated from the response.
- `code` (string, required) — The stable, machine-readable error code to branch on. New codes may appear; treat an unknown one by its `status`.
- `detail` (string, optional, nullable) — Human-readable specifics; the wording may change without notice.
- `features` (list of string, optional, nullable) — On `feature_not_in_plan` only: the plan features this request needs.
- `instance` (string, optional, nullable) — The request path that produced the error.
- `requestId` (string, optional, nullable) — Identifies the request in Synthesia's logs (also the `Request-Id` header); quote it when contacting support.

### 404 Not Found Error

The localization does not exist, or you cannot see it (not_found).

- `type` (string, required) — A URL identifying the error class — documentation, not a contract: branch on `code`, never parse `type`.
- `title` (string, required) — A human-readable summary of the error class.
- `status` (integer, required) — The HTTP status code, repeated from the response.
- `code` (string, required) — The stable, machine-readable error code to branch on. New codes may appear; treat an unknown one by its `status`.
- `detail` (string, optional, nullable) — Human-readable specifics; the wording may change without notice.
- `features` (list of string, optional, nullable) — On `feature_not_in_plan` only: the plan features this request needs.
- `instance` (string, optional, nullable) — The request path that produced the error.
- `requestId` (string, optional, nullable) — Identifies the request in Synthesia's logs (also the `Request-Id` header); quote it when contacting support.

### 409 Conflict Error

The localization is still importing its video (conflict).

- `type` (string, required) — A URL identifying the error class — documentation, not a contract: branch on `code`, never parse `type`.
- `title` (string, required) — A human-readable summary of the error class.
- `status` (integer, required) — The HTTP status code, repeated from the response.
- `code` (string, required) — The stable, machine-readable error code to branch on. New codes may appear; treat an unknown one by its `status`.
- `detail` (string, optional, nullable) — Human-readable specifics; the wording may change without notice.
- `features` (list of string, optional, nullable) — On `feature_not_in_plan` only: the plan features this request needs.
- `instance` (string, optional, nullable) — The request path that produced the error.
- `requestId` (string, optional, nullable) — Identifies the request in Synthesia's logs (also the `Request-Id` header); quote it when contacting support.

### 413 Content Too Large Error

Payload too large

- `type` (string, required) — A URL identifying the error class — documentation, not a contract: branch on `code`, never parse `type`.
- `title` (string, required) — A human-readable summary of the error class.
- `status` (integer, required) — The HTTP status code, repeated from the response.
- `code` (string, required) — The stable, machine-readable error code to branch on. New codes may appear; treat an unknown one by its `status`.
- `detail` (string, optional, nullable) — Human-readable specifics; the wording may change without notice.
- `features` (list of string, optional, nullable) — On `feature_not_in_plan` only: the plan features this request needs.
- `instance` (string, optional, nullable) — The request path that produced the error.
- `requestId` (string, optional, nullable) — Identifies the request in Synthesia's logs (also the `Request-Id` header); quote it when contacting support.

### 415 Unsupported Media Type Error

Unsupported media type

- `type` (string, required) — A URL identifying the error class — documentation, not a contract: branch on `code`, never parse `type`.
- `title` (string, required) — A human-readable summary of the error class.
- `status` (integer, required) — The HTTP status code, repeated from the response.
- `code` (string, required) — The stable, machine-readable error code to branch on. New codes may appear; treat an unknown one by its `status`.
- `detail` (string, optional, nullable) — Human-readable specifics; the wording may change without notice.
- `features` (list of string, optional, nullable) — On `feature_not_in_plan` only: the plan features this request needs.
- `instance` (string, optional, nullable) — The request path that produced the error.
- `requestId` (string, optional, nullable) — Identifies the request in Synthesia's logs (also the `Request-Id` header); quote it when contacting support.

### 429 Too Many Requests Error

Rate limited

- `type` (string, required) — A URL identifying the error class — documentation, not a contract: branch on `code`, never parse `type`.
- `title` (string, required) — A human-readable summary of the error class.
- `status` (integer, required) — The HTTP status code, repeated from the response.
- `code` (string, required) — The stable, machine-readable error code to branch on. New codes may appear; treat an unknown one by its `status`.
- `detail` (string, optional, nullable) — Human-readable specifics; the wording may change without notice.
- `features` (list of string, optional, nullable) — On `feature_not_in_plan` only: the plan features this request needs.
- `instance` (string, optional, nullable) — The request path that produced the error.
- `requestId` (string, optional, nullable) — Identifies the request in Synthesia's logs (also the `Request-Id` header); quote it when contacting support.

### 500 Internal Server Error

Internal error

- `type` (string, required) — A URL identifying the error class — documentation, not a contract: branch on `code`, never parse `type`.
- `title` (string, required) — A human-readable summary of the error class.
- `status` (integer, required) — The HTTP status code, repeated from the response.
- `code` (string, required) — The stable, machine-readable error code to branch on. New codes may appear; treat an unknown one by its `status`.
- `detail` (string, optional, nullable) — Human-readable specifics; the wording may change without notice.
- `features` (list of string, optional, nullable) — On `feature_not_in_plan` only: the plan features this request needs.
- `instance` (string, optional, nullable) — The request path that produced the error.
- `requestId` (string, optional, nullable) — Identifies the request in Synthesia's logs (also the `Request-Id` header); quote it when contacting support.

### 503 Service Unavailable Error

Service unavailable

- `type` (string, required) — A URL identifying the error class — documentation, not a contract: branch on `code`, never parse `type`.
- `title` (string, required) — A human-readable summary of the error class.
- `status` (integer, required) — The HTTP status code, repeated from the response.
- `code` (string, required) — The stable, machine-readable error code to branch on. New codes may appear; treat an unknown one by its `status`.
- `detail` (string, optional, nullable) — Human-readable specifics; the wording may change without notice.
- `features` (list of string, optional, nullable) — On `feature_not_in_plan` only: the plan features this request needs.
- `instance` (string, optional, nullable) — The request path that produced the error.
- `requestId` (string, optional, nullable) — Identifies the request in Synthesia's logs (also the `Request-Id` header); quote it when contacting support.

### 504 Gateway Timeout Error

Upstream timeout

- `type` (string, required) — A URL identifying the error class — documentation, not a contract: branch on `code`, never parse `type`.
- `title` (string, required) — A human-readable summary of the error class.
- `status` (integer, required) — The HTTP status code, repeated from the response.
- `code` (string, required) — The stable, machine-readable error code to branch on. New codes may appear; treat an unknown one by its `status`.
- `detail` (string, optional, nullable) — Human-readable specifics; the wording may change without notice.
- `features` (list of string, optional, nullable) — On `feature_not_in_plan` only: the plan features this request needs.
- `instance` (string, optional, nullable) — The request path that produced the error.
- `requestId` (string, optional, nullable) — Identifies the request in Synthesia's logs (also the `Request-Id` header); quote it when contacting support.

## Types

### NewLocale

- `language` (string, required) — A `dubbing_target` language from `GET /localizations/languages`.
- `formality` (enum, optional) — Only `auto` is supported for now.
  - Allowed values: `auto`, `formal`, `informal`
- `generate` (boolean, optional, default: true) — Whether to make the locale's video. Dubbing always makes it, so only `true` applies.

### Locale

- `id` (string, required) — The locale's id. Starts with `locale_`.
- `status` (enum, required) — `processing` while the video is made, then `completed` or `failed`.
  - Allowed values: `queued`, `processing`, `completed`, `failed`, `canceled`
- `error` (Problem, required, nullable) — Why the locale failed. Branch on its `code`: `moderation` or `processing_error`. More codes may be added. Null unless the status is `failed`.
- `videoId` (string, required) — The localized video's id. Starts with `vid_`.
- `language` (string, required) — BCP 47 language code.
- `mode` (string, required) — How the locale is made: `dubbing`. More modes may be added; ignore values you don't recognize.
- `visibility` (enum, required, nullable) — Null until the locale completes.
  - Allowed values: `private`, `public`
- `createdAt` (datetime, required, nullable) — Null until the locale completes.
- `download` (string, required, nullable) — Time-limited URL of the video. Null until the locale completes.
- `thumbnail` (LocaleThumbnail, required, nullable) — Null until the locale completes.
- `captions` (LocaleCaptions, required, nullable) — Null until the locale completes.
- `done` (boolean, required) — True once `status` is terminal, whatever the outcome. Poll until it is true, then read `status`.

### Problem

An error response in RFC 9457 Problem Details format.

- `type` (string, required) — A URL identifying the error class — documentation, not a contract: branch on `code`, never parse `type`.
- `title` (string, required) — A human-readable summary of the error class.
- `status` (integer, required) — The HTTP status code, repeated from the response.
- `code` (string, required) — The stable, machine-readable error code to branch on. New codes may appear; treat an unknown one by its `status`.
- `detail` (string, optional, nullable) — Human-readable specifics; the wording may change without notice.
- `features` (list of string, optional, nullable) — On `feature_not_in_plan` only: the plan features this request needs.
- `instance` (string, optional, nullable) — The request path that produced the error.
- `requestId` (string, optional, nullable) — Identifies the request in Synthesia's logs (also the `Request-Id` header); quote it when contacting support.

### LocaleThumbnail

- `image` (string, required, nullable) — Time-limited URL of the thumbnail image.
- `gif` (string, required, nullable) — Time-limited URL of the animated thumbnail.

### LocaleCaptions

- `srt` (string, required, nullable) — Time-limited URL of the SRT captions.
- `vtt` (string, required, nullable) — Time-limited URL of the WebVTT captions.

## Examples

### Add locales to a localization

**Request**

```json
{
  "locales": [
    {
      "language": "es-ES",
      "generate": true
    }
  ],
  "lipsyncEnabled": true,
  "burnedInCaptionsEnabled": false
}
```

**Response**

```json
{
  "data": [
    {
      "id": "string",
      "status": "queued",
      "error": {
        "type": "string",
        "title": "string",
        "status": 1,
        "code": "string",
        "detail": "string",
        "features": [
          "string"
        ],
        "instance": "string",
        "requestId": "string"
      },
      "videoId": "string",
      "language": "es-ES",
      "mode": "dubbing",
      "visibility": "private",
      "createdAt": "2024-01-15T09:30:00Z",
      "download": "string",
      "thumbnail": {
        "image": "string",
        "gif": "string"
      },
      "captions": {
        "srt": "string",
        "vtt": "string"
      },
      "done": true
    }
  ],
  "nextCursor": "string"
}
```

**SDK Code**

```python Add locales to a localization
import requests

url = "https://developers.synthesia.io/api/localizations/localization_id/locales"

payload = {
    "locales": [
        {
            "language": "es-ES",
            "generate": True
        }
    ],
    "lipsyncEnabled": True,
    "burnedInCaptionsEnabled": False
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.json())
```

```javascript Add locales to a localization
const url = 'https://developers.synthesia.io/api/localizations/localization_id/locales';
const options = {
  method: 'PUT',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"locales":[{"language":"es-ES","generate":true}],"lipsyncEnabled":true,"burnedInCaptionsEnabled":false}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Add locales to a localization
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://developers.synthesia.io/api/localizations/localization_id/locales"

	payload := strings.NewReader("{\n  \"locales\": [\n    {\n      \"language\": \"es-ES\",\n      \"generate\": true\n    }\n  ],\n  \"lipsyncEnabled\": true,\n  \"burnedInCaptionsEnabled\": false\n}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Add locales to a localization
require 'uri'
require 'net/http'

url = URI("https://developers.synthesia.io/api/localizations/localization_id/locales")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"locales\": [\n    {\n      \"language\": \"es-ES\",\n      \"generate\": true\n    }\n  ],\n  \"lipsyncEnabled\": true,\n  \"burnedInCaptionsEnabled\": false\n}"

response = http.request(request)
puts response.read_body
```

```java Add locales to a localization
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.put("https://developers.synthesia.io/api/localizations/localization_id/locales")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"locales\": [\n    {\n      \"language\": \"es-ES\",\n      \"generate\": true\n    }\n  ],\n  \"lipsyncEnabled\": true,\n  \"burnedInCaptionsEnabled\": false\n}")
  .asString();
```

```php Add locales to a localization
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://developers.synthesia.io/api/localizations/localization_id/locales', [
  'body' => '{
  "locales": [
    {
      "language": "es-ES",
      "generate": true
    }
  ],
  "lipsyncEnabled": true,
  "burnedInCaptionsEnabled": false
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Add locales to a localization
using RestSharp;

var client = new RestClient("https://developers.synthesia.io/api/localizations/localization_id/locales");
var request = new RestRequest(Method.PUT);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"locales\": [\n    {\n      \"language\": \"es-ES\",\n      \"generate\": true\n    }\n  ],\n  \"lipsyncEnabled\": true,\n  \"burnedInCaptionsEnabled\": false\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Add locales to a localization
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "locales": [
    [
      "language": "es-ES",
      "generate": true
    ]
  ],
  "lipsyncEnabled": true,
  "burnedInCaptionsEnabled": false
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://developers.synthesia.io/api/localizations/localization_id/locales")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Add locales to a localization

**Request**

```json
{
  "locales": [
    {
      "language": "es-ES",
      "generate": true
    }
  ],
  "lipsyncEnabled": true,
  "burnedInCaptionsEnabled": false
}
```

**Response**

```json
{
  "data": [
    {
      "id": "string",
      "status": "queued",
      "error": {
        "type": "string",
        "title": "string",
        "status": 1,
        "code": "string",
        "detail": "string",
        "features": [
          "string"
        ],
        "instance": "string",
        "requestId": "string"
      },
      "videoId": "string",
      "language": "es-ES",
      "mode": "dubbing",
      "visibility": "private",
      "createdAt": "2024-01-15T09:30:00Z",
      "download": "string",
      "thumbnail": {
        "image": "string",
        "gif": "string"
      },
      "captions": {
        "srt": "string",
        "vtt": "string"
      },
      "done": true
    }
  ],
  "nextCursor": "string"
}
```

**SDK Code**

```python Add locales to a localization
import requests

url = "https://developers.synthesia.io/api/localizations/localization_id/locales"

payload = {
    "locales": [
        {
            "language": "es-ES",
            "generate": True
        }
    ],
    "lipsyncEnabled": True,
    "burnedInCaptionsEnabled": False
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.json())
```

```javascript Add locales to a localization
const url = 'https://developers.synthesia.io/api/localizations/localization_id/locales';
const options = {
  method: 'PUT',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"locales":[{"language":"es-ES","generate":true}],"lipsyncEnabled":true,"burnedInCaptionsEnabled":false}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Add locales to a localization
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://developers.synthesia.io/api/localizations/localization_id/locales"

	payload := strings.NewReader("{\n  \"locales\": [\n    {\n      \"language\": \"es-ES\",\n      \"generate\": true\n    }\n  ],\n  \"lipsyncEnabled\": true,\n  \"burnedInCaptionsEnabled\": false\n}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Add locales to a localization
require 'uri'
require 'net/http'

url = URI("https://developers.synthesia.io/api/localizations/localization_id/locales")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"locales\": [\n    {\n      \"language\": \"es-ES\",\n      \"generate\": true\n    }\n  ],\n  \"lipsyncEnabled\": true,\n  \"burnedInCaptionsEnabled\": false\n}"

response = http.request(request)
puts response.read_body
```

```java Add locales to a localization
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.put("https://developers.synthesia.io/api/localizations/localization_id/locales")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"locales\": [\n    {\n      \"language\": \"es-ES\",\n      \"generate\": true\n    }\n  ],\n  \"lipsyncEnabled\": true,\n  \"burnedInCaptionsEnabled\": false\n}")
  .asString();
```

```php Add locales to a localization
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://developers.synthesia.io/api/localizations/localization_id/locales', [
  'body' => '{
  "locales": [
    {
      "language": "es-ES",
      "generate": true
    }
  ],
  "lipsyncEnabled": true,
  "burnedInCaptionsEnabled": false
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Add locales to a localization
using RestSharp;

var client = new RestClient("https://developers.synthesia.io/api/localizations/localization_id/locales");
var request = new RestRequest(Method.PUT);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"locales\": [\n    {\n      \"language\": \"es-ES\",\n      \"generate\": true\n    }\n  ],\n  \"lipsyncEnabled\": true,\n  \"burnedInCaptionsEnabled\": false\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Add locales to a localization
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "locales": [
    [
      "language": "es-ES",
      "generate": true
    ]
  ],
  "lipsyncEnabled": true,
  "burnedInCaptionsEnabled": false
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://developers.synthesia.io/api/localizations/localization_id/locales")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```