← API v2 Overview

Documents

List reusable document templates, send them to contacts for review or e-signature, and inspect signature request status.

The Document Object

Generated from the OpenAPI schema. Always matches the live API.

Fields (10)
AttributeTypeRequiredDescriptionExample
idinteger-Document id.
tagstring-Document tag.
namestring-Document name.
descriptionstring-Document description.
fileobject-The stored file.
file.idstring-File id.
file.namestring-File name.
file.sizeinteger or null-File size in bytes, or null.
requeststring-Whether/how a signature can be requested for this document.
updatedinteger-Unix timestamp the document was last updated.
Example object
{
    "id": 0,
    "tag": "",
    "name": "",
    "description": "",
    "file": {
        "id": "",
        "name": "",
        "size": 0
    },
    "request": "",
    "updated": 0
}

Endpoints

GET List Documents

GET /2.0/documents · scope documents:read

List documents with pagination and optional filters.

Parameters (6)
ParameterInTypeRequiredDescriptionExample
pagequeryinteger-Page number, starting at 1 (offset pagination).
per_pagequeryinteger-Results per page (maximum 500).
tagquerystring-Filter by tag. Supports wildcards (%) with the search:wildcard scope.
updatedquerystring-Unix timestamp exact match, or a two-element array [from, to] for a range. An empty bound is open-ended.
cursorquerystring-Keyset pagination cursor from a previous response's meta.pagination.next_cursor. When supplied, page/total are not returned.
fieldsquerystring-Comma-separated dot-paths to return only those fields, e.g. id,data.stock.price_channel.
Responses
StatusDescription
200 OKPaginated documents

Failures use the standard error responses (4xx/5xx) with the shared error envelope.

{
    "success": true,
    "data": [
        {
            "id": 0,
            "tag": "",
            "name": "",
            "description": "",
            "file": {
                "id": "",
                "name": "",
                "size": 0
            },
            "request": "",
            "updated": 0
        }
    ],
    "meta": {
        "pagination": {
            "page": 0,
            "per_page": 0,
            "total": 0,
            "total_pages": 0,
            "next_cursor": ""
        }
    }
}

GET Get Document

GET /2.0/documents/{id} · scope documents:read

Retrieve a single document by id.

Parameters (2)
ParameterInTypeRequiredDescriptionExample
idpathstringYesResource identifier in the path.
fieldsquerystring-Comma-separated dot-paths to return only those fields, e.g. id,data.stock.price_channel.
Responses
StatusDescription
200 OKDocument

Failures use the standard error responses (4xx/5xx) with the shared error envelope.

{
    "success": true,
    "data": {
        "id": 0,
        "tag": "",
        "name": "",
        "description": "",
        "file": {
            "id": "",
            "name": "",
            "size": 0
        },
        "request": "",
        "updated": 0
    }
}

Send

POST Send Documents

POST /2.0/documents/send · scope documents:send

Send one or more documents to a contact for review or e-signing. Optionally set a redirect to return the contact to an invoice, order, or purchase after signing completes.

Request body
AttributeTypeRequiredDescriptionExample
contactintegerYesContact id to send the documents to.77684
documentsarray of stringYesDocuments to send. Each item is a document id, a document tag, or a {id, tag} object.[12]
esignboolean-Whether the documents require e-signature (true) or are sent for review only (false).true
redirectobject-Optional: after signing, return the contact to an existing invoice/order/purchase for the same contact (sets the post-signing redirect URL and label).
redirect.typeenumYesThe kind of record to return to.invoice
redirect.idintegerYesThe invoice/order/purchase id to return to.11492
{
    "contact": 77684,
    "documents": [
        12
    ],
    "esign": true,
    "redirect": {
        "type": "invoice",
        "id": 11492
    }
}
Responses
StatusDescription
201 CreatedDocument signature request created and sent

Failures use the standard error responses (4xx/5xx) with the shared error envelope.

{
    "success": true,
    "data": {
        "id": 0,
        "code": "",
        "contact": 0,
        "customer_name": "",
        "esign": false,
        "signed": false,
        "signed_at": 0,
        "requested": 0,
        "documents": [
            {
                "tag": "",
                "name": "",
                "signed": false,
                "signed_at": 0
            }
        ],
        "url": ""
    }
}

Signatures

GET List Signature Requests

GET /2.0/documents/signatures · scope document-signatures:read

List document signature requests.

Parameters (6)
ParameterInTypeRequiredDescriptionExample
pagequeryinteger-Page number, starting at 1 (offset pagination).
per_pagequeryinteger-Results per page (maximum 500).
contactqueryinteger-Filter by contact id.
signedqueryinteger-Filter by signed state: 0 (unsigned) or 1 (signed).
cursorquerystring-Keyset pagination cursor from a previous response's meta.pagination.next_cursor. When supplied, page/total are not returned.
fieldsquerystring-Comma-separated dot-paths to return only those fields, e.g. id,data.stock.price_channel.
Responses
StatusDescription
200 OKPaginated document signature requests

Failures use the standard error responses (4xx/5xx) with the shared error envelope.

{
    "success": true,
    "data": [
        {
            "id": 0,
            "code": "",
            "contact": 0,
            "customer_name": "",
            "esign": false,
            "signed": false,
            "signed_at": 0,
            "requested": 0,
            "documents": [
                {
                    "tag": "",
                    "name": "",
                    "signed": false,
                    "signed_at": 0
                }
            ],
            "url": ""
        }
    ],
    "meta": {
        "pagination": {
            "page": 0,
            "per_page": 0,
            "total": 0,
            "total_pages": 0,
            "next_cursor": ""
        }
    }
}

GET Get Signature Request

GET /2.0/documents/signatures/{signature_id} · scope document-signatures:read

Retrieve a single document signature request by id.

Parameters (2)
ParameterInTypeRequiredDescriptionExample
signature_idpathstringYesResource identifier in the path.
fieldsquerystring-Comma-separated dot-paths to return only those fields, e.g. id,data.stock.price_channel.
Responses
StatusDescription
200 OKDocument signature request

Failures use the standard error responses (4xx/5xx) with the shared error envelope.

{
    "success": true,
    "data": {
        "id": 0,
        "code": "",
        "contact": 0,
        "customer_name": "",
        "esign": false,
        "signed": false,
        "signed_at": 0,
        "requested": 0,
        "documents": [
            {
                "tag": "",
                "name": "",
                "signed": false,
                "signed_at": 0
            }
        ],
        "url": ""
    }
}