Skip to main content
The Makeswift REST API allows you to programmatically manage your Makeswift resources. Use it to automate workflows, integrate with external systems, or build custom tooling.

Base URL

All API requests should be made to:
https://api.makeswift.com

Authentication

Authenticate requests by including an App API key in the x-api-key header:
curl https://api.makeswift.com/v2/sites \
  -H "x-api-key: your-api-key"
See the Authentication guide to learn how to create an app and get your API key.

Resources

ResourceDescription
SitesCreate, read, update, delete, and duplicate sites
LocalesConfigure localization settings
PagesManage pages within a site
RoutesDefine external routes for your site

Response format

All responses return JSON. Successful responses include an object field indicating the resource type:
{
  "object": "site",
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "My Site"
}
List endpoints return paginated results:
{
  "object": "list",
  "data": [...],
  "hasMore": true
}

Pagination

List endpoints support cursor-based pagination using the following query parameters:
ParameterTypeDefaultDescription
limitnumber20Number of results to return (max 100)
startingAfterstring-Cursor for fetching results after a specific resource ID
To paginate through results:
  1. Make an initial request without the startingAfter parameter
  2. If hasMore is true, use the id of the last item in data as the startingAfter parameter for the next request
  3. Repeat until hasMore is false
# First page
curl "https://api.makeswift.com/v2/sites/YOUR_SITE_ID/pages?limit=10" \
  -H "x-api-key: your-api-key"

# Next page (using the last page ID from previous response)
curl "https://api.makeswift.com/v2/sites/YOUR_SITE_ID/pages?limit=10&startingAfter=550e8400-e29b-41d4-a716-446655440000" \
  -H "x-api-key: your-api-key"

Rate Limits

The API implements rate limiting per authentication credential (API key or Bearer token) to ensure fair usage and protect service stability. Rate limits may be adjusted over time.

Errors

The API uses standard HTTP status codes and returns consistent error responses:
StatusDescription
200Success
201Created
400Bad request - check your parameters
401Unauthorized - invalid or missing API key
403Forbidden - insufficient permissions
404Not found
409Conflict - resource already exists
429Too many requests - rate limit exceeded

400 Bad Request

Returned when the request body or query parameters are invalid.
{
  "object": "error",
  "code": "bad_request",
  "message": "Invalid request parameters",
  "details": [
    {
      "field": "name",
      "message": "Name is required"
    }
  ]
}

401 Unauthorized

Returned when the API key is missing or invalid.
{
  "object": "error",
  "code": "unauthorized",
  "message": "Invalid or missing API key"
}

403 Forbidden

Returned when the API key is valid but lacks permission to access the resource.
{
  "object": "error",
  "code": "forbidden",
  "message": "You do not have permission to access this resource"
}

404 Not Found

Returned when the requested resource doesn’t exist.
{
  "object": "error",
  "code": "not_found",
  "message": "Site not found"
}

409 Conflict

Returned when attempting to create a resource that already exists.
{
  "object": "error",
  "code": "conflict",
  "message": "A page with this path already exists"
}

429 Too Many Requests

Returned when the rate limit is exceeded.
{
  "object": "error",
  "code": "too_many_requests",
  "message": "Rate limit exceeded"
}