MessageOS
APIWebhooksIdTest

Send a test event

POST
/webhooks/{id}/test

Sends a webhook.test event to this endpoint, to check your receiver without sending a message to anyone.

  • The event is queued and its delivery starts at once, so it usually reaches your server within seconds.
  • After 30 tests in an hour for one agent, or while webhook delivery is not turned on for your agent, the event stays queued and goes out on the next delivery run.
  • The answer is 202 as soon as the event is queued, and it does not wait for your server: GET /webhooks/{id}/deliveries shows the event with its status and the status code your server answered.
  • It is signed like any other event, and retried like any other when your server does not answer with a 2xx status.

Scope: webhooks:manage.

Authorization

bearer
headerAuthorizationBearer <mosc_...>

A client key (mosc_).

Path Parameters

id*integer

The endpoint id.

Range0 < value

Response Body

The test event was queued.

application/json
  1. response
id*string

The event id.

status*string

Example request

curl -X POST 'https://api.messageos.ai/v1/webhooks/42/test' \  -H 'Authorization: Bearer mosc_...'

Example response

{  "id": "evt_2b7f4c1e-8a9d-4e3f-b6a1-5c0d9e8f7a6b",  "status": "pending"}