Rulebooks
Confirm a rulebook CSV import
POST
/api/v1alpha1/rulebooks/csv-importsCreates the rulebooks from a preview you have already checked. This is the step that writes.
- Access: an alpha-enabled API key with the
MANAGE_RULEBOOKSpermission. - Send: the
sessionIdfromPOST /api/v1alpha1/rulebooks/csv-imports/preview, before it expires. - Returns: how many rulebooks were created, and each one in full.
- Retries: an optional
Idempotency-Keystops a repeated call from importing twice.
Authorization
apiKey AuthorizationBearer <token>
In: header
Header Parameters
Idempotency-Key?string
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
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/csv-imports" \ -H "Authorization: Bearer $DEEPFRAME_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "default_rulebook_name": "Imported Safety Rules", "mapping": { "additional_description_columns": [ "Notes" ], "rule_description": "Details", "rule_id": "Rule ID", "rule_title": "Requirement", "rulebook_name": "Section" }, "session_id": "rbi_0190b5d4-7e1f-7a2b-9c3d-1234567890ab" }'{ "created_count": 2, "rulebooks": [ { "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" } ]}