PUT /platform/v1/ens-subscriptions

Overview 

Updates a single subscription. To pause an active subscription, set the status request parameter to paused. To unpause a paused subscription, set the status request parameter to active. Always supply a status reason in the request when you update the subscription status. Changes made to a subscription can take up to two minutes to become active.

JSON Parameters 

NameTypeDescription
subscriptionIdstringRequiredUnique identifier for the subscription to update.
eventCategoryTypesarrayRequiredComma-separated list of fully qualified event types for which you’re requesting notifications. Expressed as NotificationEventCategory.NotificationEventType. Review Supported Notification Events for a list of supported event categories and types.
filtersarrayEach string in the array is a key=value pair to filter on. Review Subscription Filters for a list of data items available for filtering.
subscriptionNamestringName of the subscription. This name must be unique.
statusstringIndicates the status of the callback subscription. Can be set to either active or paused. You can only pause active callback subscriptions. You can only make paused callback subscriptions active.
statusReasonstringDescribes why you changed the status.

Usage 

Example Request 

1Host: https://YOUR_SUBDOMAIN.rest.marketingcloudapis.com
2PUT /platform/v1/ens-subscriptions
3Content-Type: application/json
4Authorization: Bearer YOUR_ACCESS_TOKEN
5
6[{
7  "subscriptionName": "subscriptionName1",
8  "eventCategoryTypes": ["TransactionalSendEvents.EmailNotSent",
9  "TransactionalSendEvents.EmailSent"],
10  "subscriptionId": "55afe59f-8d20-46fd-a2d1-ff01453abe90",
11         "filters": ["definitionKey=12345"],
12         "status": "paused",
13         "statusReason": "max retries exhausted trying to post to callback url"
14}]

Example Response 

1HTTP/1.1 200 OK
2[{
3  "callbackId": "65b885ab-c2b4-46fe-85d0-d6cb8be8057d",
4  "callbackName": "cb1",
5  "url": "https://example.com/",
6  "maxBatchSize": 1000,
7  "status": "paused",
8  "statusReason": "max retries exhausted trying to post to callback url"
9  "subscriptionName": "subscriptionName1",
10  "eventCategoryTypes": ["TransactionalSendEvents.EmailNotSent",
11  "TransactionalSendEvents.EmailSent"],
12  "subscriptionId": "d89c87c4-70f8-43d6-be1e-f01dce97fe4c",
13  "filters": ["definitionKey=12345"]
14}]

HTTP Responses 

ResponseReason
200 OKCallback description updated. Review example response.
304 No ChangeUpdate already exists on the server.
400 Bad RequestInvalid request
403 ForbiddenFailed to pass authorization.
500 Server ErrorInternal error

See Also 

DID THIS ARTICLE SOLVE YOUR ISSUE?
Let us know so we can improve!