POST /my/survey_answers

POST /my/survey_answers

Creates a survey answer

Body Required

  • response array
  • identifier string

Responses

  • 200

    successful operation

    Hide response attribute Show response attribute object
    • data object
      Hide data attributes Show data attributes object
      • id integer
      • user_id integer
      • identifier string
      • response array[string]
      • survey_uuid string(uuid)
      • updated_at string(DateTime)
  • 400

    Bad Request

  • 401

    Authorization information is missing or invalid.

  • 422

    Unprocessable Entity

  • 500

    Server Error

POST /my/survey_answers
curl \
 -X POST https://api.cosmily.com/api/v1/my/survey_answers \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"response":["male"],"identifier":"gender"}'
Request example
{
  "response": [
    "male"
  ],
  "identifier": "gender"
}
Request examples
{
  "response": [
    "male"
  ],
  "identifier": "gender"
}
Response examples (200)
{
  "data": {
    "id": 42,
    "user_id": 42,
    "identifier": "string",
    "response": [
      "string"
    ],
    "survey_uuid": "string",
    "updated_at": "string"
  }
}
Response examples (200)
{
  "data": {
    "id": 42,
    "user_id": 42,
    "identifier": "string",
    "response": [
      "string"
    ],
    "survey_uuid": "string",
    "updated_at": "string"
  }
}