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
query Parameters
createdAfter
string <date-time>

Only return contracts created after this date (ISO 8601)

createdBefore
string <date-time>

Only return contracts created before this date (ISO 8601)

updatedAfter
string <date-time>

Only return contracts updated after this date (ISO 8601)

updatedBefore
string <date-time>

Only return contracts updated before this date (ISO 8601)

status
integer [ 1 .. 6 ]

Filter by status code: 1=Draft, 2=In Negotiation, 3=Pending Approval, 4=Pending Signature, 5=Executed, 6=Terminated

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
[
  • {
    }
]

Emails

Email-related operations

List contract emails

List all emails associated with contracts (for AI training)

Authorizations:
ApiKeyAuth
query Parameters
pagesize
integer
Default: 100

Number of emails to return

cursor
string

Cursor for pagination

contractType
string
Enum: "template" "playbook" "external"

Filter by contract type

contractId
string

Filter by specific contract ID

sender
string

Filter by sender email

dateFrom
string <date>

Filter emails from this date

dateTo
string <date>

Filter emails until this date

Responses

Response samples

Content type
application/json
{
  • "emails": [
    ],
  • "pagination": {
    }
}

Properties

Contract property definitions that define the metadata fields available on contracts

List property definitions

Retrieve all contract property definitions available to the company, including system default properties.

Authorizations:
ApiKeyAuth

Responses

Response samples

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

Get property definition

Retrieve a single property definition by its ID or unique key.

Authorizations:
ApiKeyAuth
path Parameters
idOrKey
required
string

Property ID (MongoDB ObjectId) or property key

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "key": "string",
  • "label": "string",
  • "description": "string",
  • "type": "string",
  • "options": { },
  • "group": "string",
  • "subGroup": "string",
  • "sortOrder": 0,
  • "isDefault": true,
  • "manualOnly": true
}

Categories

Contract categories used to classify and organize contracts

List categories

Retrieve all contract categories available to the company, including system default categories.

Authorizations:
ApiKeyAuth

Responses

Response samples

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

Test endpoint

Test endpoint to test API connectivity and authentication

Authorizations:
ApiKeyAuth

Responses

Response samples

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