AnsweredAssumed Answered

Help posting an announcement through the API?

Question asked by David Joyner on Oct 15, 2019
Latest reply on Oct 15, 2019 by David Joyner



I'm working on a script that can post announcements through the Canvas API. I've worked with the API a good bit before, but never with discussion topics, and I'm running into a 422 error.


I'm attempting to create the topic with a call to

PUT /api/v1/courses/123/discussion_topics

...with three parameters:

{"title": "Hello World", "message": "hello world", "is_announcement": "true"}

However, I'm getting a 422 error with that, and I'm not sure why; I'm guessing there's a required parameter I'm not passing, but I don't know which it would be. Never mind, it's not that as I could post with just course ID and message from the live API.