Contracts API

Create, manage, and track contracts for signing.

Base URL:https://apisign.io/api

Create Contract

Contract Creation Flows

APISign supports two distinct workflows for creating contracts:

Important Validation Rules:

  • Template Contracts: Must provide template_id and variables. Must NOT provide content or fields.
  • Non-Template Contracts: Must provide content and fields. Must NOT provide template_id or variables.

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 TypeDescriptionCompleted ByExample
textPlain text inputCreator/Signer"COMPANY_NAME"
emailEmail address input with validationCreator/Signer"CLIENT_EMAIL"
phonePhone number input with formattingCreator/Signer"CLIENT_PHONE"
dateDate pickerCreator/Signer"START_DATE"
labelDisplay-only text label (non-editable)Creator"SERVICE_TYPE"
signatureSignature drawing canvasSigner"CLIENT_SIGNATURE"
initialsInitials drawing canvasSigner"CLIENT_INITIALS"
timestampAuto-filled with signing timestampSigner"DATE_SIGNED"
signer_nameAuto-filled with signer's nameSigner"SIGNER_NAME"

Signer Object

Each signer in the signers array should include:

FieldTypeRequiredDescription
emailstringYesSigner's email address
namestringYesSigner's full name
companystringNoSigner's company name
signing_orderintegerYesOrder in which to sign (1, 2, 3...)

Get Contract


List Contracts

Contract Statuses

StatusDescription
draftContract created but not yet sent
sentContract sent to signers, awaiting signatures
signedAll signers have completed their signatures
cancelledContract was cancelled before completion
expiredContract expired before all signatures were collected

Send Contract


Cancel Contract


Download Contract PDF