Archive, restore or move a rule
POST
/api/v1/rules/{id}/status
const url = 'https://deck.example.com/api/v1/rules/1/status';const options = { method: 'POST', headers: {cookie: 'qd_auth=<qd_auth>', 'Content-Type': 'application/json'}, body: '{"move_to":null,"status":"active"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://deck.example.com/api/v1/rules/1/status \ --header 'Content-Type: application/json' \ --cookie qd_auth=<qd_auth> \ --data '{ "move_to": null, "status": "active" }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
integer format: int64
Request Bodyrequired
Section titled “Request Bodyrequired”Archive, restore, or restore tied to another session (“move”).
Media typeapplication/json
Archive, restore, or restore tied to another session (“move”).
object
move_to
Responses
Section titled “Responses”A grant.
Media typeapplication/json
A grant.
object
action_template
required
What a rule allows: action types, and for forwards, resumes and new sessions, the target.
archived_reason
string | null
builtin
required
Shipped with the deck (the sent-mail grant). The person can turn it off but not delete it.
boolean
created_from_card_id
integer | null format: int64
criteria
required
A strict rule’s criteria. A sender criterion needs the card to report DMARC or DKIM passing.
object
account
string | null
from_address
string | null
from_domain
string | null
list_id
string | null
subject_contains
string | null
id
required
integer format: int64
instruction
string | null
known_sender_domains
required
A fuzzy match from any other domain is refused.
Array<string>
last_matched_at
string | null
match_count
required
integer format: int64
mode
required
project
string | null
session_ref
topic
string | null
Example
{ "action_template": { "target": null, "types": [ "archive" ] }, "criteria": { "account": null, "from_address": null, "from_domain": null, "list_id": null, "subject_contains": null }, "mode": "fuzzy", "status": "active"}default
Section titled “default”An error, with its message.
Media typeapplication/json
Every error the REST API returns, with an HTTP status.
object
error
required
string
Example generated
{ "error": "example"}