Skip to main content

Test Support Rule

POST 

/api/support/admin/rules/:rule/test

Dry-runs a rule against an existing ticket: reports whether the rule's conditions match the ticket right now and which actions would run. Nothing is changed, sent, or recorded. The rule's is_active flag is ignored — an inactive rule can be tested.

Required scope: support:write

Grant this scope to your token under Settings → Developer → Personal Access Tokens.

Request body

  • ticket_id (integer, required) — the id of the ticket to evaluate against. Must exist.

Response fields

  • matches (boolean) — whether every condition holds for the ticket.
  • would_run[] (object[]) — the rule's actions in order, each with type (string), value (mixed, nullable) and label (string, nullable — the action's display label). Empty when the rule does not match, or when an hourly rule has already fired in this status epoch.
  • already_applied (boolean) — only ever true for an hourly rule: the rule has already fired on this ticket since its status last changed, so the scheduled sweep would skip it.

Authentication: Bearer token with the support:write scope, or an authenticated session, from a caller with an active support role who also holds the support admin role. No tenant context — this endpoint is central.

Request

Responses

OK

Response Headers
    Content-Type