Skip to content
WhatSync/DocsAPI v1

Change or pause a webhook

Change a webhook's events, description or headers, or pause and resume it (paused: true or false).

POST/api/v1/tools/update_webhookWrite
Key permissions
Read chats and messages + Manage webhooks
Authentication
Authorization: Bearer $WHATSYNC_API_KEY
How keys work

How it works

  • Resuming also resends deliveries that waited while paused.
  • headers replaces the whole set (null removes them); use it when the receiver refuses with 401 and wants its own key, e.g.
  • a Cursor automation: headers {"Authorization": "Bearer <key>"}.
  • Deliveries still waiting are then sent again at once.
  • To send to a different address, delete this one and use request_webhook.

Body parameters

idempotencyKeystringbody or header

A fresh random UUID for each new action; never build it from dates, names, counters or step numbers, which repeat across runs. Reuse it exactly only to retry the same action.

webhookIdstringrequired

id from list_webhooks or create_webhook, such as we_...

eventTypesmessage.received | message.sent | message.status | connection.connected | connection.disconnected | poll.vote_updated | webhook.test[]optional

See the example and input schema for this value.

descriptionstring | nulloptional

See the example and input schema for this value.

pausedbooleanoptional

See the example and input schema for this value.

headersobject | nulloptional

Extra request headers sent with every event, as { name: value }, for receivers that need their own key, like Cursor automations: {"Authorization": "Bearer <key>"}. Up to 5. Values are stored encrypted and never shown again; answers list header_names only.

Conditions and pagination

  • headers is optional: extra request headers for receivers that need their own key, like Cursor automations: headers: {"Authorization": "Bearer <key>"}. Up to 5; Content-Type, Host, User-Agent, Webhook-* and other HTTP framing headers are refused. Values are stored encrypted and never returned; answers show header_names only. On update_webhook, headers replaces the whole set and null removes it.
  • Use a unique idempotency key for each intended action. Reuse the same key and exactly the same input on a retry. The body key takes precedence over Idempotency-Key.

Response

The response wraps tool-specific data in result. Save operation_id and inspect get_operation with operationId if the outcome is uncertain. completed means the operation completed; it does not prove message delivery or Meta approval. An uncertain operation returns HTTP 409 with error.operation_id.

Every response includes X-Request-Id. Errors use the shared error format and retry rules.

Schemas

Input JSON Schema
Input JSON Schema
{
  "type": "object",
  "properties": {
    "idempotencyKey": {
      "type": "string",
      "pattern": "^[A-Za-z0-9._:-]{8,128}$",
      "description": "A fresh random UUID for each new action; never build it from dates, names, counters or step numbers, which repeat across runs. Reuse it exactly only to retry the same action."
    },
    "webhookId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 80,
      "description": "id from list_webhooks or create_webhook, such as we_..."
    },
    "eventTypes": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "message.received",
          "message.sent",
          "message.status",
          "connection.connected",
          "connection.disconnected",
          "poll.vote_updated",
          "webhook.test"
        ]
      },
      "minItems": 1,
      "maxItems": 7
    },
    "description": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 500
        },
        {
          "type": "null"
        }
      ]
    },
    "paused": {
      "type": "boolean"
    },
    "headers": {
      "anyOf": [
        {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "Extra request headers sent with every event, as { name: value }, for receivers that need their own key, like Cursor automations: {\"Authorization\": \"Bearer <key>\"}. Up to 5. Values are stored encrypted and never shown again; answers list header_names only."
        },
        {
          "type": "null"
        }
      ],
      "description": "Extra request headers sent with every event, as { name: value }, for receivers that need their own key, like Cursor automations: {\"Authorization\": \"Bearer <key>\"}. Up to 5. Values are stored encrypted and never shown again; answers list header_names only."
    }
  },
  "required": [
    "idempotencyKey",
    "webhookId"
  ],
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}
Response JSON Schema
Response JSON Schema
{
  "type": "object",
  "properties": {
    "operation_id": {
      "type": "string",
      "format": "uuid"
    },
    "status": {
      "type": "string",
      "enum": [
        "completed"
      ]
    },
    "replayed": {
      "type": "boolean"
    },
    "result": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "updated": {
          "type": "boolean"
        },
        "header_names": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "required": [],
      "additionalProperties": true
    },
    "note": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "operation_id",
    "status",
    "result"
  ],
  "additionalProperties": true
}