Body
Required
-
The name of the document.
-
An array containing the client uuids that should be sent the document when it is built.
-
The UUID of the document template you want to be used with this document. You must not provide the sfdt or docx fields when creating from a template.
-
Optional: The document variable dependants. Used to swap variables out for real data.
POST
/api/v1/document
curl \
--request POST 'https://api.plannrcrm.com/api/v1/document' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--header "X-PLANNR-ACCOUNT-UUID: {YOUR_PLANNR_ACCOUNT_UUID}" \
--data '{"name":"Client Service Agreement","client_uuids":["1c209bf4-7fae-4592-9751-ed527fe3f1f5","8da8d2b0-c3ff-4a80-a5c7-26e936c802af"],"template_uuid":"375ba3fb-7aec-499b-9f3b-7a6d861b336e","known_dependants":[{"client-1":"29edb695-d4c5-4ab9-8a68-26b90e422ccd"}]}'
Request examples
# Headers
X-PLANNR-ACCOUNT-UUID: {YOUR_PLANNR_ACCOUNT_UUID}
# Payload
{
"name": "Client Service Agreement",
"client_uuids": [
"1c209bf4-7fae-4592-9751-ed527fe3f1f5",
"8da8d2b0-c3ff-4a80-a5c7-26e936c802af"
],
"template_uuid": "375ba3fb-7aec-499b-9f3b-7a6d861b336e",
"known_dependants": [
{
"client-1": "29edb695-d4c5-4ab9-8a68-26b90e422ccd"
}
]
}
Response examples (201)
{
"name": "Welcome Template",
"uuid": "c522ff2f-7ebc-4ead-8e3c-481a50c0e087",
"status": "published",
"version": 3,
"created_at": "2025-06-26T11:37:07+01:00",
"updated_at": "2025-06-26T11:37:07+01:00",
"public_pdf_url": "https://api.plannrcrm.com/document/09b8e77b-057b-4918-933a-fde3db4f0654/content/pdf?plannr_account_uuid=1f27b370-5ce7-4475-b633-c8a9b48518d6",
"public_docx_url": "https://api.plannrcrm.com/document/d90e73c2-269a-4eb3-b66e-70000098f2f7/content/docx?plannr_account_uuid=0ece6ca1-9baf-4a90-9780-3e53478b5ad1",
"public_sfdt_url": "https://api.plannrcrm.com/document/6ed66e6e-e1d8-454b-9580-97032b42a802/content/sfdt?plannr_account_uuid=fa359178-b321-49fb-b671-bf29f5947350",
"known_dependants": {
"client-1": "2e137f15-c203-40d3-91a1-79f6c2fd7bd1"
},
"public_preview_url": "https://api.plannrcrm.com/document/1c441907-891d-4383-8487-55fe4cd0c758/content/preview?plannr_account_uuid=91678a53-b534-456d-bccf-2a27a7c78085",
"required_dependants": {
"client-1": "client"
},
"last_publishing_error": "There was an error converting this file to PDF. Please try again later."
}