---
title: "Update a subscription"
method: PATCH
path: "/webhooks/{subscriptionId}"
tags: ["Webhooks"]
---

# Update a subscription

`PATCH /webhooks/{subscriptionId}`

## Request

- Base URL: `https://api.dojo.tech`
- URL: `https://api.dojo.tech/webhooks/{subscriptionId}`
- Auth: API key in header `Authorization`
- TypeScript: <https://skmtc.dev/dojo/apis/dojo-api/docs/webhooks/:subscriptionId/patch.ts> (a function with typed inputs; its response is checked against the schema)

Updates your subscription details. You can change the URL or the list of events.

## Path parameters

- `subscriptionId` string, required

## Headers

- `version` string, date, required

## Request body

- SubscriptionUpdateRequest
  - `events` string[], nullable: The list of events.
  - `url` string, uri, nullable: The URL of the Webhook endpoint.
  - `description` string, nullable: The subscription description.

## Response `200`

OK

- Subscription
  - `id` string: The unique identifier for the subscription.
  - `accountId` string, nullable: The unique identifier for the account.
  - `events` string[]: The list of events.
  - `url` string, uri: The URL of the Webhook endpoint.
  - `description` string, nullable: The subscription description.
  - `secrets` SubscriptionSecret[]: The list of secrets associated with the subscription. Used to generate signatures.
    - `id` string: The unique identifier for the secret.
    - `value` string: The secret value.
    - `createdAt` string, date-time: The timestamp of the created date, in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) UTC format.
    - `isActive` boolean: The status of the secret. It can be activated or deactivated.
  - `createdAt` string, date-time: The creation date, in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) UTC format.
  - `updatedAt` string, date-time: The timestamp of the update date, in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) UTC format.

## Other responses

- `400`: Bad request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not found
- `409`: Conflict

---

[API](https://skmtc.dev/dojo/apis/dojo-api.md) - [All operations](https://skmtc.dev/dojo/apis/dojo-api/llms.txt) - [OpenAPI document](https://skmtc.dev/dojo/apis/dojo-api/revisions/29fc8900ba37?raw)
