Create a country
Creates a country. See the validation note in info: the ISO length and required rules in the model do not execute.
Authorization
bearerAuth In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Body of POST /v1/countries. See the note in info: these constraints are not enforced server-side.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/countries" \ -H "Content-Type: application/json" \ -d '{ "iso_alpha_2": "CH", "iso_alpha_3": "CHE", "iso_numeric": "756", "name": "string" }'{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"iso_alpha_2": "CH",
"iso_alpha_3": "CHE",
"iso_numeric": "756",
"icon": "string",
"icon_url": "string",
"emoji": "🇨🇭",
"phone_prefix": "+41",
"order": 999,
"tags": [
"string"
],
"iban_length": 0,
"name": "Switzerland",
"description": "string",
"created_at": "2019-08-24T14:15:22Z",
"created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",
"modified_at": "2019-08-24T14:15:22Z",
"modified_by": "e8d4374d-93a1-4e98-a6c6-fdcf00c5059f",
"active": true,
"metadata": {}
}{
"status": 404,
"message": "Country not found",
"code": "countries_m.country_not_found",
"class": "business",
"retryable": true,
"details": [
{
"field": "string",
"rule": "string",
"param": "string",
"message": "string"
}
]
}{
"status": 404,
"message": "Country not found",
"code": "countries_m.country_not_found",
"class": "business",
"retryable": true,
"details": [
{
"field": "string",
"rule": "string",
"param": "string",
"message": "string"
}
]
}{
"status": 404,
"message": "Country not found",
"code": "countries_m.country_not_found",
"class": "business",
"retryable": true,
"details": [
{
"field": "string",
"rule": "string",
"param": "string",
"message": "string"
}
]
}{
"status": 429,
"message": "rate limit exceeded",
"code": "rate_limits_m.exceeded",
"class": "temporary",
"retryable": true
}{
"status": 404,
"message": "Country not found",
"code": "countries_m.country_not_found",
"class": "business",
"retryable": true,
"details": [
{
"field": "string",
"rule": "string",
"param": "string",
"message": "string"
}
]
}{
"overall_status": "unhealthy",
"message": "Service is shutting down",
"timestamp": "2026-08-27T15:04:05.123456789+02:00"
}Description
Previous Page
Returns a BARE ARRAY of countries ordered by order, then name — not the paginated envelope; /v2/countries is the enveloped surface. icon_url is computed per row from the AppConfig icon pattern. The filter contract is not what its name suggests: filter omitted or empty returns ALL countries, filter=all returns all, and ANY OTHER non-empty value returns only active ones. So filter=active and filter=nonsense behave identically, and the struct comment in the service ("'all' to get all countries, otherwise only active") does not mention that the empty case also returns all.