Documents and signing

documents.content.get

Read a document's text to review or edit it: an agreement template written in the agreement writer (documentType agreement_template) or a contractor agreement template written in Oatmilk (contractor_template). Returns the title, revision, status (draft, published, archived, starter), the Markdown text in pages of up to 20,000 characters (offset and nextOffset), its headings, and for agreements the letterhead setting, merge fields, signers, footer, logo and the library images it places. Agreement Markdown uses {{field.key}} merge fields, a {{signatures}} line for the signature section and a \pagebreak line for a page break.

GETPOST/api/v1/accounting/documents.content.get

Permissions

accounting:read

Who can call it

admin, finance

Retries

Safe to retry: it only reads

MCP

accounting_documents_content_get

Fields

  • documentTypeenumRequired
    agreement_templatecontractor_template
  • documentIdstring (ID)Required

    The ID of the related record.

  • offsetinteger

    How many results to skip, for the next page of a list.

    0 to 500000 · Default 0

  • limitinteger

    How many results to return at most.

    500 to 20000 · Default 20000

Example

curl -G https://app.getoatmilk.com/api/v1/accounting/documents.content.get \
  -H "Authorization: Bearer $OATMILK_API_KEY" \
  --data-urlencode 'documentType=agreement_template' \
  --data-urlencode 'documentId=1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d'
Response
{
  "data": { … }
}

Try it

Try it

Checks your input with this action’s real schema and answers like the API, with synthetic data. No key needed, and nothing changes.

GET/api/v1/accounting/documents.content.get
curl -G https://app.getoatmilk.com/api/v1/accounting/documents.content.get \
  -H "Authorization: Bearer $OATMILK_API_KEY" \
  --data-urlencode 'documentType=agreement_template' \
  --data-urlencode 'documentId=1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d'

More in Documents and signing.