Sentry Teams API

Manage teams within organizations

Documentation

Specifications

Schemas & Data

Other Resources

OpenAPI Specification

sentry-system-teams-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Sentry Alerts Teams API
  description: The Alerts API provides endpoints for managing alert rules in Sentry, including creating, retrieving, updating, and deleting metric alert rules and issue alert rules, as well as managing spike protection notification actions.
  version: 0.0.1
  contact:
    name: Sentry Support
    url: https://sentry.io/support/
    email: support@sentry.io
servers:
- url: https://sentry.io/api/0
  description: Sentry Production API
security:
- BearerAuth: []
tags:
- name: Teams
  description: Manage teams within organizations
paths:
  /organizations/{organization_id_or_slug}/teams/:
    get:
      operationId: listOrganizationTeams
      summary: Sentry List an organization's teams
      description: Returns a list of teams bound to an organization.
      tags:
      - Teams
      parameters:
      - $ref: '#/components/parameters/OrganizationIdOrSlug'
      - name: cursor
        in: query
        description: Pagination cursor.
        schema:
          type: string
      responses:
        '200':
          description: A list of teams.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Team'
        '401':
          description: Unauthorized.
        '403':
          description: Forbidden.
    post:
      operationId: createTeam
      summary: Sentry Create a new team
      description: Creates a new team bound to an organization.
      tags:
      - Teams
      parameters:
      - $ref: '#/components/parameters/OrganizationIdOrSlug'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - name
              properties:
                name:
                  type: string
                  description: The human-readable name of the team.
                slug:
                  type: string
                  description: Optionally set a unique slug for the team.
      responses:
        '201':
          description: Team created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Team_2'
        '400':
          description: Bad request.
        '401':
          description: Unauthorized.
        '403':
          description: Forbidden.
        '409':
          description: A team with this slug already exists.
  /teams/{organization_id_or_slug}/{team_id_or_slug}/:
    get:
      operationId: retrieveTeam
      summary: Sentry Retrieve a team
      description: Returns details for a specific team.
      tags:
      - Teams
      parameters:
      - $ref: '#/components/parameters/OrganizationIdOrSlug'
      - $ref: '#/components/parameters/TeamIdOrSlug'
      responses:
        '200':
          description: Team details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TeamDetail'
        '401':
          description: Unauthorized.
        '403':
          description: Forbidden.
        '404':
          description: Team not found.
    put:
      operationId: updateTeam
      summary: Sentry Update a team
      description: Updates various attributes of the given team.
      tags:
      - Teams
      parameters:
      - $ref: '#/components/parameters/OrganizationIdOrSlug'
      - $ref: '#/components/parameters/TeamIdOrSlug'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: The new name for the team.
                slug:
                  type: string
                  description: The new slug for the team.
      responses:
        '200':
          description: Team updated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TeamDetail'
        '400':
          description: Bad request.
        '401':
          description: Unauthorized.
        '403':
          description: Forbidden.
        '404':
          description: Team not found.
    delete:
      operationId: deleteTeam
      summary: Sentry Delete a team
      description: Schedules a team for deletion.
      tags:
      - Teams
      parameters:
      - $ref: '#/components/parameters/OrganizationIdOrSlug'
      - $ref: '#/components/parameters/TeamIdOrSlug'
      responses:
        '204':
          description: Team scheduled for deletion.
        '401':
          description: Unauthorized.
        '403':
          description: Forbidden.
        '404':
          description: Team not found.
  /teams/{organization_id_or_slug}/{team_id_or_slug}/projects/:
    get:
      operationId: listTeamProjects
      summary: Sentry List a team's projects
      description: Returns a list of projects bound to a team.
      tags:
      - Teams
      parameters:
      - $ref: '#/components/parameters/OrganizationIdOrSlug'
      - $ref: '#/components/parameters/TeamIdOrSlug'
      - name: cursor
        in: query
        description: Pagination cursor.
        schema:
          type: string
      responses:
        '200':
          description: A list of projects.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Project'
        '401':
          description: Unauthorized.
        '404':
          description: Team not found.
  /projects/{organization_id_or_slug}/{project_id_or_slug}/teams/:
    get:
      operationId: listProjectTeams
      summary: Sentry List a project's teams
      description: Returns a list of teams bound to a project.
      tags:
      - Teams
      parameters:
      - name: organization_id_or_slug
        in: path
        required: true
        description: The ID or slug of the organization.
        schema:
          type: string
      - name: project_id_or_slug
        in: path
        required: true
        description: The ID or slug of the project.
        schema:
          type: string
      responses:
        '200':
          description: A list of teams.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Team_2'
        '401':
          description: Unauthorized.
        '404':
          description: Project not found.
components:
  schemas:
    Team_2:
      type: object
      properties:
        id:
          type: string
        slug:
          type: string
        name:
          type: string
        dateCreated:
          type: string
          format: date-time
        isMember:
          type: boolean
        memberCount:
          type: integer
        avatar:
          type: object
          properties:
            avatarType:
              type: string
            avatarUuid:
              type: string
              nullable: true
      required:
      - id
      - slug
      - name
    TeamDetail:
      type: object
      properties:
        id:
          type: string
        slug:
          type: string
        name:
          type: string
        dateCreated:
          type: string
          format: date-time
        isMember:
          type: boolean
        memberCount:
          type: integer
        avatar:
          type: object
          properties:
            avatarType:
              type: string
            avatarUuid:
              type: string
              nullable: true
        organization:
          type: object
          properties:
            id:
              type: string
            slug:
              type: string
            name:
              type: string
        projects:
          type: array
          items:
            $ref: '#/components/schemas/Project'
      required:
      - id
      - slug
      - name
    Project:
      type: object
      properties:
        id:
          type: string
        slug:
          type: string
        name:
          type: string
        platform:
          type: string
          nullable: true
        dateCreated:
          type: string
          format: date-time
      required:
      - id
      - slug
      - name
    Team:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier of the team.
        slug:
          type: string
          description: The URL-friendly slug of the team.
        name:
          type: string
          description: The human-readable name of the team.
        dateCreated:
          type: string
          format: date-time
        isMember:
          type: boolean
        memberCount:
          type: integer
        avatar:
          type: object
          properties:
            avatarType:
              type: string
            avatarUuid:
              type: string
              nullable: true
      required:
      - id
      - slug
      - name
  parameters:
    TeamIdOrSlug:
      name: team_id_or_slug
      in: path
      required: true
      description: The ID or slug of the team.
      schema:
        type: string
    OrganizationIdOrSlug:
      name: organization_id_or_slug
      in: path
      required: true
      description: The ID or slug of the organization.
      schema:
        type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: Authentication token for the Sentry API.