Skip to main content
POST
/
api
/
v1
/
events
Track event
curl --request POST \
  --url http://localhost:3001/api/v1/events \
  --header 'Content-Type: application/json' \
  --header 'idempotency-key: <idempotency-key>' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "event": "<string>",
  "profile": {
    "email": "jsmith@example.com",
    "externalId": "<string>",
    "properties": {}
  },
  "data": {},
  "referenceId": "<string>",
  "redactedDataPaths": [
    "<string>"
  ],
  "occurredAt": "2023-11-07T05:31:56Z"
}
'
{
  "eventId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "profileId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "matchedJourneys": 4503599627370495,
  "enrolledJourneys": 4503599627370495,
  "skippedJourneys": 4503599627370495
}

Documentation Index

Fetch the complete documentation index at: https://segmentflow.ai/docs/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

x-api-key
string
header
required

Unified API key for server-side SDK and API integrations

Headers

idempotency-key
string
required

Required idempotency key. Reusing it with the same request replays the original event response; reusing it with a different request returns 409.

Required string length: 1 - 255

Body

application/json
event
string
required

Free-form business event name, for example order.created.

Required string length: 1 - 255
profile
object
required

Profile identity and optional durable Profile Property input.

data
object

One-event payload for this event. This is not copied into Profile Properties.

referenceId
string

Safe caller correlation id. It is not used for idempotency; use the Idempotency-Key header for that.

Required string length: 1 - 255
redactedDataPaths
string[]

Event state paths to redact before durable retention. Paths must live under /event/.

Pattern: ^\/event\/
occurredAt
string<date-time>

Event time. If omitted, Segmentflow uses receipt time.

Pattern: ^(?:(?:\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|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$

Response

Default Response

eventId
string<uuid>
required

Durable UserEvent id.

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
profileId
string<uuid>
required

Resolved Profile id.

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
matchedJourneys
integer
required

Count of active Journeys whose entry event matched.

Required range: 0 <= x <= 9007199254740991
enrolledJourneys
integer
required

Count of Journey enrollments started from this event.

Required range: 0 <= x <= 9007199254740991
skippedJourneys
integer
required

Count of matched Journeys skipped by filters or eligibility.

Required range: 0 <= x <= 9007199254740991