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":["fa519179-ec6f-4e54-90e1-df44d26f8ba5","8bda6aa3-9a05-4e9b-b590-79bb0c87319c"],"template_uuid":"d2691323-9846-4bff-b8bc-9d008da54463","known_dependants":[{"client-1":"3c873c56-bf67-48b9-b1f0-d9b49f9d3095"}]}'
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": [
"fa519179-ec6f-4e54-90e1-df44d26f8ba5",
"8bda6aa3-9a05-4e9b-b590-79bb0c87319c"
],
"template_uuid": "d2691323-9846-4bff-b8bc-9d008da54463",
"known_dependants": [
{
"client-1": "3c873c56-bf67-48b9-b1f0-d9b49f9d3095"
}
]
}
Response examples (201)
{
"name": "Welcome Template",
"uuid": "b160918e-865f-431c-b712-3bb2ba70e931",
"status": "published",
"version": 3,
"created_at": "2025-01-12T12:55:59+00:00",
"updated_at": "2025-01-12T12:55:59+00:00",
"public_pdf_url": "https://plannr.valet/document/81e05ab0-0164-430e-9036-5cb56e09581c/content/pdf?plannr_account_uuid=ed969af1-3feb-4a17-b31f-11b40bb31cfc",
"public_docx_url": "https://plannr.valet/document/a47b3c3b-3345-41d6-b14e-b1c5ac48c324/content/docx?plannr_account_uuid=af625be7-8951-480f-9012-bc31f733a3b6",
"public_sfdt_url": "https://plannr.valet/document/4c32f50b-80ef-4471-afa3-c028bb3f2a8a/content/sfdt?plannr_account_uuid=7781917c-50a4-4271-b670-1c8057d38437",
"known_dependants": {
"client-1": "d627c139-4494-40b8-bc42-ba5e97ca6a18"
},
"public_preview_url": "https://plannr.valet/document/b6545842-26f5-4f22-8adc-1bdae21634eb/content/preview?plannr_account_uuid=ec1dbe86-a416-48cb-a20d-c5ca941dff40",
"required_dependants": {
"client-1": "client"
}
}