Developers / Agents

Mint a ticket for a private website widget

POST https://api.echonova.ai/v1/widgets/{publicId}/tickets

Call this from your server for a signed-in visitor. It returns a single-use ticket that you pass to the visitor browser, which starts one widget session with it. The widget must be private and turned on. Minting is free.

Headers

Authorization string Required

Bearer, a space, then your API key, which starts with ek_. Create keys in the portal under Developers, API Keys.

Path parameters

publicId string Required

The widget id from the widget settings, starting with wdg_.

Request body

application/json

user object Optional

The signed-in visitor this ticket is for.

channel string Optional

Restricts the ticket to one channel. Leave it out to allow both.

voice or chat
ttlSeconds integer Optional

Seconds the ticket stays valid, from 60 to 900. It works once.

60 to 900default 300

Response

200 application/json Every response uses this envelope.

data object

The result.

success boolean

true for a successful call.

statusCode integer

Repeats the HTTP status.

errorMessage string or null

null on success.

Errors

Same envelope, with success false and data null. All errors

POST /v1/widgets/{publicId}/tickets

curl -X POST "https://api.echonova.ai/v1/widgets/wdg_a1B2c3D4e5F6g7H8i9J0/tickets" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

{
  "data": {
    "ticket": "wtk_IlrI02c2RnE7iqidinRQanxpcTovunoAK7Bu5R6Zc5w",
    "expiresAt": "2026-10-19T09:30:00.000Z"
  },
  "success": true,
  "statusCode": 200,
  "errorMessage": null
}