واجهة HTTP
POST /sdk/v1/decide
What to show this person in each placement, now
يُرسل مع: X-App-Install, X-App-Key
المحتوى
| الحقل | النوع | مطلوب |
|---|---|---|
external_id |
string | نعم |
placements |
string[] | نعم |
language |
en · ar |
نعم |
context |
object | |
token |
string | |
trigger |
Trigger |
الإجابات: 200
POST /sdk/v1/events
What the app showed, and what the person clicked or dismissed
يُرسل مع: X-App-Install, X-App-Key
المحتوى
| الحقل | النوع | مطلوب |
|---|---|---|
events |
InteractionIn[] | نعم |
الإجابات: 200
GET /sdk/v1/design/bundle
The org’s design: its theme, components and templates (ETag)
يُرسل مع: if-none-match, X-App-Key
الإجابات: 200, 304
POST /server/v1/decide
What to show a person in each placement, now
يُرسل مع: authorization
المحتوى
| الحقل | النوع | مطلوب |
|---|---|---|
external_id |
string | نعم |
placements |
string[] | نعم |
language |
en · ar |
نعم |
context |
object | |
token |
string | |
trigger |
Trigger |
الإجابات: 200
POST /server/v1/events
What was shown, and what was clicked or dismissed
يُرسل مع: authorization
المحتوى
| الحقل | النوع | مطلوب |
|---|---|---|
events |
InteractionIn[] | نعم |
الإجابات: 200
POST /sdk/v1/coupons/claim
Claim a coupon for this person (idempotent by id)
يُرسل مع: X-App-Install, X-App-Key
المحتوى
| الحقل | النوع | مطلوب |
|---|---|---|
id |
string (uuid) | نعم |
message_id |
string (uuid) | نعم |
external_id |
string | نعم |
language |
en · ar |
|
view |
boolean |
الإجابات: 200
POST /sdk/v1/draws/play
Play a draw for this person: the server draws (idempotent by id)
يُرسل مع: X-App-Install, X-App-Key
المحتوى
| الحقل | النوع | مطلوب |
|---|---|---|
id |
string (uuid) | نعم |
message_id |
string (uuid) | نعم |
external_id |
string | نعم |
language |
en · ar |
|
view |
boolean |
الإجابات: 200
POST /sdk/v1/checkins
Check this person in for today (once a day)
يُرسل مع: X-App-Install, X-App-Key
المحتوى
| الحقل | النوع | مطلوب |
|---|---|---|
message_id |
string (uuid) | نعم |
external_id |
string | نعم |
language |
en · ar |
|
view |
boolean |
الإجابات: 200
PUT /sdk/v1/push-tokens
Register this install’s push token
يُرسل مع: X-App-Install, X-App-Key
المحتوى
| الحقل | النوع | مطلوب |
|---|---|---|
external_id |
string | |
platform |
android · ios · web |
نعم |
provider |
fcm · apns |
نعم |
environment |
production · sandbox |
|
token |
string | نعم |
الإجابات: 200
DELETE /sdk/v1/push-tokens
Remove this install’s token
يُرسل مع: X-App-Install, X-App-Key
الإجابات: 204
POST /server/v1/coupons/claim
Claim a coupon for this person (idempotent by id)
يُرسل مع: authorization
المحتوى
| الحقل | النوع | مطلوب |
|---|---|---|
id |
string (uuid) | نعم |
message_id |
string (uuid) | نعم |
external_id |
string | نعم |
language |
en · ar |
|
view |
boolean |
الإجابات: 200
POST /server/v1/draws/play
Play a draw for this person: the server draws (idempotent by id)
يُرسل مع: authorization
المحتوى
| الحقل | النوع | مطلوب |
|---|---|---|
id |
string (uuid) | نعم |
message_id |
string (uuid) | نعم |
external_id |
string | نعم |
language |
en · ar |
|
view |
boolean |
الإجابات: 200
POST /server/v1/checkins
Check this person in for today (once a day)
يُرسل مع: authorization
المحتوى
| الحقل | النوع | مطلوب |
|---|---|---|
message_id |
string (uuid) | نعم |
external_id |
string | نعم |
language |
en · ar |
|
view |
boolean |
الإجابات: 200
POST /server/v1/push/send
Send a live push message to a person’s devices, with the org’s creds
يُرسل مع: authorization
المحتوى
| الحقل | النوع | مطلوب |
|---|---|---|
message_id |
string (uuid) | نعم |
external_id |
string | نعم |
language |
en · ar |
الإجابات: 200
GET /server/v1/push-tokens
A person’s push tokens, newest first
يُرسل مع: authorization
الإجابات: 200
الهوية والأحداث والموافقة
كل حزمة ترسل هوية الشخص وأحداثه وموافقته إلى هنا، بالمفتاح العام نفسه.
POST /sdk/v1/identify
Who the app’s user is; email and phone are hashed on arrival
يُرسل مع: X-User-Hash, X-App-Install, X-App-Key
المحتوى
| الحقل | النوع | مطلوب |
|---|---|---|
external_id |
string | |
email |
string | |
phone |
string | |
email_sha256 |
string | |
phone_sha256 |
string | |
attributes |
object |
الإجابات: 200
POST /sdk/v1/events
What the identified user did
يُرسل مع: X-User-Hash, X-App-Key
المحتوى
| الحقل | النوع | مطلوب |
|---|---|---|
external_id |
string | نعم |
events |
EventIn[] | نعم |
الإجابات: 200
PUT /sdk/v1/consent
What the user agreed to, per channel
يُرسل مع: X-User-Hash, X-App-Key
المحتوى
| الحقل | النوع | مطلوب |
|---|---|---|
external_id |
string | نعم |
channel |
push · in_app · email · whatsapp · sms · telegram |
نعم |
granted |
boolean | نعم |
occurred_at |
string (date-time) |
الإجابات: 200
POST /sdk/v1/install/events
What the app’s user did before the app identified them
يُرسل مع: X-App-Install, X-App-Key
المحتوى
| الحقل | النوع | مطلوب |
|---|---|---|
events |
EventIn[] | نعم |
الإجابات: 200
PUT /sdk/v1/install/consent
What the app’s user agreed to before the app identified them
يُرسل مع: X-App-Install, X-App-Key
المحتوى
| الحقل | النوع | مطلوب |
|---|---|---|
channel |
push · in_app · email · whatsapp · sms · telegram |
نعم |
granted |
boolean | نعم |
occurred_at |
string (date-time) |
الإجابات: 200
POST /server/v1/identify
Create or update a profile by the match rule
يُرسل مع: authorization
المحتوى
| الحقل | النوع | مطلوب |
|---|---|---|
external_id |
string | |
email |
string | |
phone |
string | |
email_sha256 |
string | |
phone_sha256 |
string | |
attributes |
object |
الإجابات: 200
POST /server/v1/events
Events, each naming its person
يُرسل مع: authorization
المحتوى
| الحقل | النوع | مطلوب |
|---|---|---|
events |
ServerEventIn[] | نعم |
الإجابات: 200
POST /server/v1/orders
Orders; one sent again by its order_id is updated
يُرسل مع: authorization
المحتوى
| الحقل | النوع | مطلوب |
|---|---|---|
orders |
OrderIn[] | نعم |
الإجابات: 200
PUT /server/v1/consent
What a person agreed to, per channel
يُرسل مع: authorization
المحتوى
| الحقل | النوع | مطلوب |
|---|---|---|
external_id |
string | نعم |
channel |
push · in_app · email · whatsapp · sms · telegram |
نعم |
granted |
boolean | نعم |
occurred_at |
string (date-time) |
الإجابات: 200
POST /server/v1/import
A batch of end users as text/csv or application/json (at most 10,000 rows)
يُرسل مع: authorization
الإجابات: 200
GET /server/v1/profiles/{external_id}
A person, by the org’s external id
يُرسل مع: authorization
الإجابات: 200
DELETE /server/v1/profiles/{external_id}
Delete a person and everything about them; every service forgets them too
يُرسل مع: authorization
الإجابات: 204