[ARCHIVED] Error 500 when creating sub account via API c#

Jump to solution
vRaj1
Community Member

Dear,

I'm referring to the below URL to create a sub-account. I'm passing all five parameters, which mentioned but still, I'm getting errors while creating sub-account.  :https://canvas.instructure.com/doc/api/accounts.html#method.sub_accounts.create

Create a new sub-account

POST /api/v1/accounts/:account_id/sub_accounts

Thanks.

Labels (2)
0 Likes
2 Solutions
robotcars
Community Champion

Hi @vRaj1 

Nest all those values within 'account' object and ensure that the :account_id represents the parent_account for the created sub account.

Payload Example

{"account":{"name":"Create Via API","sis_account_id":"API_sub_account"}}

 

 

View solution in original post

robotcars
Community Champion

@vRaj1 

Canvas is confusing in this aspect, but Accounts are like Folders, where you can put courses, and change settings, with different Users who can be given permissions of those Accounts.

Users are not stored in Accounts, and are held within the Root Account (your school). To create Users, check out https://canvas.instructure.com/doc/api/users.html#method.users.create

View solution in original post

0 Likes