> ## Documentation Index
> Fetch the complete documentation index at: https://sentrydocs.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Teams

> Manage teams and team membership via the API

Teams group members together so you can assign issues, configure alert routing, and control project access at a team level. Use these endpoints to create teams, manage membership, and list a team's projects.

***

## List teams

```
GET /api/0/organizations/{organization_id_or_slug}/teams/
```

Returns all teams in the organization.

**Required scope:** `team:read`

### Path parameters

<ParamField path="organization_id_or_slug" type="string" required>
  The numeric ID or slug of the organization.
</ParamField>

### Example request

```bash theme={null}
curl https://sentry.io/api/0/organizations/my-org/teams/ \
  -H "Authorization: Bearer sntrys_TOKEN"
```

### Example response

```json theme={null}
[
  {
    "id": "3",
    "slug": "backend",
    "name": "Backend Team",
    "dateCreated": "2019-01-15T00:00:00Z",
    "isMember": true,
    "memberCount": 5,
    "projects": []
  }
]
```

### Response fields

<ResponseField name="id" type="string">
  The team's numeric ID, returned as a string.
</ResponseField>

<ResponseField name="slug" type="string">
  The URL-friendly identifier for the team.
</ResponseField>

<ResponseField name="name" type="string">
  The display name of the team.
</ResponseField>

<ResponseField name="dateCreated" type="string">
  ISO 8601 timestamp of when the team was created.
</ResponseField>

<ResponseField name="isMember" type="boolean">
  Whether the authenticated user is a member of this team.
</ResponseField>

<ResponseField name="memberCount" type="integer">
  The total number of members in the team.
</ResponseField>

***

## Create a team

```
POST /api/0/organizations/{organization_id_or_slug}/teams/
```

Creates a new team in the organization.

**Required scope:** `team:write`

### Request body

<ParamField body="name" type="string" required>
  The display name for the team.
</ParamField>

<ParamField body="slug" type="string">
  A URL-friendly identifier. If omitted, Sentry generates one from the team name.
</ParamField>

### Example request

```bash theme={null}
curl -X POST https://sentry.io/api/0/organizations/my-org/teams/ \
  -H "Authorization: Bearer sntrys_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name": "Backend Team", "slug": "backend"}'
```

### Example response

```json theme={null}
{
  "id": "3",
  "slug": "backend",
  "name": "Backend Team",
  "dateCreated": "2024-01-15T10:00:00Z",
  "isMember": false,
  "memberCount": 0
}
```

***

## Retrieve a team

```
GET /api/0/teams/{organization_id_or_slug}/{team_id_or_slug}/
```

Returns details for a single team.

**Required scope:** `team:read`

### Path parameters

<ParamField path="organization_id_or_slug" type="string" required>
  The numeric ID or slug of the organization.
</ParamField>

<ParamField path="team_id_or_slug" type="string" required>
  The numeric ID or slug of the team.
</ParamField>

### Example request

```bash theme={null}
curl https://sentry.io/api/0/teams/my-org/backend/ \
  -H "Authorization: Bearer sntrys_TOKEN"
```

***

## List team members

```
GET /api/0/teams/{organization_id_or_slug}/{team_id_or_slug}/members/
```

Returns a paginated list of members in the team.

**Required scope:** `team:read`

### Example request

```bash theme={null}
curl https://sentry.io/api/0/teams/my-org/backend/members/ \
  -H "Authorization: Bearer sntrys_TOKEN"
```

### Example response

```json theme={null}
[
  {
    "id": "1",
    "email": "jane@example.com",
    "name": "Jane Smith",
    "role": "member",
    "pending": false,
    "dateCreated": "2019-03-22T10:00:00Z"
  }
]
```

### Response fields

<ResponseField name="id" type="string">
  The member's unique ID within the organization.
</ResponseField>

<ResponseField name="email" type="string">
  The member's email address.
</ResponseField>

<ResponseField name="name" type="string">
  The member's display name.
</ResponseField>

<ResponseField name="role" type="string">
  The member's organization role, e.g. `"admin"`, `"member"`, `"owner"`.
</ResponseField>

<ResponseField name="pending" type="boolean">
  `true` if the member has been invited but has not yet accepted.
</ResponseField>

***

## List team projects

```
GET /api/0/teams/{organization_id_or_slug}/{team_id_or_slug}/projects/
```

Returns the projects that this team has access to.

**Required scope:** `team:read`

### Example request

```bash theme={null}
curl https://sentry.io/api/0/teams/my-org/backend/projects/ \
  -H "Authorization: Bearer sntrys_TOKEN"
```

### Example response

```json theme={null}
[
  {
    "id": "2",
    "slug": "my-project",
    "name": "My Project",
    "platform": "python",
    "dateCreated": "2018-11-06T21:19:58.536Z",
    "status": "active"
  }
]
```
