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"]
}'
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"]
}'
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"]
}'
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"]
}'
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
}'
{
"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
}
{
"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"
}
{
"status": "error",
"questions": { "current": null, "available": null },
"message": "The question cannot be skipped",
"advice": false
}
Qualification
Submit an answer
Send the user’s answer to the current qualification question and get the next step.
POST
/
api
/
answers
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"]
}'
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"]
}'
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"]
}'
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"]
}'
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
}'
{
"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
}
{
"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"
}
{
"status": "error",
"questions": { "current": null, "available": null },
"message": "The question cannot be skipped",
"advice": false
}
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.
Headers
Body
Always an array. Its content depends on the question type:
single_choice: one answerid.multiple_choice: one or more answeridvalues.input_int,input_text,input_bigtext: the value the user typed, as a string.input_date: the date asYYYY-MM-DD.
skip_question is true.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".Response
See Start qualification 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. |
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"]
}'
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"]
}'
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"]
}'
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"]
}'
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
}'
{
"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
}
{
"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"
}
{
"status": "error",
"questions": { "current": null, "available": null },
"message": "The question cannot be skipped",
"advice": false
}