Skip to main content
POST
/
events
Track an event
curl --request POST \
  --url https://api.engagefabric.com/events \
  --header 'Content-Type: application/json' \
  --data '
{
  "projectId": "123e4567-e89b-12d3-a456-426614174000",
  "externalUserId": "user_12345",
  "eventType": "lesson_completed",
  "properties": {
    "lessonId": "math-101",
    "score": 95,
    "duration": 300
  },
  "timestamp": "2025-11-17T10:30:00Z",
  "idempotencyKey": "evt_user12345_lesson_20251117_103000"
}
'
{
  "eventId": "123e4567-e89b-12d3-a456-426614174000",
  "status": "PENDING",
  "skipped": false,
  "message": "Event queued for processing",
  "existingEventId": "<string>"
}

Body

application/json
projectId
string
required

Project ID

Example:

"123e4567-e89b-12d3-a456-426614174000"

externalUserId
string
required

External user ID from client system

Example:

"user_12345"

eventType
string
required

Event type

Example:

"lesson_completed"

properties
object

Event properties

Example:
{
"lessonId": "math-101",
"score": 95,
"duration": 300
}
timestamp
string

Event timestamp (ISO 8601)

Example:

"2025-11-17T10:30:00Z"

idempotencyKey
string

Idempotency key for preventing duplicate processing

Example:

"evt_user12345_lesson_20251117_103000"

Response

Event accepted and queued for processing

eventId
string
required

Event ID

Example:

"123e4567-e89b-12d3-a456-426614174000"

status
enum<string>
required

Processing status

Available options:
PENDING,
PROCESSING,
PROCESSED,
FAILED,
SKIPPED
Example:

"PENDING"

skipped
boolean
required

Whether event was skipped due to idempotency

Example:

false

message
string
required

Message

Example:

"Event queued for processing"

existingEventId
string

Existing event ID if duplicate