Skip to main content

Authentication and secret handling

Tenant facade APIs

Send the tenant key only from a trusted backend:

X-Tenant-Api-Key: ${TOAI_TENANT_API_KEY}

Credentials are tenant-scoped and scope-scoped. Use the smallest set needed. Rotate by issuing a replacement, switching traffic, verifying it, then revoking the old credential.

Public chat

Your backend calls POST /api/v1/assistant/bootstrap with the tenant key. It returns a short-lived bootstrap_token and Broker endpoints. The browser/mobile client receives only that short-lived bootstrap material, never the long-lived tenant API key.

Signed commerce webhooks

Inventory ingress uses a different trust model: HMAC-SHA256 over a canonical delivery input, managed key ids, timestamp freshness, and replay claims. See signed inventory events.

Never log

Tenant keys, HMAC secrets/signatures, bootstrap tokens, provider credentials, private keys, source media URLs, raw webhook bodies, or customer PII.