Skip to Content
API ReferenceSupport automation rules

Dry run support automation rules

See what your switched-on rules would do with a ticket, without doing it.

The dry run changes nothing: no reply, refund, close or record. It tests only rules that are switched on, and it does not check the daily refund cap.

GET
/v2/support-automation-rules/dry-run

See what your automation would do with one of your tickets if it were opened now: which rule would answer it, the reply it would send, the refund in USD cents and the close outcome. Nothing is sent, refunded, closed or recorded. Only switched-on rules take part, in their current order, so a paused rule shows up only after you switch it on. With support automation off, the answer is matched: false with skip_reason: auto_respond_disabled. For a refund rule, the dry run checks that the ticket's order is paid (PAID, PARTIAL or COMPLETED) and was not already refunded; otherwise it answers would_execute: false with skip_reason: refund_unavailable. It does not check the daily refund cap, whether a refund would be more than nothing (no ticket item, nothing left to refund, or the per-order cap used up), or whether the item is a subscription: those are checked when the rule runs on a new ticket, and a refund that fails them makes the rule do nothing for that ticket. Another store's ticket returns 404. Requires the support.automation API-key ability, and the key's user needs the Support Automation role in the store (owners and administrators have it). OAuth callers use the admin grant and select a store with X-STORE. Current membership and role permissions apply to every request.

Authorization

headerAuthorizationBearer <API Key>

Provide your SellApp API key as a bearer token.

Query Parameters

ticket_id*integer

The ticket to test the rules against.

Range1 <= value

Header Parameters

X-STORE?string

Store slug. Required for OAuth access tokens. API keys may omit it to use their current store, or the first accessible store when no current store is selected.

Response Body

Successful response.

application/json
  1. response
data*
Example Request
curl -X GET 'https://sell.app/api/v2/support-automation-rules/dry-run?ticket_id=1' \  -H 'X-STORE: launch-lab'
{  "data": {    "ticket_id": 4821,    "matched": true,    "would_execute": true,    "rule_id": 7,    "rule_name": "Expired download links",    "skip_reason": null,    "rendered_reply": "Hi maya.chen@example.com, we credited $9.99 to your Launch Lab wallet for Design kit. Your wallet balance is now $9.99.",    "refund_amount_cents": 999,    "close_outcome": "refunded_partial",    "automation_enabled": true,    "currency": "USD"  }}