{
  "opencollection": "1.0.0",
  "info": {
    "name": "Contractbook API v3",
    "version": "3.0"
  },
  "request": {
    "auth": {
      "type": "bearer",
      "token": "{{bearerToken}}"
    }
  },
  "items": [
    {
      "info": {
        "name": "Documents",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Get a list of documents",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.contractbook.com/v3/documents"
          },
          "docs": "List documents (contracts) and drafts in the workspace, with filtering and pagination."
        },
        {
          "info": {
            "name": "Get a document",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.contractbook.com/v3/documents/:id",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "Path parameter."
              }
            ]
          },
          "docs": "Retrieve a single document (contract) by ID, including parties, signees, and data fields."
        },
        {
          "info": {
            "name": "Update a document",
            "type": "http"
          },
          "http": {
            "method": "PATCH",
            "url": "https://api.contractbook.com/v3/documents/:id",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "Path parameter."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Update a document's data fields and metadata."
        },
        {
          "info": {
            "name": "Delete a document",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://api.contractbook.com/v3/documents/:id",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "Path parameter."
              }
            ]
          },
          "docs": "Delete a document by ID."
        },
        {
          "info": {
            "name": "Get a PDF copy of a document",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.contractbook.com/v3/documents/:id/pdf",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "Path parameter."
              }
            ]
          },
          "docs": "Download a PDF copy of the document/contract."
        },
        {
          "info": {
            "name": "Send a document for signature",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.contractbook.com/v3/documents/:id/send",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "Path parameter."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Send a document out for electronic signature."
        }
      ]
    },
    {
      "info": {
        "name": "Document sharing",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Share a document",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.contractbook.com/v3/documents/:id/share",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "Path parameter."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Share a document with collaborators."
        },
        {
          "info": {
            "name": "Unshare a document",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://api.contractbook.com/v3/documents/:id/share",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "Path parameter."
              }
            ]
          },
          "docs": "Revoke collaborator access to a document."
        }
      ]
    },
    {
      "info": {
        "name": "Templates",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Get a list of templates",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.contractbook.com/v3/templates"
          },
          "docs": "List reusable contract templates in the workspace."
        },
        {
          "info": {
            "name": "Get a template",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.contractbook.com/v3/templates/:id",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "Path parameter."
              }
            ]
          },
          "docs": "Retrieve a single template by ID."
        },
        {
          "info": {
            "name": "Create a new document from a template",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.contractbook.com/v3/templates/:id/create_document",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "Path parameter."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Generate a new pre-filled draft document (contract) from a template."
        }
      ]
    },
    {
      "info": {
        "name": "Automations",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Get a list of automations",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.contractbook.com/v3/automations"
          },
          "docs": "List the automations configured in the workspace."
        },
        {
          "info": {
            "name": "Run an automation",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.contractbook.com/v3/automations/:id/run",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "Path parameter."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Trigger a specific automation to run."
        }
      ]
    },
    {
      "info": {
        "name": "Spaces",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Create a child space",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.contractbook.com/v3/spaces/:id",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "Path parameter."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Create a child space under the given space."
        },
        {
          "info": {
            "name": "Get a space tree",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.contractbook.com/v3/spaces/:id/tree",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "Path parameter."
              }
            ]
          },
          "docs": "Retrieve the tree of spaces beneath the given space."
        }
      ]
    },
    {
      "info": {
        "name": "Attachments",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Upload an attachment",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.contractbook.com/v3/upload",
            "body": {
              "type": "formdata",
              "data": [
                {
                  "name": "file",
                  "type": "file"
                }
              ]
            }
          },
          "docs": "Upload a file to attach to a document."
        }
      ]
    }
  ]
}