FruxonDocs
ApiEmbed configs

Creates an embed config for the agent, minting a fresh publishable key.

Returns the new config including its `key` — paste that into the embed snippet. The key is publishable (not a secret); the allowed origins, rate limits, and the single-agent session token are the real controls. Fails 404 if the agent doesn't exist in this tenant.

POST
/v1/tenants/{tenant}/agents/{agent}/embedConfigs
AuthorizationBearer <token>

JWT Authorization header using the Bearer scheme. Enter 'Bearer' [space] and then your token.

In: header

Path Parameters

agent*string

The agent identifier.

tenant*string

The tenant identifier

Allowed origins and visitor-facing presentation.

allowedOrigins?array<string>

Origins the widget may be embedded on; a single "*" allows any (dev/open).

greeting?string|null
suggestedPrompts?array<string>
themeJson?string|null

The initial presentation manifest (client-owned schema; opaque here). Goes live immediately — a brand-new widget has nothing published for a draft to differ from.

maxTurnsPerSession?integer|null

Maximum turns one visitor conversation may spend; null for no ceiling. Settable at create so a widget is never live-and-uncapped in the window before its first edit.

Formatint32
maxCostPerSession?number|null

Maximum USD one visitor conversation may accrue; null for no ceiling.

Formatdouble
[key: string]?never

Response Body

curl -X POST "https://api.fruxon.com/v1/tenants/string/agents/string/embedConfigs" \  -H "Content-Type: application/json" \  -d '{}'
{
  "id": "string",
  "agentId": "string",
  "key": "string",
  "enabled": false,
  "allowedOrigins": [
    "string"
  ],
  "greeting": "string",
  "suggestedPrompts": [
    "string"
  ],
  "themeJson": "string",
  "draftThemeJson": "string",
  "hasUnpublishedChanges": false,
  "publishedAt": 0,
  "customCss": "string",
  "maxTurnsPerSession": 0,
  "maxCostPerSession": 0,
  "accessMode": "PUBLIC",
  "hasIdentitySecret": false,
  "trustAnchorId": "00000000-0000-0000-0000-000000000000",
  "createdAt": 0,
  "modifiedAt": 0
}
Empty
Empty
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "property1": null,
  "property2": null
}