Skip to main content
POST
/
v1
/
embed
/
sessions
Create embed session
curl --request POST \
  --url https://pilotstatus.com.br/v1/embed/sessions \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "surface": "chat",
  "whatsappNumberIds": [
    "num_01HZX..."
  ],
  "allowedOrigins": [
    "https://app.tenant.com"
  ],
  "ttlSeconds": 900
}
'
{
  "token": "eyJhbGciOiJIUzI1NiJ9.<claims>.<sig>",
  "surface": "chat",
  "whatsappNumberIds": [
    "num_01HZX..."
  ],
  "allowedOrigins": [
    "https://app.tenant.com"
  ],
  "expiresAt": "2026-06-26T15:15:00.000Z"
}

Authorizations

x-api-key
string
header
required

Your ps_ API key

Body

application/json
surface
string
required

Microfrontend to embed.

Example:

"chat"

allowedOrigins
string
required

Exact origins (scheme://host[:port]) where the iframe may run.

Example:

"[\"https://app.tenant.com\"]"

whatsappNumberIds
string

Numbers to expose in chat (required for a tenant key on surface:chat).

Example:

"[\"num_01HZX...\"]"

brandingOverride
object

Per-session branding (logo/colors/title) overriding the tenant branding.

ttlSeconds
string

Token validity in seconds (default 900 chat / 1800 connect).

Example:

"900"

Response

Create chat session