COPS

Update notification subscription

PATCH
/notifications/subscriptions/{id}

Change a notification subscription: its events, event options, campaign filter, label, destination or enabled state. The destination, secret and headers are write-only; send a new value to replace one.

Authorization

apiKeyAuth
headerx-api-key<token>

API key for authentication. Keys are prefixed with cops_.

Path Parameters

id*string

Subscription id from list_notification_subscriptions.

Match^nsub_.+[\s\S]*$

Request Body

application/json
  1. body
destination?string

The webhook URL. Write-only: it is never returned. Not needed for a personal email subscription, which always sends to your account email.

eventTypes?array<>

Event type keys from list_notification_event_types. An empty list sends every instant event, or with campaignIds every instant campaign event; a digest is sent only when listed.

eventOptions?

Options for the event types in eventTypes, keyed by event type. The optionsSchema of each event type in list_notification_event_types gives its options and their defaults; an option you leave out uses its default. Replaces all stored options. Omit to keep them.

campaignIds?array<string>

Only send events about these campaigns (ids from list_campaigns). A campaign filter works only with event types whose scope is campaign in list_notification_event_types. An empty list means no filter.

secret?|

custom_webhook only: the signing secret (whsec_ followed by base64 is recommended). Write-only; null removes it.

customHeaders?|

custom_webhook only: extra request headers as name to value. Write-only; null removes them.

label?|

Display name for the destination. The daily digest uses it as a title prefix.

enabled?boolean

false pauses the subscription without deleting it.

Response Body

Response schema unavailable.

Example Request
curl -X PATCH 'https://cops.app/api/brand/notifications/subscriptions/string' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response200
Empty