Set my active team
const url = 'https://api.deploybase.eu/api/v1/api/v1/me/active-team';const options = { method: 'POST', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"team_id":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “ Authorizations ”Request Body
Section titled “ Request Body ”The team to switch to
object
Example generated
{ "team_id": "example"}Responses
Section titled “ Responses ”OK
object
object
object
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.
IsActive marks the team the current request is acting on.
IsHome marks the team the caller’s own Zitadel org maps to. Exactly one entry has it.
LapsedAt is set while this extra team is blocked as a second Free team of one of its owners (DEP-889): its sites keep serving, but nobody can deploy or create projects until it is paid for again. LapseRemovalAt is when it is deleted if that does not happen. Shown to every member, not just owners: a member who cannot deploy needs to know why.
PendingPlan and PendingInterval are the paid plan chosen when the team was created, so the waiting-for-payment page can restart the same checkout. Set only alongside AwaitingPaymentUntil, and only for owners.
Plan, Interval and AwaitingPaymentUntil are filled only on teams the caller OWNS (DEP-766): what a team pays is the owner’s business, not a member’s. Plan is free, starter, pro or scale; Interval (monthly or annual) is absent on Free. AwaitingPaymentUntil is set while a team created on a paid plan waits for its first payment: the team is removed at that time if it is still unpaid. Such a team reads as Free until the payment lands.
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.
Example
{ "data": { "interval": "monthly", "pending_interval": "monthly", "pending_plan": "pro", "plan": "pro" }}Bad Request
object
object
Example generated
{ "code": "example", "details": "example", "error": "example", "meta": { "request_id": "example", "timestamp": "example", "trace_id": "example" }}Unauthorized
object
object
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
object
object
Example generated
{ "code": "example", "details": "example", "error": "example", "meta": { "request_id": "example", "timestamp": "example", "trace_id": "example" }}Internal Server Error
object
object
Example generated
{ "code": "example", "details": "example", "error": "example", "meta": { "request_id": "example", "timestamp": "example", "trace_id": "example" }}Service Unavailable
object
object
Example generated
{ "code": "example", "details": "example", "error": "example", "meta": { "request_id": "example", "timestamp": "example", "trace_id": "example" }}Live 022265e7 built