KosmoKrator

productivity

PandaDoc CLI for AI Agents

Use the PandaDoc CLI from KosmoKrator to call PandaDoc tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.

PandaDoc CLI Setup

PandaDoc can be configured headlessly with `kosmokrator integrations:configure pandadoc`.

Install, configure, and verify
# Install KosmoKrator first if it is not available on PATH.
curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash

# Configure and verify this integration.
kosmokrator integrations:configure pandadoc --set access_token="$PANDADOC_ACCESS_TOKEN" --enable --read allow --write ask --json
kosmokrator integrations:doctor pandadoc --json
kosmokrator integrations:status --json

Credentials

Authentication type: Manual OAuth token oauth2_manual_token. Configure credentials once, then reuse the same stored profile from scripts, coding CLIs, Lua, and MCP.

KeyEnv varTypeRequiredLabel
access_token PANDADOC_ACCESS_TOKEN Secret secret yes Access Token
url PANDADOC_URL URL url no API Base URL

Command Patterns

The generic command is stable across every integration. The provider shortcut is shorter for humans.

Generic CLI call
kosmo integrations:call pandadoc.pandadoc_list_documents '{"page":1,"count":1}' --json
Provider shortcut
kosmo integrations:pandadoc pandadoc_list_documents '{"page":1,"count":1}' --json

Discovery

These commands return structured output for coding agents that need to inspect capabilities before choosing a function.

Discovery commands
kosmo integrations:docs pandadoc --json
kosmo integrations:docs pandadoc.pandadoc_list_documents --json
kosmo integrations:schema pandadoc.pandadoc_list_documents --json
kosmo integrations:search "PandaDoc" --json
kosmo integrations:list --json

Automation Contexts

The same configured command surface works in these environments. The command does not change unless the host wrapper, credentials, or permissions change.

CLI Functions

Every function below can be called headlessly. Commands are highlighted, copyable, and scroll horizontally when payloads are long.

pandadoc.pandadoc_list_documents

List documents from PandaDoc. Returns a paginated list of documents with their IDs, names, status, and metadata.

Read read
Parameters
page, count
Generic call
kosmo integrations:call pandadoc.pandadoc_list_documents '{"page":1,"count":1}' --json
Shortcut
kosmo integrations:pandadoc pandadoc_list_documents '{"page":1,"count":1}' --json

pandadoc.pandadoc_get_document

Get details of a specific PandaDoc document by ID. Returns document metadata, status, recipients, and fields.

Read read
Parameters
id
Generic call
kosmo integrations:call pandadoc.pandadoc_get_document '{"id":"example_id"}' --json
Shortcut
kosmo integrations:pandadoc pandadoc_get_document '{"id":"example_id"}' --json

pandadoc.pandadoc_create_document

Create a new PandaDoc document from an existing template. The document is created in draft status and can then be sent for signature.

Write write
Parameters
name, template_id, recipients, tokens, fields, metadata
Generic call
kosmo integrations:call pandadoc.pandadoc_create_document '{"name":"example_name","template_id":"example_template_id","recipients":"example_recipients","tokens":"example_tokens","fields":"example_fields","metadata":"example_metadata"}' --json
Shortcut
kosmo integrations:pandadoc pandadoc_create_document '{"name":"example_name","template_id":"example_template_id","recipients":"example_recipients","tokens":"example_tokens","fields":"example_fields","metadata":"example_metadata"}' --json

pandadoc.pandadoc_send_document

Send a PandaDoc document to recipients for signature. The document must be in draft status. Once sent, recipients will receive an email notification.

Write write
Parameters
id, message, silent
Generic call
kosmo integrations:call pandadoc.pandadoc_send_document '{"id":"example_id","message":"example_message","silent":true}' --json
Shortcut
kosmo integrations:pandadoc pandadoc_send_document '{"id":"example_id","message":"example_message","silent":true}' --json

pandadoc.pandadoc_list_templates

List available document templates from PandaDoc. Returns template IDs, names, and metadata for creating new documents.

Read read
Parameters
page
Generic call
kosmo integrations:call pandadoc.pandadoc_list_templates '{"page":1}' --json
Shortcut
kosmo integrations:pandadoc pandadoc_list_templates '{"page":1}' --json

