API Reference
Create a playbook
Markdown up to 16KB, applied to one or both routine kinds.
POST
/routines/playbooksadmin, userroutines defaults to ["review", "bughunt"] when omitted. content is markdown, up to 16KB, with optional leading YAML frontmatter (stored verbatim, not parsed).
Body
namestringrequiredNon-empty, ≤128 chars, no slashes or control characters (it's a path segment).
contentstringrequiredMarkdown, up to 16KB (UTF-8 bytes).
routinesstring[]Which kinds it applies to. Defaults to both.
Request
cURL
bash
curl -X POST localhost:8000/routines/playbooks \
-H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' \
-d '{"name":"security-basics","content":"# Security basics\n\n- Never log secrets.","routines":["review","bughunt"]}'Responses
201Playbook created
json
{
"id": 1,
"name": "security-basics",
"routines": ["review", "bughunt"],
"content": "# Security basics\n\n- Never log secrets."
}400Validation failure
json
{ "detail": "playbook content exceeds the 16KB limit (17000 bytes)" }409Name already exists
json
{ "detail": "playbook 'security-basics' already exists" }