Skip to content
QwryAI
Documentation
Pages

Endpoints

List procedures

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

automation_drafts with kind set to playbook lists the procedures on the agent's Procedures page: each one's name, description, revision and whether it's switched on for customers. Steps aren't included; read one procedure with Get a procedure. Procedures 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.
kindstringYesplaybook for procedures. (ai_action lists Actions; see List actions.)
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": "playbook"}'

Response

JSON
{
  "success": true,
  "data": {
    "kind": "playbook",
    "surface": "authoring_drafts",
    "items": [
      {
        "id": "playbook-draft:5a8d2c71-e94b-4f06-b3a2-7c1e0d9f4b68",
        "playbookId": "5a8d2c71-e94b-4f06-b3a2-7c1e0d9f4b68",
        "status": "enabled",
        "revision": 1,
        "updatedAt": "2026-11-30T18:47:24.973Z",
        "name": "Lost loyalty card",
        "nameTruncated": false,
        "description": "Handles a customer who says they lost their loyalty card: creates a ticket and arranges a replacement.",
        "descriptionTruncated": false
      },
      {
        "id": "playbook-draft:c0f7e3a5-21d8-4b9c-8e46-3a5b7d9f1c02",
        "playbookId": "c0f7e3a5-21d8-4b9c-8e46-3a5b7d9f1c02",
        "status": "disabled",
        "revision": 3,
        "updatedAt": "2026-11-30T18:47:27.049Z",
        "name": "Speak to a manager",
        "nameTruncated": false,
        "description": "Hands a customer who asks for a manager about a complaint over to a person.",
        "descriptionTruncated": false
      }
    ],
    "nextCursor": null
  }
}
FieldTypeDescription
idstringThe procedure's id. Pass it as draftId or procedure_id to the other procedure tools.
playbookIdstringThe procedure's stable identity, kept across versions.
statusstringenabled when it's live for customers, disabled otherwise.
revisionintegerGoes up with every saved change. Send it as expectedRevision when you delete or pause.
updatedAtstringWhen it last changed, in ISO 8601.
namestringThe name, cut to 256 characters; nameTruncated is true when it was cut.
descriptionstringThe description, 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