Skip to content

API reference

Apply a playbook to accounts

playbook_apply — Copy a playbook's tasks onto the given accounts (replacing tasks that came from it).

playbook_apply · Changes an X-Buddy setting

Copy a playbook's tasks onto the given accounts (replacing tasks that came from it). Growth tasks arrive OFF. Returns the result per account.

REST POST /api/public/v1/playbooks/{playbook_id}/apply
MCP tool playbook_apply
Permission needed tasks.manage — Owner, Manager, Operator
Scope group automation:write
Group Tasks and playbooks
Shown up front in profiles Automation

Input

Field Type Required Description
playbook_id string (uuid) Yes Playbook id from playbook_list.
accounts array of string (1–100 chars) (1–100 items) Yes account_id or @handle of each account.

Result

Returns the operation's result in the { data, meta } envelope.

Needs an idempotency key (Idempotency-Key, 8–128 characters). Retrying with the same key never repeats the action.

Example

Call over REST

curl -X POST "https://reach-link-craft.lovable.app/api/public/v1/playbooks/00000000-0000-4000-8000-000000000001/apply" \
  -H "Authorization: Bearer $XBUDDY_API_KEY" \
  -H "Idempotency-Key: 6f1c2a90-example-key" \
  -H "Content-Type: application/json" \
  -d '{"accounts":["@your_x_account"]}'

Call over MCP

{
  "method": "tools/call",
  "params": {
    "name": "playbook_apply",
    "arguments": {
      "playbook_id": "00000000-0000-4000-8000-000000000001",
      "accounts": [
        "@your_x_account"
      ],
      "idempotency_key": "6f1c2a90-example-key"
    }
  }
}

Errors you may get

Back to all operations