Skip to content

HTTP API

POST /sdk/v1/decide

What to show this person in each placement, now

Sent with: X-App-Install, X-App-Key

Body

Field Type Required
external_id string yes
placements string[] yes
language en · ar yes
context object
token string
trigger Trigger

Answers: 200

POST /sdk/v1/events

What the app showed, and what the person clicked or dismissed

Sent with: X-App-Install, X-App-Key

Body

Field Type Required
events InteractionIn[] yes

Answers: 200

GET /sdk/v1/design/bundle

The org’s design: its theme, components and templates (ETag)

Sent with: if-none-match, X-App-Key

Answers: 200, 304

POST /server/v1/decide

What to show a person in each placement, now

Sent with: authorization

Body

Field Type Required
external_id string yes
placements string[] yes
language en · ar yes
context object
token string
trigger Trigger

Answers: 200

POST /server/v1/events

What was shown, and what was clicked or dismissed

Sent with: authorization

Body

Field Type Required
events InteractionIn[] yes

Answers: 200

POST /sdk/v1/coupons/claim

Claim a coupon for this person (idempotent by id)

Sent with: X-App-Install, X-App-Key

Body

Field Type Required
id string (uuid) yes
message_id string (uuid) yes
external_id string yes
language en · ar
view boolean

Answers: 200

POST /sdk/v1/draws/play

Play a draw for this person: the server draws (idempotent by id)

Sent with: X-App-Install, X-App-Key

Body

Field Type Required
id string (uuid) yes
message_id string (uuid) yes
external_id string yes
language en · ar
view boolean

Answers: 200

POST /sdk/v1/checkins

Check this person in for today (once a day)

Sent with: X-App-Install, X-App-Key

Body

Field Type Required
message_id string (uuid) yes
external_id string yes
language en · ar
view boolean

Answers: 200

PUT /sdk/v1/push-tokens

Register this install’s push token

Sent with: X-App-Install, X-App-Key

Body

Field Type Required
external_id string
platform android · ios · web yes
provider fcm · apns yes
environment production · sandbox
token string yes

Answers: 200

DELETE /sdk/v1/push-tokens

Remove this install’s token

Sent with: X-App-Install, X-App-Key

Answers: 204

POST /server/v1/coupons/claim

Claim a coupon for this person (idempotent by id)

Sent with: authorization

Body

Field Type Required
id string (uuid) yes
message_id string (uuid) yes
external_id string yes
language en · ar
view boolean

Answers: 200

POST /server/v1/draws/play

Play a draw for this person: the server draws (idempotent by id)

Sent with: authorization

Body

Field Type Required
id string (uuid) yes
message_id string (uuid) yes
external_id string yes
language en · ar
view boolean

Answers: 200

POST /server/v1/checkins

Check this person in for today (once a day)

Sent with: authorization

Body

Field Type Required
message_id string (uuid) yes
external_id string yes
language en · ar
view boolean

Answers: 200

POST /server/v1/push/send

Send a live push message to a person’s devices, with the org’s creds

Sent with: authorization

Body

Field Type Required
message_id string (uuid) yes
external_id string yes
language en · ar

Answers: 200

GET /server/v1/push-tokens

A person’s push tokens, newest first

Sent with: authorization

Answers: 200

Every SDK sends the person’s identity, events and consent here, with the same publishable key.

POST /sdk/v1/identify

Who the app’s user is; email and phone are hashed on arrival

Sent with: X-User-Hash, X-App-Install, X-App-Key

Body

Field Type Required
external_id string
email string
phone string
email_sha256 string
phone_sha256 string
attributes object

Answers: 200

POST /sdk/v1/events

What the identified user did

Sent with: X-User-Hash, X-App-Key

Body

Field Type Required
external_id string yes
events EventIn[] yes

Answers: 200

PUT /sdk/v1/consent

What the user agreed to, per channel

Sent with: X-User-Hash, X-App-Key

Body

Field Type Required
external_id string yes
channel push · in_app · email · whatsapp · sms · telegram yes
granted boolean yes
occurred_at string (date-time)

Answers: 200

POST /sdk/v1/install/events

What the app’s user did before the app identified them

Sent with: X-App-Install, X-App-Key

Body

Field Type Required
events EventIn[] yes

Answers: 200

PUT /sdk/v1/install/consent

What the app’s user agreed to before the app identified them

Sent with: X-App-Install, X-App-Key

Body

Field Type Required
channel push · in_app · email · whatsapp · sms · telegram yes
granted boolean yes
occurred_at string (date-time)

Answers: 200

POST /server/v1/identify

Create or update a profile by the match rule

Sent with: authorization

Body

Field Type Required
external_id string
email string
phone string
email_sha256 string
phone_sha256 string
attributes object

Answers: 200

POST /server/v1/events

Events, each naming its person

Sent with: authorization

Body

Field Type Required
events ServerEventIn[] yes

Answers: 200

POST /server/v1/orders

Orders; one sent again by its order_id is updated

Sent with: authorization

Body

Field Type Required
orders OrderIn[] yes

Answers: 200

PUT /server/v1/consent

What a person agreed to, per channel

Sent with: authorization

Body

Field Type Required
external_id string yes
channel push · in_app · email · whatsapp · sms · telegram yes
granted boolean yes
occurred_at string (date-time)

Answers: 200

POST /server/v1/import

A batch of end users as text/csv or application/json (at most 10,000 rows)

Sent with: authorization

Answers: 200

GET /server/v1/profiles/{external_id}

A person, by the org’s external id

Sent with: authorization

Answers: 200

DELETE /server/v1/profiles/{external_id}

Delete a person and everything about them; every service forgets them too

Sent with: authorization

Answers: 204