Skip to main content
POST
/
v2
/
routes
Create Route
curl --request POST \
  --url https://api.makeswift.com/v2/routes \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "siteId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "pathname": "/furniture"
}
'
{
  "object": "route",
  "id": "37b18c41-9752-4adf-9aef-f42ab4f74b04",
  "pathname": "/furniture"
}

Authorizations

x-api-key
string
header
required

The App API key.

(e.g. sk_eczMHVBY9fV6GYFhvs53qcnxq7yptlXL3ABKOZtn6dQ)

Query Parameters

skipValidation
enum<string>

The flag that determines whether to skip route validation. Useful when an external system has a different way of validating routes than Makeswift.

Available options:
true,
false

Body

application/json

The request body for creating a new route.

siteId
string<uuid>
required

The site ID to create the route for.

pathname
string
required

The route pathname.

Example:

"/furniture"

Response

The route.

object
enum<string>
required
Available options:
route
id
string<uuid>
required

The ID of the route.

pathname
string
required

The route pathname.

Example:

"/furniture"