v1

Quickstart

Your first call

After creating an API key, call the API with X-API-Key.

Base URLs

REST API:

https://<project-ref>.supabase.co/functions/v1/api-gateway/v1

OGC API - Features:

https://<project-ref>.supabase.co/functions/v1/api-gateway/oapif

Replace <project-ref> with your Supabase project reference.

List records

curl -H "X-API-Key: mk_live_your_key_here" \
  "https://<ref>.supabase.co/functions/v1/api-gateway/v1/records?per_page=5"

Response format

{
  "ok": true,
  "data": [
    {
      "id": "8ba2dac9-2f85-4b36-9b8f-2da8c9a7f4a0",
      "type": "record",
      "form_id": "df7991ef-4a6f-48f4-9f1d-0fd4f53c9a77",
      "project_id": "c328e46a-8fb9-41f1-a5f9-3dca9a894ab3",
      "form_version_id": "e5d3f7bc-ec9c-457b-8f2f-9ab8e76b519c",
      "properties": {
        "name": "Inspection #42",
        "status_field": "completed"
      },
      "geometry": {
        "type": "Point",
        "coordinates": [-73.985, 40.758]
      },
      "created_at": "2026-02-20T09:00:00Z",
      "updated_at": "2026-02-20T09:15:00Z",
      "status": "active"
    }
  ],
  "pagination": {
    "total": 142,
    "page": 1,
    "per_page": 5,
    "total_pages": 29
  }
}

Pagination

Parameter Default Max Description
page 1 -- Page number
per_page 50 500 Items per page

Safe retries for writes

Use Idempotency-Key on POST and PUT calls.

curl -X POST \
  -H "X-API-Key: mk_live_..." \
  -H "Idempotency-Key: rec-create-001" \
  -H "Content-Type: application/json" \
  -d '{"form_id":"...","properties":{"name":"Example"}}' \
  "https://<ref>.supabase.co/functions/v1/api-gateway/v1/records"

Connection check

Use an authenticated endpoint to verify connectivity:

curl -H "X-API-Key: mk_live_..." \
  "https://<ref>.supabase.co/functions/v1/api-gateway/v1/organization"

Next steps

Precisa de ajuda com a API? Entre em contato com nossa equipe de suporte.

Comece Grátis