Sentry Projects API

Manage projects within organizations

Documentation

Specifications

Schemas & Data

Other Resources

OpenAPI Specification

sentry-system-projects-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Sentry Alerts Projects 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: Projects
  description: Manage projects within organizations
paths:
  /organizations/{organization_id_or_slug}/projects/:
    get:
      operationId: listOrganizationProjects
      summary: Sentry List an organization's projects
      description: Returns a list of projects bound to an organization.
      tags:
      - Projects
      parameters:
      - $ref: '#/components/parameters/OrganizationIdOrSlug'
      - 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.
        '403':
          description: Forbidden.
        '404':
          description: Organization not found.
  /projects/{organization_id_or_slug}/{project_id_or_slug}/:
    get:
      operationId: retrieveProject
      summary: Sentry Retrieve a project
      description: Returns details for a specific project.
      tags:
      - Projects
      parameters:
      - $ref: '#/components/parameters/OrganizationIdOrSlug'
      - $ref: '#/components/parameters/ProjectIdOrSlug'
      responses:
        '200':
          description: Project details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Project'
        '401':
          description: Unauthorized.
        '403':
          description: Forbidden.
        '404':
          description: Project not found.
    put:
      operationId: updateProject
      summary: Sentry Update a project
      description: Updates various attributes and configurable settings for the given project.
      tags:
      - Projects
      parameters:
      - $ref: '#/components/parameters/OrganizationIdOrSlug'
      - $ref: '#/components/parameters/ProjectIdOrSlug'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: The human-readable name of the project.
                slug:
                  type: string
                  description: The new slug for the project.
                platform:
                  type: string
                  description: The platform identifier.
                isBookmarked:
                  type: boolean
                  description: Toggle bookmarked status.
                digestsMinDelay:
                  type: integer
                  description: Minimum delivery interval for digests in seconds.
                digestsMaxDelay:
                  type: integer
                  description: Maximum delivery interval for digests in seconds.
      responses:
        '200':
          description: Project updated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectDetail'
        '400':
          description: Bad request.
        '401':
          description: Unauthorized.
        '403':
          description: Forbidden.
        '404':
          description: Project not found.
    delete:
      operationId: deleteProject
      summary: Sentry Delete a project
      description: Schedules a project for deletion. This action is irreversible.
      tags:
      - Projects
      parameters:
      - $ref: '#/components/parameters/OrganizationIdOrSlug'
      - $ref: '#/components/parameters/ProjectIdOrSlug'
      responses:
        '204':
          description: Project scheduled for deletion.
        '401':
          description: Unauthorized.
        '403':
          description: Forbidden.
        '404':
          description: Project not found.
  /teams/{organization_id_or_slug}/{team_id_or_slug}/projects/:
    post:
      operationId: createProject
      summary: Sentry Create a new project
      description: Creates a new project bound to a team.
      tags:
      - Projects
      parameters:
      - $ref: '#/components/parameters/OrganizationIdOrSlug'
      - $ref: '#/components/parameters/TeamIdOrSlug'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - name
              properties:
                name:
                  type: string
                  description: The human-readable name of the project.
                slug:
                  type: string
                  description: Optionally set a unique slug for the project.
                platform:
                  type: string
                  description: The platform identifier (e.g., python, javascript).
      responses:
        '201':
          description: Project created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectDetail'
        '400':
          description: Bad request.
        '401':
          description: Unauthorized.
        '403':
          description: Forbidden.
        '404':
          description: Team not found.
        '409':
          description: A project with this slug already exists.
  /projects/{organization_id_or_slug}/{project_id_or_slug}/users/:
    get:
      operationId: listProjectUsers
      summary: Sentry List a project's users
      description: Returns a list of users seen within a project.
      tags:
      - Projects
      parameters:
      - $ref: '#/components/parameters/OrganizationIdOrSlug'
      - $ref: '#/components/parameters/ProjectIdOrSlug'
      - name: query
        in: query
        description: Filter by user search query.
        schema:
          type: string
      responses:
        '200':
          description: A list of users.
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                    username:
                      type: string
                    email:
                      type: string
                    ip:
                      type: string
                    dateCreated:
                      type: string
                      format: date-time
        '401':
          description: Unauthorized.
        '403':
          description: Forbidden.
  /projects/{organization_id_or_slug}/{project_id_or_slug}/teams/{team_id_or_slug}/:
    post:
      operationId: addTeamToProject
      summary: Sentry Add a team to a project
      description: Grants a team access to a project.
      tags:
      - Projects
      parameters:
      - $ref: '#/components/parameters/OrganizationIdOrSlug'
      - $ref: '#/components/parameters/ProjectIdOrSlug'
      - $ref: '#/components/parameters/TeamIdOrSlug'
      responses:
        '201':
          description: Team added to project.
        '401':
          description: Unauthorized.
        '403':
          description: Forbidden.
        '404':
          description: Not found.
    delete:
      operationId: removeTeamFromProject
      summary: Sentry Delete a team from a project
      description: Revokes a team's access to a project.
      tags:
      - Projects
      parameters:
      - $ref: '#/components/parameters/OrganizationIdOrSlug'
      - $ref: '#/components/parameters/ProjectIdOrSlug'
      - $ref: '#/components/parameters/TeamIdOrSlug'
      responses:
        '200':
          description: Team removed from project.
        '401':
          description: Unauthorized.
        '403':
          description: Forbidden.
        '404':
          description: Not found.
