---
title: "Update webhook"
method: POST
path: "/v1/projects/{project_id}/webhooks/{id}"
tags: ["Webhook"]
---

# Update webhook

`POST /v1/projects/{project_id}/webhooks/{id}`

## Request

- Base URL: `https://api.telerivet.com`
- URL: `https://api.telerivet.com/v1/projects/{project_id}/webhooks/{id}`
- Auth: one of:
  - HTTP basic
  - OAuth 2 (authorization code, authorization URL `https://telerivet.com/oauth/authorize`, token URL `https://api.telerivet.com/oauth/token`)

Updates the webhook configuration.

## Path parameters

- `project_id` string, required
- `id` string, required

## Request body

- object
  - `url` string: URL that webhook requests are sent to
  - `secret` string: Secret included with webhook requests for authentication (sent as HTTP basic auth password with username 'telerivet')
  - `events` string[]: Array of event types that trigger this webhook. Possible values: `send_status` (message status updates), `send_broadcast` (broadcast sent), `contact_update` (contact added/updated/deleted), `message_metadata` (message metadata updated)
  - `vars` object: Custom variables stored for this webhook. Variable names may be up to 32 characters in length and can contain the characters a-z, A-Z, 0-9, and _. Values may be strings, numbers, or boolean (true/false). String values may be up to 4096 bytes in length when encoded as UTF-8. Up to 100 variables are supported per object. Setting a variable to null will delete the variable.

## Response `200`

Successful response

- Webhook: Represents a webhook that is triggered when specific events occur within a project. Webhooks allow your server to receive HTTP POST requests when certain events happen, such as when a message's status changes or when a contact is updated. When an event occurs that matches a webhook's event types, Telerivet will send an HTTP POST request to the webhook URL with information about the event. For more information about the webhook request format, see the [Webhook API](https://telerivet.com/api/webhook) documentation. Note: The Webhook object is not used for notifying your server when incoming messages are received. To notify a URL when incoming messages are received, you can configure a webhook by creating a Service with type incoming_message_webhook.
  - `id` string: ID of the webhook
  - `url` string: URL that webhook requests are sent to
  - `secret` string: Secret included with webhook requests for authentication (sent as HTTP basic auth password with username 'telerivet')
  - `events` string[]: Array of event types that trigger this webhook. Possible values: `send_status` (message status updates), `send_broadcast` (broadcast sent), `contact_update` (contact added/updated/deleted), `message_metadata` (message metadata updated)
  - `vars` object: Custom variables stored for this webhook. Variable names may be up to 32 characters in length and can contain the characters a-z, A-Z, 0-9, and _. Values may be strings, numbers, or boolean (true/false). String values may be up to 4096 bytes in length when encoded as UTF-8. Up to 100 variables are supported per object. Setting a variable to null will delete the variable.
  - `project_id` string: ID of the project this webhook belongs to

## Other responses

- `400`: Invalid request parameters
- `401`: Invalid or missing API key or Bearer token
- `404`: Resource not found

---

[API](https://skmtc.dev/telerivet/apis/telerivet-api.md) · [All operations](https://skmtc.dev/telerivet/apis/telerivet-api/llms.txt) · [OpenAPI document](https://skmtc.dev/telerivet/apis/telerivet-api/revisions/4e14b1c8d917?raw)
