View .md

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

Auth: AdminPermission: admin.rootRoute name: admin-translations-listController: TranslationsController::listroute source

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

Auth: AdminPermission: admin.rootRoute name: admin-translations-uploadController: TranslationsController::uploadroute source

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

Body fieldTypeRequiredDescription
filestring (binary)yesTranslation 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}

Auth: AdminPermission: admin.rootRoute name: admin-translations-getController: TranslationsController::getroute source

Get translation file Get the content of a specific translation file

ParameterInTypeRequiredDescription
langpathstringyesLanguage 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}

Auth: AdminPermission: admin.rootRoute name: admin-translations-updateController: TranslationsController::updateroute source

Update translation file Update the content of a translation file

ParameterInTypeRequiredDescription
langpathstringyesLanguage 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}

Auth: AdminPermission: admin.rootRoute name: admin-translations-createController: TranslationsController::createroute source

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

ParameterInTypeRequiredDescription
langpathstringyesLanguage 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}

Auth: AdminPermission: admin.rootRoute name: admin-translations-deleteController: TranslationsController::deleteroute source

Delete translation file Delete a translation file

ParameterInTypeRequiredDescription
langpathstringyesLanguage 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

Auth: AdminPermission: admin.rootRoute name: admin-translations-downloadController: TranslationsController::downloadroute source

Download translation file Download a translation file as JSON

ParameterInTypeRequiredDescription
langpathstringyesLanguage 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

Auth: AdminPermission: admin.rootRoute name: admin-translations-enabled-getController: TranslationsController::getEnabledroute source

Get enabled languages Get the list of enabled language codes

Response data fieldTypeDescription
enabledstring[]
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: AdminPermission: admin.rootRoute name: admin-translations-enabled-setController: TranslationsController::setEnabledroute source

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

Body fieldTypeRequiredDescription
enabledstring[]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

Auth: AdminPermission: admin.rootRoute name: admin-translations-enableController: TranslationsController::enableLanguageroute source

Enable language Enable a specific language

ParameterInTypeRequiredDescription
langpathstringyesLanguage 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

Auth: AdminPermission: admin.rootRoute name: admin-translations-disableController: TranslationsController::disableLanguageroute source

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

ParameterInTypeRequiredDescription
langpathstringyesLanguage 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