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

application/json

Body Required

Survey information

  • survey object
    Hide survey attributes Show survey attributes

Responses

  • 201

    Survey created and returned

    Hide response attributes Show response attributes object
  • 401

    Authorization information is missing or invalid.

  • 422

    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": {}
  }
}
Response examples (201)
{
  "name": "string",
  "data": {}
}