Skip to content
dimmiDocs

Conversations

Create a redaction rule

POST/api/v1/redaction-rules

Authorization

Authorizationstringrequired

An API token, sent as Bearer <token>.

Needs the settings:write ability

Body

application/json
enabledboolean

Whether the rule runs; defaults to true.

namestringrequired

A label, 1 to 80 characters.

Minimum length: 1 · Maximum length: 80

patternstringrequired

An RE2 regular expression, at most 256 characters.

Minimum length: 1 · Maximum length: 256

replacementstring

Text written in place of a match, at most 80 characters; defaults to [redacted].

Maximum length: 80

Response 201

Created
dataobjectrequired
Show child attributes
created_atstringrequired

When it was created, as an RFC 3339 time, such as 2026-01-31T09:00:00Z.

Format: date-time

enabledbooleanrequired

True when the rule is applied to messages before they are stored.

idstringrequired

The id of this record. Send it wherever an endpoint asks for this record; never use its name or title in its place.

namestringrequired

Name of the rule.

objectstringrequired

The kind of record this is, the same for every record of its kind, such as article.

patternstringrequired

The regular expression whose matches are replaced, up to 256 characters.

positionintegerrequired

Where the rule comes in the order rules apply, lowest first.

Format: int32

replacementstringrequired

What each match becomes in the stored text, up to 80 characters, such as [redacted].

updated_atstringrequired

When it last changed, as an RFC 3339 time, such as 2026-01-31T09:00:00Z.

Format: date-time

Response error

Error
codestringrequired

Stable code for programs to tell errors apart, such as validation_failed or internal_error.

errorsobject

Each rejected field mapped to its messages. Only present when the input was invalid.

messagestringrequired

What went wrong, in words safe to show a person.