API guides

Attachments

A document's files, behind short-lived signed links.

The API isn’t switched on in this environment yet. Everything below is accurate; the examples come from the published contract rather than a live read.

A document's files — the PDF that arrived, whatever was attached — are listed by their own endpoint, each with a download_url: a signed link that fetches the file directly.

List a document's attachments
From the published contract
curl "https://api.rivet.network/v1/documents/6a5eed00000000000000d001/attachments" \
  -H "Authorization: Bearer rk_live_…"
DocumentAttachment
FieldTypeNotes
id*stringThe attachment's id.
filename*stringThe file's name.
content_type*string | nullMIME type, when known.
size_bytes*integer | nullSize in bytes, when known.
uploaded_at*string | nullWhen it was attached.
download_url*stringA signed, time-limited link to the file. Fetch it promptly; list again when it expires.

Signed links

  • download_url is time-limited — fetch it promptly. When it expires, list the attachments again for a fresh one; the ids are stable.
  • Don't store or share the URL itself; store the attachment id and re-list when you need the bytes.
  • The endpoint follows the same rule as every read: a document your organization isn't a party to answers not_found, never a hint that it exists.