[ARCHIVED] Error 500 when creating sub account via API c#
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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"}}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
This discussion post is outdated and has been archived. Please use the Community question forums and official documentation for the most current and accurate information.