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":["71f9d554-1da5-4d12-85fb-af09f02bc6b9","5e799efd-6d2a-4248-86eb-bfecd6df8cdd"],"template_uuid":"c8844cb2-8911-4ee9-b64b-e8d4d17d138e","known_dependants":[{"client-1":"9d1b769b-b9b4-4670-8bda-727d1e907915"}]}'
Request examples
# Headers
X-PLANNR-ACCOUNT-UUID: {YOUR_PLANNR_ACCOUNT_UUID}
# Payload
{
"name": "Client Service Agreement",
"client_uuids": [
"71f9d554-1da5-4d12-85fb-af09f02bc6b9",
"5e799efd-6d2a-4248-86eb-bfecd6df8cdd"
],
"template_uuid": "c8844cb2-8911-4ee9-b64b-e8d4d17d138e",
"known_dependants": [
{
"client-1": "9d1b769b-b9b4-4670-8bda-727d1e907915"
}
]
}
Response examples (201)
{
"name": "Welcome Template",
"uuid": "44a06746-4383-4aac-9261-b4e099e7f81c",
"status": "published",
"version": 3,
"created_at": "2025-09-17T15:46:52+01:00",
"updated_at": "2025-09-17T15:46:52+01:00",
"public_pdf_url": "https://api.plannrcrm.com/document/45550a8f-ba4f-4f70-ae71-d7e37f48a093/content/pdf?plannr_account_uuid=b86609c8-cde1-4049-be5d-8a9c5e26ac30",
"public_docx_url": "https://api.plannrcrm.com/document/7db15208-53b1-4efc-af75-ed895ada91cb/content/docx?plannr_account_uuid=b9e92f63-1a02-4b07-a1d1-ade388094784",
"public_sfdt_url": "https://api.plannrcrm.com/document/03a81dba-91ca-4ce5-b2f1-e87f4f2d518b/content/sfdt?plannr_account_uuid=59e2b8b0-c305-46d2-9375-9d77e99bc5f7",
"known_dependants": {
"client-1": "96e3267b-9bc9-4137-a2fe-cee77f163b83"
},
"public_preview_url": "https://api.plannrcrm.com/document/14433024-617c-42f3-b424-9a004d076312/content/preview?plannr_account_uuid=493e3e1d-0355-4fc6-a9e2-e0a065623179",
"required_dependants": {
"client-1": "client"
},
"last_publishing_error": "There was an error converting this file to PDF. Please try again later."
}