data
Docusign CLI for AI Agents
Use the Docusign CLI from KosmoKrator to call Docusign tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.Docusign CLI Setup
Docusign can be configured headlessly with `kosmokrator integrations:configure docusign`.
# 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 docusign --set access_token="$DOCUSIGN_ACCESS_TOKEN" --set account_id="$DOCUSIGN_ACCOUNT_ID" --set base_path="$DOCUSIGN_BASE_PATH" --enable --read allow --write ask --json
kosmokrator integrations:doctor docusign --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.
| Key | Env var | Type | Required | Label |
|---|---|---|---|---|
access_token | DOCUSIGN_ACCESS_TOKEN | Secret secret | yes | Access Token |
account_id | DOCUSIGN_ACCOUNT_ID | Text text | yes | Account ID |
base_path | DOCUSIGN_BASE_PATH | URL url | yes | API Base Path |
Command Patterns
The generic command is stable across every integration. The provider shortcut is shorter for humans.
kosmo integrations:call docusign.docusign_list_envelopes '{"status":"example_status","from_date":"example_from_date","to_date":"example_to_date","search_text":"example_search_text","count":1,"start_position":1,"order":"example_order","order_by":"example_order_by"}' --json kosmo integrations:docusign docusign_list_envelopes '{"status":"example_status","from_date":"example_from_date","to_date":"example_to_date","search_text":"example_search_text","count":1,"start_position":1,"order":"example_order","order_by":"example_order_by"}' --json Discovery
These commands return structured output for coding agents that need to inspect capabilities before choosing a function.
kosmo integrations:docs docusign --json
kosmo integrations:docs docusign.docusign_list_envelopes --json
kosmo integrations:schema docusign.docusign_list_envelopes --json
kosmo integrations:search "Docusign" --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.
docusign.docusign_list_envelopes
List envelopes in the DocuSign account. Filter by status (sent, delivered, completed, signed, declined, voided), date range, or search text. Returns envelope summaries with IDs, subjects, statuses, and dates.
read - Parameters
- status, from_date, to_date, search_text, count, start_position, order, order_by
kosmo integrations:call docusign.docusign_list_envelopes '{"status":"example_status","from_date":"example_from_date","to_date":"example_to_date","search_text":"example_search_text","count":1,"start_position":1,"order":"example_order","order_by":"example_order_by"}' --json kosmo integrations:docusign docusign_list_envelopes '{"status":"example_status","from_date":"example_from_date","to_date":"example_to_date","search_text":"example_search_text","count":1,"start_position":1,"order":"example_order","order_by":"example_order_by"}' --json docusign.docusign_get_envelope
Get detailed information about a DocuSign envelope including status, recipients, documents, and signing history. Use this to check if an envelope has been signed or to review its details.
read - Parameters
- envelope_id, include
kosmo integrations:call docusign.docusign_get_envelope '{"envelope_id":"example_envelope_id","include":"example_include"}' --json kosmo integrations:docusign docusign_get_envelope '{"envelope_id":"example_envelope_id","include":"example_include"}' --json docusign.docusign_create_envelope
Create a new DocuSign envelope for electronic signature. You can create from a template (pass template_id) or from scratch with inline documents and recipients. Set status to "sent" to send immediately or "created" to save as a draft.
write - Parameters
- envelope_definition
kosmo integrations:call docusign.docusign_create_envelope '{"envelope_definition":"example_envelope_definition"}' --json kosmo integrations:docusign docusign_create_envelope '{"envelope_definition":"example_envelope_definition"}' --json docusign.docusign_list_templates
List templates available in the DocuSign account. Templates define reusable envelope structures with pre-configured documents, recipients, and signing tabs. Use a template ID to create envelopes from a template.
read - Parameters
- search_text, count, start_position, folder_id, folder_ids, order, order_by
kosmo integrations:call docusign.docusign_list_templates '{"search_text":"example_search_text","count":1,"start_position":1,"folder_id":"example_folder_id","folder_ids":"example_folder_ids","order":"example_order","order_by":"example_order_by"}' --json kosmo integrations:docusign docusign_list_templates '{"search_text":"example_search_text","count":1,"start_position":1,"folder_id":"example_folder_id","folder_ids":"example_folder_ids","order":"example_order","order_by":"example_order_by"}' --json docusign.docusign_get_template
Get details for a DocuSign template including its documents, recipient roles, signing tabs, and email settings. Use this to understand a template before creating an envelope from it.
read - Parameters
- template_id
kosmo integrations:call docusign.docusign_get_template '{"template_id":"example_template_id"}' --json kosmo integrations:docusign docusign_get_template '{"template_id":"example_template_id"}' --json docusign.docusign_list_documents
List documents in a DocuSign envelope. Returns document IDs, names, types (content or summary), and page counts. Use document IDs to download individual documents.
read - Parameters
- envelope_id
kosmo integrations:call docusign.docusign_list_documents '{"envelope_id":"example_envelope_id"}' --json kosmo integrations:docusign docusign_list_documents '{"envelope_id":"example_envelope_id"}' --json docusign.docusign_get_document
Download a document from a DocuSign envelope. Returns the document content as base64-encoded data. Use "combined" as the document_id to download all documents as a single combined PDF.
read - Parameters
- envelope_id, document_id
kosmo integrations:call docusign.docusign_get_document '{"envelope_id":"example_envelope_id","document_id":"example_document_id"}' --json kosmo integrations:docusign docusign_get_document '{"envelope_id":"example_envelope_id","document_id":"example_document_id"}' --json docusign.docusign_get_current_user
Get information about the authenticated DocuSign user, including name, email, and associated accounts. Useful for verifying credentials and discovering account IDs.
read - Parameters
- none
kosmo integrations:call docusign.docusign_get_current_user '{}' --json kosmo integrations:docusign docusign_get_current_user '{}' --json Function Schemas
Use these parameter tables when building CLI payloads without calling integrations:schema first.
docusign.docusign_list_envelopes 8 parameters
kosmo integrations:schema docusign.docusign_list_envelopes --json | Parameter | Type | Required | Description |
|---|---|---|---|
status | string | no | Filter by status: sent, delivered, completed, signed, declined, voided, or "all" (default: all). |
from_date | string | no | Start date for filter (YYYY-MM-DD). Defaults to 30 days ago if not specified. |
to_date | string | no | End date for filter (YYYY-MM-DD). Defaults to today. |
search_text | string | no | Search envelope subjects and recipient names. |
count | integer | no | Number of results to return (default: 25, max: 100). |
start_position | integer | no | Zero-based index for pagination (default: 0). |
order | string | no | Sort direction: "asc" or "desc" (default: "desc"). |
order_by | string | no | Sort field: "last_modified", "created", or "sent" (default: "last_modified"). |
docusign.docusign_get_envelope 2 parameters
kosmo integrations:schema docusign.docusign_get_envelope --json | Parameter | Type | Required | Description |
|---|---|---|---|
envelope_id | string | yes | The envelope ID to retrieve. |
include | string | no | Comma-separated list of additional data to include: "recipients", "documents", "extensions", "custom_fields", "tabs". |
docusign.docusign_create_envelope 1 parameters
kosmo integrations:schema docusign.docusign_create_envelope --json | Parameter | Type | Required | Description |
|---|---|---|---|
envelope_definition | object | yes | The full envelope definition JSON object. Required fields: documents (or templateId), recipients (signers, cc, etc.), emailSubject, and status ("sent" or "created"). See DocuSign eSignature REST API docs for full schema. |
docusign.docusign_list_templates 7 parameters
kosmo integrations:schema docusign.docusign_list_templates --json | Parameter | Type | Required | Description |
|---|---|---|---|
search_text | string | no | Filter templates by name or description. |
count | integer | no | Number of results to return (default: 25). |
start_position | integer | no | Zero-based index for pagination (default: 0). |
folder_id | string | no | Filter by folder ID. |
folder_ids | array | no | Filter by multiple folder IDs. |
order | string | no | Sort direction: "asc" or "desc". |
order_by | string | no | Sort field: "name" or "modified". |
docusign.docusign_get_template 1 parameters
kosmo integrations:schema docusign.docusign_get_template --json | Parameter | Type | Required | Description |
|---|---|---|---|
template_id | string | yes | The template ID to retrieve. |
docusign.docusign_list_documents 1 parameters
kosmo integrations:schema docusign.docusign_list_documents --json | Parameter | Type | Required | Description |
|---|---|---|---|
envelope_id | string | yes | The envelope ID to list documents for. |
docusign.docusign_get_document 2 parameters
kosmo integrations:schema docusign.docusign_get_document --json | Parameter | Type | Required | Description |
|---|---|---|---|
envelope_id | string | yes | The envelope ID containing the document. |
document_id | string | yes | The document ID to download. Use "combined" to get all documents as a single PDF. |
docusign.docusign_get_current_user 0 parameters
kosmo integrations:schema docusign.docusign_get_current_user --json | Parameter | Type | Required | Description |
|---|---|---|---|
| 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.