API Reference

REST & GraphQL API

Auto-generated from your schema. Available immediately, versioned, and fully spec-compliant.

Authentication required

All API requests must include your apikey header and, for protected routes, a valid Authorization: Bearer TOKEN header. Find your keys in your project Settings → API.

GET/rest/v1/{table}
POST/rest/v1/{table}
PATCH/rest/v1/{table}?id=eq.{id}
DELETE/rest/v1/{table}?id=eq.{id}

Example request & response

Request
curl -X GET \
  'https://your-project.swifton.io/rest/v1/users?limit=10&order=created_at.desc' \
  -H 'Authorization: Bearer YOUR_ANON_KEY' \
  -H 'apikey: YOUR_ANON_KEY'
Response · 200 OK
[
  {
    "id": "usr_01h9f3...",
    "email": "alice@example.com",
    "created_at": "2024-03-15T12:00:00Z",
    "updated_at": "2024-03-15T12:00:00Z"
  },
  {
    "id": "usr_01h9f4...",
    "email": "bob@example.com",
    "created_at": "2024-03-14T09:30:00Z",
    "updated_at": "2024-03-14T09:30:00Z"
  }
]