v1 GET

Forms & Projects

Forms

Forms define the structure of your field data. Each form has a versioned schema (JSON) that describes its fields.

GET /v1/forms

List all forms in your organization.

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

Query parameters:

Parameter Description
project_id Filter by project
page Page number (default 1)
per_page Items per page (default 50, max 500)

Response:

{
  "ok": true,
  "data": [
    {
      "id": "frm_xyz",
      "type": "form",
      "project_id": "prj_456",
      "name": "Bridge Inspection",
      "description": "Standard bridge condition assessment",
      "is_active": true,
      "created_at": "2026-01-10T09:00:00Z",
      "updated_at": "2026-02-14T11:30:00Z"
    }
  ],
  "pagination": { "total": 12, "page": 1, "per_page": 50, "total_pages": 1 }
}

GET /v1/forms/:id

Get a single form with its published schema.

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

Response:

{
  "ok": true,
  "data": {
    "id": "frm_xyz",
    "type": "form",
    "name": "Bridge Inspection",
    "description": "Standard bridge condition assessment",
    "is_active": true,
    "version": 3,
    "version_id": "fv_789",
    "schema": {
      "fields": [
        {"key": "inspector_name", "type": "text", "label": "Inspector Name", "required": true},
        {"key": "condition", "type": "single_choice", "label": "Condition", "options": ["good", "fair", "poor"]},
        {"key": "temperature", "type": "number", "label": "Temperature (C)"},
        {"key": "photo", "type": "photo", "label": "Site Photo"}
      ]
    },
    "created_at": "2026-01-10T09:00:00Z",
    "updated_at": "2026-02-14T11:30:00Z"
  }
}

The schema.fields array describes each form field. Use the key values as property keys when creating records.


Projects

Projects group forms and records together.

GET /v1/projects

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

Response:

{
  "ok": true,
  "data": [
    {
      "id": "prj_456",
      "type": "project",
      "name": "Highway 101 Survey",
      "description": "Q1 2026 infrastructure assessment",
      "created_at": "2026-01-05T08:00:00Z",
      "updated_at": "2026-02-10T15:00:00Z"
    }
  ],
  "pagination": { "total": 3, "page": 1, "per_page": 50, "total_pages": 1 }
}

GET /v1/projects/:id

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

Besoin d'aide avec l'API ? Contactez notre équipe support.

Commencer Gratuitement