# Copy variable to another locale

**Publié le** : 2026-05-08
**Catégorie** : Core CMS

## `POST /variables/:id/copy-to-locale`

**Copy variable to another locale**

Creates a translated copy of this variable in the target locale.

Required permissions: `variables.create`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | Yes | Unique identifier |


### Request Body

Content-Type: `application/json`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `targetLocale` | string | Yes | Required |


### Responses

| Status | Description |
| --- | --- |
| `200` | Successful response |
| `401` | Unauthorized — invalid or missing API token |
| `403` | Forbidden — insufficient permissions |
| `404` | Not found |
| `422` | Validation error |


### Examples

```bash
curl -X POST https://api.lynkow.com/v1/variables/1/copy-to-locale \
  -H "Authorization: Bearer $API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"locale": "fr"}'
```

### Response Example

```json
{
  "data": {
    "id": 50,
    "key": "company_name",
    "value": "Acme Corp",
    "type": "text",
    "locale": "fr",
    "createdAt": "2025-04-06T15:00:00.000Z",
    "updatedAt": "2025-04-06T15:00:00.000Z"
  }
}
```

---