Pactly Public API (0.2.0)

Download OpenAPI specification:

The Pactly Public API provides programmatic access to contract lifecycle management capabilities, enabling integration with your existing systems. Key features include:

Contract Management: Create, retrieve, update, and search contracts across your organization • Template Operations: Access and manage contract templates for consistent document generation • Document Generation: Generate contracts from templates with dynamic variable substitution • Text Extraction: Extract and analyze text content from contracts and documents • Workflow Automation: Trigger workflows and track contract lifecycle events

The API follows RESTful principles and returns JSON responses. All endpoints require authentication via API key.

Contracts

Operations related to contract management including creation, retrieval, updates, and text extraction

List all contracts

Retrieve a paginated list of contracts accessible to the authenticated user. Supports filtering by type, status, and date ranges.

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
{
  • "contracts": [
    ]
}

Generate contract

Generate a new contract from a template

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "template": "string",
  • "createdAt": "2019-08-24T14:15:22Z"
}

Generate contract set from values

Generate a set of contracts based on provided values

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get contract details

Retrieve detailed information about a specific contract including all properties, metadata, and status information.

Authorizations:
ApiKeyAuth
path Parameters
id
required
string

Route pattern variable id

Responses

Response samples

Content type
application/json
{
  • "id": "507f1f77bcf86cd799439011",
  • "type": "template",
  • "name": "Software License Agreement - Acme Corp",
  • "reference": "SLA-2024-001",
  • "status": "executed",
  • "createdAt": "2024-01-15T10:30:00Z",
  • "updatedAt": "2024-01-20T14:45:00Z",
  • "finalizedAt": "2024-01-20T14:45:00Z",
  • "executedAt": "2024-01-20T15:00:00Z",
  • "executionMethod": "docusign",
  • "archived": false,
  • "deleted": false,
  • "aborted": false,
  • "final": true,
  • "hubRequestStatus": "completed",
  • "properties": {
    },
  • "user": "507f1f77bcf86cd799439012",
  • "template": "507f1f77bcf86cd799439013"
}

Extract contract text

Extract and return the full text content of a contract. Useful for search, analysis, and AI processing.

Authorizations:
ApiKeyAuth
path Parameters
id
required
string^[0-9a-fA-F]{24}$

Contract ID (MongoDB ObjectId format)

Responses

Response samples

Content type
application/json
{
  • "contractId": "507f1f77bcf86cd799439011",
  • "name": "Software License Agreement - Acme Corp",
  • "text": [
    ]
}

Download contract

Download a contract file by ID

Authorizations:
ApiKeyAuth
path Parameters
id
required
string^[0-9a-fA-F]{24}$

Contract ID (MongoDB ObjectId format)

Responses

Response samples

Content type
application/json
{
  • "error": "Bad Request",
  • "message": "Invalid contract ID format"
}

Templates

Manage contract templates that serve as the foundation for generating new contracts

List all templates

Retrieve all available contract templates that can be used to create new contracts.

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Test endpoint

Test endpoint to test API connectivity and authentication

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
{
  • "message": "string"
}