Skip to content
Rigel docs
Open Rigel

Documents linked to a record

documents.document.for_record

GET/api/v1/households/{household_id}/queries/documents.document.for_record

  • Query
  • Rigel runs it

The documents linked to a record (a task, a recipe, a piece of equipment), oldest link first, each with the link's note. Use it to show or find a record's documents.

Parameters#

Documents linked to a record: parameters
FieldDescription
household_idpathstringrequired

The household's ID.

record_idquerystringrequired

The ID of any record in the household, such as tsk_01JC0000000000000000000000.

1 to 100 characters

Response#

200 The answer.

Documents linked to a record: response fields
FieldDescription
itemsarray of objectsrequired
items[].link_idstringrequired

A document link ID, such as dlk_01JC0000000000000000000000.

items[].document_idstringrequired

A document ID, such as doc_01JC0000000000000000000000.

items[].titlestringrequiredNo description.
items[].kindone of: markdown, html, filerequiredNo description.
items[].summarystring or nullrequiredNo description.
items[].notestring or nullrequired

Why it is linked, if said.

items[].updated_atstring (date-time)required

When the document last changed.

Errors#

Every error has the same envelope: error.code, error.message, error.details, error.recovery and error.request_id.

Documents linked to a record: errors
StatusCodeWhen
400validation_failedA field is missing, misspelled or out of range. details.fields lists each problem.
401unauthenticatedThe request has no valid session.
404not_foundThe 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.

Documents about the furnace

The documents linked to a record, oldest link first.

Request, curl
curl 'https://rigel.house/api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/queries/documents.document.for_record?record_id=ast_01M6V9CSVCMZFAP6ZN5WANZ6M8' \
  -H "Cookie: rigel_session=$RIGEL_SESSION"
Request, TypeScript
const response = await fetch("https://rigel.house/api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/queries/documents.document.for_record?record_id=ast_01M6V9CSVCMZFAP6ZN5WANZ6M8", {
  headers: {
    Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
  },
});
const data = await response.json();
Request, HTTP
GET /api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/queries/documents.document.for_record?record_id=ast_01M6V9CSVCMZFAP6ZN5WANZ6M8 HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Response, 200
HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01M6V9CTBFFNV0AAFAFTYC010Q

{
  "items": [
    {
      "link_id": "dlk_01M6V9CTA4KGBRBFX4W8FP73Z5",
      "document_id": "doc_01M6V9CTA49AN0VKX4EC3Q8R0A",
      "title": "Furnace notes",
      "kind": "markdown",
      "summary": "Where the furnace is, which filter it takes and who to call.",
      "note": "Care notes",
      "updated_at": "2026-11-07T15:17:53.121Z"
    }
  ]
}

Documents about a project

Request, curl
curl 'https://rigel.house/api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/queries/documents.document.for_record?record_id=tsk_01M6V9CT2Z01QVT17DRMSXTW4W' \
  -H "Cookie: rigel_session=$RIGEL_SESSION"
Request, TypeScript
const response = await fetch("https://rigel.house/api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/queries/documents.document.for_record?record_id=tsk_01M6V9CT2Z01QVT17DRMSXTW4W", {
  headers: {
    Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
  },
});
const data = await response.json();
Request, HTTP
GET /api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/queries/documents.document.for_record?record_id=tsk_01M6V9CT2Z01QVT17DRMSXTW4W HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Response, 200
HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01M6V9CTBHFTG55J8G3708F9PK

{
  "items": [
    {
      "link_id": "dlk_01M6V9CTA8CMYTVDGYY02MJJYF",
      "document_id": "doc_01M6V9CTA8APRK3KGY0M9RKB4W",
      "title": "Playroom plan",
      "kind": "markdown",
      "summary": null,
      "note": null,
      "updated_at": "2026-11-07T15:17:53.119Z"
    }
  ]
}

For Rigel#

Rigel's tool for this query is documents_document_for_record. Rigel runs this on its own, then says what it did. The agent guide has the rest.

Rigel is in early access, and sign-up is by invitation. Open Rigel