openapi: 3.1.0 info: title: Sentry Organizations API description: >- The Organizations API provides endpoints for managing Sentry organizations, including retrieving and updating organization details, managing members and their roles, listing projects and repositories, and resolving event and short IDs. 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: Members description: Manage organization members and their roles - name: Organizations description: Manage organization details and settings - name: Repositories description: Manage organization repositories paths: /organizations/{organization_id_or_slug}/: get: operationId: retrieveOrganization summary: Sentry Retrieve an organization description: Returns details for a specific organization. tags: - Organizations parameters: - $ref: '#/components/parameters/OrganizationIdOrSlug' responses: '200': description: Organization details. content: application/json: schema: $ref: '#/components/schemas/OrganizationDetail' '401': description: Unauthorized. '403': description: Forbidden. '404': description: Organization not found. put: operationId: updateOrganization summary: Sentry Update an organization description: Updates various attributes and configurable settings for the given organization. tags: - Organizations parameters: - $ref: '#/components/parameters/OrganizationIdOrSlug' requestBody: required: true content: application/json: schema: type: object properties: name: type: string description: The human-readable name for the organization. slug: type: string description: The unique URL slug for this organization. isEarlyAdopter: type: boolean description: Opt-in to new features before they are released. responses: '200': description: Organization updated. content: application/json: schema: $ref: '#/components/schemas/OrganizationDetail' '400': description: Bad request. '401': description: Unauthorized. '403': description: Forbidden. '404': description: Organization not found. /organizations/{organization_id_or_slug}/members/: get: operationId: listOrganizationMembers summary: Sentry List organization members description: Returns a list of members bound to the organization. tags: - Members parameters: - $ref: '#/components/parameters/OrganizationIdOrSlug' - name: cursor in: query description: Pagination cursor. schema: type: string responses: '200': description: A list of organization members. content: application/json: schema: type: array items: $ref: '#/components/schemas/OrganizationMember' '401': description: Unauthorized. '403': description: Forbidden. post: operationId: addOrganizationMember summary: Sentry Add a member to an organization description: Adds a member to an organization by email address. tags: - Members parameters: - $ref: '#/components/parameters/OrganizationIdOrSlug' requestBody: required: true content: application/json: schema: type: object required: - email - role properties: email: type: string format: email description: The email address to invite. role: type: string description: The role for the member (e.g., member, admin, manager, owner). teams: type: array items: type: string description: Team slugs to add the member to. responses: '201': description: Member invitation sent. content: application/json: schema: $ref: '#/components/schemas/OrganizationMember' '400': description: Bad request. '401': description: Unauthorized. '403': description: Forbidden. /organizations/{organization_id_or_slug}/members/{member_id}/: get: operationId: retrieveOrganizationMember summary: Sentry Retrieve an organization member description: Returns details for a specific organization member. tags: - Members parameters: - $ref: '#/components/parameters/OrganizationIdOrSlug' - $ref: '#/components/parameters/MemberId' responses: '200': description: Member details. content: application/json: schema: $ref: '#/components/schemas/OrganizationMember' '401': description: Unauthorized. '404': description: Member not found. put: operationId: updateOrganizationMemberRoles summary: Sentry Update organization member roles description: Updates the role and team memberships for an organization member. tags: - Members parameters: - $ref: '#/components/parameters/OrganizationIdOrSlug' - $ref: '#/components/parameters/MemberId' requestBody: required: true content: application/json: schema: type: object properties: role: type: string description: The organization-level role. teams: type: array items: type: string description: Team slugs to assign. responses: '200': description: Member updated. content: application/json: schema: $ref: '#/components/schemas/OrganizationMember' '400': description: Bad request. '401': description: Unauthorized. '403': description: Forbidden. delete: operationId: deleteOrganizationMember summary: Sentry Delete an organization member description: Removes a member from an organization. tags: - Members parameters: - $ref: '#/components/parameters/OrganizationIdOrSlug' - $ref: '#/components/parameters/MemberId' responses: '204': description: Member removed successfully. '401': description: Unauthorized. '403': description: Forbidden. '404': description: Member not found. /organizations/{organization_id_or_slug}/projects/: get: operationId: listOrganizationProjects summary: Sentry List organization projects description: Returns a list of projects bound to the organization. tags: - Organizations 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. /organizations/{organization_id_or_slug}/repos/: get: operationId: listOrganizationRepositories summary: Sentry List organization repositories description: Returns a list of version control repositories for a given organization. tags: - Repositories parameters: - $ref: '#/components/parameters/OrganizationIdOrSlug' - name: cursor in: query description: Pagination cursor. schema: type: string responses: '200': description: A list of repositories. content: application/json: schema: type: array items: $ref: '#/components/schemas/Repository' '401': description: Unauthorized. '403': description: Forbidden. /organizations/{organization_id_or_slug}/repos/{repo_id}/commits/: get: operationId: listRepositoryCommits summary: Sentry List repository commits description: Returns a list of commits for a given repository. tags: - Repositories parameters: - $ref: '#/components/parameters/OrganizationIdOrSlug' - name: repo_id in: path required: true description: The ID of the repository. schema: type: string - name: cursor in: query description: Pagination cursor. schema: type: string responses: '200': description: A list of commits. content: application/json: schema: type: array items: $ref: '#/components/schemas/Commit' '401': description: Unauthorized. '404': description: Repository not found. /organizations/{organization_id_or_slug}/shortids/{short_id}/: get: operationId: resolveShortId summary: Sentry Resolve a short ID description: >- Resolves a short ID to the project slug and internal issue ID, useful for URL construction. tags: - Organizations parameters: - $ref: '#/components/parameters/OrganizationIdOrSlug' - name: short_id in: path required: true description: The short ID to resolve (e.g., PROJECT-123). schema: type: string responses: '200': description: Resolved short ID. content: application/json: schema: type: object properties: organizationSlug: type: string projectSlug: type: string shortId: type: string group: type: object properties: id: type: string title: type: string '401': description: Unauthorized. '404': description: Short ID not found. /organizations/{organization_id_or_slug}/eventids/{event_id}/: get: operationId: resolveEventId summary: Sentry Resolve an event ID description: Resolves an event ID to the event's project and issue. tags: - Organizations parameters: - $ref: '#/components/parameters/OrganizationIdOrSlug' - name: event_id in: path required: true description: The event ID to resolve. schema: type: string responses: '200': description: Resolved event ID. content: application/json: schema: type: object properties: organizationSlug: type: string projectSlug: type: string groupId: type: string eventId: type: string event: type: object '401': description: Unauthorized. '404': description: Event not found. /organizations/{organization_id_or_slug}/stats_v2/: get: operationId: retrieveEventCounts summary: Sentry Retrieve event counts (v2) description: Returns event counts for the organization, optionally grouped by project. tags: - Organizations parameters: - $ref: '#/components/parameters/OrganizationIdOrSlug' - name: field in: query required: true description: The field to query (e.g., sum(quantity), sum(times_seen)). schema: type: string - name: statsPeriod in: query description: Stats period (e.g., 24h, 14d). schema: type: string - name: groupBy in: query description: Group results by category, outcome, or project. schema: type: string responses: '200': description: Event count statistics. content: application/json: schema: type: object '401': description: Unauthorized. '403': description: Forbidden. /organizations/{organization_id_or_slug}/relay_usage/: get: operationId: listOrganizationTrustedRelays summary: Sentry List organization trusted relays description: Returns a list of trusted relays for the organization. tags: - Organizations parameters: - $ref: '#/components/parameters/OrganizationIdOrSlug' responses: '200': description: A list of trusted relays. content: application/json: schema: type: array items: type: object properties: publicKey: type: string name: type: string description: type: string created: type: string format: date-time lastModified: type: string format: date-time '401': description: Unauthorized. '403': description: Forbidden. /organizations/{organization_id_or_slug}/client-keys/: get: operationId: listOrganizationClientKeys summary: Sentry List organization client keys description: Returns a list of client keys bound to the organization. tags: - Organizations parameters: - $ref: '#/components/parameters/OrganizationIdOrSlug' - name: cursor in: query description: Pagination cursor. schema: type: string responses: '200': description: A list of client keys. content: application/json: schema: type: array items: type: object properties: id: type: string name: type: string label: type: string public: type: string secret: type: string projectId: type: integer isActive: type: boolean dateCreated: type: string format: date-time '401': description: Unauthorized. '403': description: Forbidden. components: securitySchemes: BearerAuth: type: http scheme: bearer description: Authentication token for the Sentry API. parameters: OrganizationIdOrSlug: name: organization_id_or_slug in: path required: true description: The ID or slug of the organization. schema: type: string MemberId: name: member_id in: path required: true description: The ID of the member to retrieve. schema: type: string schemas: OrganizationDetail: type: object properties: id: type: string slug: type: string name: type: string dateCreated: type: string format: date-time status: type: object properties: id: type: string name: type: string isEarlyAdopter: type: boolean avatar: type: object properties: avatarType: type: string avatarUuid: type: string nullable: true features: type: array items: type: string quota: type: object properties: maxRate: type: integer nullable: true maxRateInterval: type: integer accountLimit: type: integer projectLimit: type: integer required: - id - slug - name OrganizationMember: type: object properties: id: type: string email: type: string format: email name: type: string role: type: string roleName: type: string pending: type: boolean expired: type: boolean dateCreated: type: string format: date-time user: type: object nullable: true properties: id: type: string name: type: string username: type: string email: type: string format: email teams: type: array items: type: string required: - id - email - role Project: 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 hasAccess: type: boolean required: - id - slug - name Repository: type: object properties: id: type: string name: type: string url: type: string nullable: true provider: type: object properties: id: type: string name: type: string status: type: string dateCreated: type: string format: date-time externalSlug: type: string required: - id - name Commit: type: object properties: id: type: string message: type: string dateCreated: type: string format: date-time author: type: object properties: name: type: string email: type: string format: email repository: type: object properties: id: type: string name: type: string required: - id