Body
-
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.
Additional properties are allowed.
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": [
"9f83c8ca-75b0-4564-bd91-4e20062ef464",
"d7cbf925-4cf3-403d-8644-7032c0d54436",
"cc0f0270-f087-4574-9c14-76cce5a2cc69"
],
"template_uuid": "78daa119-f384-43f0-b67f-dcbfd5b05516",
"known_dependants": {
"client-1": "09c3a064-fcd3-429a-8488-078f1eeb766b"
}
}'
Request examples
# Headers
X-PLANNR-ACCOUNT-UUID: {YOUR_PLANNR_ACCOUNT_UUID}
# Payload
{
"name": "Client Service Agreement",
"client_uuids": [
"9f83c8ca-75b0-4564-bd91-4e20062ef464",
"d7cbf925-4cf3-403d-8644-7032c0d54436",
"cc0f0270-f087-4574-9c14-76cce5a2cc69"
],
"template_uuid": "78daa119-f384-43f0-b67f-dcbfd5b05516",
"known_dependants": {
"client-1": "09c3a064-fcd3-429a-8488-078f1eeb766b"
}
}
Response examples (201)
[
{
"uuid": "7fc5d7d8-de9f-41e6-bf60-b0a02b9030b6",
"created_at": "2026-10-28T10:39:28+00:00",
"updated_at": "2026-10-28T10:39:28+00:00",
"version": 3,
"name": "Welcome Template",
"status": "published",
"last_publishing_error": "There was an error converting this file to PDF. Please try again later.",
"required_dependants": {
"client-1": "client"
},
"known_dependants": {
"client-1": "fc0b6354-11ba-4def-b579-d6ea52fa5d5b"
},
"public_docx_url": "https://api.plannrcrm.com/document/4b17dd9c-72ee-4f8d-ab98-0925e319fd9d/content/docx?plannr_account_uuid=ea465ee7-5945-425d-b159-0a837bdadffe",
"public_sfdt_url": "https://api.plannrcrm.com/document/1ba05d9c-e947-40bc-acb5-241ce1998fde/content/sfdt?plannr_account_uuid=f53461af-17a1-4321-b030-3e7e6c2c8902",
"public_pdf_url": "https://api.plannrcrm.com/document/10ad2b52-dc4d-4e89-b9f4-8da9f2e069af/content/pdf?plannr_account_uuid=a8f5519a-acbb-412f-a708-860f15b0c239",
"public_preview_url": "https://api.plannrcrm.com/document/076b1ce4-1abd-4c82-a828-ce54a7b94065/content/preview?plannr_account_uuid=65a22b94-fffe-498f-a27a-5c1a36327ad1"
}
]
Response examples (422)
{
"message": "The given data was invalid.",
"errors": {
"field": [
"The field is invalid."
]
}
}