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":["d65bf8b5-cf7d-44fe-aaf2-e54123eeb8f0","a8ea31fb-a53e-4783-835c-2b27cb6bb3bf"],"template_uuid":"15b5c732-63a7-44a1-8681-ef695cd47400","known_dependants":[{"client-1":"96dc0a5b-e7ca-4f80-a258-52e23650960d"}]}'
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": [
"d65bf8b5-cf7d-44fe-aaf2-e54123eeb8f0",
"a8ea31fb-a53e-4783-835c-2b27cb6bb3bf"
],
"template_uuid": "15b5c732-63a7-44a1-8681-ef695cd47400",
"known_dependants": [
{
"client-1": "96dc0a5b-e7ca-4f80-a258-52e23650960d"
}
]
}
Response examples (201)
{
"name": "Welcome Template",
"uuid": "82d1721c-46c6-4dd3-87b6-98a4e4f295b3",
"status": "published",
"version": 3,
"created_at": "2025-05-14T18:27:14+01:00",
"updated_at": "2025-05-14T18:27:14+01:00",
"public_pdf_url": "https://plannr.valet/document/aff5f4c7-558d-4a28-95a5-04ae4be5ef4c/content/pdf?plannr_account_uuid=a69058a1-cab4-45d5-b607-2916e859e850",
"public_docx_url": "https://plannr.valet/document/f405de16-20d3-4119-a0ae-08a6bf3fed89/content/docx?plannr_account_uuid=25d89d69-2403-4f0e-b780-ebd64a9e028d",
"public_sfdt_url": "https://plannr.valet/document/87cc1605-3e35-43d4-a8c6-f224668a137a/content/sfdt?plannr_account_uuid=964cfac3-0265-48d6-8865-7c42d3563036",
"known_dependants": {
"client-1": "eae4df5c-7b15-4583-a26c-a2754ec5766c"
},
"public_preview_url": "https://plannr.valet/document/fcd1f83e-50d1-4446-9b21-2b02d32b8fa0/content/preview?plannr_account_uuid=cbba8ab2-0c59-420e-aff8-003ad9401139",
"required_dependants": {
"client-1": "client"
},
"last_publishing_error": "There was an error converting this file to PDF. Please try again later."
}