Skip to main content
POST
/
events
Ingest an event
curl --request POST \
  --url https://api.sendrealm.com/events \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "event": "order.completed",
  "contact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "email": "jsmith@example.com",
  "external_id": "<string>",
  "payload": {},
  "occurred_at": "2023-11-07T05:31:56Z",
  "idempotency_key": "<string>"
}
'
{
  "data": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "event": "<string>",
    "deduplicated": true,
    "occurred_at": "2023-11-07T05:31:56Z"
  }
}

Endpoint

POST /events

Request body

{
  "event": "order.completed",
  "contact_id": "c671f89b-3ec1-4c58-9ad2-4ef8c2917cda",
  "payload": {
    "order_id": "ord_123",
    "total": 4900
  },
  "occurred_at": "2026-06-08T14:15:00.000Z",
  "idempotency_key": "evt_order_completed_ord_123"
}
You can also identify a contact with external_id or email. Identity resolution order is:
  1. contact_id
  2. external_id
  3. normalized email

Successful response

{
  "data": {
    "id": "4d978da0-4504-42e3-9d71-e9b9a2f9082d",
    "event": "order.completed",
    "resolved_identity_type": "contact_id",
    "resolved_identity_value": "c671f89b-3ec1-4c58-9ad2-4ef8c2917cda",
    "occurred_at": "2026-06-08T14:15:00.000Z"
  }
}
New customer events currently return 202 Accepted.

Idempotent replay response

If you reuse the same idempotency_key, Sendrealm returns the existing event instead of creating a new one:
{
  "data": {
    "id": "4d978da0-4504-42e3-9d71-e9b9a2f9082d",
    "event": "order.completed",
    "deduplicated": true,
    "occurred_at": "2026-06-08T14:15:00.000Z"
  }
}

Reserved namespace

Customer-submitted events must not start with sendrealm.. Examples of Sendrealm system events:
  • sendrealm.mail.delivery
  • sendrealm.push.open
  • sendrealm.contact.updated
  • sendrealm.topic.subscribed

Guarantees and limits

  • Event ingest is at-least-once.
  • Idempotency is enforced by project_id + idempotency_key.
  • Payload size is capped by the project’s configured event payload limit.
  • Processing retries use exponential backoff before a dead-letter handoff.
  • Ordering across separate events is not guaranteed.

Retention

  • Default event retention is 90 days.
  • Retention windows can be adjusted through backoffice-managed project automation settings.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
event
string
required
Example:

"order.completed"

contact_id
string<uuid>
email
string<email>
external_id
string
payload
object
occurred_at
string<date-time>
idempotency_key
string

Response

Event replay deduplicated

data
object