Passer au contenu principal
POST
Create a hosted session

Autorisations

Authorization
string
header
requis

Company API key, sent as Authorization: Bearer <key>. Create it in the dashboard (Developer > API Keys) with the permissions the integration needs.

Corps

application/json
purpose
string
requis

GET /hosted-sessions/purposes

Exemple:

"whatsapp"

context
object

Options of the purpose

return_url
string<uri> | null
locale
string | null
Exemple:

"fr"

expires_in
integer

Minutes, default 60

Plage requise: 5 <= x <= 1440

Réponse

200 - application/json

Always HTTP 200: the outcome is in success and code (absolute value of the response code).

success
boolean
Exemple:

true

code
integer
Exemple:

1000

message
string
Exemple:

"Request success."

body
object

A signed, expiring, single-use link to one of our hosted pages, and its outcome

token
string | null

Present only on authentication routes

trace_id
string | null

Present only when success is false