4 endpoints. Send your API key as Authorization: Bearer <key> on each request; see The API and AI assistants for keys, errors, idempotency and the conventions every endpoint shares.
GET /api/projects/{id}/forms
The project's intake forms, each with its public url
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | integer | Yes | From 1 to 2147483647. |
Responses:
| Status | Meaning |
|---|---|
| 200 | The forms |
| 401 | Missing or invalid API key (Error) |
| 404 | Item (or its parent) does not exist (Error) |
POST /api/projects/{id}/forms
Make a public intake form (admins); each submission becomes a task in phase_id, named "{title}
fields (1 to 15) each have a label, a kind (text, long_text, email or choice, with options for a choice) and required. Do not ask for passwords, payment details, or health or other sensitive information. retention_days (30, 90, 180 or 365; default 90) is how long submitted answers are kept; they are deleted then, and with the form. Up to 10 forms per project.
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | integer | Yes | From 1 to 2147483647. |
X-Actor | header | string | No | Name recorded in the activity log (up to 200 characters, URI-encoded if not ASCII). |
Request body (application/json, required).
| Field | Type | Required | Description |
|---|---|---|---|
title | string | Yes | Up to 100 characters. |
intro | string or null | No | Up to 2000 characters. |
phase_id | integer | Yes | |
retention_days | integer | No | One of: 30, 90, 180, 365. |
accepting | boolean | No | |
fields | array of object | Yes | Up to 15 items. |
Responses:
| Status | Meaning |
|---|---|
| 201 | The form |
| 400 | The request body is invalid or is not valid JSON (Error) |
| 401 | Missing or invalid API key (Error) |
| 403 | Admins only |
| 404 | Item (or its parent) does not exist (Error) |
PATCH /api/forms/{id}
Change a form (admins); accepting false stops it at once
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | integer | Yes | From 1 to 2147483647. |
X-Actor | header | string | No | Name recorded in the activity log (up to 200 characters, URI-encoded if not ASCII). |
Request body (application/json, required)
Responses:
| Status | Meaning |
|---|---|
| 200 | The form |
| 400 | The request body is invalid or is not valid JSON (Error) |
| 401 | Missing or invalid API key (Error) |
| 403 | Admins only |
| 404 | Item (or its parent) does not exist (Error) |
DELETE /api/forms/{id}
Delete a form (admins) and every answer sent through it; the tasks stay
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | integer | Yes | From 1 to 2147483647. |
Responses:
| Status | Meaning |
|---|---|
| 204 | Deleted |
| 401 | Missing or invalid API key (Error) |
| 403 | Admins only |
| 404 | Item (or its parent) does not exist (Error) |