Draft a reply to an attention item
POST /v2/attention-items/{attentionItemId}/draft
Parameters
Path parameters
Header parameters
apps/rest-api/src/shared/idempotency.ts.Request body
Content-Type: application/json
Example
{
"instruction": "string",
"draft": {
"subject": "string",
"body": "string"
}
}
Responses
200 — Successful response
Content-Type: application/json
Example
{
"data": {
"attentionItemReplyDraft": {
"subject": "string",
"body": "string",
"to": "string"
}
}
}
400 — Request body failed validation.
Content-Type: application/json
401 — Missing or invalid API key.
Content-Type: application/json
403 — Valid key, insufficient permission.
Content-Type: application/json
404 — Resource does not exist.
Content-Type: application/json
409 — Request conflicts with the current state of the resource.
Content-Type: application/json
429 — Rate limit exceeded.
Content-Type: application/json
500 — Unexpected server error.
Content-Type: application/json
Code samples
curl https://api.prod.getdex.com/v2/attention-items/00000000-0000-0000-0000-000000000000/draft \
--request POST \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"instruction": "string",
"draft": {
"subject": "string",
"body": "string"
}
}'
fetch('https://api.prod.getdex.com/v2/attention-items/00000000-0000-0000-0000-000000000000/draft', {
method: 'POST',
headers: {
Authorization: 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
instruction: 'string',
draft: {
subject: 'string',
body: 'string'
}
})
})
requests.post(
"https://api.prod.getdex.com/v2/attention-items/00000000-0000-0000-0000-000000000000/draft",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
},
json={
"instruction": "string",
"draft": {
"subject": "string",
"body": "string"
}
}
)
List attention items
List the email threads Dex flagged as waiting on the user — a reply someone expects, or an action such as signing or renewing — newest first. Open items only unless `includeResolved=true`. Cursor-pagi
Read an attention item's thread
Read the email thread behind an attention item live from the user's mailbox, oldest message first: `{ data: { attentionItemThread: { subject, account_email, messages: [{ id, from, reply_to, subject, d

