[ARCHIVED] Sample Json for Create user

Jump to solution
vRaj1
Community Member

Dear All,

I would like to create a user through API.  I'm referring to the below URL. 

https://canvas.instructure.com/doc/api/users.html#method.users.create

Could you please provide a sample Json to create a user or class.

Thanks.

Labels (2)
0 Likes
1 Solution
James
Community Champion

@vRaj1 

In the documentation that you linked to, you will find the definitions for the request. I'll let you decide which ones are important for your institution.

Probably the most commonly missed idea is that the properties like user[name] need to be nested in JSON.

This may not hit all of the content that you need to set, but it should look something like this:

 

{
  "user" : {
    "name" : "John Smith",
    "skip_registration" : true
  },
  "pseudonym" : {
    "unique_id" : "jsmith",
    "password" : "changeMe",
    "sis_user_id" : 1234
  },
  "communication_channel" : {
    "type" : "email",
    "address" : "jsmith@example.com",
    "skip_confirmation" : false
  }
}

 

 

View solution in original post