Partially update event subscription

View as MarkdownOpen in Claude
Use this method to partially update an event subscription. Structure your request to follow the [RFC 6902](https://datatracker.ietf.org/doc/html/rfc6902) standard. To update an event subscription, you need its subscriptionId. Our gateway returned the subscriptionId in the id field in the response of the [Create Event Subscription](https://docs.payroc.com/api/schema/notifications/event-subscriptions/create) method. **Note:** If you don't have the subscriptionId, use our [List Event Subscriptions](https://docs.payroc.com/api/schema/notifications/event-subscriptions/list) method to search for the subscription. You can update the following properties of an event subscription: - **eventTypes** - Subscribe to new events or remove events that you are subscribed to. - **notifications** - Information about your endpoint and who we email if we can't contact your endpoint. - **enabled** - Turn on or turn off notifications for the subscription.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

subscriptionIdstringRequired

Headers

Idempotency-KeystringRequiredformat: "uuid"
Unique identifier that you generate for each request. You must use the [UUID v4 format](https://www.rfc-editor.org/rfc/rfc4122) for the identifier. For more information about the idempotency key, go to [Idempotency](https://docs.payroc.com/api/idempotency).

Request

This endpoint expects a list of objects.
addobjectRequired
A Patch Add Operation.
OR
removeobjectRequired
A Patch Remove Operation.
OR
replaceobjectRequired
A Patch Replace Operation.
OR
moveobjectRequired
A Patch Move Operation.
OR
copyobjectRequired
A Patch Copy Operation.
OR
testobjectRequired
A Patch Test Operation.

Response

Successful request. We updated the event subscription.
enabledboolean
Indicates if we should notify you when the event occurs. The value is one of the following: - `true` - We notify you when the event occurs. - `false` - We don't notify you when the event occurs.
eventTypeslist of strings

Array of events that you want to subscribe to. For a list of events, go to Events List.

notificationslist of objects
Array of polymorphic notification objects that contain information about how we contact you when an event occurs.
idlong or nullRead-only
Unique identifier that we assigned to the event subscription.
statusenum or nullRead-only
Status of the subscription. We return one of the following values: - `registered` - You have set up the subscription, and we will notify you when an event occurs. - `suspended` - We have deactivated the event subscription, and we won't notify you when an event occurs. - `failed` - We couldn't contact your URI endpoint. We email the supportEmailAddress.
Allowed values:
metadataobject or null

Object that you can send to include custom data in the request. For more information about how to use metadata, go to Metadata.

Errors