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":["fa3a6e3d-bc3e-43ba-b9e0-7316e55fbb06","a949c50b-cf93-4688-ad5e-8191bcad6953"],"template_uuid":"93be35b5-bd50-49ce-86d0-7767078b568f","known_dependants":[{"client-1":"f2bd8967-4ceb-4d5d-8812-edc2f786aa9a"}]}'
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": [
"fa3a6e3d-bc3e-43ba-b9e0-7316e55fbb06",
"a949c50b-cf93-4688-ad5e-8191bcad6953"
],
"template_uuid": "93be35b5-bd50-49ce-86d0-7767078b568f",
"known_dependants": [
{
"client-1": "f2bd8967-4ceb-4d5d-8812-edc2f786aa9a"
}
]
}
Response examples (201)
{
"name": "Welcome Template",
"uuid": "3fa2d285-1870-4a77-afb6-2018e9408d8c",
"status": "published",
"version": 3,
"created_at": "2025-04-22T13:44:19+01:00",
"updated_at": "2025-04-22T13:44:19+01:00",
"public_pdf_url": "https://plannr.valet/document/0589c387-cc3c-4d40-b368-0537d63e727c/content/pdf?plannr_account_uuid=4fb1a8d0-0426-4a51-98c8-62e3e5bef1ee",
"public_docx_url": "https://plannr.valet/document/6729c3be-4af8-4a36-8b66-57c8a02a2514/content/docx?plannr_account_uuid=020d225c-0efc-4b8f-ab76-bc623956a69a",
"public_sfdt_url": "https://plannr.valet/document/141a566e-c03b-4442-90af-31b965e1d958/content/sfdt?plannr_account_uuid=dcf39fc3-f393-4e45-8c2c-bd2c1dc0010f",
"known_dependants": {
"client-1": "9c87b630-e5c2-4bac-827b-ffca08b572eb"
},
"public_preview_url": "https://plannr.valet/document/09e734b9-f109-4b1f-87d1-ab6faf023eeb/content/preview?plannr_account_uuid=3000c6df-17a5-4dc6-8d58-a9578cb5823f",
"required_dependants": {
"client-1": "client"
},
"last_publishing_error": "There was an error converting this file to PDF. Please try again later."
}