Skip to content

Cards, filtered by account, section or state

The OpenAPI spec (JSON)Licence, versions and sign-in

GET
/api/v1/cards
curl --request GET \
--url 'https://deck.example.com/api/v1/cards?state=open&open=false' \
--cookie qd_auth=<qd_auth>
account
string
section

Where a card sits in the Inbox.

One of:
string
Allowed values: suggestion later sent
state
string
Allowed values: open revising approved executing handed_off done failed handled_elsewhere later automatic
open

Only cards still on the Inbox (not finished).

boolean

Only cards still on the Inbox (not finished).

limit
integer format: int64
Media typeapplication/json
Array<object>

A card as the deck serves it.

object
account
required

An account label from deck config.

string
>= 1 characters <= 100 characters
action_records
required

The current version’s actions, in order.

Array<object>

An action as stored on a card version.

object
action
required

One proposed action. The type tag is also the name runner.eligible uses.

One of:
object
account
required
string
>= 1 characters <= 100 characters
thread_id
required
string
>= 1 characters <= 200 characters
type
required
string
Allowed value: archive
key
additional properties
card_id
required
integer format: int64
card_version
required
integer format: int64
error
string | null
finished_at
string | null
id
required
integer format: int64
outcome

What was sent and what came back.

run_by
Any of:
string
Allowed values: runner agent
seq
required
integer format: int64
started_at
string | null
status
required
string
Allowed values: pending released started done failed stopped
actions
Array
default: <= 20 items

One proposed action. The type tag is also the name runner.eligible uses.

One of:
object
account
required
string
>= 1 characters <= 100 characters
thread_id
required
string
>= 1 characters <= 200 characters
type
required
string
Allowed value: archive
key
additional properties
auto_grant

Ask for an automatic action under this grant: the deck runs rules match, and stores the card as automatic only when it allows.

integer | null format: int64
excerpt

The email’s own words for the Inbox’s details pane, as plain text: the newest message verbatim, or a thread as one line per message (Mary: Did we update this for Compass?). Leave out quoted replies, signatures and footers. The pane shows the first lines. On an account whose rules keep customers’ data out of other systems, leave out end users’ personal data and document contents, as stories and forwards do.

string | null
facts

Key facts shown under the summary, each {"label": "Amount", "value": "$1,200"}.

Array<object>
default: <= 30 items

One fact on a card: an amount, a date, a reference.

object
label
required

A few words: “Amount”, “Due”.

string
>= 1 characters <= 100 characters
value
required

“$1,200”, “1 December”.

string
>= 1 characters <= 1000 characters
key
additional properties
grant_id
integer | null format: int64
handoff_reason
string | null
id
required
integer format: int64
keep_in_inbox

Nothing touches the thread (a newsletter the person reads themselves).

boolean
last_message_at

When that message arrived. A thread left for later takes a new card only for a message newer than that.

string | null
last_message_ref

The newest message the card was prepared on, for freshness checks.

string | null
link

Open in Gmail (or the draft).

string | null
list_id

The List-Id header, for strict rules and the learning loop.

string | null
needs_agent

The agent wants to carry the card out itself, whatever the runner could do.

boolean
pending

The person’s decision on this version while it waits out the undo window: the card still reads open until the batch is released (or undone, when this goes away).

Any of:

A decision in its undo window (Card.pending).

object
batch
required

The Approve All batch: POST /api/v1/decisions/undo with it cancels the decision.

string
kind
required

The kinds of decision the person makes on a card.

string
Allowed values: approve edit adjust move_down move_up later stop
release_at
required

When the batch is released to the runner.

string
posted_by
required

A session by its tab, on a node. session_id pins one conversation when the tab has been reused.

object
node
required
string
>= 1 characters <= 100 characters
session_id
string | null
tab
required
string
>= 1 characters <= 200 characters
prepared_at
required
string
reason
required
string
>= 1 characters <= 5000 characters
recheck_note
string | null
rechecked_at
string | null
refs
Array<string>
default: <= 50 items
rule_ref

The rules.md row the agent used.

string | null
section
required

Where a card sits in the Inbox.

One of:
string
Allowed values: suggestion later sent
sender
Any of:

The sender as the agent read it.

object
address
required
string
>= 3 characters <= 320 characters
name
string | null
key
additional properties
sender_auth
object
dkim_pass
boolean
dmarc_pass
boolean
spf_pass

The sending server is one the domain’s SPF record allows. Absent on cards from before 28 Nov 2026, and left out of the deck’s answers when absent, so a CLI from before then (which refuses unknown fields here) still reads them.

boolean | null
state
required
string
Allowed values: open revising approved executing handed_off done failed handled_elsewhere later automatic
subject
required
string
<= 1000 characters
summary
required

What the email is, in a few words: the Inbox shows it on one line beside the proposed action. Lead with the kind of email and leave out who sent it and what their company does unless the person needs that to decide: “Sales pitch: card dunning”, “Water bill, direct debit”, “Customer asks how webhook retries work”. Facts and drafts carry the rest.

string
>= 1 characters <= 5000 characters
thread_key
required

The thread’s ID as the mail service gives it: Gmail’s thread ID, exactly (19a4f0c2b7e1d3a5), with no account or service prefix (the account is its own field). One card per account and thread; a forward without a source names the thread by it.

string
>= 1 characters <= 300 characters
to

Which of the person’s addresses the newest message went to (an alias such as hello@example.com when that’s where it arrived). The Inbox shows it with the sender; without it, the account’s address stands in.

string | null
updated_at
required
string
version
required
integer format: int64

Example

[
{
"action_records": [
{
"action": {
"type": "archive"
},
"run_by": "runner",
"status": "pending"
}
],
"actions": [],
"auto_grant": null,
"excerpt": null,
"facts": [],
"keep_in_inbox": false,
"last_message_at": null,
"last_message_ref": null,
"link": null,
"list_id": null,
"needs_agent": false,
"pending": null,
"refs": [],
"rule_ref": null,
"section": "suggestion",
"sender": null,
"sender_auth": {
"dkim_pass": false,
"dmarc_pass": false
},
"state": "open",
"to": 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"
}