Skip to main content

Send Events

Send Events​

Send events to the API base URL supplied with your tenant. Local development uses the HTTPS API edge https://api.dev.custd.com.

Prerequisites:

# API_URL and TOKEN come from your configured tenant integration.
# Replace the historical timestamp below with your event's actual UTC time.

curl -sf -X POST "$API_URL/api/v1/events" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"eventTypeSlug": "page-view",
"schemaVersion": "1.0.0",
"timestamp": "2026-05-27T12:00:00.000Z",
"context": { "device": { "type": "desktop" } },
"payload": { "example": true }
}'

Expected result: HTTP 202, success: true and an event UUID. The sample payload must match your registered schema. Tenant scope comes from the credential.

Batch sends use /api/v1/events/batch with {"events":[...]} and return per-event results[]. Require the expected result count, success: true, a 2xx result status and an event UUID for every item. HTTP 202 alone is insufficient.

Start with one event and follow its receipt to queryable data. Correct the schema/type/payload named by a validation error. Preserve event identifiers and use the SDK's bounded retry/flush handling for failed items; do not blindly resend successful batch items.