Body
-
The name of the document.
-
An array containing the client uuids that should be sent the document when it is built.
-
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.
-
Optional: The document variable dependants. Used to swap variables out for real data.
Additional properties are allowed.
POST
/api/v1/document
curl \
--request POST 'https://api.plannrcrm.com/api/v1/document' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--header "X-PLANNR-ACCOUNT-UUID: {YOUR_PLANNR_ACCOUNT_UUID}" \
--data '{"name":"Client Service Agreement","client_uuids":["4f3dac1f-07b9-4435-9fb2-946ee14e1d79","da7ef377-dbc8-4cb4-a9e4-5caabe53d07c","42740236-5deb-4655-9a6a-14ca17c6e95d"],"template_uuid":"75dc8f92-16d9-4c9b-a398-46b13ef68af1","known_dependants":{"client-1":"e1f3a91f-d8ca-4dbe-9361-2e077548471c"}}'
Request examples
# Headers
X-PLANNR-ACCOUNT-UUID: {YOUR_PLANNR_ACCOUNT_UUID}
# Payload
{
"name": "Client Service Agreement",
"client_uuids": [
"4f3dac1f-07b9-4435-9fb2-946ee14e1d79",
"da7ef377-dbc8-4cb4-a9e4-5caabe53d07c",
"42740236-5deb-4655-9a6a-14ca17c6e95d"
],
"template_uuid": "75dc8f92-16d9-4c9b-a398-46b13ef68af1",
"known_dependants": {
"client-1": "e1f3a91f-d8ca-4dbe-9361-2e077548471c"
}
}
Response examples (201)
[
{
"uuid": "05763149-d172-43b1-8798-b623bf41fbeb",
"created_at": "2026-08-07T15:29:25+01:00",
"updated_at": "2026-08-07T15:29:25+01:00",
"version": 3,
"name": "Welcome Template",
"status": "published",
"last_publishing_error": "There was an error converting this file to PDF. Please try again later.",
"required_dependants": {
"client-1": "client"
},
"known_dependants": {
"client-1": "ad210a3e-c9e5-458e-8020-3d3243de8ee5"
},
"public_docx_url": "https://api.plannrcrm.com/document/e137fd95-a5eb-44cc-8c91-122af289ccae/content/docx?plannr_account_uuid=a55daad7-9707-4e58-a6e9-4f25340f545b",
"public_sfdt_url": "https://api.plannrcrm.com/document/98b93c4d-d793-4dad-92de-964daadb9db2/content/sfdt?plannr_account_uuid=aa69c041-2102-4f76-bb3d-5e0be09ae4fa",
"public_pdf_url": "https://api.plannrcrm.com/document/2df5ba49-e9e2-44d8-beda-a97f51e4158d/content/pdf?plannr_account_uuid=2cd7d326-e3f6-4733-9004-e055442eb69c",
"public_preview_url": "https://api.plannrcrm.com/document/301cf31e-6ba6-41b7-9444-a16fe183bc8a/content/preview?plannr_account_uuid=3d748ade-48fa-4648-a9f7-d1ecba5d5fff"
}
]
Response examples (422)
{
"message": "The given data was invalid.",
"errors": {
"field": [
"The field is invalid."
]
}
}