Developers / Agents

Get an agent's website widget

GET https://api.echonova.ai/v1/agents/{agentId}/widget

Returns the agent's website widget settings. data is null when the agent has no widget yet. Needs the agents:read scope on the key.

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

agentId string Required

The agent id, as GET /v1/agents returned it.

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

GET /v1/agents/{agentId}/widget

curl "https://api.echonova.ai/v1/agents/{agentId}/widget" \
  -H "Authorization: Bearer YOUR_API_KEY"

{
  "data": {
    "publicId": "wdg_a1B2c3D4e5F6",
    "enabled": true,
    "mode": "private",
    "allowedOrigins": [
      "https://shop.example.com"
    ],
    "look": {
      "theme": "auto",
      "position": "end"
    }
  },
  "success": true,
  "statusCode": 200,
  "errorMessage": null
}