---
title: "Update event subscription"
method: PUT
path: "/event-subscriptions/{subscriptionId}"
tags: ["eventSubscriptions"]
---

# Update event subscription

`PUT /event-subscriptions/{subscriptionId}`

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](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 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](https://docs.payroc.com/knowledge/events/events-list).  
- Information about how we contact you when an event occurs.

## Path parameters

- `subscriptionId` integer, required

## Headers

- `Authorization` string, required

## Request body

- EventSubscription
  - `id` integer — Unique identifier that we assigned to the event subscription.
  - `enabled` boolean, required — 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.
  - `status` 'registered' | 'suspended' | 'failed' — 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.
  - `eventTypes` string[], required — Array of events that you want to subscribe to. For a list of events, go to [Events List](https://docs.payroc.com/knowledge/events/events-list).
  - `notifications` Notification[], required — Array of polymorphic notification objects that contain information about how we contact you when an event occurs.
    - `type` 'webhook', required — Discriminator value: webhook
    - `uri` string, required — Public endpoint that we send notifications to.
    - `secret` string, required — 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.
    - `supportEmailAddress` string, required — Email address of the person or team that we contact if we can't deliver notifications.
  - `metadata` EventSubscriptionMetadata — Object that you can send to include custom data in the request. For more information about how to use metadata, go to [Metadata](https://docs.payroc.com/api/metadata).

## Response `204`

Successful request. We updated the event subscription.

- object

## Other responses

- `400` — Invalid request
- `401` — Identity could not be verified
- `404` — Resource not found
- `406` — Not acceptable
- `500` — An error has occured

---

[API](https://skmtc.dev/payroc/apis/schema.md) · [All operations](https://skmtc.dev/payroc/apis/schema/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/payroc/schema/revisions/1d9d3e305945/schema)
