openapi: 3.1.0 info: title: Sentry Alerts 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: Alerts description: Manage alerts (beta) paths: /organizations/{organization_id_or_slug}/alerts/: get: operationId: fetchAlerts summary: Sentry Fetch alerts description: Returns a list of alerts for the organization. tags: - Alerts parameters: - $ref: '#/components/parameters/OrganizationIdOrSlug' - name: cursor in: query description: Pagination cursor. schema: type: string responses: '200': description: A list of alerts. content: application/json: schema: type: array items: $ref: '#/components/schemas/MonitorAlert' '401': description: Unauthorized. '403': description: Forbidden. post: operationId: createAlert summary: Sentry Create an alert for an organization description: Creates a new alert for the organization. tags: - Alerts parameters: - $ref: '#/components/parameters/OrganizationIdOrSlug' requestBody: required: true content: application/json: schema: type: object required: - name properties: name: type: string description: The name of the alert. responses: '201': description: Alert created. content: application/json: schema: $ref: '#/components/schemas/MonitorAlert' '400': description: Bad request. '401': description: Unauthorized. put: operationId: mutateOrganizationAlerts summary: Sentry Mutate an organization's alerts description: Bulk update alerts for an organization. tags: - Alerts parameters: - $ref: '#/components/parameters/OrganizationIdOrSlug' requestBody: required: true content: application/json: schema: type: object properties: ids: type: array items: type: string status: type: string responses: '200': description: Alerts updated. '401': description: Unauthorized. '403': description: Forbidden. delete: operationId: bulkDeleteAlerts summary: Sentry Bulk delete alerts description: Bulk delete alerts for an organization. tags: - Alerts parameters: - $ref: '#/components/parameters/OrganizationIdOrSlug' - name: id in: query description: IDs of alerts to delete. schema: type: array items: type: string responses: '204': description: Alerts deleted. '401': description: Unauthorized. '403': description: Forbidden. /organizations/{organization_id_or_slug}/alerts/{alert_id}/: get: operationId: fetchAlert summary: Sentry Fetch an alert description: Returns details for a specific alert. tags: - Alerts parameters: - $ref: '#/components/parameters/OrganizationIdOrSlug' - $ref: '#/components/parameters/AlertId' responses: '200': description: Alert details. content: application/json: schema: $ref: '#/components/schemas/MonitorAlert' '401': description: Unauthorized. '404': description: Alert not found. put: operationId: updateAlert summary: Sentry Update an alert by ID description: Updates an alert. tags: - Alerts parameters: - $ref: '#/components/parameters/OrganizationIdOrSlug' - $ref: '#/components/parameters/AlertId' requestBody: required: true content: application/json: schema: type: object properties: name: type: string responses: '200': description: Alert updated. content: application/json: schema: $ref: '#/components/schemas/MonitorAlert' '400': description: Bad request. '401': description: Unauthorized. '404': description: Alert not found. delete: operationId: deleteAlert summary: Sentry Delete an alert description: Deletes an alert. tags: - Alerts parameters: - $ref: '#/components/parameters/OrganizationIdOrSlug' - $ref: '#/components/parameters/AlertId' responses: '204': description: Alert deleted. '401': description: Unauthorized. '404': description: Alert not found. components: parameters: OrganizationIdOrSlug: name: organization_id_or_slug in: path required: true description: The ID or slug of the organization. schema: type: string AlertId: name: alert_id in: path required: true description: The ID of the alert. schema: type: string schemas: MonitorAlert: type: object properties: id: type: string name: type: string status: type: string dateCreated: type: string format: date-time required: - id - name securitySchemes: BearerAuth: type: http scheme: bearer description: Authentication token for the Sentry API.