---
title: "Update"
method: PUT
path: "/webhook/{webhookId}"
tags: ["Webhook"]
---

# Update

`PUT /webhook/{webhookId}`

## Request

- Base URL: `https://api.speakai.co/v1`
- URL: `https://api.speakai.co/v1/webhook/{webhookId}`
- Auth: API key in header `x-speakai-key` and API key in header `x-access-token`

You can update definition of an existing webhook: change events it's subscribed to, edit description or your `metaData`.

This is a partial update. Send `callbackUrl` on every call, and send only the other fields you want to change: any field you leave out keeps its stored value. To clear a field, send it with an empty value rather than omitting it.

## Path parameters

- `webhookId` string, required

## Request body

- object
  - `callbackUrl` string, required: Give the URL Speak posts events to. Send it on every update, even when you are only changing something else. required; validated as a plain string with no length cap and no uri format check
  - `metaData` object: Replace the data Speak merges into the body of every delivery for this webhook. Speak adds eventType, deliveryId and the fields for the event that fired on top of it. optional, unconstrained object, any keys accepted. Omit it and the stored value is left unchanged: the controller passes the destructured value into findOneAndUpdate, and an undefined key is dropped before the update is sent rather than written over what is there.
  - `mediaId` string: Scope the webhook to a single media item instead of your whole account. optional, empty string allowed, no length cap
  - `events` string[]: Replace the list of events this webhook receives. explicitly.optional; no minimum or maximum item count. Each item must be one of the 18 listed values, which come from WebhookEvent.
  - `description` string: Describe what this webhook does on your side so you can recognize it later. optional, empty string allowed, no length cap

## Response `200`

OK

- object
  - `status` string
  - `message` string

---

[API](https://skmtc.dev/speakai/apis/speak-ai-api.md) · [All operations](https://skmtc.dev/speakai/apis/speak-ai-api/llms.txt) · [OpenAPI document](https://skmtc.dev/speakai/apis/speak-ai-api/revisions/52d777e6d46e?raw)
