Create a rulebook
/api/v1alpha1/rulebooksCreates a rulebook: the set of rules a run checks a video against. It belongs to the API key that created it.
- Access: an alpha-enabled API key with the
MANAGE_RULEBOOKSpermission. - Retries: an optional
Idempotency-Keymakes a repeated call safe.
Bind it to a workflow with POST /api/v1alpha1/workflows, then start a run on that workflow.
Authorization
apiKey In: header
Header Parameters
Optional key for safe retry of this POST. The key is retained for 24 hours and compared with the request payload and concrete path parameters.
length <= 255Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
curl -X POST "https://example.com/api/v1alpha1/rulebooks" \ -H "Authorization: Bearer $DEEPFRAME_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "content": "Inspect every emergency exit.", "name": "Warehouse Safety", "rules": [ { "description": "The exit remains unobstructed.", "id": "SEC-04", "title": "Emergency exit is clear." } ] }'{ "can_delete": true, "can_edit": true, "content": "Inspect every emergency exit.", "created_at": "2026-08-10T10:05:00.000Z", "created_by": "user_0190b5d4-7e1f-7a2b-9c3d-1234567890ab", "has_active_workflow_run": false, "id": "rb_0190b5d4-7e1f-7a2b-9c3d-1234567890ab", "is_template": false, "name": "Warehouse Safety", "owner_id": "user_0190b5d4-7e1f-7a2b-9c3d-1234567890ab", "rules": [ { "description": "The exit remains unobstructed.", "id": "SEC-04", "title": "Emergency exit is clear.", "version": 2 } ], "template_key": "template_0190b5d4-7e1f-7a2b-9c3d-1234567890ab", "updated_at": "2026-08-10T10:06:00.000Z", "updated_by": "user_0190b5d4-7e1f-7a2b-9c3d-1234567890ab"}