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":["59624b98-a8a5-42bb-96dc-1a9481397e50","ebbc1096-c78c-42da-9e87-1eda9eef7788"],"template_uuid":"3b110103-339e-4cf3-9659-3104f77d5178","known_dependants":[{"client-1":"494a179c-bf75-4151-aabc-1a308113aab9"}]}'
Request examples
# Headers
X-PLANNR-ACCOUNT-UUID: {YOUR_PLANNR_ACCOUNT_UUID}
# Payload
{
"name": "Client Service Agreement",
"client_uuids": [
"59624b98-a8a5-42bb-96dc-1a9481397e50",
"ebbc1096-c78c-42da-9e87-1eda9eef7788"
],
"template_uuid": "3b110103-339e-4cf3-9659-3104f77d5178",
"known_dependants": [
{
"client-1": "494a179c-bf75-4151-aabc-1a308113aab9"
}
]
}
Response examples (201)
{
"name": "Welcome Template",
"uuid": "1c19b805-80aa-471a-8cde-75017b849d13",
"status": "published",
"version": 3,
"created_at": "2025-10-08T10:40:15+01:00",
"updated_at": "2025-10-08T10:40:15+01:00",
"public_pdf_url": "https://api.plannrcrm.com/document/9fe79be8-78a1-4347-bcbd-b7d4db6be1a1/content/pdf?plannr_account_uuid=5124827a-0633-45e9-9c0e-df531204a147",
"public_docx_url": "https://api.plannrcrm.com/document/b3c3db36-d885-40d6-965c-4ccd672cc5d9/content/docx?plannr_account_uuid=c5aeba48-9269-4121-bf8b-1d47c400880e",
"public_sfdt_url": "https://api.plannrcrm.com/document/7f801ab3-b504-45cf-aa2d-2e5993803a43/content/sfdt?plannr_account_uuid=274d1d67-cca4-4325-87ad-4556bede5f0e",
"known_dependants": {
"client-1": "651fcf4e-d422-4f90-b8f2-7dc2afcb8d33"
},
"public_preview_url": "https://api.plannrcrm.com/document/89006834-f803-4f12-91ec-91fa3b497954/content/preview?plannr_account_uuid=c731b643-83e3-494d-9bd1-8d836e377486",
"required_dependants": {
"client-1": "client"
},
"last_publishing_error": "There was an error converting this file to PDF. Please try again later."
}