Contracts API
Create, manage, and track contracts for signing.
Base URL:
https://apisign.io/apiCreate Contract
Contract Creation Flows
APISign supports two distinct workflows for creating contracts:
Important Validation Rules:
- Template Contracts: Must provide
template_idandvariables. Must NOT providecontentorfields. - Non-Template Contracts: Must provide
contentandfields. Must NOT providetemplate_idorvariables.
1. Template-Based Contract Creation
Create contracts from pre-existing templates with variable substitution:
{
"name": "Service Agreement - John Smith",
"template_id": "tmpl_abc123",
"variables": {
"company_name": "Acme Corporation",
"client_name": "John Smith",
"hourly_rate": "$150"
},
"signers": [
{
"email": "john@example.com",
"name": "John Smith",
"signing_order": 1
}
],
}
2. Blank Contract Creation
Create one-off contracts from scratch with custom content and field definitions:
{
"name": "Custom NDA - Jane Doe",
"content": "# Non-Disclosure Agreement\n\nThis agreement is between {{COMPANY_NAME}} and {{CLIENT_NAME}}.\n\n**Label:** {{SERVICE_LABEL}}\n**Client Signature:** {{CLIENT_SIGNATURE}}",
"fields": [
{
"name": "COMPANY_NAME",
"type": "text",
"completedBy": "creator"
},
{
"name": "CLIENT_NAME",
"type": "text",
"completedBy": "creator"
},
{
"name": "SERVICE_LABEL",
"type": "label",
"completedBy": "creator"
},
{
"name": "CLIENT_SIGNATURE",
"type": "signature",
"completedBy": "signer"
}
],
"signers": [
{
"email": "jane@example.com",
"name": "Jane Doe",
"signing_order": 1
}
]
}
Field Types
For blank contracts, you can specify the following field types:
| Field Type | Description | Completed By | Example |
|---|---|---|---|
text | Plain text input | Creator/Signer | "COMPANY_NAME" |
email | Email address input with validation | Creator/Signer | "CLIENT_EMAIL" |
phone | Phone number input with formatting | Creator/Signer | "CLIENT_PHONE" |
date | Date picker | Creator/Signer | "START_DATE" |
label | Display-only text label (non-editable) | Creator | "SERVICE_TYPE" |
signature | Signature drawing canvas | Signer | "CLIENT_SIGNATURE" |
initials | Initials drawing canvas | Signer | "CLIENT_INITIALS" |
timestamp | Auto-filled with signing timestamp | Signer | "DATE_SIGNED" |
signer_name | Auto-filled with signer's name | Signer | "SIGNER_NAME" |
Signer Object
Each signer in the signers array should include:
| Field | Type | Required | Description |
|---|---|---|---|
email | string | Yes | Signer's email address |
name | string | Yes | Signer's full name |
company | string | No | Signer's company name |
signing_order | integer | Yes | Order in which to sign (1, 2, 3...) |
Get Contract
List Contracts
Contract Statuses
| Status | Description |
|---|---|
draft | Contract created but not yet sent |
sent | Contract sent to signers, awaiting signatures |
signed | All signers have completed their signatures |
cancelled | Contract was cancelled before completion |
expired | Contract expired before all signatures were collected |