Shield rules

Reorder shield rules

Replace the whole evaluation order in one call.

PUT/api/v1/shield-rules
cURL
curl -X PUT "https://inboundr.net/api/v1/shield-rules" \
  -H "Authorization: Bearer $INBOUNDR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "order": []
  }'

Sets the order every shield rule is evaluated in. Position 0 is checked first.

This is the collection endpoint because that is what the operation is about: it names every rule at once. To nudge a single rule one place, the per-rule { "move": "up" } spelling is shorter.

orderarraybodyrequired

Rule IDs (sr_…) in the order you want them checked. The list must contain exactly the account's rules: every rule once, with none missing or repeated.

json
{ "order": ["sr_456", "sr_123", "sr_789"] }

Example response

200
{
  "order": ["sr_456", "sr_123", "sr_789"]
}

A list that is missing a rule, repeats one, or names a rule that isn't yours is rejected with 409 and nothing is written. That is deliberate: the usual cause is a client holding a list from before a rule was created or deleted somewhere else, and partially applying it would leave two rules fighting over one position. Re-read the list and send the order again.

Priorities are rewritten to a dense 0…n-1 on every call, so gaps left by deleted rules are tidied up as a side effect.