## Retrieve

`teams.retrieve(strteam_id)  -> TeamRetrieveResponse`

**get** `/teams/{teamId}`

Get the details of a team

### Parameters

- `team_id: str`

### Returns

- `class TeamRetrieveResponse: …`

  - `team: Team`

    - `id: str`

      The team ID (example: "eyVcnFJcR92BxBkz7N6g5w")

    - `created_at: str`

      The team creation date as an ISO string (example: "2023-02-03T11:19:41.579Z")

    - `invitations: List[TeamInvitation]`

      The list of pending invitations

      - `created_at: str`

        The user creation date as an ISO string (example: "2023-02-03T11:19:41.579Z")

      - `email: str`

        The invited user email (example: "herve@scenario.com")

      - `role: Literal["admin", "key", "member"]`

        The role of the invited user inside the team

        - `"admin"`

        - `"key"`

        - `"member"`

      - `status: Literal["accepted", "expired", "pending", "withdrawn"]`

        The status of the invitation

        - `"accepted"`

        - `"expired"`

        - `"pending"`

        - `"withdrawn"`

      - `url: str`

        The link the invited user opens to accept the invitation, as sent by email

      - `project_ids: Optional[List[str]]`

        The list of project IDs for which the user is invited

    - `keys: List[TeamKey]`

      The list of API keys

      - `id: str`

        The key's member id (its API user id, `apiu_...`), taken by the member and
        usage routes (example: "apiu_eyVcnFJcR92BxBkz7N6g5w")

      - `api_key_id: str`

        The API key id (`api_...`), taken by the api-keys routes (example:
        "api_eyVcnFJcR92BxBkz7N6g5w")

      - `api_key_status: Literal["active", "inactive"]`

        The status of the API key

        - `"active"`

        - `"inactive"`

      - `created_at: str`

        The API key creation date as an ISO string (example: "2023-02-03T11:19:41.579Z")

      - `name: str`

        The API key name (example: "eurv-scenario")

      - `scope: Literal["project", "team"]`

        The scope of the API key: 'project' for project-scoped keys, 'team' for team-scoped keys

        - `"project"`

        - `"team"`

      - `updated_at: str`

        The API key last update date as an ISO string (example: "2023-02-03T11:19:41.579Z")

      - `author_id: Optional[str]`

        The member who created the key: a human, or the member id (`apiu_...`) of
        the team API key that created it.

      - `consumption: Optional[float]`

        Consumption (CU) used by this key over the current billing period.

      - `last_used_at: Optional[str]`

        The date the API key was last used to authenticate a request, as an ISO
        string (example: "2023-02-03T11:19:41.579Z"). Absent if the key has never
        been used.

      - `max_consumption: Optional[float]`

        The key's effective consumption (CU) cap for the period (per-key override,
        else the team-wide default). Absent when the key is uncapped.

      - `owner_id: Optional[str]`

        For a PROJECT key: the project it was created on (the team id on some
        legacy keys). Absent for team keys.

      - `projects: Optional[List[TeamKeyProject]]`

        For a PROJECT key: the projects it has access to and its role on each.
        Empty when the key is currently not a member of any (live) project.
        Absent for team keys.

        - `project_id: str`

          The project the key has a role on

        - `role: str`

          The key's role on this project: a built-in role (`admin`/`editor`/`reader`)
          or a custom `;`-separated scope list (example: `"asset.read;model.read"`).

      - `role: Optional[str]`

        The key's role. For a TEAM key: its effective team-plane scopes as a
        `;`-separated list (e.g. `"team.read;team.usage.read"`). Project keys
        carry their project-plane role(s) per project in `projects` instead.

    - `name: str`

      The team name (example: "Scenario")

    - `payment_status: Literal["failed", "succeeded"]`

      The paymentStatus for the team

      - `"failed"`

      - `"succeeded"`

    - `plan: Literal["cu-basic", "cu-creator", "cu-max", 9 more]`

      The team plan

      - `"cu-basic"`

      - `"cu-creator"`

      - `"cu-max"`

      - `"cu-pro"`

      - `"cu-pro-q3-25"`

      - `"cu-team"`

      - `"cu-team-v2"`

      - `"enterprise"`

      - `"essential"`

      - `"free"`

      - `"premium"`

      - `"pro"`

    - `projects: List[TeamProject]`

      Projects of the team

      - `id: str`

      - `created_at: str`

      - `name: str`

      - `updated_at: str`

      - `avatar: Optional[TeamProjectAvatar]`

        - `asset_id: Optional[str]`

          ID of the asset used as thumbnail if provided, otherwise undefined

        - `url: Optional[str]`

          Signed URL of the assetId or free url if assetId is undefined

      - `disable_ip_detection: Optional[bool]`

        When true, IP detection is switched off for this project.

      - `quality_gate_auto_detect: Optional[bool]`

        Whether Quality Gate auto-detection runs on generation for this project.

    - `search_host: str`

      The search host for the team

    - `search_indexes: TeamSearchIndexes`

      The search indexes for the team

      - `assets: TeamSearchIndexesAssets`

        - `private: str`

          The private search index for the team

        - `public: str`

          The public search index for the team

      - `models: TeamSearchIndexesModels`

        - `private: str`

          The private search index for the team

        - `public: str`

          The public search index for the team

      - `workflows: TeamSearchIndexesWorkflows`

        - `private: str`

          The private search index for the team

        - `public: str`

          The public search index for the team

    - `type: Literal["personal", "shared"]`

      The team type

      - `"personal"`

      - `"shared"`

    - `updated_at: str`

      The team update date as an ISO string (example: "2023-02-03T11:19:41.579Z")

    - `users: List[TeamUser]`

      The list of teams members and their role

      - `id: str`

        The user ID (example: "eyVcnFJcR92BxBkz7N6g5w")

      - `created_at: str`

        The user creation date as an ISO string (example: "2023-02-03T11:19:41.579Z")

      - `email: str`

        The user email (example: "herve@scenario.com")

      - `role: Literal["admin", "key", "member"]`

        The role of the user inside the team

        - `"admin"`

        - `"key"`

        - `"member"`

      - `updated_at: str`

        The user last update date as an ISO string (example: "2023-02-03T11:19:41.579Z")

      - `avatar: Optional[TeamUserAvatar]`

        The user's avatar

        - `asset_id: Optional[str]`

          ID of the asset used as thumbnail if provided, otherwise undefined

        - `url: Optional[str]`

          Signed URL of the assetId or free url if assetId is undefined

      - `consumption: Optional[float]`

        Consumption (CU) used by this member over the current billing period.

      - `max_consumption: Optional[float]`

        The member's effective consumption (CU) cap for the period (per-user
        override, else the team-wide default). Absent when the member is uncapped.

    - `avatar: Optional[TeamAvatar]`

      The team's avatar

      - `asset_id: Optional[str]`

        ID of the asset used as thumbnail if provided, otherwise undefined

      - `url: Optional[str]`

        Signed URL of the assetId or free url if assetId is undefined

    - `byok: Optional[TeamByok]`

      BYOK pricing override. Admin-only — omitted for non-admin callers.

      - `markup_multiplier: float`

      - `updated_at: Optional[str]`

        ISO timestamp of the last update. Optional — legacy rows may lack it.

      - `updated_by: Optional[str]`

        Human-readable handle of who last updated the markup (display name).

    - `default_user_max_consumption: Optional[float]`

      Team-wide default max consumption (CU) applied to every member over the
      billing period, unless overridden per member. Absent when no team-wide
      default is set.

    - `ip_detection_enforcement: Optional[Literal["active-fail-closed", "active-fail-open", "disabled"]]`

      The IP detection enforcement posture for the team.
      'disabled': IP detection is not performed.
      'active-fail-open': IP detection runs; on detector error the request is allowed through.
      'active-fail-closed': IP detection runs; on detector error the request is blocked.

      - `"active-fail-closed"`

      - `"active-fail-open"`

      - `"disabled"`

    - `quality_gate_auto_detect: Optional[bool]`

      Quality Gate auto-detection default for the team.

    - `settings: Optional[TeamSettings]`

      Team settings. Returned on `GET` and `PUT /teams/{teamId}`, absent from
      the teams list.

      - `homepage: Optional[Dict[str, object]]`

        Published homepage layout.

    - `subscription_status: Optional[Literal["active", "inactive", "paused"]]`

      The subscriptionStatus for the team

      - `"active"`

      - `"inactive"`

      - `"paused"`

