Skip to content

Set my active team

POST
/api/v1/me/active-team
curl --request POST \
--url https://api.deploybase.eu/api/v1/api/v1/me/active-team \
--header 'Authorization: <Authorization>' \
--header 'Content-Type: application/json' \
--data '{ "team_id": "example" }'

Records the named team as the caller’s active team and returns it. Subsequent requests that carry no X-Deploybase-Team header resolve to it. Refused with ACTIVE_TEAM_FORBIDDEN if the caller is not a member of the team (the same answer is given for a team that does not exist, so the endpoint cannot be used to probe team IDs), and with ACCOUNT_SUSPENDED / ACCOUNT_DELETING / ACCOUNT_DELETED for a team that can no longer be entered. Requires a signed-in user: API keys authenticate a team, not a person.

The team to switch to

Media type application/json
object
team_id
required
string
Example generated
{
"team_id": "example"
}

OK

Media type application/json
object
data
meta
object
request_id
string
timestamp
string
trace_id
string
data
object
display_label

DisplayLabel is what to show a human. Never empty, even for teams whose name is still a raw Zitadel org UUID — models.Team.DisplayLabel owns that fallback.

string
id
string
is_active

IsActive marks the team the current request is acting on.

boolean
is_home

IsHome marks the team the caller’s own Zitadel org maps to. Exactly one entry has it.

boolean
last_active_at
string
name
string
role
string
slug
string
status

Status is the team’s lifecycle state, with “suspended” taking precedence over the deletion state machine: a suspended team is usually active, and “active” is exactly the wrong thing to tell someone whose team is closed.

string
Example generated
{
"data": {
"display_label": "example",
"id": "example",
"is_active": true,
"is_home": true,
"last_active_at": "example",
"name": "example",
"role": "example",
"slug": "example",
"status": "example"
},
"meta": {
"request_id": "example",
"timestamp": "example",
"trace_id": "example"
}
}

Bad Request

Media type application/json
object
code
string
details
error
string
meta
object
request_id
string
timestamp
string
trace_id
string
Example generated
{
"code": "example",
"details": "example",
"error": "example",
"meta": {
"request_id": "example",
"timestamp": "example",
"trace_id": "example"
}
}

Unauthorized

Media type application/json
object
code
string
details
error
string
meta
object
request_id
string
timestamp
string
trace_id
string
Example generated
{
"code": "example",
"details": "example",
"error": "example",
"meta": {
"request_id": "example",
"timestamp": "example",
"trace_id": "example"
}
}

ACTIVE_TEAM_FORBIDDEN, ACCOUNT_SUSPENDED, ACCOUNT_DELETING or ACCOUNT_DELETED

Media type application/json
object
code
string
details
error
string
meta
object
request_id
string
timestamp
string
trace_id
string
Example generated
{
"code": "example",
"details": "example",
"error": "example",
"meta": {
"request_id": "example",
"timestamp": "example",
"trace_id": "example"
}
}

Internal Server Error

Media type application/json
object
code
string
details
error
string
meta
object
request_id
string
timestamp
string
trace_id
string
Example generated
{
"code": "example",
"details": "example",
"error": "example",
"meta": {
"request_id": "example",
"timestamp": "example",
"trace_id": "example"
}
}

Service Unavailable

Media type application/json
object
code
string
details
error
string
meta
object
request_id
string
timestamp
string
trace_id
string
Example generated
{
"code": "example",
"details": "example",
"error": "example",
"meta": {
"request_id": "example",
"timestamp": "example",
"trace_id": "example"
}
}