Create a document
Headers
-
Content-Type string
-
Accept string
-
X-PLANNR-ACCOUNT-UUID string
Body Required
-
The name of the document.
-
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 \
-X POST https://api.plannrcrm.com/api/v1/document \
-H "Authorization: Bearer {OAUTH_ACCESS_TOKEN or PERSONAL_ACCESS_TOKEN}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-PLANNR-ACCOUNT-UUID: {YOUR_PLANNR_ACCOUNT_UUID}" \
-d '{"name":"Client Service Agreement","client_uuids":["23e85b26-eb26-4d82-b074-9d639b935e52","79b2c5ac-0b03-4c9d-b236-54eddeb72e83"],"template_uuid":"b07c7847-2387-47ef-818a-d769b6ea57ba","known_dependants":[{"client-1":"a0ea7089-c57d-4564-ad37-bf128c1954e7"}]}'
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": [
"23e85b26-eb26-4d82-b074-9d639b935e52",
"79b2c5ac-0b03-4c9d-b236-54eddeb72e83"
],
"template_uuid": "b07c7847-2387-47ef-818a-d769b6ea57ba",
"known_dependants": [
{
"client-1": "a0ea7089-c57d-4564-ad37-bf128c1954e7"
}
]
}
Response examples (201)
{
"name": "Welcome Template",
"uuid": "5ce859e1-4c6e-4aad-9dc5-a0a781239b4c",
"status": "published",
"version": 3,
"created_at": "2025-01-17T11:18:31+00:00",
"updated_at": "2025-01-17T11:18:31+00:00",
"public_pdf_url": "https://plannr.valet/document/9fce6ead-6741-4265-8139-ad4abf8e3462/content/pdf?plannr_account_uuid=3e6f151f-eaa8-4b7c-a87f-f591202351a7",
"public_docx_url": "https://plannr.valet/document/9ce2b007-b6ba-4da8-a1ec-7ce3f6edacc3/content/docx?plannr_account_uuid=df42a111-73bc-47f7-9394-d41b7acc210b",
"public_sfdt_url": "https://plannr.valet/document/032dce2c-b98c-4935-8813-5f252d61ac33/content/sfdt?plannr_account_uuid=224c44a4-6ba0-4eb6-a1c3-ac73eca85665",
"known_dependants": {
"client-1": "597a3809-f902-4cb0-af0a-21ae5f0ac3f5"
},
"public_preview_url": "https://plannr.valet/document/7a257ade-5319-4dce-b8cc-8ca26fa6fc56/content/preview?plannr_account_uuid=7d7db9cd-83ce-437e-922b-3ee614e5a64f",
"required_dependants": {
"client-1": "client"
}
}