Participate to a quiz

POST /platform/quiz/{id}/participate

Path parameters

  • id integer(int32) Required

    The id of the quiz

application/json

Body

  • answer_ids array[integer]

Responses

  • 200 application/json

    returns the quiz result

    Hide response attribute Show response attribute object
    • message string
  • 401 application/json

    Unauthorized.

    Hide response attribute Show response attribute object
    • message string
  • 403

    Forbidden - You don't have permission to access this route

  • 404

    Not found

  • 422 application/json

    Unprocessable Content

    Hide response attributes Show response attributes object
    • message string

      Error message.

    • errors object
      Hide errors attributes Show errors attributes object
      • field array[string]

        Error message details.

      • * array[string] Additional properties

        Error message details.

POST /platform/quiz/{id}/participate
curl \
 --request POST 'https://domain.tld/api/v2/platform/quiz/{id}/participate' \
 --header "Content-Type: application/json" \
 --data '{"answer_ids":[42]}'
Request examples
{
  "answer_ids": [
    42
  ]
}
Response examples (200)
{
  "message": "Quiz answered successfully"
}
Response examples (401)
{
  "message": "Unauthorized."
}
Response examples (422)
{
  "message": "field is required! (and 3 more error)",
  "errors": {
    "field": [
      "Error message details here"
    ],
    "additionalProperty1": [
      "Error message details here"
    ],
    "additionalProperty2": [
      "Error message details here"
    ]
  }
}