Hi all,
In case, like me, you've needed to use the API to create numerical quiz questions with exact or range answers, but haven't been able to set the answers to to anything besides 0, the following information might help.
For 'exact_answer' numerical questions, use the key 'answer_exact' in the answers object to specify the answer value.
For 'range_answer' numerical questions, use the key 'answer_range_start' and 'answer_range_end' in the answers object to specify the answer value range.
The API docs at
https://canvas.instructure.com/doc/api/quiz_questions.html#method.quizzes/quiz_questions don't document the JSON for the creation of the answers in a quiz question, only the structure of the JSON response, and if you use the key values from the response docs, you always get answer values of 0.
I hope this info saves someone from beating their head against this particular brick wall.
All the best,
Chuck Bearden