Skip to main content
POST
Create a hosted session

Authorizations

Authorization
string
header
required

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

Body

application/json
purpose
string
required

GET /hosted-sessions/purposes

Example:

"whatsapp"

context
object

Options of the purpose

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

"fr"

expires_in
integer

Minutes, default 60

Required range: 5 <= x <= 1440

Response

200 - application/json

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

success
boolean
Example:

true

code
integer
Example:

1000

message
string
Example:

"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