KosmoKrator

other

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.

8 functions 7 read 1 write Manual OAuth token auth

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 use the same stored profile from scripts, coding CLIs, Lua code mode, and the MCP gateway.

KeyEnv varTypeRequiredLabel
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

Call Docusign Headlessly

Use the generic call form when another coding CLI or script needs a stable universal interface.

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

Use the provider shortcut form for shorter human-facing commands.

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

Agent Discovery Commands

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

All CLI Functions

Every function below can be called headlessly. The generic form is stable across all integrations; the provider shortcut is shorter but specific to Docusign.

docusign.docusign_list_envelopes

Read read

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.

Parameters
status, from_date, to_date, search_text, count, start_position, order, order_by

Generic CLI call

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

Provider shortcut

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

Read read

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.

Parameters
envelope_id, include

Generic CLI call

kosmo integrations:call docusign.docusign_get_envelope '{"envelope_id":"example_envelope_id","include":"example_include"}' --json

Provider shortcut

kosmo integrations:docusign docusign_get_envelope '{"envelope_id":"example_envelope_id","include":"example_include"}' --json

docusign.docusign_create_envelope

Write write

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.

Parameters
envelope_definition

Generic CLI call

kosmo integrations:call docusign.docusign_create_envelope '{"envelope_definition":"example_envelope_definition"}' --json

Provider shortcut

kosmo integrations:docusign docusign_create_envelope '{"envelope_definition":"example_envelope_definition"}' --json

docusign.docusign_list_templates

Read read

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.

Parameters
search_text, count, start_position, folder_id, folder_ids, order, order_by

Generic CLI call

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

Provider shortcut

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

Read read

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.

Parameters
template_id

Generic CLI call

kosmo integrations:call docusign.docusign_get_template '{"template_id":"example_template_id"}' --json

Provider shortcut

kosmo integrations:docusign docusign_get_template '{"template_id":"example_template_id"}' --json

docusign.docusign_list_documents

Read read

List documents in a DocuSign envelope. Returns document IDs, names, types (content or summary), and page counts. Use document IDs to download individual documents.

Parameters
envelope_id

Generic CLI call

kosmo integrations:call docusign.docusign_list_documents '{"envelope_id":"example_envelope_id"}' --json

Provider shortcut

kosmo integrations:docusign docusign_list_documents '{"envelope_id":"example_envelope_id"}' --json

docusign.docusign_get_document

Read read

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.

Parameters
envelope_id, document_id

Generic CLI call

kosmo integrations:call docusign.docusign_get_document '{"envelope_id":"example_envelope_id","document_id":"example_document_id"}' --json

Provider shortcut

kosmo integrations:docusign docusign_get_document '{"envelope_id":"example_envelope_id","document_id":"example_document_id"}' --json

docusign.docusign_get_current_user

Read read

Get information about the authenticated DocuSign user, including name, email, and associated accounts. Useful for verifying credentials and discovering account IDs.

Parameters
none

Generic CLI call

kosmo integrations:call docusign.docusign_get_current_user '{}' --json

Provider shortcut

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

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.

Operation
Read read
Schema command
kosmo integrations:schema docusign.docusign_list_envelopes --json
ParameterTypeRequiredDescription
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

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.

Operation
Read read
Schema command
kosmo integrations:schema docusign.docusign_get_envelope --json
ParameterTypeRequiredDescription
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

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.

Operation
Write write
Schema command
kosmo integrations:schema docusign.docusign_create_envelope --json
ParameterTypeRequiredDescription
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

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.

Operation
Read read
Schema command
kosmo integrations:schema docusign.docusign_list_templates --json
ParameterTypeRequiredDescription
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

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.

Operation
Read read
Schema command
kosmo integrations:schema docusign.docusign_get_template --json
ParameterTypeRequiredDescription
template_id string yes The template ID to retrieve.

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.

Operation
Read read
Schema command
kosmo integrations:schema docusign.docusign_list_documents --json
ParameterTypeRequiredDescription
envelope_id string yes The envelope ID to list documents for.

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.

Operation
Read read
Schema command
kosmo integrations:schema docusign.docusign_get_document --json
ParameterTypeRequiredDescription
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

Get information about the authenticated DocuSign user, including name, email, and associated accounts. Useful for verifying credentials and discovering account IDs.

Operation
Read read
Schema command
kosmo integrations:schema docusign.docusign_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.