Skip to main content

Settings API

Workspace settings, API keys, and team membership Base path: /api/v1/settings Endpoint count: 9

List per-agent per-channel concurrency caps

GET /api/v1/settings/agent-channel-caps
Return every configured per-agent per-channel max-concurrent cap for the tenant. Optionally narrow to a single agent with ?agent_user_id=. A missing (agent, channel) row means “no cap, fail-OPEN”; a row with max_concurrent=0 blocks that agent from that channel entirely. Owner/admin only.
agent_user_id
string
Narrow the list to one agent’s caps.

List Messenger personas

GET /api/v1/settings/channels/messenger/personas
Lists the virtual sender personas configured on the connected Messenger Page. The Page access token is held server-side and never exposed to the browser.

Get your current IP address

GET /api/v1/settings/ip-allowlist/current-ip
Returns your current IP address as the API sees it, plus whether IP-allowlist enforcement is active for your account. Use it to add the correct IP to your allowlist without locking yourself out. ip is null when your IP address cannot be determined; enforced is false when allowlist enforcement is not applied in the current environment.

Create an API key

POST /api/v1/settings/api-keys
Mint a new tenant API key. The key value is returned ONLY on this response (Cache-Control: no-store) — store it immediately. mode: 'test' activates sandbox-mode (no real provider hits, no billing). Optional per-key allowed_ips enforces an IP allowlist at auth time.
name
string
required
Human-readable label shown in the dashboard. Not used for authentication.
type
string (enum: secret|public)
secret = server-only dv_*_sk_* key; public = browser-safe pk_* key for the embed SDK.
scopes
string[]
API key permission scopes (e.g. messages:write). At least one scope is required for keys minted after 2026-08-01; empty-scope keys are deprecated and treated as least-privilege (viewer) / will be rejected after the grandfather deadline.
mode
string (enum: live|test)
test keys never deliver messages and never bill; useful for CI/staging.
expiresIn
string (enum: never|30d|90d|1y)
Key lifetime. never (the default) mints a non-expiring key; 30d, 90d, and 1y set an automatic expiry measured from creation time.
allowed_ips
string[]
Optional IP/CIDR allowlist. Auth middleware rejects requests from a non-allowlisted source.

Create a Messenger persona

POST /api/v1/settings/channels/messenger/personas
Creates a new virtual sender persona on the connected Messenger Page. Meta mints the id; the supplied name and avatar are echoed back so the UI can render the row without a refetch.
name
string
required
Display name shown to the recipient.
profile_picture_url
string
required
HTTPS avatar URL. Meta fetches it at create time and rejects non-https schemes.

Upsert one per-agent per-channel concurrency cap

PUT /api/v1/settings/agent-channel-caps
Set the maximum simultaneous open interactions of one channel an agent can be routed (e.g. agent X = 3 chats). max_concurrent=0 opts the agent OUT of that channel entirely; a positive value caps concurrency; deleting the row reverts to “no cap”. Idempotent upsert keyed on (agent_user_id, channel). Owner/admin only.
agent_user_id
string
required
Workspace user id of the agent the cap applies to (1-128 characters).
channel
string (enum: sms|whatsapp|email|rcs|viber|instagram|…)
required
Channel the cap governs (e.g. sms, whatsapp, email, voice, web_chat).
max_concurrent
integer
required
Maximum simultaneous open interactions on this channel (0-1000). 0 opts the agent out of the channel entirely.

Bulk upsert per-agent per-channel concurrency caps

PUT /api/v1/settings/agent-channel-caps/bulk
Upsert a batch of (agent_user_id, channel, max_concurrent) caps in one call — the team-members cap-matrix save. Idempotent: re-sending an (agent, channel) pair updates its existing cap instead of creating a duplicate. Up to 500 rows; duplicate (agent, channel) keys in the payload keep the last value. Owner/admin only.
caps
object[]
required
Batch of (agent_user_id, channel, max_concurrent) cap rows to upsert. 1-500 items; duplicate (agent, channel) keys keep the last value.

Clear a per-agent per-channel concurrency cap

DELETE /api/v1/settings/agent-channel-caps/{agentUserId}/{channel}
Remove the cap row for one (agent, channel) pair, reverting it to the “no cap, fail-OPEN” default. Returns 404 when no cap was configured for that pair. Owner/admin only.
agentUserId
string
required
Workspace user id of the agent whose cap is being cleared.
channel
string (enum: sms|whatsapp|email|rcs|viber|instagram|…)
required
Channel whose cap row is being cleared.

Delete a Messenger persona

DELETE /api/v1/settings/channels/messenger/personas/{personaId}
Removes a virtual sender persona from the connected Messenger Page by its Meta object id. Returns 204 on success.
personaId
string
required
Meta persona object id (numeric string).