---
title: "Switch active team."
method: POST
path: "/api/v1/teams/{teamId}/switch"
tags: ["Teams"]
---

# Switch active team.

`POST /api/v1/teams/{teamId}/switch`

## Request

- Base URL: `https://app.customgpt.ai`
- URL: `https://app.customgpt.ai/api/v1/teams/{teamId}/switch`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/poll-the-people/apis/customgpt-ai/docs/api/v1/teams/:teamId/switch/post.ts> (a function with typed inputs; its response is checked against the schema)

Switches the authenticated user's active team context. Subsequent requests will operate in the context of the new team.

## Path parameters

- `teamId` integer, required

## Response `200`

Update user account info

- object
  - `status` 'error' | 'success': The status of the response
  - `data` User
    - `created_at` string, date-time: When was this user created?
    - `email` string, email: User email
    - `id` integer: User ID
    - `current_team_id` integer: User currently active team ID
    - `name` string: User name
    - `profile_photo_url` string, url: User profile photo URL
    - `updated_at` string, date-time: When was this user updated?

## Other responses

- `401`: API Token is either missing or invalid
- `500`: Internal Server Error

## Changes

- **2026-11-03** `77aab4354382`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/poll-the-people/apis/customgpt-ai/changes/api/v1/teams/:teamId/switch/post.md)

---

[API](https://skmtc.dev/poll-the-people/apis/customgpt-ai.md) - [All operations](https://skmtc.dev/poll-the-people/apis/customgpt-ai/llms.txt) - [OpenAPI document](https://skmtc.dev/poll-the-people/apis/customgpt-ai/revisions/77aab4354382?raw)
