Skip to content

Apply deterministic fixes to filtered violations

POST
/compliance/violations/fix
Code sample: Shell / cURL
curl --request POST \
--url 'https://example.com/api/v1/compliance/violations/fix?severity=all&resolved=pending&groupBy=none&sort=date&direction=asc&page=1&pageSize=10' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "type": "missing_notes", "violationId": "example" }'

Synchronously fixes one violationId, one type, or all supported pending violations in the filtered scope. Returns actual fixed/skipped counts and errors; hasMore indicates that the bounded batch left additional rows. Pagination and sorting do not restrict bulk fixes. Requires settings.manage.

startDate

Period start (YYYY-MM-DD); defaults to the report’s last 30 days.

string format: date
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$/

Period start (YYYY-MM-DD); defaults to the report’s last 30 days.

endDate

Period end (YYYY-MM-DD), inclusive.

string format: date
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$/

Period end (YYYY-MM-DD), inclusive.

types

Comma-separated canonical violation types.

string

Comma-separated canonical violation types.

severity

Filter by severity.

string
Allowed values: all warning error

Filter by severity.

resolved

Resolution state; defaults to open violations.

string
default: pending
Allowed values: pending resolved all

Resolution state; defaults to open violations.

memberIds

Comma-separated member IDs.

string

Comma-separated member IDs.

clientIds

Comma-separated company IDs.

string

Comma-separated company IDs.

search

Search violation rows.

string
<= 200 characters

Search violation rows.

groupBy

Group ordering; rows remain paginated.

string
default: none
Allowed values: none type member company

Group ordering; rows remain paginated.

sort

Sort field within groups.

string
default: date
Allowed values: date type member company severity

Sort field within groups.

direction

Sort direction.

string
default: desc
Allowed values: asc desc

Sort direction.

page

One-based page.

integer
default: 1 > 0 <= 9007199254740991

One-based page.

pageSize

Rows per page: 10, 25, 50, or 100.

integer
default: 10 > 0 <= 100

Rows per page: 10, 25, 50, or 100.

Media typeapplication/json
object
type

Fix only this supported violation type.

string
Allowed values: missing_notes activity_role_mismatch
violationId

Fix one violation by ID within the selected scope.

string
>= 1 characters

Fix outcomes, including skipped rows and errors.

Media typeapplication/json
object
data
required
object
errors
required
Array<string>
fixed
required
integer
<= 9007199254740991
hasMore
required
boolean
skipped
required
integer
<= 9007199254740991

Example generated

{
"data": {
"errors": [
"example"
],
"fixed": 1,
"hasMore": true,
"skipped": 1
}
}

Validation error. Parse failures include field paths and expectations.

Media typeapplication/json

Validation error with safe field paths and expected values; submitted values are never returned.

object
error
required
object
code
required

Stable machine-readable error code.

string
issues
Array<object>
object
expected
required
string
message
required
string
path
required
Array<string | number>
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Unauthorized.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Forbidden.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Rate limit exceeded. Wait for Retry-After before retrying.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}
RateLimit-Limit
string
/^\d+$/

Maximum requests in the current quota window.

RateLimit-Policy
string

Quota policy in requests and window seconds, for example 60;w=60.

RateLimit-Remaining
string
/^\d+$/

Requests left in this quota window (zero when blocked).

RateLimit-Reset
string
/^\d+$/

Seconds until the current quota window resets, when available from the rate-limit store.

Retry-After
string
/^\d+$/

Seconds until another request may be attempted.