Documents and signing

signing.envelopes.updateDraft

Edit a draft envelope with expectedRevision, including uploaded-document field positions, and its job (jobRoleId with jobRoleVersion, or both null) and engagement (the structured pay and dates, or null). Changing document content, the job or the pay clears the prepared PDF and its field positions; field placement alone keeps the PDF.

POST/api/v1/accounting/signing.envelopes.updateDraft

Permissions

accounting:readaccounting:write

Who can call it

admin, finance

Retries

Idempotency key required, with expectedRevision

MCP

accounting_signing_envelopes_update_draft

Fields

  • idstring (ID)Required

    The record's ID.

  • expectedRevisionintegerRequired

    The record's current revision, from the last time you read it. If someone changed the record since, the request is refused with a conflict so you can reload and check before trying again.

    at most 9007199254740991 · greater than 0

  • titlestring

    A short title.

    1–200 characters

  • messagestring

    at most 4000 characters

  • templateIdstring (ID) or null
  • fileIdstring (ID)

    The ID of the related record.

  • subjectTypeenum or null

    The kind of record this is about, such as entry, invoice or mail.

    contractorpartyinvoice
  • subjectIdstring or null

    The ID of the record this is about.

  • mergeValuesmap
  • signingOrderenum
    sequentialparallel
  • recipientsarray of objects

    at most 20 items

  • fieldsarray of objects

    at most 500 items

  • expiresAtstring (date-time)

    When this stops working, as an ISO 8601 date and time.

  • expiresInDaysinteger

    1 to 365

  • reminderIntervalDaysinteger

    0 to 30

  • allowChangesboolean
  • jobRoleIdstring (ID) or null
  • jobRoleVersioninteger or null
  • engagementobject or null

  • idempotencyKeystringRequired

    Any unique text you generate once per intended change, so a retried request only happens once. Send it as the Idempotency-Key header instead if you prefer; if you send both they must match.

    8–200 characters

Example

curl https://app.getoatmilk.com/api/v1/accounting/signing.envelopes.updateDraft \
  -H "Authorization: Bearer $OATMILK_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "id": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
  "expectedRevision": 3
}'
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.

POST/api/v1/accounting/signing.envelopes.updateDraft
curl https://app.getoatmilk.com/api/v1/accounting/signing.envelopes.updateDraft \
  -H "Authorization: Bearer $OATMILK_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "id": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
  "expectedRevision": 3
}'

More in Documents and signing.