Agents
An agent is a job the business has hired an agent for: answer the phone, confirm orders, chase payments. Create one from a template or a definition, update its draft, publish, and read its versions.
| Method | Route | What it does |
|---|---|---|
bots.createFromTemplate | POST /api/v1/workflows/create/template | Describe the agent in plain words and get a working draft. |
bots.create | POST /api/v1/workflows/create/definition | Create an agent from a full definition. |
bots.list | GET /api/v1/workflows/fetch | Every agent in the account. |
bots.summary | GET /api/v1/workflows/summary | Ids and names only, for pickers. |
bots.count | GET /api/v1/workflows/count | How many agents the account has. |
bots.get | GET /api/v1/workflows/fetch/{workflow_id} | One agent: its draft if it has one, else what is live. |
bots.update | PUT /api/v1/workflows/{workflow_id} | Save the draft. |
bots.validate | POST /api/v1/workflows/{workflow_id}/validate | Check a definition before publishing. |
bots.publish | POST /api/v1/workflows/{workflow_id}/publish | Make the draft the live version. |
bots.createDraft | POST /api/v1/workflows/{workflow_id}/create-draft | Start a draft from what is live. |
bots.versions | GET /api/v1/workflows/{workflow_id}/versions | Every version, newest first. |
bots.restoreVersion | POST /api/v1/workflows/{workflow_id}/versions/{version_id}/restore | Copy an older version into the draft. |
bots.setLive | PUT /api/v1/workflows/{workflow_id}/live | Turn an agent on or off for calls. |
bots.setStatus | PUT /api/v1/workflows/{workflow_id}/status | Archive or restore an agent. |
bots.duplicate | POST /api/v1/workflows/{workflow_id}/duplicate | Copy an agent. |
bots.callOutcomes | GET /api/v1/workflows/call-outcomes | Every outcome label the account’s calls can carry. |