# Change a webhook URL

### Change a webhook URL

`PATCH /api/v1/webhooks/{webhookId}`

Operation ID: `updateWebhook`

The secret stays the same. Pending deliveries go to the new URL.

**Path parameters**

- `webhookId` (string · uuid, required): Webhook id

**Request body** (required)

- `url` (string · uri, required): An https URL that accepts POST requests.

**200**: Webhook updated.

- `webhook` (object, required)
  - `id` (string · uuid, required)
  - `url` (string, required)
  - `lastAttemptAt` (string · date-time | null, required)
  - `lastError` (string | null, required): Why the last failed delivery failed, for example 401. Null once a delivery succeeds.
  - `createdAt` (string · date-time, required)
  - `createdBy` (string · uuid | null, required)
- `requestId` (string · uuid, required): Id of this request, for support and troubleshooting

**Errors**

- `400`: Bad request
- `401`: Unauthorized: missing or invalid API key
- `403`: Forbidden
- `404`: Not found
- `422`: Invalid request payload
