Drafts waiting to be sent
email.draft.list
GET/api/v1/households/{household_id}/queries/email.draft.list
- Query
- Rigel runs it
Drafts that are being written, on their way (sending) or failed, most recently changed first. Sent drafts are not listed: they are emails in their conversation.
Parameters#
| Field | Description |
|---|---|
household_idpathstringrequired | The household's ID. |
Response#
200 The answer.
| Field | Description |
|---|---|
itemsarray of objectsrequired | |
items[].idstringrequired | A email draft ID, such as emf_01JC0000000000000000000000. |
items[].email_thread_idstring or nullrequired | The conversation it replies to, or null. |
items[].from_email_address_idstring or nullrequired | The address it goes out from, or null if that address was removed. |
items[].from_person_idstring or nullrequired | The family member it is sent for, or null. |
items[].toarray of objectsrequired | The To recipients. |
items[].to[].email_correspondent_idstringrequired | The person or organization as Rigel knows them. |
items[].to[].addressstringrequired | Their email address. |
items[].to[].namestringrequired | Their name; may be empty. |
items[].ccarray of objectsrequired | The Cc recipients. |
items[].cc[].email_correspondent_idstringrequired | The person or organization as Rigel knows them. |
items[].cc[].addressstringrequired | Their email address. |
items[].cc[].namestringrequired | Their name; may be empty. |
items[].subjectstringrequired | The subject. |
items[].bodystringrequired | The message, in Markdown. |
items[].stateone of: draft, sending, sent, failedrequired | Where the draft stands: draft (being written), sending (sent by a person, on its way), sent (delivered to the mail service), failed (sending failed; edit it or send it again). |
items[].problemstring or nullrequired | Why it is waiting or failed, in words, or null. |
items[].attachmentsarray of objectsrequired | The files attached. |
items[].attachments[].file_idstringrequired | The attached file. |
items[].attachments[].file_namestringrequired | Its name. |
items[].updated_atstring (date-time)required | When it last changed. |
Errors#
Every error has the same envelope: error.code, error.message, error.details, error.recovery and error.request_id.
| Status | Code | When |
|---|---|---|
400 | validation_failed | A field is missing, misspelled or out of range. details.fields lists each problem. |
401 | unauthenticated | The request has no valid session. |
404 | not_found | The household doesn't exist, or you aren't a member of it. |
Examples#
These are real. Each was recorded from a sample household, the Okafors, running through the whole API when this site was built.
List drafts
curl 'https://rigel.house/api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/queries/email.draft.list' \
-H "Cookie: rigel_session=$RIGEL_SESSION"const response = await fetch("https://rigel.house/api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/queries/email.draft.list", {
headers: {
Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
},
});
const data = await response.json();GET /api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/queries/email.draft.list HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01M6V9CSS3RGYMAXSCJTNM70Q5
{
"items": [
{
"id": "emf_01M6V9CSS28T4ADS0XYSNEQG13",
"email_thread_id": null,
"from_email_address_id": "eml_01M6V9CSQB5Y3M8ETS3YPHFPA1",
"from_person_id": "per_01M6V9CS6RX26JK5KVYGRN22D2",
"to": [
{
"email_correspondent_id": "emp_01M6V9CSQT3G5XYPMTTD6W9VYJ",
"address": "pat@smithhvac.example.com",
"name": "Pat Smith"
}
],
"cc": [],
"subject": "Furnace quote",
"body": "Could you send the quote again?",
"state": "draft",
"problem": null,
"attachments": [],
"updated_at": "2026-11-07T15:17:52.546Z"
},
{
"id": "emf_01M6V9CSRY2YJHWT6T44V5M78S",
"email_thread_id": "emt_01M6V9CSQK00H6ZNSV7F9ENC49",
"from_email_address_id": "eml_01M6V9CSQB5Y3M8ETS3YPHFPA1",
"from_person_id": "per_01M6V9CS6RX26JK5KVYGRN22D2",
"to": [
{
"email_correspondent_id": "emp_01M6V9CSQK7BRTJRSVATB06DCC",
"address": "office@lakeviewdental.example.com",
"name": "Lakeview Dental"
}
],
"cc": [],
"subject": "Re: Reminder: Nia's cleaning on Thursday",
"body": "Thank you. We'll be there at 3:20 pm on Thursday, and we'll bring the insurance card.",
"state": "draft",
"problem": null,
"attachments": [],
"updated_at": "2026-11-07T15:17:52.545Z"
}
]
}For Rigel#
Rigel's tool for this query is email_draft_list. Rigel runs this on its own, then says what it did. The agent guide has the rest.