Skip to content
QwryAI
Documentation
Pages

Endpoints

List actions

List an agent's Actions with whether each is live, 20 per page

automation_drafts with kind set to ai_action lists the Actions on the agent's Actions page: each one's name, description, revision and whether it's switched on for customers. Preview copies and the built-in tools procedures use aren't listed. Actions come back in id order, 20 at a time.

POSThttps://api.qwryai.com/public/v1/tools/automation_drafts

Authentication

Send your API key as Authorization: Bearer YOUR_API_KEY; it needs the Read actions and procedures permission. See Authentication.

Body parameters

NameTypeRequiredDescription
chatbotIdstringYesThe agent's id, from list_agents.
kindstringYesai_action for Actions. (playbook lists procedures; see List procedures.)
afterIdstringNoThe nextCursor from the previous page. Leave it out for the first page.

Request example

Bash
curl -X POST 'https://api.qwryai.com/public/v1/tools/automation_drafts' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"chatbotId": "YOUR_AGENT_ID", "kind": "ai_action"}'

Response

JSON
{
  "success": true,
  "data": {
    "kind": "ai_action",
    "surface": "authoring_drafts",
    "items": [
      {
        "id": "action-draft:8c1e5b20-4a7d-4f3e-9b2c-6d0a1e7f3c58",
        "actionId": "action:create_ticket:2b7d9e41-0c3a-4e65-8f19-a4d2c6b8e017",
        "usageScope": { "kind": "reusable" },
        "status": "enabled",
        "revision": 1,
        "updatedAt": "2026-11-30T18:47:10.000Z",
        "name": "Create ticket",
        "nameTruncated": false,
        "description": "Use this when a customer reports a damaged or faulty item. First ask for their email address and what is wrong with the item, then create the ticket.",
        "descriptionTruncated": false
      },
      {
        "id": "action-draft:41a7c3e9-5b2d-4c80-a6f1-0e9d8b7c2a35",
        "actionId": "action:live_chat:7e2f0b6c-9d41-4a3e-b852-1c6a0f4d9e23",
        "usageScope": { "kind": "reusable" },
        "status": "enabled",
        "revision": 1,
        "updatedAt": "2026-11-30T18:47:17.639Z",
        "name": "QwryAI live chat",
        "nameTruncated": false,
        "description": "Use this when the customer asks to speak to a human agent or a real person.",
        "descriptionTruncated": false
      }
    ],
    "nextCursor": null
  }
}
FieldTypeDescription
idstringThe Action's draft id. Pass it as draftId or action_id to the other Action tools.
actionIdstringThe Action's reference, as a procedure step names it: [[actionId]].
usageScopeobject{ "kind": "reusable" } for an Action any procedure or conversation can use, or { "kind": "playbook_private", "playbookId" } for one that belongs to a single procedure.
statusstringenabled when it's live for customers, disabled otherwise.
revisionintegerGoes up with every saved change. Send it as expectedRevision when you edit or delete.
updatedAtstringWhen the draft last changed, in ISO 8601.
namestringThe Action's name, cut to 256 characters; nameTruncated is true when it was cut.
descriptionstringWhen the agent should use it, cut to 256 characters, or null; descriptionTruncated says whether it was cut.
nextCursorstringSend it as afterId for the next page; null on the last page.

Errors

HTTP statuscodewhen
400INVALID_ARGUMENTSkind is missing or isn't ai_action or playbook, or afterId is empty.
400CHATBOT_ID_REQUIREDchatbotId is missing or isn't a valid agent id.
403INSUFFICIENT_PERMISSIONThe key doesn't hold Read actions and procedures.
404CHATBOT_NOT_FOUNDNo agent with that chatbotId in your workspace.
429INTEGRATION_RATE_LIMIT_EXCEEDEDMore than 2,000 requests in 15 minutes for this key.
500TOOL_FAILEDThe tool failed on our side. Try again.

Authentication and plan errors are listed in Error Handling.

Explore the documentation