---
canonical_url: "https://docs.composio.dev/toolkits/contractbook"
markdown_url: "https://docs.composio.dev/toolkits/contractbook.md"
product: "platform"
version: null
last_updated: null
---

# Contractbook

Contractbook is a contract lifecycle management platform for creating, organizing, sharing, sending, and signing contracts.

- **Category:** documents
- **Auth:** API_KEY
- **Composio-managed OAuth available?** N/A
- **Tools:** 9
- **Triggers:** 0
- **Slug:** `CONTRACTBOOK`
- **Version:** 00000000_00

## Tools

### Create Document From Template

**Slug:** `CONTRACTBOOK_CREATE_DOCUMENT_FROM_TEMPLATE`

Create a draft document from a Contractbook template, optionally overriding its document fields; this does not send the draft for signature.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `tags` | array | No | Tags assigned to the draft; each tag must be a non-empty string. |
| `title` | string | No | Draft title override. |
| `message` | string | No | Draft message content override. |
| `parties` | array | No | Party and signee overrides for the draft. |
| `language` | string | No | Draft language code override. |
| `attachments` | array | No | Attachments to put on the draft using already-hosted Contractbook-compatible URLs. |
| `data_fields` | array | No | Template data-field values and definitions to apply; omitted conditional fields resolve as false in template conditions. |
| `template_id` | string | Yes | Template ID used to create the draft. |
| `dynamic_tables` | array | No | Values used to fill dynamic-table placeholders in the template. |
| `to_be_signed_by` | string ("owner_and_others" | "others_only" | "owner_only") | No | Who must sign the draft. |
| `company_logo_url` | string | No | Company logo URL override; pass null to remove the logo. |
| `signing_order_mode` | string ("random" | "strict" | "grouped") | No | Draft signing order mode override. |
| `attachments_signed_separately` | boolean | No | Whether draft attachments are signed and sealed separately. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Permanently Delete Document

**Slug:** `CONTRACTBOOK_DELETE_DOCUMENT`

Permanently destroy a Contractbook document with no restore option. Signed documents cannot be deleted through this API; Contractbook rejects signed or otherwise undeletable documents rather than reporting success.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `document_id` | string | Yes | ID of the Contractbook document to permanently destroy. This cannot be undone, and signed documents cannot be deleted through this API. Retrieve the document first if its identity or state is uncertain. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Document

**Slug:** `CONTRACTBOOK_GET_DOCUMENT`

Get the full current Contractbook document, including the version required for a safe update.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `document_id` | string | Yes | Contractbook document ID. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Document PDF Link

**Slug:** `CONTRACTBOOK_GET_DOCUMENT_PDF_LINK`

Get a short-lived PDF download URL for a document, or a not-ready message when Contractbook is still generating it.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `document_id` | string | Yes | Contractbook document ID whose PDF link to request. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Template

**Slug:** `CONTRACTBOOK_GET_TEMPLATE`

Get a template's full fields, parties, attachments, and signing configuration before creating a draft from it.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `template_id` | string | Yes | Contractbook template ID. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Automations

**Slug:** `CONTRACTBOOK_LIST_AUTOMATIONS`

List Contractbook automations for one trigger type; this only discovers automations and does not run them.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `trigger_type` | string ("webhook_trigger" | "hubspot_contractbook_automation_triggered" | "hubspot_deal_stage_changed" | "contract_signed" | "contract_verified_ai" | "contract_viewed" | "data_field_date_reached" | "data_field_updated" | "draft_created" | "draft_updated" | "drafter_questionnaire_completed" | "sent_for_signature" | "task_due_date_reached" | "task_is_done" | "pipedrive_deal_stage_changed" | "salesforce_flow_executed" | "salesforce_opportunity_stage_changed") | Yes | Trigger type whose published automations to return. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Documents

**Slug:** `CONTRACTBOOK_LIST_DOCUMENTS`

Search and filter documents visible to the connected Contractbook account, returning one page and a cursor for continuation.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `full` | boolean | No | Include data fields and full party details in each result. |
| `tags` | array | No | Tags used to filter documents. |
| `owned` | boolean | No | When set, filter by whether the connected account owns the document. |
| `title` | string | No | Case-insensitive partial title to match. |
| `cursor` | string | No | Opaque next_cursor returned by a previous call; omit for the first page. |
| `states` | array | No | Document states to include. |
| `contexts` | array | No | Document areas to search; include all three values to search every available area. |
| `page_size` | integer | No | Maximum documents in this page (0-100). |
| `sort_column` | string ("created_at" | "updated_at" | "title") | No | Field used to sort results. |
| `workspace_id` | string | No | Workspace ID to filter when contexts includes workspace. |
| `signed_before` | string | No | Return documents signed before this timestamp, excluding the boundary. |
| `document_types` | array | No | Document types to include. |
| `sort_direction` | string ("asc" | "desc") | No | Sort direction. |
| `updated_before` | string | No | Return documents updated before this timestamp, excluding the boundary. |
| `signed_at_or_after` | string | No | Return documents signed at or after this timestamp. |
| `updated_at_or_after` | string | No | Return documents updated at or after this timestamp. |
| `integration_object_id` | string | No | External integration object ID associated with documents. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Templates

**Slug:** `CONTRACTBOOK_LIST_TEMPLATES`

List all Contractbook templates visible to the connected account for choosing a template ID.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `exclude_spaces` | boolean | No | Exclude templates located in spaces when true. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update Document

**Slug:** `CONTRACTBOOK_UPDATE_DOCUMENT`

Update selected fields of a draft or stored contract using its current version; supplied collection fields replace their complete existing collections.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `tags` | array | No | Complete replacement tag list; fetch and merge first to preserve existing tags. |
| `title` | string | No | Replacement document title. |
| `message` | string | No | Replacement document message content. |
| `parties` | array | No | Complete replacement party and signee list; fetch and merge first to preserve parties. |
| `version` | string | Yes | Current document version from GET_DOCUMENT or a recent document response; stale values fail with version_mismatch. |
| `language` | string | No | Replacement document language code; pass null only when intentionally clearing it. |
| `attachments` | array | No | Complete replacement attachment list using Contractbook attachment objects; fetch and merge first to preserve existing attachments. Pass null only when intentionally clearing it. |
| `data_fields` | array | No | Complete replacement data-field list; fetch and merge first to preserve fields. |
| `document_id` | string | Yes | Draft or stored-contract document ID. |
| `dynamic_tables` | array | No | Complete replacement dynamic-table definitions with attrs containing id, columns, and rows. |
| `to_be_signed_by` | string ("owner_and_others" | "others_only" | "owner_only") | No | Who must sign the document. |
| `company_logo_url` | string | No | Replacement company logo URL; pass null only when intentionally clearing it. |
| `signing_order_mode` | string ("random" | "strict" | "grouped") | No | Replacement signing order mode. |
| `attachments_signed_separately` | boolean | No | Whether attachments are signed separately from the document. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |
