signing.envelopes.createDraft
Create a draft envelope from a template (templateId or templateKey) or an uploaded file (fileId) with title, message, recipients (signer or cc, signerRole, order, userId for a company signer who signs in Oatmilk), mergeValues, signingOrder (parallel or sequential), deadline, and reminder interval. A template that states pay (like the contractor agreement) is made from a job: jobRoleId and jobRoleVersion (a version from contractorOps.roles.versions), and engagement: the pay as rate {amountMinor (minor units, as a string of digits), currency, unit: hour, day, week, month, year or fixed}, basis job (the version's pay: its currency and unit, within its band) or one_off (a rate for this agreement only, with an optional note), and startDate, endDate and noticeDays. The pay, its currency, the role and the dates are then filled in from these and can't be set through mergeValues. Nothing is sent.
/api/v1/accounting/signing.envelopes.createDraftPermissions
Who can call it
Retries
MCP
accounting_signing_envelopes_create_draftFields
titlestringRequiredA short title.
1–200 characters
messagestringat most 4000 characters · Default ""
templateIdstring (ID)The ID of the related record.
templateKeystringMatches ^[a-z][a-z0-9-]{1,60}$
fileIdstring (ID)The ID of the related record.
subjectTypeenumThe kind of record this is about, such as entry, invoice or mail.
contractorpartyinvoicesubjectIdstringThe ID of the record this is about.
1–200 characters
mergeValuesmapDefault {}
signingOrderenumsequentialparallelDefault "parallel"
recipientsarray of objectsat most 20 items
fieldsarray of objectsat most 500 items · Default []
expiresAtstring (date-time)When this stops working, as an ISO 8601 date and time.
expiresInDaysinteger1 to 365
reminderIntervalDaysinteger0 to 30 · Default 3
allowChangesbooleanjobRoleIdstring (ID)The ID of the related record.
jobRoleVersioninteger1 to 100000
engagementobjectNo other fields
idempotencyKeystringRequiredAny 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.createDraft \
-H "Authorization: Bearer $OATMILK_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"title": "Synthetic services agreement"
}'{
"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.
curl https://app.getoatmilk.com/api/v1/accounting/signing.envelopes.createDraft \
-H "Authorization: Bearer $OATMILK_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"title": "Synthetic services agreement"
}'More in Documents and signing.