API reference
Agents
Your live assistants: list them, read one and update the websites it answers on.
GET /agents
List agents
The workspace's agents (live assistants), newest first. A key with an agent allowlist sees only those agents.
Scope: agents:read
Parameters
limitoptional in the query ·integerRows per page, 1 to 100.
cursoroptional in the query ·stringThe next_cursor of the previous page.
Returns Agent
idrequiredstringId
namerequiredstringThe agent's display name.
statusrequiredstringlive, paused or retired.
languagerequiredstringenglish, arabic or bilingual.
public_keyrequiredstringThe key in the website snippet (pk_...). Not a secret.
allowed_originsrequiredstring[]The websites the widget answers on.
conversations_per_monthrequiredintegerThe plan's monthly allowance for this agent.
created_atoptionalstringCreated At
updated_atoptionalstringUpdated At
Responses
200Successful Response401Missing, invalid, revoked or expired key. Leaving the workspace, or being removed from it, revokes the keys a teammate made; a key whose maker's membership ended any other way answerskey_maker_left.403The plan has no API, the key lacks the scope, or the role of the teammate who made the key no longer allows it (maker_role_limit; a publishable key saysinsufficient_scope).404Nothing by that id in this workspace.413The request body is larger than this route accepts (1 MB; 3 MB for a text source). On a source:plan_text_limit, the agent's plan cannot hold more text (limit_chars,used_chars).422The request did not validate;detailslists the fields.429Rate limit reached; waitRetry-Afterseconds.500Our fault; quoterequest_idto support.
curl https://www.bidii.ai/api/v2/agents \
-H "Authorization: Bearer bidi_sk_YOUR_KEY"GET /agents/{agent_id}
Get an agent
One agent by id. An id from another workspace is not found.
Scope: agents:read
Parameters
agent_idrequired in the path ·string
Returns Agent
idrequiredstringId
namerequiredstringThe agent's display name.
statusrequiredstringlive, paused or retired.
languagerequiredstringenglish, arabic or bilingual.
public_keyrequiredstringThe key in the website snippet (pk_...). Not a secret.
allowed_originsrequiredstring[]The websites the widget answers on.
conversations_per_monthrequiredintegerThe plan's monthly allowance for this agent.
created_atoptionalstringCreated At
updated_atoptionalstringUpdated At
Responses
200Successful Response401Missing, invalid, revoked or expired key. Leaving the workspace, or being removed from it, revokes the keys a teammate made; a key whose maker's membership ended any other way answerskey_maker_left.403The plan has no API, the key lacks the scope, or the role of the teammate who made the key no longer allows it (maker_role_limit; a publishable key saysinsufficient_scope).404Nothing by that id in this workspace.413The request body is larger than this route accepts (1 MB; 3 MB for a text source). On a source:plan_text_limit, the agent's plan cannot hold more text (limit_chars,used_chars).422The request did not validate;detailslists the fields.429Rate limit reached; waitRetry-Afterseconds.500Our fault; quoterequest_idto support.
curl https://www.bidii.ai/api/v2/agents/AGENT_ID \
-H "Authorization: Bearer bidi_sk_YOUR_KEY"PATCH /agents/{agent_id}
Update an agent
Change the agent's name or the websites its widget answers on. Other fields (plan, status, prompt) are not writable through the API. The website list follows the dashboard's rules: the same cleaning, the same cap of changes per hour (429 past it), and the same audit entry.
Scope: agents:write
Parameters
agent_idrequired in the path ·string
Request body
nameoptionalstringThe agent's display name (1 to 120 characters).
allowed_originsoptionalstring[]The websites the widget answers on, as origins (https://shop.example). An internationalised domain is stored in its DNS form (xn--...).
Returns Agent
idrequiredstringId
namerequiredstringThe agent's display name.
statusrequiredstringlive, paused or retired.
languagerequiredstringenglish, arabic or bilingual.
public_keyrequiredstringThe key in the website snippet (pk_...). Not a secret.
allowed_originsrequiredstring[]The websites the widget answers on.
conversations_per_monthrequiredintegerThe plan's monthly allowance for this agent.
created_atoptionalstringCreated At
updated_atoptionalstringUpdated At
Responses
200Successful Response401Missing, invalid, revoked or expired key. Leaving the workspace, or being removed from it, revokes the keys a teammate made; a key whose maker's membership ended any other way answerskey_maker_left.403The plan has no API, the key lacks the scope, or the role of the teammate who made the key no longer allows it (maker_role_limit; a publishable key saysinsufficient_scope).404Nothing by that id in this workspace.413The request body is larger than this route accepts (1 MB; 3 MB for a text source). On a source:plan_text_limit, the agent's plan cannot hold more text (limit_chars,used_chars).422The request did not validate;detailslists the fields.429Rate limit reached; waitRetry-Afterseconds.500Our fault; quoterequest_idto support.
curl -X PATCH https://www.bidii.ai/api/v2/agents/AGENT_ID \
-H "Authorization: Bearer bidi_sk_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "Front desk"}'