pandadoc.pandadoc_get_template

Get details of a specific PandaDoc template by ID. Returns template metadata, fields, tokens, and recipient roles.

Read read
Parameters
id
Generic call
kosmo integrations:call pandadoc.pandadoc_get_template '{"id":"example_id"}' --json
Shortcut
kosmo integrations:pandadoc pandadoc_get_template '{"id":"example_id"}' --json

pandadoc.pandadoc_download_document

Download a PandaDoc document as a PDF. Returns the PDF content as a base64-encoded string.

Read read
Parameters
id
Generic call
kosmo integrations:call pandadoc.pandadoc_download_document '{"id":"example_id"}' --json
Shortcut
kosmo integrations:pandadoc pandadoc_download_document '{"id":"example_id"}' --json

pandadoc.pandadoc_create_link

Create a signed sharing link (session) for a PandaDoc document. The link allows viewing the document without authentication.

Write write
Parameters
id, lifetime
Generic call
kosmo integrations:call pandadoc.pandadoc_create_link '{"id":"example_id","lifetime":1}' --json
Shortcut
kosmo integrations:pandadoc pandadoc_create_link '{"id":"example_id","lifetime":1}' --json

pandadoc.pandadoc_get_current_user

Get the profile of the currently authenticated PandaDoc user. Useful for verifying the connection and identifying the account.

Read read
Parameters
none
Generic call
kosmo integrations:call pandadoc.pandadoc_get_current_user '{}' --json
Shortcut
kosmo integrations:pandadoc pandadoc_get_current_user '{}' --json

Function Schemas

Use these parameter tables when building CLI payloads without calling integrations:schema first.

pandadoc.pandadoc_list_documents 2 parameters
Schema command
kosmo integrations:schema pandadoc.pandadoc_list_documents --json
ParameterTypeRequiredDescription
page integer no Page number for pagination (default: 1).
count integer no Number of documents per page (default: 50, max: 100).
pandadoc.pandadoc_get_document 1 parameters
Schema command
kosmo integrations:schema pandadoc.pandadoc_get_document --json
ParameterTypeRequiredDescription
id string yes The document UUID.
pandadoc.pandadoc_create_document 6 parameters
Schema command
kosmo integrations:schema pandadoc.pandadoc_create_document --json
ParameterTypeRequiredDescription
name string yes Name for the new document.
template_id string yes UUID of the template to create the document from.
recipients array no List of recipients. Each recipient should have "email" and optionally "first_name", "last_name", "role".
tokens array no List of template tokens to fill. Each token should have "name" and "value".
fields array no Prefill fields. Each field should have "name" (or "field_uuid") and "value".
metadata object no Custom metadata key-value pairs to attach to the document.
pandadoc.pandadoc_send_document 3 parameters
Schema command
kosmo integrations:schema pandadoc.pandadoc_send_document --json
ParameterTypeRequiredDescription
id string yes The document UUID to send.
message string no Custom message to include in the email notification to recipients.
silent boolean no If true, the document changes status to sent but no email is sent to recipients (default: false).
pandadoc.pandadoc_list_templates 1 parameters
Schema command
kosmo integrations:schema pandadoc.pandadoc_list_templates --json
ParameterTypeRequiredDescription
page integer no Page number for pagination (default: 1).
pandadoc.pandadoc_get_template 1 parameters
Schema command
kosmo integrations:schema pandadoc.pandadoc_get_template --json
ParameterTypeRequiredDescription
id string yes The template UUID.
pandadoc.pandadoc_download_document 1 parameters
Schema command
kosmo integrations:schema pandadoc.pandadoc_download_document --json
ParameterTypeRequiredDescription
id string yes The document UUID to download.
pandadoc.pandadoc_get_current_user 0 parameters
Schema command
kosmo integrations:schema pandadoc.pandadoc_get_current_user --json
ParameterTypeRequiredDescription
No parameters.

Permissions

Headless calls still follow the integration read/write permission policy. Configure read/write defaults with integrations:configure. Add --force only for trusted automation that should bypass that policy.