Skip to main content
WA-Campaigns
API reference

Webhooks API

Outbound event subscriptions: register an HTTPS endpoint and the platform posts signed events to it as messages are delivered, replies arrive, and campaigns finish. The signing secret is shown exactly once, when the endpoint is created.

GET/webhookswebhooks:manage

List endpoints

The org's registered outbound webhook endpoints. The signing secret is redacted — it is shown only once, when the endpoint is created.

Takes no arguments.

Request

curl -X GET "https://rcs-templates-api-dot-msg2ai-server.ue.r.appspot.com/api/agent/webhooks" \
  -H "Authorization: Bearer $WA_AGENT_KEY"

Same call, as a tool

# MCP tool name
list_webhooks

# No CLI command for this call yet —
# use the HTTP route or the MCP tool.
POST/webhookswebhooks:manage

Register an endpoint

Register an HTTPS endpoint to receive signed platform events. The response carries the signing secret exactly once — store it then, because every later read redacts it and there is no way to retrieve it again. Each delivery is signed with an HMAC-SHA256 over the timestamp and raw body.

Arguments

NameTypeInDescription
urlrequiredstringbodyHTTPS endpoint to POST events to.
eventsrequiredstring[]bodyEvent types to subscribe to.
descriptionstringbody—

Request

curl -X POST "https://rcs-templates-api-dot-msg2ai-server.ue.r.appspot.com/api/agent/webhooks" \
  -H "Authorization: Bearer $WA_AGENT_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": <string>,
    "events": <string[]>
  }'

Same call, as a tool

# MCP tool name
create_webhook

# No CLI command for this call yet —
# use the HTTP route or the MCP tool.
PUT/webhooks/:idwebhooks:manage

Update an endpoint

Change an endpoint's url, subscribed events, description, or active flag. Only the fields you pass change, and the signing secret is neither returned nor rotated here.

Arguments

NameTypeInDescription
idrequiredstringpath—
urlstringbody—
eventsstring[]body—
descriptionstring | nullbody—
activebooleanbody—

Request

curl -X PUT "https://rcs-templates-api-dot-msg2ai-server.ue.r.appspot.com/api/agent/webhooks/<id>" \
  -H "Authorization: Bearer $WA_AGENT_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": <string>,
    "events": <string[]>,
    "description": <string | null>,
    "active": <boolean>
  }'

Same call, as a tool

# MCP tool name
update_webhook

# No CLI command for this call yet —
# use the HTTP route or the MCP tool.
DELETE/webhooks/:idwebhooks:manage

Remove an endpoint

Remove a webhook endpoint. Its delivery history goes with it, and anything still queued for it stops.

Arguments

NameTypeInDescription
idrequiredstringpath—

Request

curl -X DELETE "https://rcs-templates-api-dot-msg2ai-server.ue.r.appspot.com/api/agent/webhooks/<id>" \
  -H "Authorization: Bearer $WA_AGENT_KEY"

Same call, as a tool

# MCP tool name
delete_webhook

# No CLI command for this call yet —
# use the HTTP route or the MCP tool.
POST/webhooks/:id/testwebhooks:manage

Fire a test event

Fire a synthetic signed event at one endpoint to verify the receiver. Returns the delivery id and whether it was accepted.

Arguments

NameTypeInDescription
idrequiredstringpath—

Request

curl -X POST "https://rcs-templates-api-dot-msg2ai-server.ue.r.appspot.com/api/agent/webhooks/<id>/test" \
  -H "Authorization: Bearer $WA_AGENT_KEY"

Same call, as a tool

# MCP tool name
test_webhook

# No CLI command for this call yet —
# use the HTTP route or the MCP tool.