> ## Documentation Index
> Fetch the complete documentation index at: https://docs-saas.primeearn.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Submit an answer

> Send the user's answer to the current qualification question and get the next step.

Call this endpoint after each question returned with `status: "accepted"`. Keep calling it while the response `status` is `accepted`. Stop when it is `qualified`, `disqualified` or `error`.

The response has the same shape as [Start qualification](https://docs-saas.primeearn.com/surveys/qualification/start.md).

## Headers

**Authorization** `string` *required*

`Bearer {uh}`, the same token used to start qualification.

## Body

**survey** `string` *required*

Survey hash (UUID) being qualified.

**question** `string` *required*

Question hash: `questions.current.id` from the previous response.

**answer** `string[]`

Always an array. Its content depends on the [question type](https://docs-saas.primeearn.com/surveys/qualification/question-types.md):

* `single_choice`: one answer `id`.
* `multiple_choice`: one or more answer `id` values.
* `input_int`, `input_text`, `input_bigtext`: the value the user typed, as a string.
* `input_date`: the date as `YYYY-MM-DD`.

Required unless `skip_question` is `true`.

**skip\_question** `boolean` (default: false)

Send `true` to skip the question. Only allowed when `is_skippable` is `true`; otherwise the response is `status: "error"` with `message: "The question cannot be skipped"`.

**token** `string`

Your app API token. Required when secure API mode is enabled for your app.

**policy\_optin** `boolean`

Send `true` once the user has accepted your privacy policy.

## Response

See [Start qualification](https://docs-saas.primeearn.com/surveys/qualification/start.md#response) for every field.

## Errors

| HTTP | When |
| - | - |
| `400` | App not found, app deleted, or `token` does not match. |
| `401` | Missing or unknown bearer token. |
| `404` | Unknown survey or question hash, or `question` sent with no `answer` and no `skip_question`. |
| `422` | Validation error. |
| `429` | Rate limit exceeded. |

```bash Single choice theme={null}
curl --request POST \
  --url https://partners.{your-domain}/api/answers \
  --header 'Authorization: Bearer 0b6c1a3e-5d1f-4c1e-9d0a-2f3b4c5d6e7f' \
  --header 'Content-Type: application/json' \
  --data '{
    "survey": "95b22201-5cb6-4bbe-a733-430d18c90287",
    "question": "0d8263ff-07b9-4097-b228-517eb1a35b2d",
    "answer": ["c18689dc-6379-4c86-92f6-692f67c3c522"]
  }'
```

```bash Multiple choice theme={null}
curl --request POST \
  --url https://partners.{your-domain}/api/answers \
  --header 'Authorization: Bearer 0b6c1a3e-5d1f-4c1e-9d0a-2f3b4c5d6e7f' \
  --header 'Content-Type: application/json' \
  --data '{
    "survey": "ef3e30d6-ed4c-4d19-bd45-f7c23cb44eac",
    "question": "86400f09-66d3-43c7-b9fd-e81ccabaf574",
    "answer": ["0d9bdf92-6b75-4637-bbfd-c6db35ce7843", "898d9638-d5d1-4040-83dd-55e6591a152c"]
  }'
```

```bash Text input theme={null}
curl --request POST \
  --url https://partners.{your-domain}/api/answers \
  --header 'Authorization: Bearer 0b6c1a3e-5d1f-4c1e-9d0a-2f3b4c5d6e7f' \
  --header 'Content-Type: application/json' \
  --data '{
    "survey": "2848cfc6-187c-44ec-b774-5dfef207e534",
    "question": "f9ad620e-305e-407e-9c37-ff2179870a3e",
    "answer": ["90011"]
  }'
```

```bash Date input theme={null}
curl --request POST \
  --url https://partners.{your-domain}/api/answers \
  --header 'Authorization: Bearer 0b6c1a3e-5d1f-4c1e-9d0a-2f3b4c5d6e7f' \
  --header 'Content-Type: application/json' \
  --data '{
    "survey": "f2cbe170-fb78-4817-96eb-613c9418952f",
    "question": "2d557d65-6a2c-4ad6-9d8e-5ee21c0ca658",
    "answer": ["1990-03-25"]
  }'
```

```bash Skip theme={null}
curl --request POST \
  --url https://partners.{your-domain}/api/answers \
  --header 'Authorization: Bearer 0b6c1a3e-5d1f-4c1e-9d0a-2f3b4c5d6e7f' \
  --header 'Content-Type: application/json' \
  --data '{
    "survey": "95b22201-5cb6-4bbe-a733-430d18c90287",
    "question": "0d8263ff-07b9-4097-b228-517eb1a35b2d",
    "skip_question": true
  }'
```

```json Next question theme={null}
{
  "status": "accepted",
  "questions": {
    "current": {
      "id": "2d557d65-6a2c-4ad6-9d8e-5ee21c0ca658",
      "question": "Enter your birthday",
      "type": "input_date",
      "is_skippable": false,
      "autocomplete": false,
      "answers": []
    },
    "available": 3
  },
  "message": null,
  "advice": false
}
```

```json Qualified theme={null}
{
  "status": "qualified",
  "questions": { "current": null, "available": null },
  "message": null,
  "advice": false,
  "url": "https://{router-host}/out?sh=95b22201-5cb6-4bbe-a733-430d18c90287&uh=0b6c1a3e-5d1f-4c1e-9d0a-2f3b4c5d6e7f&p=web",
  "redirect_type": "new_tab"
}
```

```json Cannot skip theme={null}
{
  "status": "error",
  "questions": { "current": null, "available": null },
  "message": "The question cannot be skipped",
  "advice": false
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.