# Your bot's setups (or your own)

`GET https://app.skylit.ai/api/nexus/v1/playbooks`

API: Nexus.

A setup is a named play plus the checklist that defines it. Each of your accounts has its own setups: your bot's (`account=agent`, the default on every setup route) and your own (`account=main`). Archived setups are left out unless you send `includeArchived=true`.

With a key you create, edit and tag with your bot's setups. Your own setups are read only here; you change them on skylit.ai.

```bash
curl -s "https://app.skylit.ai/api/nexus/v1/playbooks" \
  -H "Authorization: Bearer $SKYLIT_API_KEY"
```

## Authentication

Send your Skylit API key as a bearer token: `Authorization: Bearer <key>`. No other header is accepted.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `account` | query | string | no | `agent` (your bot's setups, the default on these routes) or `main` (your own, read only by key). (one of `agent`, `main`; default `agent`) |
| `includeArchived` | query | boolean | no |  (default `false`) |

## Example request

```bash
curl "https://app.skylit.ai/api/nexus/v1/playbooks" \
  -H "Authorization: Bearer $SKYLIT_API_KEY"
```

## Responses

### 200

The account's setups, live first, newest first.

Your bot's setups (from the route's own test).:

```json
{
  "data": {
    "playbooks": [
      {
        "id": "50873e40-8b0f-4cf6-a031-3da471b99dd6",
        "userId": "f6ed04ec-427c-4354-a83d-1f5669cfd81b",
        "name": "ORB five",
        "description": "Opening range break",
        "book": "agent",
        "createdAt": "2026-11-18T13:57:56.94651-05:00",
        "updatedAt": "2026-11-18T13:57:56.980274-05:00",
        "rules": [
          {
            "id": "bce4ec96-1a98-4dea-8dd4-fd7f19cababa",
            "playbookId": "50873e40-8b0f-4cf6-a031-3da471b99dd6",
            "label": "Breaks the first 5 minute range",
            "position": 0,
            "createdAt": "2026-11-18T13:57:56.94651-05:00",
            "updatedAt": "2026-11-18T13:57:56.94651-05:00"
          },
          {
            "id": "e04fb878-41e0-4d99-be45-112744d1d3c6",
            "playbookId": "50873e40-8b0f-4cf6-a031-3da471b99dd6",
            "label": "No news within 15 minutes",
            "position": 2,
            "createdAt": "2026-11-18T13:57:56.981727-05:00",
            "updatedAt": "2026-11-18T13:57:56.981727-05:00"
          }
        ]
      }
    ]
  },
  "meta": {
    "account": "agent"
  }
}
```

### 400

`bad_request`: account is not "agent" or "main".

### 401

Missing or invalid key.

### 404

`user_not_found`: this Skylit account has not used Nexus yet.
