API & WebhooksForms

Forms

List forms, get form details, list submissions, get submission, and delete submissions via the API.

Forms API

Access form data and submissions programmatically. Requires an API token with forms.view or submissions.* abilities.


List Forms

GET /api/v1/forms — Permission: forms.view

Query Parameters

ParameterTypeRequiredDescription
searchstringNoSearch by form name
statusstringNoFilter by status
per_pageintegerNoResults per page, 1–100 (default: 25)

Example Request

curl -X GET "https://your-domain.com/api/v1/forms" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json"

Example Response

{
  "data": [
    {
      "id": 1,
      "name": "Contact Form",
      "slug": "contact-form",
      "description": "Main website contact form",
      "status": "published",
      "is_active": true,
      "field_count": 5,
      "submission_count": 142,
      "created_at": "2025-03-15T10:00:00.000000Z",
      "updated_at": "2025-03-15T10:00:00.000000Z"
    }
  ],
  "meta": { "current_page": 1, "last_page": 1, "per_page": 25, "total": 1 },
  "links": { "first": "...", "last": "...", "prev": null, "next": null }
}

Get Form

GET /api/v1/forms/{id} — Permission: forms.view

Returns form details including all fields.

Example Request

curl -X GET "https://your-domain.com/api/v1/forms/1" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json"

Example Response

{
  "data": {
    "id": 1,
    "name": "Contact Form",
    "slug": "contact-form",
    "description": "Main website contact form",
    "status": "published",
    "is_active": true,
    "field_count": 3,
    "submission_count": 142,
    "fields": [
      { "id": 1, "key": "full_name", "label": "Full Name", "type": "text", "is_required": true, "position": 0 },
      { "id": 2, "key": "email", "label": "Email", "type": "email", "is_required": true, "position": 1 },
      { "id": 3, "key": "message", "label": "Message", "type": "textarea", "is_required": false, "position": 2 }
    ],
    "created_at": "2025-03-15T10:00:00.000000Z",
    "updated_at": "2025-03-15T10:00:00.000000Z"
  }
}

List Submissions

GET /api/v1/forms/{id}/submissions — Permission: submissions.view

Query Parameters

ParameterTypeRequiredDescription
statusstringNoFilter by status
is_starredbooleanNoFilter starred submissions
per_pageintegerNoResults per page, 1–100 (default: 25)

Example Request

curl -X GET "https://your-domain.com/api/v1/forms/1/submissions?per_page=10" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json"

Example Response

{
  "data": [
    {
      "id": 42,
      "form_id": 1,
      "data": { "full_name": "John Smith", "email": "john@example.com", "message": "Hello!" },
      "status": "complete",
      "is_read": true,
      "is_starred": false,
      "contact_id": 15,
      "submitted_at": "2025-06-01T14:30:00.000000Z",
      "created_at": "2025-06-01T14:28:00.000000Z"
    }
  ],
  "meta": { "current_page": 1, "last_page": 5, "per_page": 10, "total": 42 },
  "links": { "first": "...", "last": "...", "prev": null, "next": "..." }
}

Get Submission

GET /api/v1/forms/{id}/submissions/{submissionId} — Permission: submissions.view

Returns the same shape as a single item in the list response.


Delete Submission

DELETE /api/v1/forms/{id}/submissions/{submissionId} — Permission: submissions.delete

Example Request

curl -X DELETE "https://your-domain.com/api/v1/forms/1/submissions/42" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json"

Returns 204 No Content on success.

Was this article helpful?