Skip to main content
POST
Send an event

Authorizations

Authorization
string
header
required

A project key (Developers → API keys). Keep it on your server, not in an app.

Headers

traceparent
string

W3C Trace Context; joins your trace to ours

Idempotency-Key
string

A retry with the same key and body returns the first response

Required string length: 1 - 255

Body

application/json
event
string
required

An event name such as checkin.scanned. The onchain. and web. prefixes are reserved for Lurk’s integrations and cannot be sent here

Maximum string length: 100
Pattern: ^[a-z][a-z0-9_]*(\.[a-z][a-z0-9_]*)+$
user
string
required

Your own identifier for the person, 1 to 256 characters. Lurk makes the person the first time it sees it

Required string length: 1 - 256
idempotency_key
string
required

Makes a retry safe: the same key with the same request returns the first answer and changes nothing. 1 to 255 characters, no control characters. Remembered for 30 days

Required string length: 1 - 255
properties
object

Flat facts about the event, up to 50. Each name is 1 to 64 characters; each value is a string (up to 1,024 characters), a number, true or false, null, or a list of up to 50 of those

timestamp
string<date-time>

When it happened, as an ISO 8601 time with an offset. Defaults to now. It may be in the past, so you can import history, but not more than 5 minutes ahead of Lurk's clock

profile
object

Changes to the person's profile, applied with the event in the same transaction, once (a replay of the same idempotency_key applies nothing). Rules do not read it, and it is not kept with the event

alias
string

Another identifier this person was known by, such as the anonymous visitor ID they had before this sign-in: their history also reads its events from now on. Nothing moves, and the alias can be removed (DELETE /v1/users/{id}/aliases). Made with the event, once. A refused alias is not made and the event is recorded all the same: alias in the answer says which, and why

Required string length: 1 - 256

Response

Send an event

activity
string | null
required

The receipt envelope, or null when nothing changed

user
string
required

Your own identifier for the person: an email, a user ID or a session ID. 1 to 256 characters

Required string length: 1 - 256
event
string
required

An event's name: lowercase words joined by dots, thing first, such as checkin.scanned

Maximum string length: 100
Pattern: ^[a-z][a-z0-9_]*(\.[a-z][a-z0-9_]*)+$
receipts
object[]
required

What changed: one for each unit a rule changed, with the balance after. Empty when nothing changed

skipped
object[]
required

Rules that heard the event and did nothing, and why. Not an error

held
object[]

Changes that wait for a person to give or refuse them; none have been made

alias
object

Only when the event carried alias: what became of it. A refused alias never refuses the event