Skip to content
WhatSync/DocsAPI v1

Create a webhook (confirm link)

Prepare sending WhatSync events (new messages, sends, delivery status, connection changes, poll votes) to an HTTPS address the user gave, such as an n8n, Make or Zapier webhook URL or their own server.

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

How it works

  • Whoever runs the address receives the user's new messages, so the user confirms it, and sees the signing secret once, on the confirm page.
  • Once they confirm, call send_test_webhook and then list_webhooks: if the test failed, last_failure.problem says why.
  • If the receiver needs its own key with each request (it answers 401 asking for an Authorization header, as Cursor automations do), pass it in headers.
  • Returns confirm_link: nothing happens until the user opens it while signed in to WhatSync and presses the button.
  • Max and Business plans; at most 10 per account.

Body parameters

urlstring · urirequired

A public HTTPS address that accepts POST requests

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

See the example and input schema for this value.

descriptionstringoptional

See the example and input schema for this value.

headersobjectoptional

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.

Response

HTTP 200 returns this tool's JSON directly, without an MCP content wrapper. Optional provider fields may be absent or null; check pagination and coverage before treating a page as complete.

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": {
    "url": {
      "type": "string",
      "format": "uri",
      "maxLength": 2000,
      "description": "A public HTTPS address that accepts POST requests"
    },
    "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": {
      "type": "string",
      "maxLength": 500
    },
    "headers": {
      "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."
    }
  },
  "required": [
    "url",
    "eventTypes"
  ],
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}
Response JSON Schema
Response JSON Schema
{
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "enum": [
        "confirmation_needed",
        "not_on_this_plan",
        "demo_account"
      ]
    },
    "confirm_link": {
      "type": "string"
    },
    "link_expires_at": {
      "type": "string"
    },
    "what_happens": {
      "type": "string"
    },
    "note": {
      "type": "string"
    },
    "links": {
      "type": "object",
      "additionalProperties": true,
      "description": "Provider or tool-specific fields; preserve unknown fields."
    }
  },
  "required": [],
  "additionalProperties": true
}