Skip to content
PUT
/api/v1/reading-rules/{id}
curl --request PUT \
--url https://deck.example.com/api/v1/reading-rules/1 \
--header 'Content-Type: application/json' \
--cookie qd_auth=<qd_auth> \
--data '{ "account": null, "from": null, "label": null, "name": "example", "source": null, "text_regex": null }'
id
required
integer format: int64

A “while I’m reading” rule: an item that matches every condition it sets gets through while the person reads. Conditions left out match anything; a rule must set at least one.

Media typeapplication/json

A “while I’m reading” rule: an item that matches every condition it sets gets through while the person reads. Conditions left out match anything; a rule must set at least one.

object
account

The mail account, or the Matrix room’s name.

string | null
from

The sender contains this (case doesn’t matter): @alertmanager:, no-reply@accounts.google.com.

string | null
label

The item carries this Gmail label.

string | null
name
required

What it’s for, as the Rules screen shows it (“Critical alerts”).

string
>= 1 characters <= 200 characters
source

gmail or matrix.

string | null
text_regex

An RE2 regular expression the subject and text are matched against: (?i)\(critical\).

string | null

A “while I’m reading” rule: an item that matches every condition it sets gets through while the person reads. Conditions left out match anything; a rule must set at least one.

Media typeapplication/json

A “while I’m reading” rule: an item that matches every condition it sets gets through while the person reads. Conditions left out match anything; a rule must set at least one.

object
account

The mail account, or the Matrix room’s name.

string | null
enabled
required
boolean
from

The sender contains this (case doesn’t matter): @alertmanager:, no-reply@accounts.google.com.

string | null
id
required
integer format: int64
label

The item carries this Gmail label.

string | null
last_matched_at
string | null
match_count
required
integer format: int64
name
required

What it’s for, as the Rules screen shows it (“Critical alerts”).

string
>= 1 characters <= 200 characters
source

gmail or matrix.

string | null
text_regex

An RE2 regular expression the subject and text are matched against: (?i)\(critical\).

string | null

Example

{
"account": null,
"from": null,
"label": null,
"source": null,
"text_regex": null
}

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"
}