Headers
-
Content-Type
string -
Accept
string -
X-PLANNR-ACCOUNT-UUID
string
Body
Required
-
name
string Required The name of the document.
-
client_uuids
array[string] Required An array containing the client uuids that should be sent the document when it is built.
-
template_uuid
string 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.
-
known_dependants
array[string] 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 {OAUTH_ACCESS_TOKEN or PERSONAL_ACCESS_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-PLANNR-ACCOUNT-UUID: {YOUR_PLANNR_ACCOUNT_UUID}" \
--data '{"name":"Client Service Agreement","client_uuids":["9f1b68dd-69ad-452a-9bf1-7f9c72fdc608","b026f59d-23a1-48db-b8dd-5def5c406a01"],"template_uuid":"1d3d5b91-d610-4054-bdaa-fbdba47936bd","known_dependants":[{"client-1":"1157595c-d9be-433a-96eb-0bc747bb14fc"}]}'
Request examples
# Headers
Authorization: Bearer {OAUTH_ACCESS_TOKEN or PERSONAL_ACCESS_TOKEN}
Content-Type: application/json
Accept: application/json
X-PLANNR-ACCOUNT-UUID: {YOUR_PLANNR_ACCOUNT_UUID}
# Payload
{
"name": "Client Service Agreement",
"client_uuids": [
"9f1b68dd-69ad-452a-9bf1-7f9c72fdc608",
"b026f59d-23a1-48db-b8dd-5def5c406a01"
],
"template_uuid": "1d3d5b91-d610-4054-bdaa-fbdba47936bd",
"known_dependants": [
{
"client-1": "1157595c-d9be-433a-96eb-0bc747bb14fc"
}
]
}
Response examples (201)
{
"name": "Welcome Template",
"uuid": "29b62567-b2e9-4270-9ccf-97f7285584d5",
"status": "published",
"version": 3,
"created_at": "2025-06-05T11:39:40+01:00",
"updated_at": "2025-06-05T11:39:40+01:00",
"public_pdf_url": "https://plannr.valet/document/f6ca5746-b68b-40a8-9768-7bf7287a589a/content/pdf?plannr_account_uuid=c6de9259-7db8-4709-8c1d-8164278188f6",
"public_docx_url": "https://plannr.valet/document/e22ace92-ac6d-420e-a735-fcbe9eab839c/content/docx?plannr_account_uuid=5399c2d9-7a92-452d-ab8e-af951c3f8842",
"public_sfdt_url": "https://plannr.valet/document/1dbc3172-1986-44aa-8c14-bdf4800fc27b/content/sfdt?plannr_account_uuid=09257fdf-5a22-4583-88ef-e95bafe0b8c5",
"known_dependants": {
"client-1": "00e0f945-1b35-4c15-ba02-976829335984"
},
"public_preview_url": "https://plannr.valet/document/f8390ca6-b700-4aac-9963-1b187c20fb60/content/preview?plannr_account_uuid=8fcda276-7a45-417b-97d0-a6122fffd831",
"required_dependants": {
"client-1": "client"
},
"last_publishing_error": "There was an error converting this file to PDF. Please try again later."
}