Create a named survey for the current user

POST /users/{user_id}/surveys

Create a named survey for the current user. The data object will contain key value pairs that will reflect the choices made by the user to different survey questions. The key will be unique for each question.

Path parameters

Body Required

Survey information

  • survey object
    Hide survey attributes Show survey attributes object

Responses

  • Survey created and returned

    Hide response attributes Show response attributes object
  • Authorization information is missing or invalid.

  • Request body has errors or invalid.

POST /users/{user_id}/surveys
curl \
 -X POST https://client-subdomain.bitbond.net/api/v1/users/{user_id}/surveys \
 -H "Content-Type: application/json" \
 -d '{"survey":{"name":"string","data":{}}}'
Request example
{
  "survey": {
    "name": "string",
    "data": {}
  }
}
Request examples
{
  "survey": {
    "name": "string",
    "data": {}
  }
}
Response examples (201)
{
  "name": "string",
  "data": {}
}
Response examples (201)
{
  "name": "string",
  "data": {}
}