Skip to main content
POST
/
v1
/
sites
/
{siteId}
/
routes
Create Route
curl --request POST \
  --url https://8511e6e5e351.ngrok-free.app/v1/sites/{siteId}/routes \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "pathname": "/furniture",
  "localizedVariants": [
    {
      "locale": "es-ES",
      "pathname": "/sobre-nosotros"
    },
    {
      "locale": "fr-FR",
      "pathname": "/a-propos"
    }
  ]
}'
{
  "id": "37b18c41-9752-4adf-9aef-f42ab4f74b04",
  "pathname": "/about",
  "localizedVariants": [
    {
      "locale": "es-MX",
      "pathname": "/muebles"
    },
    {
      "locale": "fr-CA",
      "pathname": "/meubles"
    }
  ]
}

Authorizations

Authorization
string
header
required

The API key for the App (e.g. sk_eczMHVBY9fV6GYFhvs53qcnxq7yptlXL3ABKOZtn6dQ)

Path Parameters

siteId
string<uuid>
required

Query Parameters

skipValidation
enum<string>

If true, skips validation of the route, such as pathname format. This is useful for testing or when the route is known to be valid.

Available options:
true,
false

Body

application/json

Request body for creating a new site route.

pathname
string
required

Pathname of the route, e.g., "/about".

Example:

"/furniture"

localizedVariants
object[]

List of localized variants for the route. If not provided, defaults to an empty array.

Example:
[
{
"locale": "es-ES",
"pathname": "/sobre-nosotros"
},
{
"locale": "fr-FR",
"pathname": "/a-propos"
}
]

Response

201 - application/json

Site route with its localized variants.

id
string<uuid>
required
pathname
string
required

Pathname of the route, e.g., "/about".

Example:

"/furniture"

localizedVariants
object[]
required

List of localized variants for the route. Each variant has a locale and a pathname.

Example:
[
{
"locale": "es-ES",
"pathname": "/sobre-nosotros"
},
{
"locale": "fr-FR",
"pathname": "/a-propos"
}
]