Create Spike Protection Notification Copy
PUT https://sentry.io/api/0/organizations/{{organization_slug}}/notifications/actions/:action_id/
Update a Spike Protection Notification Action
https://docs.sentry.io/api/alerts/update-a-spike-protection-notification-action/
PUT/api/0/organizations/{organizationslug}/notifications/actions/{actionid}/
Updates a Spike Protection Notification Action.
Notification Actions notify a set of members when an action has been triggered through a notification service such as Slack or Sentry. For example, organization owners and managers can receive an email when a spike occurs.
Path Parameters
organization_slug (string)REQUIRED
The slug of the organization the resource belongs to.
action_id (integer)REQUIRED
ID of the notification action to retrieve
Body Parameters
trigger_type (string)REQUIRED
Type of the trigger that causes the notification. The only supported trigger right now is: spike-protection.
service_type (string)REQUIRED
Service that is used for sending the notification.
emailslacksentry_notificationpagerdutyopsgenie
integration_id (integer)
ID of the integration used as the notification service. See List Integrations to retrieve a full list of integrations.
Required if service_type is slack, pagerduty or opsgenie.
target_identifier (string)
ID of the notification target, like a Slack channel ID.
Required if service_type is slack or opsgenie.
target_display (string)
Name of the notification target, like a Slack channel name.
Required if service_type is slack or opsgenie.
projects (array(string))
List of projects slugs that the Notification Action is created for.
Scopes
You need to authenticate via bearer auth token. requires one of the following scopes:
org:adminorg:readorg:write
curl https://sentry.io/api/0/organizations/{organization_slug}/notifications/actions/{action_id}/ \
-H 'Authorization: Bearer <auth_token>' \
-X PUT \
-H 'Content-Type: application/json' \
-d '{}'
RESPONSESCHEMA202400
{
"id": "836501735",
"organizationId": "62848264",
"serviceType": "sentry_notification",
"targetDisplay": "default",
"targetIdentifier": "default",
"targetType": "specific",
"triggerType": "spike-protection",
"projects": [
4505321021243392
]
}
Request Params
| Key | Datatype | Required | Description |
|---|---|---|---|
cursor | string |
Request Body
{"integration_id"=>"default", "projects"=>[4504843082924032], "service_type"=>"sentry_notification", "trigger_type"=>"spike-protection", "target_identifier"=>"default", "target_display"=>"default"}