DevelopersHow to connect an assistantKeys
Reference/Files/Read

List a card's documents

GEThttps://api.getwerk.ai/api/v1/projects/{projectId}/cards/{cardId}/documents

The documents on a card, each with what Werk read in it.

At most the first 100; hasMore says when there are more.

Authorization

AuthorizationheaderRequired

Authorization: Bearer <key> Authentication

Path parameters

projectIdstring, uuidRequired

The project's id.

cardIdstring, uuidRequired

The card's id.

Response

200 The card's documents.

documentsarray of objects

The card's first 100 documents.

Show properties of documentsHide properties of documents
idstring, uuid

The document's id.

itemIdstring, uuid

The card the document is on.

filenamestring

The document's name.

From 1 to 255 characters
mimeTypeenum

The document's media type.

Allowed valuesapplication/pdfapplication/vnd.openxmlformats-officedocument.wordprocessingml.documentapplication/vnd.openxmlformats-officedocument.spreadsheetml.sheettext/csvtext/plaintext/markdown
revisioninteger

The document's revision, which grows each time its file is replaced.

At least 1
stateenum

not_read while it is not being read, awaiting_confirmation while Werk waits for a yes to its cost, reading, failed, or ready.

Allowed valuesnot_readawaiting_confirmationreadingfailedready
versioninteger

The document's version, which grows with every change to it; a read request sends it as expectedVersion.

At least 1
totalSourcesinteger or null

How many parts the document has, or null while not known.

At least 0
readSourcesinteger

How many parts Werk read.

At least 0
truncatedboolean

True when Werk read only the document's first parts.

summarystring or null

Werk's summary of the document, or null.

From 1 to 2000 characters
fieldsobject or null

The issuer, number, date, total and currency Werk read in the document, or null.

Show properties of fieldsHide properties of fields
issuerobject or null

The issuer Werk read in the document, or null when it found none.

Show properties of issuerHide properties of issuer
valuestring

The issuer as read.

From 1 to 512 characters
sourceobject

The part of the document it was read from.

Show properties of sourceHide properties of source
documentIdstring

The document's id.

At least 1 character
revisioninteger

The revision it was read in.

At least 1
pageinteger

The part, counted from 1 in Werk's own count; only a PDF page's location names a page of the file.

At least 1
sha256string

The SHA-256 of the file it was read from.

locationobject

Where in the file the part is.

Show properties of locationHide properties of location

One of 5 shapes, told apart by kind:

kindpdf_page
kindenum

Where in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.

Allowed valuespdf_page
pageinteger

The PDF page.

At least 1
kindsection
kindenum

Where in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.

Allowed valuessection
sectioninteger

The section, counted from 1.

At least 1
kindparagraph
kindenum

Where in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.

Allowed valuesparagraph
paragraphinteger

The paragraph, counted from 1.

At least 1
kindsheet_rows
kindenum

Where in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.

Allowed valuessheet_rows
sheetstring

The sheet's name.

At least 1 character
firstRowinteger

The part's first row.

At least 1
lastRowinteger

The part's last row.

At least 1
kindlines
kindenum

Where in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.

Allowed valueslines
firstLineinteger

The part's first line.

At least 1
lastLineinteger

The part's last line.

At least 1
numberobject or null

The document's number Werk read in the document, or null when it found none.

Show properties of numberHide properties of number
valuestring

The document's number as read.

From 1 to 128 characters
sourceobject

The part of the document it was read from.

Show properties of sourceHide properties of source
documentIdstring

The document's id.

At least 1 character
revisioninteger

The revision it was read in.

At least 1
pageinteger

The part, counted from 1 in Werk's own count; only a PDF page's location names a page of the file.

At least 1
sha256string

The SHA-256 of the file it was read from.

locationobject

Where in the file the part is.

Show properties of locationHide properties of location

One of 5 shapes, told apart by kind:

kindpdf_page
kindenum

Where in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.

Allowed valuespdf_page
pageinteger

The PDF page.

At least 1
kindsection
kindenum

Where in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.

Allowed valuessection
sectioninteger

The section, counted from 1.

At least 1
kindparagraph
kindenum

Where in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.

Allowed valuesparagraph
paragraphinteger

The paragraph, counted from 1.

At least 1
kindsheet_rows
kindenum

Where in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.

Allowed valuessheet_rows
sheetstring

The sheet's name.

At least 1 character
firstRowinteger

The part's first row.

At least 1
lastRowinteger

The part's last row.

At least 1
kindlines
kindenum

Where in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.

Allowed valueslines
firstLineinteger

The part's first line.

At least 1
lastLineinteger

The part's last line.

At least 1
dateobject or null

The date Werk read in the document, or null when it found none.

