---
title: "Update a webhook configuration"
method: PUT
path: "/v0/webhook-configurations/{webhookConfigurationId}"
tags: ["Webhook Configurations"]
---

# Update a webhook configuration

`PUT /v0/webhook-configurations/{webhookConfigurationId}`

## Request

- Base URL: `https://distributor-api.spiko.io`
- URL: `https://distributor-api.spiko.io/v0/webhook-configurations/{webhookConfigurationId}`
- Auth: HTTP basic
- TypeScript: <https://skmtc.dev/spiko/apis/spiko-distributor-api/docs/v0/webhook-configurations/:webhookConfigurationId/put.ts> (a function with typed inputs; its response is checked against the schema)

Update the URL and topics of an **active** webhook configuration. A `disabled` or `circuit-broken` configuration is rejected with `InvalidWebhookConfigurationStateError`: enable it first, then update it.

## Path parameters

- `webhookConfigurationId` string, uuid, required: a Universally Unique Identifier

## Request body

- object
  - `url` string, required
  - `topics` string[], required

## Response `200`

Success

- object
  - `id` string, uuid, required: a Universally Unique Identifier
  - `distributorId` string, uuid, required: a Universally Unique Identifier
  - `url` string, required
  - `topics` string[], required
  - `status` 'active' | 'disabled' | 'circuit-broken', required
  - `consecutiveFailures` integer, required
  - `createdAt` string, required: A valid date within the range 2020-2100
  - `updatedAt` string, required: A valid date within the range 2020-2100

## Other responses

- `400`: The webhook configuration is not in a status that allows this transition. `update`, `disable` and `rotate-secret` require an `active` configuration; `enable` requires a `disabled` or `circuit-broken` one. Recovering a `circuit-broken` configuration is therefore `enable` first, then `PUT`. | The request did not match the expected schema
- `401`: Authentication failed. Two bodies are possible: the schema below when the API rejects the credentials, and `{ "error": { "code", "status", "request", "message" } }` when the API gateway rejects them first. Only the former carries a `_tag`.
- `403`: Forbidden
- `404`: NotFound
- `503`: The investor is undergoing a scheduled upgrade, access is temporarily paused to ensure data safety.

---

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