For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Sign in
DocsAPI ReferenceChangelog
DocsAPI ReferenceChangelog
    • Overview
    • Authentication
  • REST
Sign in
LogoLogo
On this page
  • Base URL
  • Authentication
  • Resources
  • Response format
  • Pagination
  • Rate Limits
  • Errors
  • 400 Bad Request
  • 401 Unauthorized
  • 403 Forbidden
  • 404 Not Found
  • 409 Conflict
  • 429 Too Many Requests

Overview

Beta
Was this page helpful?
Next

Authentication

Built with

Programmatically manage your Makeswift sites, pages, and locales.

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

Response format

All responses return JSON. Successful responses include an object field indicating the resource type:

1{
2 "object": "site",
3 "id": "550e8400-e29b-41d4-a716-446655440000",
4 "name": "My Site"
5}

List endpoints return paginated results:

1{
2 "object": "list",
3 "data": [...],
4 "hasMore": true
5}

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.

1{
2 "object": "error",
3 "code": "bad_request",
4 "message": "Invalid request parameters",
5 "details": [
6 {
7 "field": "name",
8 "message": "Name is required"
9 }
10 ]
11}

401 Unauthorized

Returned when the API key is missing or invalid.

1{
2 "object": "error",
3 "code": "unauthorized",
4 "message": "Invalid or missing API key"
5}

403 Forbidden

Returned when the API key is valid but lacks permission to access the resource.

1{
2 "object": "error",
3 "code": "forbidden",
4 "message": "You do not have permission to access this resource"
5}

404 Not Found

Returned when the requested resource doesn’t exist.

1{
2 "object": "error",
3 "code": "not_found",
4 "message": "Site not found"
5}

409 Conflict

Returned when attempting to create a resource that already exists.

1{
2 "object": "error",
3 "code": "conflict",
4 "message": "A page with this path already exists"
5}

429 Too Many Requests

Returned when the rate limit is exceeded.

1{
2 "object": "error",
3 "code": "too_many_requests",
4 "message": "Rate limit exceeded"
5}