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":["fe67d416-5b2d-4e97-b9e9-0a54c448d65d","8526c478-763c-4edf-b925-ad34200a30ee"],"template_uuid":"87930ca1-c806-4262-a5e2-31ad1ebb9053","known_dependants":[{"client-1":"9436d4ef-b827-4042-a664-06684a15045f"}]}'
Request examples
# Headers
X-PLANNR-ACCOUNT-UUID: {YOUR_PLANNR_ACCOUNT_UUID}
# Payload
{
"name": "Client Service Agreement",
"client_uuids": [
"fe67d416-5b2d-4e97-b9e9-0a54c448d65d",
"8526c478-763c-4edf-b925-ad34200a30ee"
],
"template_uuid": "87930ca1-c806-4262-a5e2-31ad1ebb9053",
"known_dependants": [
{
"client-1": "9436d4ef-b827-4042-a664-06684a15045f"
}
]
}
Response examples (201)
{
"name": "Welcome Template",
"uuid": "6496fc81-edc9-4d02-872f-079b9d9ee4ea",
"status": "published",
"version": 3,
"created_at": "2025-08-27T17:31:26+01:00",
"updated_at": "2025-08-27T17:31:26+01:00",
"public_pdf_url": "https://api.plannrcrm.com/document/8f6e4242-dcd3-430a-b9b5-b11f80473417/content/pdf?plannr_account_uuid=8918aee3-0647-4494-a2ee-6d0163d3d66a",
"public_docx_url": "https://api.plannrcrm.com/document/9a7e340b-81e8-4696-bf1b-46c74d560f51/content/docx?plannr_account_uuid=8acf5192-1a31-4f74-918e-1c9297bbe30f",
"public_sfdt_url": "https://api.plannrcrm.com/document/6bd75640-00b1-4525-884f-d4945d864bac/content/sfdt?plannr_account_uuid=15c13b17-34f3-4b95-950b-7fd7a7b9eea0",
"known_dependants": {
"client-1": "f225674b-0432-4e6c-8c1b-388dd95cecbd"
},
"public_preview_url": "https://api.plannrcrm.com/document/26b0a231-01b2-487c-ad8a-348e00aa90c7/content/preview?plannr_account_uuid=18c1cf51-bcee-44dc-b257-d96e9bb35f4d",
"required_dependants": {
"client-1": "client"
},
"last_publishing_error": "There was an error converting this file to PDF. Please try again later."
}