# Update a webhook subscription

**PATCH /v1/webhooks/{subscriptionId}**

Partial update: only the fields present in the body are applied. Setting enabled: true past the plan cap on active subscriptions returns 402 PLAN_LIMIT_REACHED. Re-enabling a subscription resets the consecutive-failure auto-disable counter.

## Servers
- https://api.isnotai.com (Production (US))
- https://api-eu.isnotai.com (Production (EU))

API keys are region-bound: a key authenticates only against the base URL of the region it was minted in. The other region returns 401 INVALID_API_KEY.

## Authentication methods
- bearer_auth
- api_key

Send the API key as `Authorization: Bearer aik_v1_...` (preferred) or in the `x-api-key` header. Per-key rate-limit isolation applies only to the Bearer form. See [Authentication](https://www.isnotai.com/developers/authentication.md).

## Path parameters

- **subscriptionId** (string) *Required*
  Subscription id.

## Request body

Content type: `application/json`

Partial update: all fields optional, only the keys you send are applied.

- **url** (string)
- **eventType** (string) [enum: [BotDetected, SessionAnomaly, ThresholdExceeded, AlertTriggered, ReportReady, SessionCorrelated, WritingSessionScored, ]]
  Event type name (string). Requests accept the name case-insensitively; responses return the PascalCase form shown here. Integers never appear on the wire.
- **name** (string)
- **threshold** (any)
- **enabled** (boolean)

## Responses
### 200
Payload of WebhookSubscriptionResponse

Response body (application/json):
- **data** (object)
  - **id** (string)
  - **integrationId** (string)
  - **url** (string)
  - **eventType** (string) [enum: [BotDetected, SessionAnomaly, ThresholdExceeded, AlertTriggered, ReportReady, SessionCorrelated, WritingSessionScored]]
    Event type name (string). Requests accept the name case-insensitively; responses return the PascalCase form shown here. Integers never appear on the wire.
  - **name** (string)
  - **enabled** (boolean)
  - **threshold** (any)
  - **createdAt** (string(date-time))
  - **updatedAt** (string(date-time))
  - **lastDeliveryAt** (string(date-time))
  - **lastDeliveryStatus** (string) [enum: [Pending, Delivered, Failed, MaxRetriesExceeded, PermanentFailure, PoisonAborted, ]]
    Outcome of the most recent delivery attempt (string). Null until the first delivery.
  - **disabledAt** (string(date-time))
  - **disabledReason** (string)
  - **disabledFailureClass** (string)
  - **disabledDeliveryId** (string)

### 400
Payload of ErrorEnvelope

Response body (application/json):
- **error** (object)
  - **code** (string) *Required*
  - **message** (string) *Required*
  - **details** (object) *Required*
    Always present and null unless the error carries field-level context (validation errors set details.field to the offending parameter name).

### 401
Payload of ErrorEnvelope

Response body (application/json):
- **error** (object)
  - **code** (string) *Required*
  - **message** (string) *Required*
  - **details** (object) *Required*
    Always present and null unless the error carries field-level context (validation errors set details.field to the offending parameter name).

### 402
Payload of ErrorEnvelope

Response body (application/json):
- **error** (object)
  - **code** (string) *Required*
  - **message** (string) *Required*
  - **details** (object) *Required*
    Always present and null unless the error carries field-level context (validation errors set details.field to the offending parameter name).

### 404
Payload of ErrorEnvelope

Response body (application/json):
- **error** (object)
  - **code** (string) *Required*
  - **message** (string) *Required*
  - **details** (object) *Required*
    Always present and null unless the error carries field-level context (validation errors set details.field to the offending parameter name).

Any authenticated route can also return 401 (missing or invalid key), 429 RATE_LIMITED (edge rate limit; Retry-After is an integer number of seconds), and 5xx errors, even where not listed above. See [Error Handling](https://www.isnotai.com/developers/error-handling.md) and [Rate Limits](https://www.isnotai.com/developers/rate-limits.md).

