Esign Templates

Base URL: https://api.cornerspot.net

Authentication: requests use a bearer token, for example Authorization: Bearer YOUR_API_KEY.

List e-signature templates

GET /c/api/v1/esign/templates

Returns a paginated list of e-signature templates for the team. Supports name search via query/q. Requires the esign_read scope and the E-Signature module.

Query parameters

FIELDTYPEDESCRIPTION
querystringSearch by template name, case-insensitive. Also accepted as q.
pageinteger1-based page number.
per_pageintegerPage size (1–100, default 25).

Code samples

curl --request GET \
  --url 'https://api.cornerspot.net/c/api/v1/esign/templates' \
  --header 'Authorization: Bearer YOUR_API_KEY'
const response = await fetch('https://api.cornerspot.net/c/api/v1/esign/templates', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY'
  }
});

const data = await response.json();
console.log(data);
// Node.js 18+ (native fetch)
const response = await fetch('https://api.cornerspot.net/c/api/v1/esign/templates', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY'
  }
});

if (!response.ok) {
  throw new Error(`Request failed: ${response.status}`);
}

const data = await response.json();
console.log(data);
import json
import urllib.request

url = "https://api.cornerspot.net/c/api/v1/esign/templates"
headers = {
    "Authorization": "Bearer YOUR_API_KEY",
}

request = urllib.request.Request(url, headers=headers, method="GET")

with urllib.request.urlopen(request) as response:
    data = json.loads(response.read().decode("utf-8"))
    print(data)
require "json"
require "net/http"

uri = URI("https://api.cornerspot.net/c/api/v1/esign/templates")

request = Net::HTTP::Get.new(uri)
request["Authorization"] = "Bearer YOUR_API_KEY"

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") do |http|
  http.request(request)
end

puts JSON.parse(response.body)
<?php

$curl = curl_init();

curl_setopt_array($curl, [
    CURLOPT_URL => 'https://api.cornerspot.net/c/api/v1/esign/templates',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer YOUR_API_KEY',
    ],
]);

$response = curl_exec($curl);
curl_close($curl);

$data = json_decode($response, true);
print_r($data);

Responses

STATUSDESCRIPTION
200 OKa page of templates
401 Unauthorizedmissing or invalid API key
402 Payment Requiredthe team's plan doesn't include the E-Signature module
403 Forbiddenthe key lacks the esign_read scope

Get an e-signature template

GET /c/api/v1/esign/templates/{id}

Returns a single template, including its recipient roles and document/instantiation counts. Requires esign_read.

Path parameters

FIELDTYPEDESCRIPTION
idstring · requiredTemplate id (UUID).

Code samples

curl --request GET \
  --url 'https://api.cornerspot.net/c/api/v1/esign/templates/abc123' \
  --header 'Authorization: Bearer YOUR_API_KEY'
const response = await fetch('https://api.cornerspot.net/c/api/v1/esign/templates/abc123', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY'
  }
});

const data = await response.json();
console.log(data);
// Node.js 18+ (native fetch)
const response = await fetch('https://api.cornerspot.net/c/api/v1/esign/templates/abc123', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY'
  }
});

if (!response.ok) {
  throw new Error(`Request failed: ${response.status}`);
}

const data = await response.json();
console.log(data);
import json
import urllib.request

url = "https://api.cornerspot.net/c/api/v1/esign/templates/abc123"
headers = {
    "Authorization": "Bearer YOUR_API_KEY",
}

request = urllib.request.Request(url, headers=headers, method="GET")

with urllib.request.urlopen(request) as response:
    data = json.loads(response.read().decode("utf-8"))
    print(data)
require "json"
require "net/http"

uri = URI("https://api.cornerspot.net/c/api/v1/esign/templates/abc123")

request = Net::HTTP::Get.new(uri)
request["Authorization"] = "Bearer YOUR_API_KEY"

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") do |http|
  http.request(request)
end

puts JSON.parse(response.body)
<?php

$curl = curl_init();

curl_setopt_array($curl, [
    CURLOPT_URL => 'https://api.cornerspot.net/c/api/v1/esign/templates/abc123',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer YOUR_API_KEY',
    ],
]);

$response = curl_exec($curl);
curl_close($curl);

$data = json_decode($response, true);
print_r($data);

Responses

STATUSDESCRIPTION
200 OKthe template
401 Unauthorizedmissing or invalid API key
402 Payment Requiredthe team's plan doesn't include the E-Signature module
403 Forbiddenthe key lacks the esign_read scope
404 Not Foundno such template in this team

Instantiate a template into a draft envelope

POST /c/api/v1/esign/templates/{id}/create_envelope

Returned when recipient_mappings are supplied but are invalid, e.g.: unknown role_label, duplicate role assignments, duplicate emails, or missing name/email on an explicit mapping. The errors array lists each validation message. The error code is instantiation_failed.

Path parameters

FIELDTYPEDESCRIPTION
idstring · requiredTemplate id (UUID).

Request body

