Sets the source text, description or maximum translation length of a key. Send only what changes.
HTTP
PATCH /keys/{keyId}Access: Session token, or an API key with the keys:write scope.
Role: Any role in the project; changing an existing source text or the maximum length needs the manager role.
Path parameters #
| Parameter | Description |
|---|---|
keyId | The id of the key. |
Request body #
JSON.
| Field | Type | Required | Description |
|---|---|---|---|
source | string | no | The new source text. At most 5000 characters. |
description | string | no | A description for translators. At most 1000 characters. |
maxLength | integer or null | no | The longest allowed translation, in characters, from 1 to 5000. null removes the limit. |
JSON
{ "source": "Check out" }Response 200 #
The key.
JSON
{ "id": "0197a3c9-7086-7d77-8ace-2e6b8f3d5097", "name": "checkout.title", "source": "Check out", "maxLength": null }Response fields #
| Field | Type | Description |
|---|---|---|
id | string | The id of the key. |
name | string | The name. |
source | string or null | The source text. |
maxLength | integer or null | The longest allowed translation, or null for no limit. |
Errors #
| Status | error | When |
|---|---|---|
| 401 | unauthenticated | The token is missing or not valid. |
| 404 | not_found | The key does not exist, you have no access to its project, or keyId is not a UUID. |
| 409 | branch_frozen | The branch is frozen. The same call also fails with project_frozen when the project is frozen. |
| 403 | forbidden | You change an existing source text or maxLength and you are not a manager. |
| 422 | invalid_request | source is empty or too long, or maxLength is not a whole number from 1 to 5000. |
| 429 | rate_limited | Too many requests, see Rate limiting. |
See Errors for the error format.