Add a language
post
https://api.flactrum.com/v1/languages
| Required scope | languages.write |
| Success status | 201 |
| Returns | One Language object |
Request body
| Field | Type | Description |
|---|---|---|
| code * | string | ISO code, optionally with a region: en, en-GB. |
| name * | string | — |
| is_default | boolean | Only one language is the default; marking a new one clears the old. |
| is_active | boolean | — |
| sort_order | integer | — |
Response fields
| Field | Type | Description |
|---|---|---|
| id | string | — |
| code | string | — |
| name | string | — |
| is_default | boolean | The default language stores its text on the record itself, not as a translation. |
| is_active | boolean | — |
| sort_order | integer | — |
Examples
Recorded from the test suite — these are real requests and their real responses.
curl -X POST 'https://api.flactrum.com/v1/languages' \
-H 'Authorization: Bearer flk_your_key:your_secret' \
-H 'Content-Type: application/json' \
-d '{
"code": "tr",
"name": "Türkçe",
"is_default": true
}'
HTTP 201 · application/json
{
"data": {
"id": "01m43sk7fbqtxmaman5307db0q",
"code": "tr",
"name": "Türkçe",
"is_default": true,
"is_active": true,
"sort_order": 0,
"created_at": "2026-10-04T15:47:50+00:00",
"updated_at": "2026-10-04T15:47:50+00:00"
}
}