FIELDTYPEDESCRIPTION
recipient_mappings[]array of objectExplicit role-to-person mappings. Each entry must carry a role_label matching one of the template's roles.
recipient_mappings[].role_labelstring · requiredMust match a label in the template's recipient_roles.
recipient_mappings[].namestring · required
recipient_mappings[].emailstring · required
recipient_mappings[].contact_idstringOptional CRM contact to associate.
recipients[]array of objectPositional recipient list. Entry i maps to the i-th template role.
recipients[].namestring
recipients[].emailstring
recipients[].contact_idstringOptional CRM contact.
envelopeobjectOptional overrides applied to the new envelope (defaults come from the template).
envelope.subjectstringOverride the template's subject_template.
envelope.messagestringOverride the template's message_template.
auto_sendbooleanWhen true, attempt to send the draft immediately after creation. Defaults to false.

Code samples

curl --request POST \
  --url 'https://api.cornerspot.net/c/api/v1/esign/templates/abc123/create_envelope' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --data '{
  "recipient_mappings": [
    {
      "role_label": "string",
      "name": "string",
      "email": "user@example.com",
      "contact_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d"
    }
  ],
  "recipients": [
    {
      "name": "string",
      "email": "user@example.com",
      "contact_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d"
    }
  ],
  "envelope": {
    "subject": "string",
    "message": "string"
  },
  "auto_send": true
}'
const response = await fetch('https://api.cornerspot.net/c/api/v1/esign/templates/abc123/create_envelope', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer YOUR_API_KEY'
  },
  body: JSON.stringify({
    "recipient_mappings": [
      {
        "role_label": "string",
        "name": "string",
        "email": "user@example.com",
        "contact_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d"
      }
    ],
    "recipients": [
      {
        "name": "string",
        "email": "user@example.com",
        "contact_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d"
      }
    ],
    "envelope": {
      "subject": "string",
      "message": "string"
    },
    "auto_send": true
  })
});

const data = await response.json();
console.log(data);
// Node.js 18+ (native fetch)
const response = await fetch('https://api.cornerspot.net/c/api/v1/esign/templates/abc123/create_envelope', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer YOUR_API_KEY'
  },
  body: JSON.stringify({
    "recipient_mappings": [
      {
        "role_label": "string",
        "name": "string",
        "email": "user@example.com",
        "contact_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d"
      }
    ],
    "recipients": [
      {
        "name": "string",
        "email": "user@example.com",
        "contact_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d"
      }
    ],
    "envelope": {
      "subject": "string",
      "message": "string"
    },
    "auto_send": true
  })
});

if (!response.ok) {
  throw new Error(`Request failed: ${response.status}`);
}

const data = await response.json();
console.log(data);
import json
import urllib.request

url = "https://api.cornerspot.net/c/api/v1/esign/templates/abc123/create_envelope"
payload = json.dumps({
  "recipient_mappings": [
    {
      "role_label": "string",
      "name": "string",
      "email": "user@example.com",
      "contact_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d"
    }
  ],
  "recipients": [
    {
      "name": "string",
      "email": "user@example.com",
      "contact_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d"
    }
  ],
  "envelope": {
    "subject": "string",
    "message": "string"
  },
  "auto_send": true
}).encode("utf-8")
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer YOUR_API_KEY",
}

request = urllib.request.Request(url, data=payload, headers=headers, method="POST")

with urllib.request.urlopen(request) as response:
    data = json.loads(response.read().decode("utf-8"))
    print(data)
require "json"
require "net/http"

uri = URI("https://api.cornerspot.net/c/api/v1/esign/templates/abc123/create_envelope")

request = Net::HTTP::Post.new(uri)
request["Content-Type"] = "application/json"
request["Authorization"] = "Bearer YOUR_API_KEY"
request.body = JSON.generate({
  "recipient_mappings": [
    {
      "role_label": "string",
      "name": "string",
      "email": "user@example.com",
      "contact_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d"
    }
  ],
  "recipients": [
    {
      "name": "string",
      "email": "user@example.com",
      "contact_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d"
    }
  ],
  "envelope": {
    "subject": "string",
    "message": "string"
  },
  "auto_send": true
})

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") do |http|
  http.request(request)
end

puts JSON.parse(response.body)
<?php

$curl = curl_init();

curl_setopt_array($curl, [
    CURLOPT_URL => 'https://api.cornerspot.net/c/api/v1/esign/templates/abc123/create_envelope',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_HTTPHEADER => [
        'Content-Type: application/json',
        'Authorization: Bearer YOUR_API_KEY',
    ],
    CURLOPT_POSTFIELDS => json_encode([
    'recipient_mappings' => [
        [
            'role_label' => 'string',
            'name' => 'string',
            'email' => 'user@example.com',
            'contact_id' => '1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d',
        ],
    ],
    'recipients' => [
        [
            'name' => 'string',
            'email' => 'user@example.com',
            'contact_id' => '1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d',
        ],
    ],
    'envelope' => [
        'subject' => 'string',
        'message' => 'string',
    ],
    'auto_send' => true,
]),
]);

$response = curl_exec($curl);
curl_close($curl);

$data = json_decode($response, true);
print_r($data);

Responses

STATUSDESCRIPTION
201 Createddraft envelope created (and optionally sent)
401 Unauthorizedmissing or invalid API key
402 Payment Requiredthe team's plan doesn't include the E-Signature module
403 Forbiddenthe key lacks the esign_write scope
404 Not Foundno such template in this team
422 Unprocessable Contentinstantiation failed — recipient mapping errors

Was this article helpful?