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":["87eea7f8-dda5-4baa-8a84-103c83b881af","45396a1b-624c-41b9-a4ad-8f4948bdc512"],"template_uuid":"f3ab1024-900c-45b0-8d6b-c2cb9b2e91ae","known_dependants":[{"client-1":"06364ad7-218b-42ca-881a-07cbd05143a3"}]}'
Request examples
# Headers
X-PLANNR-ACCOUNT-UUID: {YOUR_PLANNR_ACCOUNT_UUID}
# Payload
{
"name": "Client Service Agreement",
"client_uuids": [
"87eea7f8-dda5-4baa-8a84-103c83b881af",
"45396a1b-624c-41b9-a4ad-8f4948bdc512"
],
"template_uuid": "f3ab1024-900c-45b0-8d6b-c2cb9b2e91ae",
"known_dependants": [
{
"client-1": "06364ad7-218b-42ca-881a-07cbd05143a3"
}
]
}
Response examples (201)
{
"name": "Welcome Template",
"uuid": "183cd800-57b3-4f3a-be18-a11f510d71d8",
"status": "published",
"version": 3,
"created_at": "2025-10-24T10:34:19+01:00",
"updated_at": "2025-10-24T10:34:19+01:00",
"public_pdf_url": "https://api.plannrcrm.com/document/7c3b0bf5-4449-44c6-9338-d1177a95446e/content/pdf?plannr_account_uuid=4a393247-90c5-4389-82c1-c09463f76f6f",
"public_docx_url": "https://api.plannrcrm.com/document/d0eeee09-cab8-4207-a1b0-a9f73c4d656c/content/docx?plannr_account_uuid=0c07ab21-a0c9-4970-8336-0844fa91755a",
"public_sfdt_url": "https://api.plannrcrm.com/document/15876450-98fa-46a5-b9a3-00ddb7839454/content/sfdt?plannr_account_uuid=1100c1c6-c62d-44cf-a7fa-acf94cdbb7b4",
"known_dependants": {
"client-1": "746c244c-8458-4a70-bda0-0958d04a1104"
},
"public_preview_url": "https://api.plannrcrm.com/document/8a5e022a-78cf-422b-9bdf-1a2fd7dab0b6/content/preview?plannr_account_uuid=b0604832-ef59-49a1-83f2-f3aa4af0a2f7",
"required_dependants": {
"client-1": "client"
},
"last_publishing_error": "There was an error converting this file to PDF. Please try again later."
}