> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.ada.cx/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.ada.cx/_mcp/server.

# List playbooks

GET https://example.ada.support/api/v2/playbooks/

Retrieve the AI Agent's version 2 ("Playbooks") playbooks, enabled and draft, in cursor-paginated pages ordered by id.

Pagination is cursor-based: read `meta.next_page_url` and replay it verbatim to fetch the next page. `next_page_url` is `null` on the last or empty page.

Reference: https://docs.ada.cx/reference/playbooks/list

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Query parameters

- `cursor` (string, optional) — The id that starts the next page. Prefer replaying `meta.next_page_url` from the previous response verbatim; if you build the request yourself, pass the `cursor` query parameter from that URL, not the whole URL.
- `limit` (integer, optional) — The number of records to return

## Response

### 200

OK

- `data` (list of Playbook, required) — The list of playbooks
- `meta` (PlaybookListMeta, required) — Pagination metadata

## Errors

### 400 Bad Request Error

Bad Request

- `errors` (list of ErrorsErrorsItems, required) — A list of errors

### 401 Unauthorized Error

Unauthorized

- `errors` (list of ErrorsErrorsItems, required) — A list of errors

### 429 Too Many Requests Error

Too Many Requests

- `errors` (list of ErrorsErrorsItems, required) — A list of errors

### 500 Internal Server Error

Internal Server Error

- `errors` (list of ErrorsErrorsItems, required) — A list of errors

## Types

### Playbook

A version 2 ("Playbooks") playbook, a structured multi-step agent flow

- `id` (string, required) — The unique identifier for the playbook
- `name` (string, required) — Display name for the playbook
- `version` (integer, required) — The playbook schema version. Always 2 on this surface.
- `enabled` (boolean, required) — Whether the playbook is enabled. False means draft.
- `description` (string, optional) — Short description of the playbook (routing-facing)
- `general_instructions` (string, optional, nullable) — Instructions that apply across the whole playbook
- `sections` (list of PlaybookSectionsItems, optional, nullable) — The ordered sections of the playbook. Each section holds an ordered list of steps (send, set, ask, run, if_else, go_to).
- `can_run_standalone` (boolean, optional) — Whether the playbook can be triggered on its own
- `referenced_articles` (list of string, optional) — Ids of knowledge articles referenced by the playbook
- `tags` (list of string, optional) — Tag ids applied to the playbook
- `acknowledgment_instruction` (string, optional, nullable) — Instruction for the acknowledgment message
- `chat_acknowledgment_override` (boolean, optional) — Request an acknowledgment for this playbook on messaging platforms even when the Agent-wide messaging acknowledgment setting (`enable_acknowledgment_messages`) is off. Never suppresses.
- `on_human_request` (enum, optional) — Deviation behavior when the user asks for a human
  - Allowed values: `exit_playbook`, `stay_in_playbook`
- `on_off_topic` (enum, optional) — Deviation behavior when the user goes off topic
  - Allowed values: `exit_playbook`, `stay_in_playbook`
- `on_off_script` (enum, optional) — Deviation behavior when the conversation goes off script
  - Allowed values: `search_knowledge`, `skip_knowledge`
- `availability_rules` (AvailabilityRule, optional, nullable) — The structured rule that gates when the Agent uses this Playbook, with variables referenced by id, or null when no rule is attached

### PlaybookListMeta

Pagination metadata

- `next_page_url` (string, required, nullable) — URL for the next page of results, or null on the last/empty page. Replay it unchanged to fetch the next page.

### ErrorsErrorsItems

- `type` (string, required) — The error type
- `message` (string, required) — The error message
- `details` (string, optional, nullable) — Extra information about the error

### PlaybookSectionsItems

### AvailabilityRule

A two-level tree of conditions that determines availability based on variable values during a conversation. The root group has a `match` combinator and a list of conditions or condition groups. A rule may contain at most 1000 conditions in total, counting every condition across the root and all nested condition groups.

- `match` (enum, required) — Whether all conditions must pass (`all`) or any one condition must pass (`any`).
  - Allowed values: `all`, `any`
- `conditions` (list of AvailabilityRuleConditionsItems, required) — List of conditions or condition groups. Must contain at least one entry. Each entry is either a `Condition` object (with `variable`, `operator`, and optional `value`) or a `ConditionGroup` object (with its own `match` and nested `conditions` list).

### AvailabilityRuleConditionsItems

### AvailabilityRuleCondition

A single condition comparing a variable to a value.

- `variable` (AvailabilityRuleConditionVariable, required) — The variable to test, referenced by `id`. Look up the ids for your Agent through the variables endpoint. Not every variable can be used in a rule; referencing one that can't returns a `400`.
- `operator` (enum, required) — The comparison operator. Unary operators (`is_set`, `is_not_set`) must not include a `value` field.
  - Allowed values: `equals`, `does_not_equal`, `greater_than`, `less_than`, `starts_with`, `ends_with`, `contains`, `does_not_contain`, `is_set`, `is_not_set`
- `value` (AvailabilityRuleConditionValue, optional) — The value to compare against. Omit for unary operators (`is_set`, `is_not_set`).
- `case_sensitive` (boolean, optional) — Whether the comparison is case-sensitive. Defaults to `false`. Only meaningful for the equality (`equals`, `does_not_equal`) and string (`starts_with`, `ends_with`, `contains`, `does_not_contain`) operators. Omitted from responses when `false`.

### AvailabilityRuleConditionGroup

A nested group of conditions inside a rule's top-level `conditions` list. Condition groups may contain only `Condition` objects — further nesting is not supported.

- `match` (enum, required) — Whether all conditions must pass (`all`) or any one condition must pass (`any`).
  - Allowed values: `all`, `any`
- `conditions` (list of AvailabilityRuleCondition, required) — List of conditions inside this condition group. Must contain at least one entry.

### AvailabilityRuleConditionVariable

The variable to test, referenced by `id`. Look up the ids for your Agent through the variables endpoint. Not every variable can be used in a rule; referencing one that can't returns a `400`.

- `id` (string, required) — The id of the variable.

### AvailabilityRuleConditionValue

The value to compare against. Omit for unary operators (`is_set`, `is_not_set`).

## Examples

**Response**

```json
{
  "data": [
    {
      "id": "65a17e3f43bec88e2792d0eb",
      "name": "Refund flow",
      "version": 2,
      "enabled": true,
      "description": "How to process a refund",
      "general_instructions": "Confirm the order number before issuing a refund.",
      "sections": [
        {
          "id": "5df263b7db5a7e6ea03fae9b",
          "title": "Main",
          "steps": [
            {
              "id": "5df263b7db5a7e6ea03faea0",
              "type": "send",
              "message": "Let me pull up that order."
            }
          ]
        }
      ],
      "can_run_standalone": true,
      "referenced_articles": [],
      "tags": [],
      "acknowledgment_instruction": "Let me look into that for you",
      "chat_acknowledgment_override": false,
      "on_human_request": "exit_playbook",
      "on_off_topic": "exit_playbook",
      "on_off_script": "search_knowledge",
      "availability_rules": null
    }
  ],
  "meta": {
    "next_page_url": null
  }
}
```

**SDK Code**

```python
import requests

url = "https://example.ada.support/api/v2/playbooks/"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://example.ada.support/api/v2/playbooks/';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://example.ada.support/api/v2/playbooks/"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://example.ada.support/api/v2/playbooks/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://example.ada.support/api/v2/playbooks/")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://example.ada.support/api/v2/playbooks/', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://example.ada.support/api/v2/playbooks/");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://example.ada.support/api/v2/playbooks/")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```