Skip to content

Bulk-update team parent relationships

PUT
/admin/org-chart
curl --request PUT \
--url https://shoehorn.example.com/api/v1/admin/org-chart \
--header 'Content-Type: application/json' \
--data '{ "updates": [ { "team_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "parent_team_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" } ] }'

Admin-only. Each update sets a team’s parent_team_id; pass null (or omit) to make the team a root team. Updates run inside one transaction. The server walks ancestry to reject cycles before applying — if any update would create a cycle, the entire request fails with CIRCULAR_REFERENCE.

Media type application/json
object
updates
required
Array<object>
>= 1 items
object
team_id
required
string format: uuid
parent_team_id

Set null to make the team a root team.

string format: uuid
nullable
Example generated
{
"updates": [
{
"team_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"parent_team_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
}
]
}

Updates applied

Media type application/json
object
success
boolean
updated

Number of updates applied.

integer
Example generated
{
"success": true,
"updated": 1
}

Returned for an empty updates array, an invalid UUID, or a cycle. Cycles use the error code CIRCULAR_REFERENCE.

Caller lacks admin permission