Set question answer Deprecated

POST /v1/client/networks/{networkId}/questions/{questionId}

This endpoint store the answer for a question in the requesting user's profile. It also performs validation on the input data:

  • at least one answer value has to be given
  • only MULTI questions support multiple answer values
  • all answers value must be strings, regardless of their value

Some questions have selectable answer options. Every option's code property, that is selected by the user, must be passed as a single answer value in this request.

If a question does not have answer options (for example TEXT or NUMBER questions), pass the answer of the user as a single element into the answer array for the endpoint.

After submitting an answer, you most likely want to call GET /client/actions again to get updated results.

Path parameters

application/json

Body Required

Responses

  • 200 application/json

    OK

    Hide response attribute Show response attribute object
  • 406 application/json

    VPN detected

    Hide response attribute Show response attribute object
POST /v1/client/networks/{networkId}/questions/{questionId}
curl \
 -X POST https://api.bitlabs.ai/v1/client/networks/{networkId}/questions/{questionId} \
 -H "X-Api-Token: $API_KEY" \
 -H "X-User-Id: $API_KEY" \
 -H "Content-Type: application/json" \
 -d '{"answers":["string"]}'
Request example
{
  "answers": [
    "string"
  ]
}
Response examples (200)
{
  "data": {}
}
Response examples (406)
{
  "error": {
    "details": {
      "http": "406 Not Acceptable",
      "msg": "vpn detected"
    }
  }
}