Show properties of dateHide properties of date
valuestring, date

The date as read, as YYYY-MM-DD.

sourceobject

The part of the document it was read from.

Show properties of sourceHide properties of source
documentIdstring

The document's id.

At least 1 character
revisioninteger

The revision it was read in.

At least 1
pageinteger

The part, counted from 1 in Werk's own count; only a PDF page's location names a page of the file.

At least 1
sha256string

The SHA-256 of the file it was read from.

locationobject

Where in the file the part is.

Show properties of locationHide properties of location

One of 5 shapes, told apart by kind:

kindpdf_page
kindenum

Where in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.

Allowed valuespdf_page
pageinteger

The PDF page.

At least 1
kindsection
kindenum

Where in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.

Allowed valuessection
sectioninteger

The section, counted from 1.

At least 1
kindparagraph
kindenum

Where in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.

Allowed valuesparagraph
paragraphinteger

The paragraph, counted from 1.

At least 1
kindsheet_rows
kindenum

Where in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.

Allowed valuessheet_rows
sheetstring

The sheet's name.

At least 1 character
firstRowinteger

The part's first row.

At least 1
lastRowinteger

The part's last row.

At least 1
kindlines
kindenum

Where in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.

Allowed valueslines
firstLineinteger

The part's first line.

At least 1
lastLineinteger

The part's last line.

At least 1
totalobject or null

The total Werk read in the document, or null when it found none.

Show properties of totalHide properties of total
valuestring

The total as read, a decimal number with a point.

Up to 128 characters
sourceobject

The part of the document it was read from.

Show properties of sourceHide properties of source
documentIdstring

The document's id.

At least 1 character
revisioninteger

The revision it was read in.

At least 1
pageinteger

The part, counted from 1 in Werk's own count; only a PDF page's location names a page of the file.

At least 1
sha256string

The SHA-256 of the file it was read from.

locationobject

Where in the file the part is.

Show properties of locationHide properties of location

One of 5 shapes, told apart by kind:

kindpdf_page
kindenum

Where in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.

Allowed valuespdf_page
pageinteger

The PDF page.

At least 1
kindsection
kindenum

Where in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.

Allowed valuessection
sectioninteger

The section, counted from 1.

At least 1
kindparagraph
kindenum

Where in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.

Allowed valuesparagraph
paragraphinteger

The paragraph, counted from 1.

At least 1
kindsheet_rows
kindenum

Where in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.

Allowed valuessheet_rows
sheetstring

The sheet's name.

At least 1 character
firstRowinteger

The part's first row.

At least 1
lastRowinteger

The part's last row.

At least 1
kindlines
kindenum

Where in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.

Allowed valueslines
firstLineinteger

The part's first line.

At least 1
lastLineinteger

The part's last line.

At least 1
currencyobject or null

The currency Werk read in the document, or null when it found none.

Show properties of currencyHide properties of currency
valuestring

The currency as read, its ISO 4217 code.

sourceobject

The part of the document it was read from.

Show properties of sourceHide properties of source
documentIdstring

The document's id.

At least 1 character
revisioninteger

The revision it was read in.

At least 1
pageinteger

The part, counted from 1 in Werk's own count; only a PDF page's location names a page of the file.

At least 1
sha256string

The SHA-256 of the file it was read from.

locationobject

Where in the file the part is.

Show properties of locationHide properties of location

One of 5 shapes, told apart by kind:

kindpdf_page
kindenum

Where in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.

Allowed valuespdf_page
pageinteger

The PDF page.

At least 1
kindsection
kindenum

Where in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.

Allowed valuessection
sectioninteger

The section, counted from 1.

At least 1
kindparagraph
kindenum

Where in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.

Allowed valuesparagraph
paragraphinteger

The paragraph, counted from 1.

At least 1
kindsheet_rows
kindenum

Where in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.

Allowed valuessheet_rows
sheetstring

The sheet's name.

At least 1 character
firstRowinteger

The part's first row.

At least 1
lastRowinteger

The part's last row.

At least 1
kindlines
kindenum

Where in the file the part is: a PDF page, a section, a paragraph, a sheet's rows or a text's lines.

Allowed valueslines
firstLineinteger

The part's first line.

At least 1
lastLineinteger

The part's last line.

At least 1
failureCodeenum or null

Why reading failed, or null.

Allowed valuesparse_failedencryptedunsupported_formattranscription_failedsummary_failedinvalid_outputaccess_lostlimit_exceededprovider_unavailable
unitsinteger or null

What reading the document counts on the plan, in messages, or null before Werk inspected it.

At least 1
pagesinteger or null

A PDF's pages, or other text in pages of 3,000 characters; null when not known.

At least 1
sheetsinteger or null

