Skip to main content
POST
Create a Rule

Authorizations

Authorization
string
header
required

JWT from IDM (Authorization: Bearer )

Body

application/json

Request to create a new Rule

rule
string
required

Rule text

Maximum string length: 450
Example:

"Avoid passive voice in all user-facing content."

allContentGroups
boolean
default:false

When true, this rule applies to all content groups and contentGroupIds must be absent or empty. When false (default), contentGroupIds must be provided and non-empty.

Example:

false

contentGroupIds
string[]

Content Group IDs this rule applies to. Must be non-empty when allContentGroups is false. Must be absent or empty when allContentGroups is true.

Maximum array length: 100
Maximum string length: 36
allLanguages
boolean
default:false

When true, this rule applies to all languages and languages must be absent or empty. When false (default), languages must be provided and non-empty.

Example:

false

languages
string[]

Language codes this rule applies to (e.g., en, en-GB). Equivalent representations such as en_US are accepted and normalised to canonical BCP-47 (en-US). Must be non-empty when allLanguages is false. Must be absent or empty when allLanguages is true.

Maximum array length: 100
Minimum string length: 1
active
boolean

Whether this rule is active. When omitted, the service decides based on remaining room under the active-rule limit for the rule's Content Group(s) and Language(s).

Example:

true

aiCheckEnabled
boolean

Whether this rule is used during AI-powered quality checks. When omitted on an active rule, the service decides based on remaining room under the AI-check limit.

Example:

true

Response

Rule created successfully

Rule details

id
string<uuid>
required

Unique identifier for this Rule

Example:

"01900000-0000-7000-8000-000000000001"

rule
string
required

The rule text

Example:

"Avoid passive voice in all user-facing content."

active
boolean
required

Whether this rule is active

aiCheckEnabled
boolean
required

Whether this rule is used during AI-powered quality checks

allContentGroups
boolean
required

Whether this rule applies to all content groups

allLanguages
boolean
required

Whether this rule applies to all languages

contentGroups
object[] | null
required

Content Groups this rule applies to. Empty list means all content groups. Null means no content groups are assigned.

languages
object[] | null
required

Language details for languages this rule applies to. Empty list means all languages. Null means no languages are assigned.

createdAt
string<date-time>
required

When this rule was created

Example:

"2024-01-15T10:30:00Z"

lastModifiedAt
string<date-time>
required

When this rule was last modified

Example:

"2024-06-01T14:22:00Z"

name
string | null

A short, system-generated name indicating this rule's purpose. Never user-entered; automatically generated, so it may be absent shortly after the rule is created.

Example:

"No passive voice"

omittedReason
string | null

Reason this rule is omitted from AI checks, as determined by an automated eligibility check. Absent if the rule is eligible, or if the check hasn't completed yet.

eligibilityCheckedAt
string<date-time> | null

When the automated AI-check eligibility check last completed for this rule. Null means it hasn't run yet: eligibility is still pending, so a client should treat the AI-check state as 'checking' rather than eligible. Once set, a null omittedReason means eligible and a non-null omittedReason means omitted.

Example:

"2024-06-01T14:22:05Z"

styleGuide
null

Style Guide this rule was extracted from. Null when the rule is unlinked — either manually created or subsequently edited.

createdBy
null

User who created this rule

lastModifiedBy
null

User who last modified this rule