Skip to Content
Tracira
API referenceRules

Create a rule

posthttps://www.tracira.com/api/rules
POST
/api/rules

Authorization

sessionAuth
cookiebetter-auth.session_token<token>

Browser session cookie used by logged-in Tracira users. Secure-prefixed variants may also be used by the browser.

Request Body

application/json
  1. body
name*string
type*string
Value in"keyword_required""keyword_forbidden""regex_match""length_limit""confidence_threshold""llm_judge""json_field""json_field_keyword_required""json_field_keyword_forbidden"
description?string
value*string
isActive?boolean
projectId?string|null
projectName?string|null
taskName?string|null
llmJudgeProvider?|
Value in"anthropic""openai""openrouter"
llmJudgeModel?string|null

Response Body

Rule created.

application/json
  1. response
id*string
name*string
type*string
Value in"keyword_required""keyword_forbidden""regex_match""length_limit""confidence_threshold""llm_judge""json_field""json_field_keyword_required""json_field_keyword_forbidden"
description*string
value*string
isActive*boolean
projectId?string|null
projectName?string|null
taskName?string|null
llmJudgeProvider?|
Value in"anthropic""openai""openrouter"
llmJudgeModel?string|null
createdAt*string
Formatdate-time
curl -X POST 'https://www.tracira.com/api/rules' \  -H 'Content-Type: application/json' \  -d '{  "name": "No refund promises",  "type": "keyword_forbidden",  "value": "refund",  "description": "Refunds need a human sign-off.",  "projectName": "Customer Support"}'
Example Response
{  "id": "string",  "name": "string",  "type": "keyword_required",  "description": "string",  "value": "string",  "isActive": true,  "projectId": "string",  "projectName": "string",  "taskName": "string",  "llmJudgeProvider": "anthropic",  "llmJudgeModel": "string",  "createdAt": "2019-08-24T14:15:22Z"}