Skip to content
Rulebooks

Update a rulebook

PATCH/api/v1alpha1/rulebooks/{rulebook_id}

Changes a rulebook this API key owns.

  • Access: an alpha-enabled API key with the MANAGE_RULEBOOKS permission.
  • Templates: shared templates are read-only and answer 403. Create your own rulebook from one instead of editing it.
  • Not found: a rulebook belonging to somebody else is deliberately indistinguishable from one that does not exist.
AuthorizationBearer <token>

In: header

Path Parameters

rulebook_id*string

Identifier of a rulebook your key can read.

Request 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 PATCH "https://example.com/api/v1alpha1/rulebooks/rb_0190b5d4-7e1f-7a2b-9c3d-1234567890ab" \  -H "Authorization: Bearer $DEEPFRAME_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "content": "Inspect all exits.",    "name": "Updated 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"}