components:
  parameters:
    ProjectIdOrSlug:
      name: project_id_or_slug
      in: path
      required: true
      description: The ID or slug of the project.
      schema:
        type: string
    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
  schemas:
    ProjectDetail:
      type: object
      properties:
        id:
          type: string
        slug:
          type: string
        name:
          type: string
        platform:
          type: string
          nullable: true
        dateCreated:
          type: string
          format: date-time
        isBookmarked:
          type: boolean
        isMember:
          type: boolean
        features:
          type: array
          items:
            type: string
        firstEvent:
          type: string
          format: date-time
          nullable: true
        firstTransactionEvent:
          type: boolean
        hasAccess:
          type: boolean
        team:
          type: object
          properties:
            id:
              type: string
            slug:
              type: string
            name:
              type: string
        teams:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              slug:
                type: string
              name:
                type: string
        organization:
          type: object
          properties:
            id:
              type: string
            slug:
              type: string
            name:
              type: string
      required:
      - id
      - slug
      - name
    Project:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier of the project.
        slug:
          type: string
          description: The URL-friendly slug of the project.
        name:
          type: string
          description: The human-readable name of the project.
        platform:
          type: string
          nullable: true
          description: The platform identifier (e.g., python, javascript).
        dateCreated:
          type: string
          format: date-time
          description: When the project was created.
        isBookmarked:
          type: boolean
        isMember:
          type: boolean
        features:
          type: array
          items:
            type: string
        firstEvent:
          type: string
          format: date-time
          nullable: true
        firstTransactionEvent:
          type: boolean
        hasAccess:
          type: boolean
        organization:
          $ref: '#/components/schemas/Organization'
      required:
      - id
      - slug
      - name
    Organization:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier of the organization.
        slug:
          type: string
          description: The URL-friendly slug of the organization.
        name:
          type: string
          description: The human-readable name of the organization.
        dateCreated:
          type: string
          format: date-time
          description: When the organization was created.
        status:
          type: object
          properties:
            id:
              type: string
            name:
              type: string
        isEarlyAdopter:
          type: boolean
          description: Whether the organization is an early adopter.
        avatar:
          type: object
          properties:
            avatarType:
              type: string
            avatarUuid:
              type: string
              nullable: true
      required:
      - id
      - slug
      - name
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: Authentication token for the Sentry API.