Skip to main content

Overview

The playbooks API exposes the governed cross-department operating playbooks and their handoff contracts. Both endpoints are read-only. Write access goes through the idempotent seed script (pnpm seed:playbooks), not the API. Use these endpoints when you need to:
  • List every seeded playbook with its full handoff sequence.
  • Fetch one playbook by its stable ID, such as revenue-lead-to-sale.
  • Drive a UI or agent that needs owners, payloads, fallbacks, or evidence requirements for a journey.

Authentication

Send a Bearer token in the standard Authorization header:
When a valid JWT is present, the tenant middleware decodes it and attaches the caller’s workspace context and role to the request. Unauthenticated requests still succeed. They receive the read-only canonical playbook registry instead of tenant-resolved data, so public callers can always read the five canonical playbooks.

List playbooks

Returns every playbook ordered by owning department code, then name. Each playbook embeds its handoffs ordered by sequence.

Get a playbook

Returns a single playbook by its stable ID with its handoffs ordered by sequence.

Response fields

Playbook

Handoff

Errors and fallback behavior

When the database is unavailable, empty, or a query fails, both endpoints fall back to the built-in canonical playbook registry and return 200 with the five canonical playbooks. The fallback is read-only, so listing playbooks degrades gracefully instead of returning 503.