
# Set text overrides

`PUT /v1/branding/texts/{screen}/{locale}` · permission `branding:write`

Writes text overrides for one screen and locale; keys in the body are added or replaced, other keys are kept. Only keys of the built-in catalog can be overridden, and a value must keep the catalog text's `{{ placeholders }}`. Control and bidirectional control characters are rejected. Security texts cannot be overridden: the consent screen, device and sign-out confirmation, the recovery code warning and the preview banner. Takes effect on publish.

## Request

| Field | Type | Required | Description |
|---|---|---|---|
| `screen` | path | yes | Hosted page screen (e.g. `login`, `authorize`). |
| `locale` | path | yes | Supported locale (e.g. `en`, `tr`). |
| `application_id` | query | no | Application scope (`app_…`). Without it and `org_id` the environment scope is used. |
| `org_id` | query | no | Organization scope (`org_…`). Cannot be combined with `application_id`. |
| `texts` | object | yes | Key → value, 1-500 keys, each value 1-1000 characters. |

## Response

`200 OK` with every override of the scope, screen and locale.

```json
{"screen": "login", "locale": "tr", "texts": {"title": "Hoş geldiniz"}}
```

## Errors

| HTTP | code | When |
|---|---|---|
| 400 | `unknown_field` | The body has an unknown field or is not a JSON object. |
| 404 | `not_found` | The `application_id` or `org_id` is malformed, or the application does not exist in this environment. |
| 422 | `validation_failed` | `texts` is missing or empty, a key is unknown (`unknown_text_key`), a placeholder is missing (`placeholder_mismatch`), the locale is unsupported or a value is invalid; `pointer` is `/texts/<key>`. Both `application_id` and `org_id` were given (`mutually_exclusive`), or one was repeated (`repeated`). |
| 401 | `unauthenticated` | The credential is missing, invalid or revoked. |
| 403 | `insufficient_permissions` | The credential lacks the required permission. |
| 429 | `rate_limited` | The rate limit was exceeded; retry after the `Retry-After` period. |
| 503 | `service_unavailable` | A dependency is temporarily unavailable; retry after the `Retry-After` period. |

## Example

```bash
curl -X PUT "https://api.eu.keenauth.com/v1/branding/texts/login/tr" \
  -H "Authorization: Bearer $KEENAUTH_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{"texts":{"title":"Hoş geldiniz"}}'
```
