Contractbook

App · 9 actions

Read contracts, browse templates, and create contract drafts.

Actions

ActionWhat it does
Create a document from a templateCreate a document from a template.
Delete a documentDelete a document.
Get a documentGet a document.
Get a space treeGet a space tree.
Get a templateGet a template.
List automationsList automations.
List documentsList documents.
List templatesList templates.
Update a documentUpdate a document.

Create a document from a template

Create a document from a template.

Inputs

Templatetemplate_idtextRequired
Template ID
Documentdocumentobject
Document parameters

Outputs

dataobject
The response from Contractbook.
Example output
{
  "data": {
    "document": {
      "attachments": [
        {}
      ],
      "comments": [
        {}
      ],
      "company_logo_url": "example",
      "created_at": "example",
      "data_fields": [
        {}
      ],
      "events": [
        {}
      ],
      "id": "example",
      "language": "ar",
      "ocr_status": "none",
      "owner": {
        "email": "example",
        "full_name": "example",
        "id": "example"
      },
      "parties": [
        {}
      ],
      "sample": true,
      "shared": true,
      "signed_at": "example",
      "signing_order_mode": "random",
      "source_template_id": "example",
      "state": "draft",
      "tags": [
        "example"
      ],
      "template": {},
      "title": "example",
      "to_be_signed_by": "owner_and_others",
      "type": "draft",
      "updated_at": "example",
      "version": "example",
      "visibilities": [
        {}
      ],
      "workspace": {
        "id": "example",
        "name": "example",
        "permissions": [
          "view_documents"
        ]
      }
    }
  }
}

Delete a document

Delete a document.

Inputs

Documentdocument_idtextRequired
Document ID

Outputs

dataobject
The response from Contractbook.
Example output
{
  "data": {}
}

Get a document

Get a document.

Inputs

Documentdocument_idtextRequired
Document ID

Outputs

dataobject
The response from Contractbook.
Example output
{
  "data": {
    "document": {
      "attachments": [
        {}
      ],
      "comments": [
        {}
      ],
      "company_logo_url": "example",
      "created_at": "example",
      "data_fields": [
        {}
      ],
      "events": [
        {}
      ],
      "id": "example",
      "language": "ar",
      "ocr_status": "none",
      "owner": {
        "email": "example",
        "full_name": "example",
        "id": "example"
      },
      "parties": [
        {}
      ],
      "sample": true,
      "shared": true,
      "signed_at": "example",
      "signing_order_mode": "random",
      "source_template_id": "example",
      "state": "draft",
      "tags": [
        "example"
      ],
      "template": {},
      "title": "example",
      "to_be_signed_by": "owner_and_others",
      "type": "draft",
      "updated_at": "example",
      "version": "example",
      "visibilities": [
        {}
      ],
      "workspace": {
        "id": "example",
        "name": "example",
        "permissions": [
          "view_documents"
        ]
      }
    }
  }
}

Get a space tree

Get a space tree.

Inputs

Space IDspace_idtextRequired
Space ID

Outputs

dataobject
The response from Contractbook.
Example output
{
  "data": {
    "id": "example",
    "name": "example",
    "spaces": [
      {
        "id": "example",
        "name": "example",
        "spaces": [
          {}
        ]
      }
    ]
  }
}

Get a template

Get a template.

Inputs

Templatetemplate_idtextRequired
Template ID

Outputs

dataobject
The response from Contractbook.
Example output
{
  "data": {
    "template": {
      "attachments": [
        {}
      ],
      "company_logo_url": "example",
      "created_at": "example",
      "data_fields": [
        {}
      ],
      "default_message": "example",
      "description": "example",
      "id": "example",
      "language": "example",
      "owned": true,
      "owner_id": "example",
      "parties": [
        {}
      ],
      "signing_order_mode": "random",
      "slug": "example",
      "template": {},
      "title": "example",
      "updated_at": "example"
    }
  }
}

List automations

List automations.

Inputs

