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":["4f4158fe-6dc0-4b1a-b07d-f52f3aab4ac2","26e35ca0-aff9-4187-a226-972c22412658"],"template_uuid":"280a7c14-e77a-4ed7-bb4d-26cc24980e7a","known_dependants":[{"client-1":"5f8f8785-d236-46bf-8a27-4e3c9848cb88"}]}'
Request examples
# Headers
X-PLANNR-ACCOUNT-UUID: {YOUR_PLANNR_ACCOUNT_UUID}
# Payload
{
"name": "Client Service Agreement",
"client_uuids": [
"4f4158fe-6dc0-4b1a-b07d-f52f3aab4ac2",
"26e35ca0-aff9-4187-a226-972c22412658"
],
"template_uuid": "280a7c14-e77a-4ed7-bb4d-26cc24980e7a",
"known_dependants": [
{
"client-1": "5f8f8785-d236-46bf-8a27-4e3c9848cb88"
}
]
}
Response examples (201)
{
"name": "Welcome Template",
"uuid": "bb66d2c9-c090-487a-97f1-a7bfb87d5b64",
"status": "published",
"version": 3,
"created_at": "2025-11-17T21:14:39+00:00",
"updated_at": "2025-11-17T21:14:39+00:00",
"public_pdf_url": "https://api.plannrcrm.com/document/fc64780f-218c-4739-ab2a-005ba9e58787/content/pdf?plannr_account_uuid=db22d7e2-5a8d-4c37-812d-6713092f5c56",
"public_docx_url": "https://api.plannrcrm.com/document/bec81219-1acb-4e7a-85e6-b929839c8873/content/docx?plannr_account_uuid=a834d6f1-781a-496c-95f0-4e9932c26bee",
"public_sfdt_url": "https://api.plannrcrm.com/document/c60871d8-f818-4b6d-8aed-a31b48029d99/content/sfdt?plannr_account_uuid=c17b3006-5d86-49c9-b173-bbac05810576",
"known_dependants": {
"client-1": "eac18d06-4bd6-41a9-965f-fe47dcaced5c"
},
"public_preview_url": "https://api.plannrcrm.com/document/e2ee0f2e-335d-4193-ad5e-a82977acb300/content/preview?plannr_account_uuid=9c46c4ee-a70d-47ef-a857-592550b012a4",
"required_dependants": {
"client-1": "client"
},
"last_publishing_error": "There was an error converting this file to PDF. Please try again later."
}