# updateWebhookSubscription

Source: /openapi/thomas-federated.openapi.json

## Operation

| Method | URL |
|---|---|
| PATCH | https://staging-api.thomas.co/v1/webhook-subscriptions/{subscriptionId} |

| Field | Value |
|---|---|
| operationId | updateWebhookSubscription |
| method | PATCH |
| server | https://staging-api.thomas.co/v1 |
| path | /webhook-subscriptions/{subscriptionId} |
| tags | `Partner Events & Webhooks` |
| summary | Change a webhook endpoint |
| badges | None |

## Request Parameters

| Name | In | Required | Schema | Description |
|---|---|---|---|---|
| subscriptionId | path | true | string |  |

## Request Body

| Content type | Schema refs |
|---|---|
| application/json | #/components/schemas/WebhookSubscriptionUpdateRequestDto |

## Responses

| Status | Description | Schema refs |
|---|---|---|
| 200 |  | #/components/schemas/WebhookSubscriptionReadResponseDto |
| 400 | Request body or path parameter validation failed | #/components/schemas/ApiErrorResponseDto |
| 401 | Invalid or missing authentication token (AUTH_TOKEN_INVALID) | #/components/schemas/ApiErrorResponseDto |
| 403 | Only a provisioned Partner-owned API client may call this operation | #/components/schemas/ApiErrorResponseDto |
| 404 | No webhook subscription with this id belongs to the calling API client. A subscription owned by a different client is concealed behind this same response. | #/components/schemas/ApiErrorResponseDto |
| 409 | Another change advanced this subscription first; re-read and retry | #/components/schemas/ApiErrorResponseDto |
| 422 | The webhook endpoint is not a safe public HTTPS destination. | #/components/schemas/ApiErrorResponseDto |
| 429 | Rate limit exceeded. | #/components/schemas/ApiErrorResponseDto |
| 503 | This deployment has no webhook signing key provisioned | #/components/schemas/ApiErrorResponseDto |

### Response 429 headers

| Name | Description | Schema |
|---|---|---|
| Retry-After | Seconds until the rate-limit block expires before retrying. | {"type":"integer","minimum":0} |
| RateLimit-Limit | Configured request limit for the active rate-limit window. | {"type":"integer"} |
| RateLimit-Remaining | Requests remaining in the active rate-limit window; zero when blocked. | {"type":"integer"} |
| RateLimit-Reset | Seconds until the rate-limit block expires. | {"type":"integer","minimum":0} |

## Artifact Examples

### Response 400 example

```json
{
  "statusCode": 400,
  "message": "Validation failed",
  "error": "HTTP_BAD_REQUEST"
}
```

### Response 401 example

```json
{
  "statusCode": 401,
  "message": "Invalid or missing authentication token",
  "error": "AUTH_TOKEN_INVALID"
}
```

### Response 403 example

```json
{
  "statusCode": 403,
  "message": "API client is not permitted to call this operation",
  "error": "PRINCIPAL_TYPE_NOT_ALLOWED"
}
```

### Response 404 example

```json
{
  "statusCode": 404,
  "message": "Webhook subscription was not found",
  "error": "WEBHOOK_SUBSCRIPTION_NOT_FOUND"
}
```

### Response 409 example

```json
{
  "statusCode": 409,
  "message": "A concurrent change moved this webhook subscription",
  "error": "WEBHOOK_SUBSCRIPTION_UPDATE_CONFLICT"
}
```

### Response 429 example

```json
{
  "statusCode": 429,
  "message": "ThrottlerException: Too Many Requests",
  "error": "HTTP_TOO_MANY_REQUESTS"
}
```

### Response 503 example

```json
{
  "statusCode": 503,
  "message": "Webhook signing is not configured on this deployment",
  "error": "WEBHOOK_SIGNING_NOT_CONFIGURED"
}
```
