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":["1294b808-7785-4719-a3a1-ee86ebdec3f3","8a7e429d-f908-4acd-910b-b654aa0c6140"],"template_uuid":"92465c3e-8e11-410d-9c71-74a0910edc78","known_dependants":[{"client-1":"a8d9d38f-257f-4ece-9bd8-7462842382b6"}]}'
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": [
"1294b808-7785-4719-a3a1-ee86ebdec3f3",
"8a7e429d-f908-4acd-910b-b654aa0c6140"
],
"template_uuid": "92465c3e-8e11-410d-9c71-74a0910edc78",
"known_dependants": [
{
"client-1": "a8d9d38f-257f-4ece-9bd8-7462842382b6"
}
]
}
Response examples (201)
{
"name": "Welcome Template",
"uuid": "291f162a-b2f4-48e5-946c-d553df50a1c1",
"status": "published",
"version": 3,
"created_at": "2025-06-13T16:58:58+01:00",
"updated_at": "2025-06-13T16:58:58+01:00",
"public_pdf_url": "https://plannr.valet/document/5cdfb9f3-a967-41b0-9d71-8cd4d5e31252/content/pdf?plannr_account_uuid=d065c590-c9ac-4057-81d0-93857a0817ce",
"public_docx_url": "https://plannr.valet/document/23173e99-2f2e-4e0a-b8ac-2e1638c61df2/content/docx?plannr_account_uuid=3a790da2-f6d7-4ce7-a42d-ea15c5f65ad2",
"public_sfdt_url": "https://plannr.valet/document/f7680af7-9ac1-480e-bd27-93876918a3db/content/sfdt?plannr_account_uuid=3ffecc95-ee59-4678-b6dc-eb5d9df80377",
"known_dependants": {
"client-1": "0337951f-8446-40c6-bc8e-9346e940d981"
},
"public_preview_url": "https://plannr.valet/document/b129c665-913e-42e3-acad-f4f8df48ed19/content/preview?plannr_account_uuid=cd0266ce-9f9e-46a8-a66e-6b097fcb5b16",
"required_dependants": {
"client-1": "client"
},
"last_publishing_error": "There was an error converting this file to PDF. Please try again later."
}