# Translations endpoints (Admin API)

> 11 FeatherPanel Admin API endpoints from admin/translations.php: methods, paths, auth, permissions, rate limits, parameters and responses.

Source: https://featherpanel.com/docs/api/reference/admin/translations/

Defined in [`backend/app/routes/admin/translations.php`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/translations.php). Authentication used here: **Admin**. Read [Authentication](https://featherpanel.com/docs/api/authentication/) for how to send credentials and [Rate limits and errors](https://featherpanel.com/docs/api/rate-limits-and-errors/) for the response envelope.

Paths, methods, permissions and rate limits come from the route file. Summaries, parameters and response codes come from the OpenAPI annotations on the controllers; endpoints without annotations show only what the route file declares.

## Endpoints

### GET `/api/admin/translations`

- Auth: Admin
- Permission: `admin.root`
- Route name: `admin-translations-list`
- Controller: [`TranslationsController::list`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/TranslationsController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/translations.php#L26)

**List translation files** Get a list of all available translation files

```bash
curl -X GET "$PANEL_URL/api/admin/translations" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"
```

Responses: `200` Translation files retrieved successfully

### POST `/api/admin/translations/upload`

- Auth: Admin
- Permission: `admin.root`
- Route name: `admin-translations-upload`
- Controller: [`TranslationsController::upload`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/TranslationsController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/translations.php#L38)

**Upload translation file** Upload a JSON translation file. The language code will be extracted from the filename.

| Body field | Type | Required | Description |
| --- | --- | --- | --- |
| `file` | string (binary) | yes | Translation JSON file (e.g., de.json) |

```bash
curl -X POST "$PANEL_URL/api/admin/translations/upload" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json" \
  -F "file=@./file"
```

Responses: `200` Translation file uploaded successfully · `400` Invalid file or request · `500` Failed to save translation file

### GET `/api/admin/translations/{lang}`

- Auth: Admin
- Permission: `admin.root`
- Route name: `admin-translations-get`
- Controller: [`TranslationsController::get`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/TranslationsController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/translations.php#L50)

**Get translation file** Get the content of a specific translation file

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `lang` | path | string | yes | Language code |

```bash
curl -X GET "$PANEL_URL/api/admin/translations/$LANG" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"
```

Responses: `200` Translation file retrieved successfully · `404` Translation file not found

### PUT `/api/admin/translations/{lang}`

- Auth: Admin
- Permission: `admin.root`
- Route name: `admin-translations-update`
- Controller: [`TranslationsController::update`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/TranslationsController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/translations.php#L67)

**Update translation file** Update the content of a translation file

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `lang` | path | string | yes | Language code |

```bash
curl -X PUT "$PANEL_URL/api/admin/translations/$LANG" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"
```

Responses: `200` Translation file updated successfully · `400` Invalid request · `500` Failed to save translation file

### POST `/api/admin/translations/{lang}`

- Auth: Admin
- Permission: `admin.root`
- Route name: `admin-translations-create`
- Controller: [`TranslationsController::create`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/TranslationsController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/translations.php#L84)

**Create translation file** Create a new translation file. If no content is provided, copies English translations as a base.

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `lang` | path | string | yes | Language code |

```bash
curl -X POST "$PANEL_URL/api/admin/translations/$LANG" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"
```

Responses: `200` Translation file created successfully · `400` Invalid request · `409` Translation file already exists

### DELETE `/api/admin/translations/{lang}`

- Auth: Admin
- Permission: `admin.root`
- Route name: `admin-translations-delete`
- Controller: [`TranslationsController::delete`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/TranslationsController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/translations.php#L101)

**Delete translation file** Delete a translation file

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `lang` | path | string | yes | Language code |

```bash
curl -X DELETE "$PANEL_URL/api/admin/translations/$LANG" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"
```

Responses: `200` Translation file deleted successfully · `404` Translation file not found

### GET `/api/admin/translations/{lang}/download`

- Auth: Admin
- Permission: `admin.root`
- Route name: `admin-translations-download`
- Controller: [`TranslationsController::download`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/TranslationsController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/translations.php#L118)

**Download translation file** Download a translation file as JSON

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `lang` | path | string | yes | Language code |

```bash
curl -X GET "$PANEL_URL/api/admin/translations/$LANG/download" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"
```

Responses: `200` Translation file downloaded · `404` Translation file not found

### GET `/api/admin/translations/enabled`

- Auth: Admin
- Permission: `admin.root`
- Route name: `admin-translations-enabled-get`
- Controller: [`TranslationsController::getEnabled`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/TranslationsController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/translations.php#L135)

**Get enabled languages** Get the list of enabled language codes

| Response `data` field | Type | Description |
| --- | --- | --- |
| `enabled` | string\[\] |  |

```bash
curl -X GET "$PANEL_URL/api/admin/translations/enabled" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"
```

Responses: `200` Enabled languages retrieved successfully

### PUT `/api/admin/translations/enabled`

- Auth: Admin
- Permission: `admin.root`
- Route name: `admin-translations-enabled-set`
- Controller: [`TranslationsController::setEnabled`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/TranslationsController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/translations.php#L147)

**Set enabled languages** Set which languages are enabled. Empty array means all languages are enabled.

| Body field | Type | Required | Description |
| --- | --- | --- | --- |
| `enabled` | string\[\] | no |  |

```bash
curl -X PUT "$PANEL_URL/api/admin/translations/enabled" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"enabled":[]}'
```

Responses: `200` Enabled languages updated successfully · `400` Invalid request

### POST `/api/admin/translations/{lang}/enable`

- Auth: Admin
- Permission: `admin.root`
- Route name: `admin-translations-enable`
- Controller: [`TranslationsController::enableLanguage`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/TranslationsController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/translations.php#L159)

**Enable language** Enable a specific language

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `lang` | path | string | yes | Language code |

```bash
curl -X POST "$PANEL_URL/api/admin/translations/$LANG/enable" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"
```

Responses: `200` Language enabled successfully · `400` Invalid language code

### POST `/api/admin/translations/{lang}/disable`

- Auth: Admin
- Permission: `admin.root`
- Route name: `admin-translations-disable`
- Controller: [`TranslationsController::disableLanguage`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/TranslationsController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/translations.php#L176)

**Disable language** Disable a specific language. English cannot be disabled.

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `lang` | path | string | yes | Language code |

```bash
curl -X POST "$PANEL_URL/api/admin/translations/$LANG/disable" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"
```

Responses: `200` Language disabled successfully · `400` Invalid language code or cannot disable English
