> ## Documentation Index
> Fetch the complete documentation index at: https://www.octoparse.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Enregistrer l’overlay de traduction

> Créer ou mettre à jour un overlay de traduction de locale pour une app.

**`PUT`** `https://api-datahub.octoparse.com/v1/data-apps/{app_id}/translations/{locale}`

Authentification : clé API requise (`Authorization: Bearer <API Key>`). Auteur de l’app uniquement.

Écrit les champs de carte et le README optionnel d’une locale. La baseline de hash est le workspace (retombe sur la dernière release s’il n’y a pas de brouillon).

## Requête

<ParamField path="app_id" type="string" required>
  champ
</ParamField>

<ParamField path="locale" type="string" required>
  Code de locale.
</ParamField>

<ParamField body="entries" type="object" required>
  champ
</ParamField>

<ParamField body="expected_revision" type="integer">
  champ
</ParamField>

### Exemple de requête

```bash theme={null}
curl -X PUT \
  -H "Authorization: Bearer $OCTOPARSE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"entries": {"identity.name": "Product Review Lookup", "identity.summary": "Fetch public reviews by product id"}, "readme": "# Product Review Lookup\n…"}' \
  "https://api-datahub.octoparse.com/v1/data-apps/carol/reviews-query/translations/en"
```

## Réponse

### 200 succès

```json theme={null}
{
  "data": {
    "locale": "string",
    "origin": "author",
    "revision": 0,
    "based_on_version": "string",
    "based_on_hash": "string",
    "stale": false,
    "stale_paths": [
      "string"
    ],
    "warnings": [
      {
        "code": "string",
        "params": {}
      }
    ]
  }
}
```

### Erreurs

| HTTP | `code`         | `category`  | Description                                                         |
| ---- | -------------- | ----------- | ------------------------------------------------------------------- |
| 401  | `unauthorized` | `forbidden` | Clé API manquante ou invalide.                                      |
| 404  | `*-not-found`  | `not_found` | La cible n’existe pas ou est invisible pour la credential actuelle. |

Les réponses d’erreur utilisent `{"error": {code, category, message, retryable}}`. Voir <a href="/docs/fr/datahub/api/reference/introduction#errors">Erreurs</a>.

## Bibliothèques clientes

Les SDK Python et JavaScript n’encapsulent pas encore cet endpoint. Appelez REST directement.