### Example

```python
import os
from scenario_sdk import Scenario

client = Scenario(
    api_key=os.environ.get("SCENARIO_SDK_API_KEY"),  # This is the default and can be omitted
    api_secret=os.environ.get("SCENARIO_SDK_API_SECRET"),  # This is the default and can be omitted
)
team = client.teams.retrieve(
    "teamId",
)
print(team.team)
```

#### Response

```json
{
  "team": {
    "id": "id",
    "createdAt": "createdAt",
    "invitations": [
      {
        "createdAt": "createdAt",
        "email": "email",
        "role": "admin",
        "status": "accepted",
        "url": "url",
        "projectIds": [
          "string"
        ]
      }
    ],
    "keys": [
      {
        "id": "id",
        "apiKeyId": "apiKeyId",
        "apiKeyStatus": "active",
        "createdAt": "createdAt",
        "name": "name",
        "scope": "project",
        "updatedAt": "updatedAt",
        "authorId": "authorId",
        "consumption": 0,
        "lastUsedAt": "lastUsedAt",
        "maxConsumption": 0,
        "ownerId": "ownerId",
        "projects": [
          {
            "projectId": "projectId",
            "role": "role"
          }
        ],
        "role": "role"
      }
    ],
    "name": "name",
    "paymentStatus": "failed",
    "plan": "cu-basic",
    "projects": [
      {
        "id": "id",
        "createdAt": "createdAt",
        "name": "name",
        "updatedAt": "updatedAt",
        "avatar": {
          "assetId": "assetId",
          "url": "url"
        },
        "disableIpDetection": true,
        "qualityGateAutoDetect": true
      }
    ],
    "searchHost": "searchHost",
    "searchIndexes": {
      "assets": {
        "private": "private",
        "public": "public"
      },
      "models": {
        "private": "private",
        "public": "public"
      },
      "workflows": {
        "private": "private",
        "public": "public"
      }
    },
    "type": "personal",
    "updatedAt": "updatedAt",
    "users": [
      {
        "id": "id",
        "createdAt": "createdAt",
        "email": "email",
        "role": "admin",
        "updatedAt": "updatedAt",
        "avatar": {
          "assetId": "assetId",
          "url": "url"
        },
        "consumption": 0,
        "maxConsumption": 0
      }
    ],
    "avatar": {
      "assetId": "assetId",
      "url": "url"
    },
    "byok": {
      "markupMultiplier": 0,
      "updatedAt": "updatedAt",
      "updatedBy": "updatedBy"
    },
    "defaultUserMaxConsumption": 0,
    "ipDetectionEnforcement": "active-fail-closed",
    "qualityGateAutoDetect": true,
    "settings": {
      "homepage": {
        "foo": "bar"
      }
    },
    "subscriptionStatus": "active"
  }
}
```
