---
title: "Set the inbound webhook"
method: PUT
path: "/v1/webhook"
tags: ["Webhook"]
---

# Set the inbound webhook

`PUT /v1/webhook`

## Request

- Base URL: `https://api.whatsmcp.com`
- URL: `https://api.whatsmcp.com/v1/webhook`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

Registers the HTTPS endpoint that receives inbound messages, or replaces the current one. The answer carries the signing `secret` ONCE — store it now, it cannot be read back. Every call issues a NEW secret; to stop and restart deliveries without changing it, use PATCH /v1/webhook.

## Request body

- SetWebhookInput
  - `events` string[], nullable
  - `url` string, required

## Response `200`

OK

- SetWebhookOutput
  - `events` string[], nullable
  - `refusal` Refusal
    - `account_status` string: when the number is not working: its status — starting, not_running, whatsapp_down, suspended, pairing, unlinked or locked
    - `account_status_reason` string: the detail of account_status, e.g. no_egress, stopped, no_plan
    - `message` string, required: a human-readable explanation
    - `reason` string, required: why the call was declined
    - `refused` boolean, required: true when the call was declined rather than performed
    - `retry_after_seconds` integer: seconds to wait before retrying; absent or 0 means retrying will not help
    - `since` string: when the number stopped working, RFC3339, when known
  - `secret` string: the signing secret — shown ONCE; store it now, it cannot be retrieved later
  - `url` string
  - `verification` string
  - `webhook_id` string

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `422`: Unprocessable Entity
- `429`: Too Many Requests
- `500`: Internal Server Error

---

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