Workspace and agents
Two read-only endpoints for integrations such as Zapier and Make: check which workspace an API key belongs to, and list the agents you can send orders to. They use the same API key as Orders.
Check a key: GET /v1/me
Returns the workspace the key belongs to and whether it is a live or a test key. Use it to test a connection and to label it ("Acme Solar, live").
GET https://api.avoonta.com/v1/me
Authorization: Bearer av_live_…
HTTP/1.1 200 OK
{
"success": true,
"workspace": {
"id": "6c1f0e2a-4b7d-4e3a-9f51-2d8c7b0a9e14",
"name": "Acme Solar",
"timezone": "America/New_York"
},
"key": {
"mode": "live",
"last4": "Wx7y"
}
}
| Field | Meaning |
|---|---|
workspace.id | The workspace's ID. It never changes. |
workspace.name | The workspace name set in the app. |
workspace.timezone | The workspace time zone (IANA name). Leads are still called in their own 8am to 8pm. |
key.mode | live for an av_live_ key, test for an av_test_ key. See Test keys. |
key.last4 | The last 4 characters of the key, to tell keys apart. The full key is never returned. |
A missing, unknown or revoked key returns 401 unauthorized.
List agents: GET /v1/agents
Returns the agents that can take orders: published and not deleted. Use the id as agent_id in POST /v1/orders.
GET https://api.avoonta.com/v1/agents
Authorization: Bearer av_live_…
HTTP/1.1 200 OK
{
"success": true,
"agents": [
{
"id": "agt_3f9c2a7b1d0e4c58a6b9e2f1d4c7a0b3",
"name": "Alex",
"label": "Solar leads",
"language": "en-US",
"is_active": true,
"paused": false,
"published": true
}
]
}
| Field | Meaning |
|---|---|
id | The agent's ID: agt_ plus 32 hex characters. |
name | The name the agent uses on calls. |
label | Your own label for the agent, or null. |
language | The language the agent speaks, for example en-US. |
is_active | false when the agent is switched off. An order for it is refused with 409 agent_inactive. |
paused | true when the agent is paused in the app. |
published | true when the agent can take calls. Always true unless you ask for drafts. |
Agents are listed oldest first, at most 500. Add ?include_drafts=1 to include agents that have not been published yet ("published": false); an order for a draft is refused with 409 agent_not_published. Deleted agents are never listed.
Website Talk button
Each agent can also take calls from a Talk now button on your own website: the visitor talks with the same agent in the browser, with the same AI disclosure, knowledge, transcript, scoring and per-minute billing as a phone call. Switch it on per agent in the app under Settings > Connections > Website Talk button, list the websites it may appear on and set a monthly minute limit, then add the one line the app gives you, just before </body>:
<script src="https://app.avoonta.com/talk.js" data-site="site_..." async></script>
- The button only works on the websites you listed (and their subdomains); any other page gets no button.
- Optional attributes:
data-label(the button text, default "Talk now"),data-color(a hex colour) anddata-position="left". - Website calls arrive as inbound calls in
GET /v1/ordersand in your webhooks.lead_phoneisnulluntil the visitor gives a number during the call. - There is no API key in the page: each visit gets its own short-lived login for one call.
Limits and errors
- Both endpoints, and
GET /v1/orders, share a limit of 120 requests per minute per workspace, apart from order creation. Over it you get429 rate_limitedwith aRetry-Afterheader in seconds. - Every request is shown in the API log in the app, like orders.
- Only
GETis allowed: other methods get405 method_not_allowed. - If the data cannot be read you get
503 unavailable. Retry shortly.