APIEvents
Submit an event
POST
Submits one event from your own system. Hidden until events are enabled.
- contact must include contactId, phoneNumber, or externalId.
- A phone number that is not a contact creates one with no consent record.
- conversation.idle is reserved.
- A repeated id returns status duplicate.
Scope: events:write.
bearerheader
AuthorizationBearer <mosc_...>A client key (mosc_).
Idempotency-Key?string8 to 128 characters. The same key and body return the stored response.
Length
8 <= length <= 128application/json- body
id?stringLength
length <= 128occurredAt?stringMatch
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$Format
date-timecontact*type*stringMatch
^[a-z][a-z0-9_.-]{1,63}$data?Default
{}The event was accepted.
application/json- response
id*stringstatus*stringValue in
"received""duplicate"Example request
curl -X POST 'https://api.messageos.ai/v1/events' \ -H 'Authorization: Bearer mosc_...' \ -H 'Idempotency-Key: visit-reminder-42-2026-10-28' \ -H 'Content-Type: application/json' \ -d '{ "id": "client-event-1", "occurredAt": "2026-10-28T23:00:00.000Z", "contact": { "phoneNumber": "+15555550123" }, "type": "lead.created", "data": { "leadId": "L-1", "source": "web" }}'Example response
{ "id": "evt_6d1e0f3a-2c4b-4f8e-9a7d-1b2c3d4e5f60", "status": "received"}Create an inbound event source POST
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.
List gaps GET
Hidden until gap recording is enabled. Returns up to 50 gaps in id order. Pass the last id as cursor for the next ones. When the client policy omits summaries, summary is null. Scope: gaps:read.
