cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
aday
Community Participant

Problems Creating A Course With API

Jump to solution

Post URL: /api/v1/accounts/1/courses

I am trying to create a new course using the API and every time  is creates a course with none of my values filled in and gives it a name of 'Unnamed Course' I have tried stripping the payload down so i am basically only posting the name but still no luck.

Here are the two payloads I have tried:

#1. "{\"account_id\":1,\"course\":{\"id\":0,\"name\":\"AD Name\"}}"

#2. "{\"id\":0,\"name\":\"AD Name\"}"

I am not sure what i am doing wrong. Any help would be great.

Thanks

Labels (1)
Tags (3)
2 Solutions

Accepted Solutions
MattHanes
Community Champion

What programming language are you using? Can you post your entire code?

View solution in original post

aday
Community Participant

Thanks for your reply,

I got it to work. It turns out i was missing ContentType = "application/json" in my request.

Thanks for your help

View solution in original post

2 Replies
MattHanes
Community Champion

What programming language are you using? Can you post your entire code?

View solution in original post

aday
Community Participant

Thanks for your reply,

I got it to work. It turns out i was missing ContentType = "application/json" in my request.

Thanks for your help

View solution in original post