Skip to main content
POST
/
policies
/
{policyId}
/
rules
Create policy rule
curl --request POST \
  --url https://api.indoralabs.com/policies/{policyId}/rules \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "type": "REDACT",
  "target": "<string>",
  "sourceText": "<string>",
  "sourcePage": 2,
  "offsetStart": 1,
  "offsetEnd": 2
}
'
{
  "rule": {
    "id": "b87e2a3c-6ef9-4f9b-8e1b-9f9c2c1eab23",
    "doc_id": "f1c8e8b0-7a1b-4f34-9b5b-0d99a3c9b77d",
    "type": "REDACT",
    "target": "all police contact information",
    "source_text": "All personal contact information of officers must be redacted",
    "source_page": 3,
    "offset_start": 120,
    "offset_end": 182,
    "created_at": "2026-01-22 14:31:09.123 -0600"
  }
}

Authorizations

x-api-key
string
header
required

Path Parameters

policyId
string<uuid>
required

Body

application/json
type
enum<string>
required

Rule behavior.

Available options:
REDACT,
DETECT,
EXCLUDE
target
string
required

Target category or phrase this rule applies to.

sourceText
string
required

Exact source text from the policy document.

sourcePage
integer
required

Page number in the policy document.

Required range: x >= 1
offsetStart
integer
required

Start character offset of the source text.

Required range: x >= 0
offsetEnd
integer
required

End character offset of the source text.

Required range: x >= 1

Response

Rule created

rule
object

Immutable compliance rule derived from a policy document.