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":["d6dbc8d5-876c-4bcf-9267-405519ff7e79","0bf24c77-4ff3-4287-bf17-afb011e69f7e"],"template_uuid":"de05428b-df93-40bd-b493-f9aa26d337b9","known_dependants":[{"client-1":"a63a700a-c429-43f8-b388-25c73e83d737"}]}'
Request examples
# Headers
X-PLANNR-ACCOUNT-UUID: {YOUR_PLANNR_ACCOUNT_UUID}
# Payload
{
"name": "Client Service Agreement",
"client_uuids": [
"d6dbc8d5-876c-4bcf-9267-405519ff7e79",
"0bf24c77-4ff3-4287-bf17-afb011e69f7e"
],
"template_uuid": "de05428b-df93-40bd-b493-f9aa26d337b9",
"known_dependants": [
{
"client-1": "a63a700a-c429-43f8-b388-25c73e83d737"
}
]
}
Response examples (201)
{
"name": "Welcome Template",
"uuid": "f071b4d8-745e-4d42-a736-1ebce92bc233",
"status": "published",
"version": 3,
"created_at": "2025-07-17T16:23:22+01:00",
"updated_at": "2025-07-17T16:23:22+01:00",
"public_pdf_url": "https://api.plannrcrm.com/document/3a6faaae-c2be-4e0b-bfc9-a2ae5966e6bf/content/pdf?plannr_account_uuid=c42da5c0-1cca-42a8-8c39-832eadbeeb87",
"public_docx_url": "https://api.plannrcrm.com/document/d88b84cc-fef5-46b3-8f8f-212bd0b8491c/content/docx?plannr_account_uuid=d0bbb2f9-380d-4b6f-b6f9-67802e9332c4",
"public_sfdt_url": "https://api.plannrcrm.com/document/187d34b4-5962-4052-82bf-a8917426c766/content/sfdt?plannr_account_uuid=15cbc1f8-b2e8-4b9d-9de8-8ec7c4d348aa",
"known_dependants": {
"client-1": "1ee0ed4d-9fb7-4ca7-bbbe-6d9df9e48b95"
},
"public_preview_url": "https://api.plannrcrm.com/document/a5d8da95-8329-455e-8eff-29103faa391b/content/preview?plannr_account_uuid=79817df7-c9bb-4bc0-8486-5ba87fc51c07",
"required_dependants": {
"client-1": "client"
},
"last_publishing_error": "There was an error converting this file to PDF. Please try again later."
}