Skip to main content
PUT
Move an agent to another team

Authorizations

Authorization
string
header
required

An aik_… programmatic API key (app.atako.ai → Settings → API keys) or a Supabase session JWT.

Path Parameters

id
string<uuid>
required

Agent id

Body

application/json
teamId
string<uuid> | null
required

Response

The recomputed chart — identical shape to GET /organization/chart.

The whole chart, and the single payload of every /organization operation — reads AND writes. A hierarchy change moves people who were not named in the request, so a write answers with the recomputed chart rather than an acknowledgement: the client never has to make a second call, nor guess. It carries both the derived SHAPE (tree) and the raw CHOICES (teams/agents/humans, with their explicit lead/manager), which is what an editor needs to show what was decided instead of what was inferred from it.

rootHumanId
string<uuid> | null
required

DERIVED, never stored: the oldest admin member. Null when the company has no admin at all — the only case where the chart has nothing to hang on.

tree
object
required

The chart as a forest. roots are the people nobody stands above (normally one). loose collects what the structure left dangling — a team whose lead is gone stays on the chart, to be repaired rather than to vanish quietly.

issues
object[]
required
teams
object[]
required
agents
object[]
required
humans
object[]
required
canEdit
boolean
required

True when the caller is a company admin, i.e. when the write operations below are open to them. Told here so the client never has to deduce a permission from a 403 it provoked.