# Update subscription

`PATCH https://api.strike.me/v1/subscriptions/{subscriptionId}`

Source: https://docs.strike.me/api/update-subscription/

---

Required scopes:

- partner.webhooks.manage

## Path parameters

- `subscriptionId` (uuid, required): ID of the subscription to update.

## Request body

`application/json`

- `webhookUrl` (string): Webhook HTTPS endpoint url.
- `webhookVersion` (string): Version that will be used when formatting the webhook payload. One of `v1`, `v2`.
- `secret` (string): Webhook secret that will be used for signing the request.
- `enabled` (boolean): Flag for enabling/disabling the subscription. If subscription is disabled the webhook won't be triggered for the respective event types.
- `eventTypes` (string[]): List of event types for the subscription. Each time that some event type from the list occurs, the webhook will be triggered.

Example:

```json
{
  "webhookUrl": "https://kramerica_industries.com/webhook",
  "webhookVersion": "v1",
  "secret": "ScKc2Phr37RzfESKGYPh6CnZqNxc9t",
  "enabled": true,
  "eventTypes": [
    "invoice.created",
    "invoice.updated"
  ]
}
```

## Responses

### 200 OK

`application/json`

- `id` (uuid, required): Id of the subscription in GUID format.
- `webhookUrl` (string, required): Webhook HTTPS endpoint url.
- `webhookVersion` (string, required): Version that will be used when formatting the webhook payload. One of `v1`, `v2`.
- `enabled` (boolean, required): Flag for enabling/disabling the subscription. If subscription is disabled the webhook won't be triggered for the respective event types.
- `created` (date-time, required): Time at which subscription has been created.
- `eventTypes` (string[], required): List of event types for the subscription. Each time that some event type from the list occurs, the webhook will be triggered.

### 401 Unauthorized

### 403 Forbidden

From the Strike API documentation — https://docs.strike.me
