# List responses to a form

`GET https://api.coach-platform.com/api/public/forms/{formId}/responses`

List submitted responses for a form, newest first. Trainee personal details and phone number are included only when the key also has trainees:read; coach private notes are never returned.

- Resource: Forms
- Authentication: API key in the `Authorization: Bearer cp_live_...` header
- HTML version: https://www.coach-platform.com/docs/api/reference/get-forms-form-id-responses
- OpenAPI spec: https://www.coach-platform.com/openapi.json

## Path parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `formId` | string | Yes |   |

## Query parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `traineeId` | string | No | Only responses submitted by this trainee. Use it to read one trainee's answers directly instead of searching by name. |
| `status` | string | No | Filter by handling status. Allowed values: `Pending`, `Handled`. |
| `search` | string | No | Search the trainee name. |
| `dateFrom` | string | No | Only responses submitted on or after this date (YYYY-MM-DD). |
| `dateTo` | string | No | Only responses submitted on or before this date (YYYY-MM-DD). |
| `page` | integer | No | Page number (1-based, default 1) Minimum: `1`. |
| `limit` | integer | No | Number of items to return (default 25, max 500) Minimum: `1`. Maximum: `500`. |

## Responses

| Status | Description |
|---|---|
| `200` OK | Successful response |
| `400` Bad Request |  |
| `401` Unauthorized |  |
| `403` Forbidden |  |
| `429` Too Many Requests |  |
| `500` Internal Server Error |  |

### 200 OK

Content type: `application/json`

| Field | Type | Description |
|---|---|---|
| `data` | object[] |   |
| `data[].id` | string |   |
| `data[].form` | object | The form this response belongs to. |
| `data[].form.id` | string |   |
| `data[].form.title` | string |   |
| `data[].form.type` | string |   |
| `data[].trainee` | object | The trainee who submitted the response. |
| `data[].trainee.id` | string |   |
| `data[].trainee.fullName` | string |   |
| `data[].responses` | object[] | The submitted answers, one entry per form field. |
| `data[].responses[].field` | string | Field id from the form definition. |
| `data[].responses[].label` | string | Field label shown to the trainee. |
| `data[].responses[].fieldType` | string | Field type, e.g. text, number, file. |
| `data[].status` | string | Whether the coach has handled this response. Allowed values: `Pending`, `Handled`. |
| `data[].type` | string | Whether this is a periodic update or a registration submission. Allowed values: `update`, `registration`. |
| `data[].createdAt` | string<date-time> |   |
| `data[].updatedAt` | 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. |

Example:

```json
{
  "data": [
    {
      "id": "<string>",
      "form": {
        "id": "<string>",
        "title": "<string>",
        "type": "<string>"
      },
      "trainee": {
        "id": "<string>",
        "fullName": "<string>"
      },
      "responses": [
        {
          "field": "<string>",
          "label": "<string>",
          "fieldType": "<string>"
        }
      ],
      "status": "Pending",
      "type": "update",
      "createdAt": "<date-time>",
      "updatedAt": "<date-time>"
    }
  ],
  "pagination": {
    "page": 123,
    "limit": 123,
    "total": 123,
    "hasMore": true,
    "truncated": true
  }
}
```

### Error responses 400, 401, 403, 429, 500

Content type: `application/json`

| Field | Type | Description |
|---|---|---|
| `error` | object |   |
| `error.code` | string |   |
| `error.message` | string |   |
| `error.fix` | string \| null |   |
| `error.details` | object \| null |   |
| `error.retryAfterMs` | number \| null |   |

Example:

```json
{
  "error": {
    "code": "<string>",
    "message": "<string>",
    "fix": "<string>",
    "details": {},
    "retryAfterMs": 123
  }
}
```

## Examples

### cURL

```bash
curl --request GET \
  --url 'https://api.coach-platform.com/api/public/forms/<formId>/responses' \
  --header 'Authorization: Bearer cp_live_...'
```

### JavaScript (fetch)

```js
const response = await fetch('https://api.coach-platform.com/api/public/forms/<formId>/responses', {
  method: 'GET',
  headers: {
    Authorization: 'Bearer cp_live_...',
  },
});

const data = await response.json();
```

## Related endpoints

- [List forms](https://www.coach-platform.com/docs/api/reference/get-forms/index.md): `GET /api/public/forms`. List forms (questionnaires) created by the coach.
- [List registration form responses](https://www.coach-platform.com/docs/api/reference/get-forms-registration/index.md): `GET /api/public/forms/registration`. List submitted registration (intake) form responses across every registration form, newest first.
- [List check-in responses](https://www.coach-platform.com/docs/api/reference/get-updates/index.md): `GET /api/public/updates`. List submitted update (check-in) form responses across every update form, newest first.
- [Respond to a check-in](https://www.coach-platform.com/docs/api/reference/post-updates-update-id-respond/index.md): `POST /api/public/updates/{updateId}/respond`. Respond to a submitted check-in.
- [Get a form with its questions](https://www.coach-platform.com/docs/api/reference/get-forms-form-id/index.md): `GET /api/public/forms/{formId}`. Get one form including its full question set.
- [Get a form response](https://www.coach-platform.com/docs/api/reference/get-forms-form-id-response-response-id/index.md): `GET /api/public/forms/{formId}/response/{responseId}`. Get a single submitted form response with its answers.
- Previous: [Get a form response](https://www.coach-platform.com/docs/api/reference/get-forms-form-id-response-response-id/index.md): `GET /api/public/forms/{formId}/response/{responseId}`. Get a single submitted form response with its answers.
- Next: [Send a notification](https://www.coach-platform.com/docs/api/reference/post-notifications/index.md): `POST /api/public/notifications`. Send an in-app notification to one trainee, immediately or on a schedule.
