Register a webhook
Registers a public https address and the event types it receives. The signing secret is returned once. Private and local addresses are rejected. An agent can have 10 webhooks that are not disabled, counting the ones added in the dashboard. Scope: webhooks:manage.
bearerAuthorizationBearer <mosc_...>A client key (mosc_).
application/json- body
url*string8 <= length <= 500eventTypes*array<>1 <= items <= 7The endpoint, with its signing secret.
application/json- response
id*integerurl*stringeventTypes*array<>status*stringpaused after repeated dead deliveries. disabled after DELETE, a 410 response, or a PATCH to disabled. An endpoint removed with DELETE cannot be changed again.
"active""paused""disabled"secret*stringThe signing secret. It is returned only once.
Example request
curl -X POST 'https://api.messageos.ai/v1/webhooks' \ -H 'Authorization: Bearer mosc_...' \ -H 'Content-Type: application/json' \ -d '{ "url": "https://example.com/messageos/webhooks", "eventTypes": [ "message.delivered", "reply.received", "contact.opted_out" ]}'Example response
{ "id": 3, "url": "https://example.com/messageos/webhooks", "eventTypes": [ "message.delivered" ], "status": "active", "secret": "9f1c2b7a4d3e8f60b5a1c9d2e7f4a3b6c8d1e2f3a4b5c6d7"}List webhooks GET
Lists this client's endpoints, including disabled ones. The secret is not included. Scope: webhooks:manage.
Remove a webhook DELETE
Removes the endpoint and revokes its signing secret. It stays in the list with status disabled, receives nothing, and cannot be resumed or changed. Removing it again returns 204. Scope: webhooks:manage.
