Ruka hadi maudhui makuu

API ya Kupokea

Kila kitu huanza na tukio. Tuma moja kwenye lango la kupokea na injini huikunja kuwa hali ya mtumiaji ya papo hapo mara moja. Marejeleo kamili ya SDK na API yatakuja na bidhaa.

At a glance

Host
eu.api.prodantix.com
Operations
POST /v1/events · POST /v1/identify · POST /v1/group
Credential
The public project key, as a Bearer header or api_key in the body
Answer
202: accepted for processing

Send a batch

Events travel in batches, one request carrying 1 to 1000 of them. The body is strict: an unknown key anywhere, a missing field or an out-of-bounds value rejects the whole batch with 400 INVALID_EVENT_BATCH. A missing or invalid key answers 401; a key from another region answers 403.

curl -X POST "https://eu.api.prodantix.com/v1/events" \
  -H "Authorization: Bearer $PRODANTIX_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "events": [{
      "distinct_id": "u_8f3a",
      "event_id": "5f6b2c1e-8f4b-4c6e-9d2a-7b1e3c4d5a6f",
      "event_name": "order.completed",
      "properties": { "amount": 4200 },
      "schema_version": 1,
      "timestamp": "2026-08-31T12:00:00.000Z"
    }],
    "sent_at": "2026-08-31T12:00:01.000Z"
  }'
FieldRequiredRules
eventsYes1 to 1000 events per request
sent_atYesISO-8601 with an explicit offset, stamped when the batch left the client
api_keyNoThe public project key (pdx_pub_…); an alternative to the Authorization header

The event envelope

Each entry in events is one envelope. What the fields mean for the person they describe is the data model; the wire rules are:

FieldRequiredRules
distinct_idYes1 to 200 characters; the user the event belongs to
event_idYesA UUID minted by the sender, one per event
event_nameYes1 to 200 characters, lowercase dotted (order.completed); a leading $ is reserved for platform names
timestampYesISO-8601 with an explicit offset, stamped when the event happened
schema_versionYesAlways 1
propertiesNoAny JSON object, defaults to empty; $set, $set_once and $unset mutate user state
session_idNo1 to 200 characters; ties the event to a replay session
contextNolocale, os, sdk and sdk_version, each optional and bounded

Identify and group

Two dedicated operations write identity rather than behaviour. POST /v1/identify associates traits with a distinct id and merges identities; POST /v1/group associates a distinct id with a group. Both take a loose { distinct_id, event_id?, properties?, timestamp? } body, become $identify and $group system events inside the engine, and answer 202 like the batch endpoint. How a merge resolves is described in the data model.

Kukubaliwa si sawa na kuhifadhiwa

Operesheni za upokeaji hujibu 202. Hiyo inamaanisha tukio limekubaliwa kuchakatwa, si kwamba limehifadhiwa. Tukio lenye muundo mbovu linaweza kutupwa baadaye katika mnyororo.

To confirm an event survived the pipeline, read it back from the events query as the quickstart does, or watch it arrive on the project room (realtime events).

Where this meets the rest of the docs

The SDKs wrap this endpoint, batching and retrying for you; install one rather than posting by hand where you can. The other REST operations, flags and messaging, live on the REST page, and the host serves its own contract at /openapi.json.