MessageOS
APIEvent sources

Create an inbound event source

POST
/event-sources

Hidden until inbound event webhooks are enabled. The source signs events it posts to /webhooks/clients/{sourceId}. The secret is returned once. Scope: webhooks:manage.

Authorization

bearer
headerAuthorizationBearer <mosc_...>

A client key (mosc_).

Request Body

application/json
  1. body
name*string
Length1 <= length
allowedTypes*array<>
Items1 <= items

Response Body

The source id and its secret.

application/json
  1. response
id*string
secret*string

Returned only once.

Example request

curl -X POST 'https://api.messageos.ai/v1/event-sources' \  -H 'Authorization: Bearer mosc_...' \  -H 'Content-Type: application/json' \  -d '{  "name": "Orders",  "allowedTypes": [    "lead.created"  ]}'

Example response

{  "id": "src_4f9a1c2b3d4e5f6a7b8c9d0e",  "secret": "kT3v9QxZ2bYp7rW1sN5mL8aD0cF4gH6jE2uR7yI9oP1"}