Trigger typetrigger_typetextRequired
Trigger type.One of: webhook_trigger (Webhook trigger), hubspot_contractbook_automation_triggered (Hubspot contractbook automation triggered), hubspot_deal_stage_changed (Hubspot deal stage changed), contract_signed (Contract signed), contract_verified_ai (Contract verified ai), contract_viewed (Contract viewed), data_field_date_reached (Data field date reached), data_field_updated (Data field updated), draft_created (Draft created), draft_updated (Draft updated), and 7 more.
Trigger filtertrigger_filterobject
Trigger filter.

Outputs

dataobject
The response from Contractbook.
Example output
{
  "data": {
    "automations": [
      {
        "id": "example",
        "inserted_at": "example",
        "name": "example",
        "published": true,
        "updated_at": "example"
      }
    ]
  }
}

List documents

List documents.

Inputs

Titletitletext
Filter by document title (case insensitive partial match)
Ownedownedtrue/false
Whether to look for documents owned by the requester or not
Cursorcursortext
Page identifier. The next page identifier will be found in the response body
Signed at ltsigned_at_ltdate and time
Filter by maximum date when the documents were signed (non-inclusive)
Signed at gtesigned_at_gtedate and time
Filter by minimum date when the documents were signed (inclusive)
Updated at ltupdated_at_ltdate and time
Filter by maximum date when the documents were updated (non-inclusive)
Updated at gteupdated_at_gtedate and time
Filter by minimum date when the documents were updated (inclusive)
Page sizepage_sizenumber
Page size. The default is 25 and the max value is 100From 0 to 100.
Sort columnsort_columntext
Column to use for sorting the documents (defaults to `created_at`)One of: created_at (Created at), updated_at (Updated at), title.
Sort directionsort_directiontext
Order direction when sorting the documentsOne of: asc, desc.

Outputs

dataobject
The response from Contractbook.
Example output
{
  "data": {
    "documents": [
      {
        "active_task_count": 1,
        "comment_count": 1,
        "completed_task_count": 1,
        "created_at": "example",
        "data_fields": [
          {}
        ],
        "folders": [
          {}
        ],
        "id": "example",
        "ocr_status": "none",
        "owner": {},
        "parties": [
          {}
        ],
        "sample": true,
        "signed_at": "example",
        "signing_order_mode": "random",
        "state": "draft",
        "tags": [
          "example"
        ],
        "title": "example",
        "to_be_signed_by": "owner_and_others",
        "type": "draft",
        "updated_at": "example",
        "version": "example",
        "visibilities": [
          {}
        ],
        "workspace": {}
      }
    ],
    "pagination_meta": {
      "cursor": "example"
    }
  }
}

List templates

List templates.

Inputs

Exclude spacesexclude_spacestrue/false
Exclude templates from Spaces
Integration filterintegration_filterobject
Exclude templates not connected to an external application according to the given rules

Outputs

dataobject
The response from Contractbook.
Example output
{
  "data": {
    "templates": [
      {
        "created_at": "example",
        "description": "example",
        "id": "example",
        "language": "example",
        "location": {},
        "owned": true,
        "owner_id": "example",
        "slug": "example",
        "title": "example",
        "updated_at": "example"
      }
    ]
  }
}

Update a document

Update a document.

Inputs

Documentdocument_idtextRequired
Document ID
DocumentdocumentobjectRequired
Document parameters

Outputs

dataobject
The response from Contractbook.
Example output
{
  "data": {
    "document": {
      "attachments": [
        {}
      ],
      "comments": [
        {}
      ],
      "company_logo_url": "example",
      "created_at": "example",
      "data_fields": [
        {}
      ],
      "events": [
        {}
      ],
      "id": "example",
      "language": "ar",
      "ocr_status": "none",
      "owner": {
        "email": "example",
        "full_name": "example",
        "id": "example"
      },
      "parties": [
        {}
      ],
      "sample": true,
      "shared": true,
      "signed_at": "example",
      "signing_order_mode": "random",
      "source_template_id": "example",
      "state": "draft",
      "tags": [
        "example"
      ],
      "template": {},
      "title": "example",
      "to_be_signed_by": "owner_and_others",
      "type": "draft",
      "updated_at": "example",
      "version": "example",
      "visibilities": [
        {}
      ],
      "workspace": {
        "id": "example",
        "name": "example",
        "permissions": [
          "view_documents"
        ]
      }
    }
  }
}

On this page