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":["7a73d149-72dc-4986-a698-07072fb1ee38","da5416dd-db53-4c16-be2a-005b54d19e23"],"template_uuid":"72930596-f058-4545-8486-eb797451662d","known_dependants":[{"client-1":"f4cea995-41ab-47f7-91e8-efe75f5ecb07"}]}'
Request examples
# Headers
X-PLANNR-ACCOUNT-UUID: {YOUR_PLANNR_ACCOUNT_UUID}
# Payload
{
"name": "Client Service Agreement",
"client_uuids": [
"7a73d149-72dc-4986-a698-07072fb1ee38",
"da5416dd-db53-4c16-be2a-005b54d19e23"
],
"template_uuid": "72930596-f058-4545-8486-eb797451662d",
"known_dependants": [
{
"client-1": "f4cea995-41ab-47f7-91e8-efe75f5ecb07"
}
]
}
Response examples (201)
{
"name": "Welcome Template",
"uuid": "f8a50458-36fb-4dbb-8f13-a3e28a3a9021",
"status": "published",
"version": 3,
"created_at": "2025-08-07T13:41:43+01:00",
"updated_at": "2025-08-07T13:41:43+01:00",
"public_pdf_url": "https://api.plannrcrm.com/document/e522c50d-dfba-4810-ac6c-9a33b8edec45/content/pdf?plannr_account_uuid=7788b669-0ae2-448c-b475-95a5f77cfffa",
"public_docx_url": "https://api.plannrcrm.com/document/3ab2992b-9a5b-40fa-b88b-372e5d7052bf/content/docx?plannr_account_uuid=9cb2c11f-3615-41ae-a6bc-e213ebf5fab1",
"public_sfdt_url": "https://api.plannrcrm.com/document/54482321-34c2-4c29-94f6-3f6522229c61/content/sfdt?plannr_account_uuid=a806aaa5-f9ae-4e84-b036-06e3038c534f",
"known_dependants": {
"client-1": "7f73fb8c-983a-412f-8f6e-28398ea62cd2"
},
"public_preview_url": "https://api.plannrcrm.com/document/dd87aba9-09f8-489f-89db-06299f8a95fa/content/preview?plannr_account_uuid=99913385-99da-4419-b26c-d7938c82004a",
"required_dependants": {
"client-1": "client"
},
"last_publishing_error": "There was an error converting this file to PDF. Please try again later."
}