Skip to main content

How to create user in particular branch through API

POST /manage/v1/user

The setting 

"orgchart": {
"__branch_id__": 8
},

in payload does not work. The user always is created in root branch. The only way to change branch is from UI.

Here is an example snippet for creating a user, while also assigning them to a branch location at the same time, using the manage/v1/user endpoint. The formatting should follow similar to this:

"select_orgchart":{"35":2},

This explanation from the API-Browser description of the Org Chart field shows this:

 


Get very comfortable with the queries for the branch structure :)

I keep a cheat sheet of these for my easy reference, but have to update when new branches get created (use a webhook to be notified and given the info for the new branch)


@John , It’s really trick in payload. I did not see the description there. Thank you!


You are welcome @liza2022! Thanks for being patient while you awaited a reply (and thanks for marking Best Answer)!


Reply