Skip to main content
POST
/
v2
/
locales
Create Locale
curl --request POST \
  --url https://api.makeswift.com/v2/locales \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "siteId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "locale": "es-ES",
  "domain": "https://hearthfurniture.com.mx"
}
'
{
  "object": "locale",
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "locale": "<string>",
  "domain": "https://hearthfurniture.com.mx",
  "isDefault": true
}

Authorizations

x-api-key
string
header
required

The App API key.

(e.g. sk_eczMHVBY9fV6GYFhvs53qcnxq7yptlXL3ABKOZtn6dQ)

Body

application/json
siteId
string<uuid>
required

The site ID to create the locale for.

locale
string
required

Locale of the site locale.

Example:

"es-ES"

domain
string<uri>

The domain URL for domain-based localization. This URL must include the protocol.

Example:

"https://hearthfurniture.com.mx"

Response

object
enum<string>
required
Available options:
locale
Example:

"locale"

id
string<uuid>
required

The ID of the created locale.

locale
string
required

We support the subset of locales specified with ISO 3166 that are composed of language and optionally a region.

Examples:

"en"

"es"

"fr-FR"

"ar-EG"

"ja-JP"

domain
null
required

The domain URL for domain-based localization.

Example:

"https://hearthfurniture.com.mx"

isDefault
boolean
required

The flag that indicates whether this locale is the default locale for the site.