Skip to content

API reference

Create or change a webhook endpoint

webhook_save — Create (no endpoint_id) or change an endpoint.

webhook_save · Changes an X-Buddy setting

Create (no endpoint_id) or change an endpoint. Creating returns the signing secret ONCE (Standard Webhooks: webhook-id, webhook-timestamp, webhook-signature = v1,base64 HMAC-SHA256 of id.timestamp.body). Changing needs expected_revision. Retries: 30 s, 2 min, 10 min, 1 h, 6 h… for 72 h; 20 failures in a row in 24 h pause it.

REST POST /api/public/v1/webhooks
MCP tool webhook_save
Permission needed integrations.manage — Owner, Manager
Scope group webhooks:manage
Group Events and webhooks
Shown up front in profiles Infrastructure

Input

Field Type Required Description
endpoint_id string (uuid) No
name string (1–60 chars) Yes A name people recognise, e.g. "n8n inbox flow".
url string (uri, 0–500 chars) Yes HTTPS address that receives the events (no internal / private addresses).
event_types array of job.succeeded · job.failed · job.unknown · job.held · job.cancelled · batch.completed · dm.received · dm.request_received · reply.received · mention.received · follower.gained · follower.lost · post.published · post.failed · post.partial · campaign.person_entered · campaign.person_replied · campaign.person_completed · campaign.paused_auto · account.session_lost · account.session_restored · account.safety_changed · account.x_rate_limited · account.chat_locked · vps.offline · vps.online · proxy.failed · alert.opened · integration.paused · scan.completed · limit.reached (1–31 items) Yes Which event types to send.
account_ids array of string (uuid) (0–200 items) No Only events of these accounts (account-less events always arrive). null = every account.
group_ids array of string (uuid) (0–50 items) No Only events of accounts in these groups. null = no group filter.
message_content boolean No Include message / reply text (needs the connection's read-message-text right).
expected_revision integer (1–∞) No The revision you read (optimistic locking); a newer revision fails with revision_conflict.

Result

Returns the operation's result in the { data, meta } envelope.

Needs an idempotency key (Idempotency-Key, 8–128 characters). Retrying with the same key never repeats the action.

Example

Call over REST

curl -X POST "https://reach-link-craft.lovable.app/api/public/v1/webhooks" \
  -H "Authorization: Bearer $XBUDDY_API_KEY" \
  -H "Idempotency-Key: 6f1c2a90-example-key" \
  -H "Content-Type: application/json" \
  -d '{"name":"Example","url":"https://example.com/","event_types":["job.succeeded"]}'

Call over MCP

{
  "method": "tools/call",
  "params": {
    "name": "webhook_save",
    "arguments": {
      "name": "Example",
      "url": "https://example.com/",
      "event_types": [
        "job.succeeded"
      ],
      "idempotency_key": "6f1c2a90-example-key"
    }
  }
}

Errors you may get

Back to all operations