A workbook's sheets with data; null for other files or when not known.

At least 1
removableboolean

True when the key's person may take this document off the card now.

hasMoreboolean

True when the card has more documents than these.

Errors

400invalid_queryThe query is not in the form the route takes; the limit is in the unit of the input details.field names (characters for a text, entries for a list, the value for a number).
401session_revokedThe request carries no session the server holds, or its session has ended.
401session_expiredThe session has expired.
404conversation_not_foundThe project the request names, or its chat, is not one the signed-in person is in.
404item_not_foundThe card the request names, or its list, is not one the signed-in person can see.
409session_changedThe session changed while the request was in flight.
rate_limitedMore requests of this kind were sent than Werk takes within the time it counts them over.
500server_errorThe server could not complete the request, and it is not known whether a write it holds was made.
curl
curl "https://api.getwerk.ai/api/v1/projects/2f6c9e41-7a3b-4d58-9c1e-0b8d4f2a6e73/cards/3c9e5b17-8d2f-4a64-b1e3-7f5a0c9d2b48/documents" \
  -H "Authorization: Bearer wk_key_..."
TypeScript
const res = await fetch("https://api.getwerk.ai/api/v1/projects/2f6c9e41-7a3b-4d58-9c1e-0b8d4f2a6e73/cards/3c9e5b17-8d2f-4a64-b1e3-7f5a0c9d2b48/documents", {
  headers: {
    Authorization: "Bearer wk_key_...",
  },
});
const answer = await res.json();
200JSON
{
  "documents": [
    {
      "id": "d7e1b5c3-9a4f-4e26-b8d0-2f6a4c8e1d59",
      "itemId": "3c9e5b17-8d2f-4a64-b1e3-7f5a0c9d2b48",
      "filename": "countertop-quote.pdf",
      "mimeType": "application/pdf",
      "revision": 1,
      "state": "ready",
      "version": 3,
      "totalSources": 2,
      "readSources": 2,
      "truncated": false,
      "summary": "Stonecraft Supply's quote for a quartz countertop, cut and installed, with delivery in two weeks.",
      "fields": {
        "issuer": {
          "value": "Stonecraft Supply",
          "source": {
            "documentId": "d7e1b5c3-9a4f-4e26-b8d0-2f6a4c8e1d59",
            "revision": 1,
            "page": 1,
            "sha256": "9f2c4e6a8b0d1f3e5a7c9b1d3f5e7a9c0b2d4f6e8a1c3e5b7d9f1a3c5e7b9d0f",
            "location": {
              "kind": "pdf_page",
              "page": 1
            }
          }
        },
        "number": {
          "value": "Q-20931",
          "source": {
            "documentId": "d7e1b5c3-9a4f-4e26-b8d0-2f6a4c8e1d59",
            "revision": 1,
            "page": 1,
            "sha256": "9f2c4e6a8b0d1f3e5a7c9b1d3f5e7a9c0b2d4f6e8a1c3e5b7d9f1a3c5e7b9d0f",
            "location": {
              "kind": "pdf_page",
              "page": 1
            }
          }
        },
        "date": {
          "value": "2026-11-17",
          "source": {
            "documentId": "d7e1b5c3-9a4f-4e26-b8d0-2f6a4c8e1d59",
            "revision": 1,
            "page": 1,
            "sha256": "9f2c4e6a8b0d1f3e5a7c9b1d3f5e7a9c0b2d4f6e8a1c3e5b7d9f1a3c5e7b9d0f",
            "location": {
              "kind": "pdf_page",
              "page": 1
            }
          }
        },
        "total": {
          "value": "2480.00",
          "source": {
            "documentId": "d7e1b5c3-9a4f-4e26-b8d0-2f6a4c8e1d59",
            "revision": 1,
            "page": 2,
            "sha256": "9f2c4e6a8b0d1f3e5a7c9b1d3f5e7a9c0b2d4f6e8a1c3e5b7d9f1a3c5e7b9d0f",
            "location": {
              "kind": "pdf_page",
              "page": 2
            }
          }
        },
        "currency": {
          "value": "USD",
          "source": {
            "documentId": "d7e1b5c3-9a4f-4e26-b8d0-2f6a4c8e1d59",
            "revision": 1,
            "page": 2,
            "sha256": "9f2c4e6a8b0d1f3e5a7c9b1d3f5e7a9c0b2d4f6e8a1c3e5b7d9f1a3c5e7b9d0f",
            "location": {
              "kind": "pdf_page",
              "page": 2
            }
          }
        }
      },
      "failureCode": null,
      "units": 1,
      "pages": 2,
      "sheets": null,
      "removable": true
    }
  ],
  "hasMore": false
}