List forms
GET/api/public/forms
List forms (questionnaires) created by the coach. Returns each form's metadata only; the questions are NOT included here. To read the questions of a form, call GET /forms/{formId}. Use type=registration for the intake questionnaire trainees fill in when they join, and type=update for recurring check-in forms.
Authentication
Requires an API key, sent as Authorization: Bearer cp_live_....
API keys carry scopes. Get the catalog of scopes and webhook events lists every scope.
Query parameters
| Name | Type | Description |
|---|---|---|
type | string | Filter by form kind. "registration" is the join-time intake questionnaire; "update" is a recurring check-in form. Omit for both. |
page | integer | Page number (1-based, default 1) |
limit | integer | Number of items to return (default 25, max 500) |
Request examples
curl --request GET \
--url 'https://api.coach-platform.com/api/public/forms' \
--header 'Authorization: Bearer cp_live_...'const response = await fetch('https://api.coach-platform.com/api/public/forms', {
method: 'GET',
headers: {
Authorization: 'Bearer cp_live_...',
},
});
const data = await response.json();Responses
200 OK
Successful response
{
"data": [
{
"id": "<string>",
"coach": "<string>",
"title": "<string>",
"description": "<string>",
"type": "registration",
"isActive": true,
"registrationOrder": 123,
"openAt": {
"date": "<date-time>",
"recurrence": "weekly",
"openDays": 123
},
"target": "allTrainees",
"targetLabels": [
{
"id": "<string>",
"text": "<string>",
"color": "<string>"
}
],
"createdAt": "<date-time>"
}
],
"pagination": {
"page": 123,
"limit": 123,
"total": 123,
"hasMore": true,
"truncated": true
}
}Response fields (24)
| Name | Type | Description |
|---|---|---|
data | object[] | |
data[].id | string | |
data[].coach | string | |
data[].title | string | |
data[].description | string | |
data[].type | string | registration = the join-time intake questionnaire. update = a recurring check-in form. |
data[].isActive | boolean | |
data[].registrationOrder | integer | Order this form is presented in during registration, when several registration forms exist. |
data[].openAt | object | When and how often the form opens for trainees. |
data[].openAt.date | string<date-time> | |
data[].openAt.recurrence | string | How often the form reopens. |
data[].openAt.openDays | integer | How many days the form stays open once it opens. |
data[].target | string | Who the form is shown to. byLabels targets trainees carrying at least one of targetLabels. |
data[].targetLabels | object[] | Labels this form targets. Only present when target is byLabels. |
data[].targetLabels[].id | string | |
data[].targetLabels[].text | string | |
data[].targetLabels[].color | string | |
data[].createdAt | string<date-time> | |
pagination | object | |
pagination.page | number | |
pagination.limit | number | |
pagination.total | number | null | Total number of matching items. null when the underlying source cannot report an exact count for this page; use hasMore to keep paging. |
pagination.hasMore | boolean | |
pagination.truncated | boolean | Present and true when the result set exceeded the in-memory scan cap and was truncated. Narrow your filters to page through all items. |
Error responses
400Bad Request401Unauthorized403Forbidden429Too Many Requests500Internal Server Error
These statuses share the same response body.
{
"error": {
"code": "<string>",
"message": "<string>",
"fix": "<string>",
"details": {},
"retryAfterMs": 123
}
}Error fields (6)
| Name | Type | Description |
|---|---|---|
error | object | |
error.code | string | |
error.message | string | |
error.fix | string | null | |
error.details | object | null | |
error.retryAfterMs | number | null |
More Forms endpoints
This page is also available as Markdown. Browse it in the interactive explorer or download the OpenAPI spec.