Skip to content
payrocdevelopers

Update event subscription

Browse API reference

PUT/event-subscriptions/{subscriptionId}updateEventSubscription

Use this method to update the details of an event subscription.

To update an event subscription, you need its subscriptionId. Our gateway returned the subscriptionId in the response of the Create Event Subscription method.

Note: If you don’t have the subscriptionId, use our List Event Subscriptions method to search for the event subscription.

You can update the following details about an event subscription:

  • Status of the event subscription.
  • Events that you have subscribed to. For a list of events that you can subscribe to, go to Events list.
  • Information about how we contact you when an event occurs.

Parameters

NameInTypeDescription
subscriptionIdRequiredpathinteger

Unique identifier that we assigned to the event subscription.
Note: Our gateway returned the subscriptionId in the id field in the response of the Create Event Subscription method.

Request body

application/json
  • enabledbooleanrequired
    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.
  • eventTypesstring[]required
    Array of events that you want to subscribe to. For a list of events, go to Events List.
  • metadataobject
    Object that you can send to include custom data in the request. For more information about how to use metadata, go to Metadata.
  • notificationsobject[]required
    Array of polymorphic notification objects that contain information about how we contact you when an event occurs.
    • option 1object
      • secretstringrequired
        String that we send with a notification so that you can ensure it is a valid notification from our gateway. We include the value in the Payroc-Secret header parameter in the webhook call. Note: In the response, we truncate the secret to the last 16 characters and mask the first 10 characters.16–64 chars
      • supportEmailAddressstringrequired
        Email address of the person or team that we contact if we can't deliver notifications.
      • typestringrequired
        Type of notification method. Note: To receive notifications by webhook, your server must be able to handle POST requests.webhook
      • uristringrequired
        Public endpoint that we send notifications to.

Responses

Successful request. We updated the event subscription.

No response body — a 204 means the action took effect.

Used in workflows

Search documentation

API reference169
Guides118
Knowledge38
legal1
Solutions32
Workflows74
↑↓highlight↵openView all search results

Menu

Theme

Sign out

Your saved plans remain in your organization. This browser’s private draft and account view will be cleared.

Talk to an engineer