Create a document Run in API Explorer

Add MCP server to your AI tool

Allow AI tools and LLMs to interact with the API documentation portal through MCP.

MCP server URL

https://apidocs.plannrcrm.com/mcp

Standard setup for AI tools providing an mcp.json file

mcp.json
{
  "PlannrCRM MCP server": {
    "url": "https://apidocs.plannrcrm.com/mcp"
  }
}

Close
POST /api/v1/document

Headers

  • X-PLANNR-ACCOUNT-UUID string
application/json

Body

  • name string Required

    The name of the document.

  • client_uuids array[string(uuid)] Required

    An array containing the client uuids that should be sent the document when it is built.

  • template_uuid string(uuid)

    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 object

    Optional: The document variable dependants. Used to swap variables out for real data.

    Additional properties are allowed.

Responses

  • 201 application/json
    Hide response attributes Show response attributes object
    • uuid string
    • created_at string
    • updated_at string
    • version integer
    • name string
    • status string
    • last_publishing_error string
    • required_dependants object
      Hide required_dependants attribute Show required_dependants attribute object
      • client-1 string
    • known_dependants object
      Hide known_dependants attribute Show known_dependants attribute object
      • client-1 string
    • public_docx_url string
    • public_sfdt_url string
    • public_pdf_url string
    • public_preview_url string
  • 422 application/json

    Validation error

    Hide response attributes Show response attributes object
    • message string Required

      A human-readable description of the error.

    • errors object

      Validation messages keyed by the field that failed.

      Hide errors attribute Show errors attribute object
      • * array[string] Additional properties
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": [
    "273dafb8-2e29-4301-b4f7-8f73557fa783",
    "c723d6ef-cfc1-4c6e-9e0c-3e7360301913",
    "7324f7cb-02dd-495b-ad14-00674ac9ee94"
  ],
  "template_uuid": "211cd3ac-d0e7-490b-8b59-54a5df5dded2",
  "known_dependants": {
    "client-1": "839a1e8c-ba2b-4534-aeb5-b0e26f307b31"
  }
}'
Request examples
# Headers
X-PLANNR-ACCOUNT-UUID: {YOUR_PLANNR_ACCOUNT_UUID}

# Payload
{
  "name": "Client Service Agreement",
  "client_uuids": [
    "273dafb8-2e29-4301-b4f7-8f73557fa783",
    "c723d6ef-cfc1-4c6e-9e0c-3e7360301913",
    "7324f7cb-02dd-495b-ad14-00674ac9ee94"
  ],
  "template_uuid": "211cd3ac-d0e7-490b-8b59-54a5df5dded2",
  "known_dependants": {
    "client-1": "839a1e8c-ba2b-4534-aeb5-b0e26f307b31"
  }
}
Response examples (201)
[
  {
    "uuid": "6ea189c4-6cf5-462d-bf7c-627b21c43bb0",
    "created_at": "2026-09-18T09:00:11+01:00",
    "updated_at": "2026-09-18T09:00:11+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": "1ea31120-2192-4d4a-9ad5-69ab9d93dd84"
    },
    "public_docx_url": "https://api.plannrcrm.com/document/7df46e41-75ba-44f8-9894-a43f6446fa87/content/docx?plannr_account_uuid=9dff7217-0d9f-4636-95bb-dab545033df7",
    "public_sfdt_url": "https://api.plannrcrm.com/document/8dc9fd12-d859-45a3-98e4-8d65683d83f4/content/sfdt?plannr_account_uuid=fbcd08ac-045f-4f06-b9b8-24fc643b30c6",
    "public_pdf_url": "https://api.plannrcrm.com/document/a3e3b8f6-ee9a-48c4-9f52-c8d597750c40/content/pdf?plannr_account_uuid=4df718e3-2e99-488d-947f-e43c6f5858f0",
    "public_preview_url": "https://api.plannrcrm.com/document/f2f60cd1-dbb8-43b0-8a71-a831657c935f/content/preview?plannr_account_uuid=46814ad5-caf3-488c-8e2e-06eceeb0019c"
  }
]
Response examples (422)
{
  "message": "The given data was invalid.",
  "errors": {
    "field": [
      "The field is invalid."
    ]
  }
}