Translations endpoints (Admin API)
11 FeatherPanel Admin API endpoints from admin/translations.php: methods, paths, auth, permissions, rate limits, parameters and responses.
Last synced from FeatherPanel 15b94e9 on .
On this page
Defined in backend/app/routes/admin/translations.php. Authentication used here: Admin. Read Authentication for how to send credentials and 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
List translation files Get a list of all available translation files
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
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) |
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}
Get translation file Get the content of a specific translation file
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
lang | path | string | yes | Language code |
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}
Update translation file Update the content of a translation file
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
lang | path | string | yes | Language code |
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}
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 |
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}
Delete translation file Delete a translation file
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
lang | path | string | yes | Language code |
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
Download translation file Download a translation file as JSON
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
lang | path | string | yes | Language code |
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
Get enabled languages Get the list of enabled language codes
Response data field | Type | Description |
|---|---|---|
enabled | string[] |
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
Set enabled languages Set which languages are enabled. Empty array means all languages are enabled.
| Body field | Type | Required | Description |
|---|---|---|---|
enabled | string[] | no |
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
Enable language Enable a specific language
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
lang | path | string | yes | Language code |
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
Disable language Disable a specific language. English cannot be disabled.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
lang | path | string | yes | Language code |
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