Issue a certificate for a set of records
In the Esign Comply API, POST /v1/certificates requests one certificate over the records a filter selects and returns it, with the status processing for a set. Call it after a person approves the quote, then wait for the certificate.issued webhook or poll the certificate.
POST /v1/certificates · API version 2026-11-21
Authentication
Send a secret key in the Authorization header: Bearer $ESIGNCOMPLY_API_KEY. The key needs full_access permission. Test keys and live keys both work, and each reads and writes the objects of its own environment. Call it from your server: a secret key never goes to a browser. Keys and permissions are described under Authentication.
Request example
cURL
curl https://esigncomply.com/v1/certificates \
-H "Authorization: Bearer $ESIGNCOMPLY_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: cert-set-terms-2026-11-21" \
-d '{
"type": "contemporaneous_record_set",
"filter": {
"version_id": "dv_3kT9",
"created_after": "2026-01-01T00:00:00Z"
},
"reference": "Terms of Service, version 2026-11-21",
"confirm_charge": true
}'
Node SDK
import { EsignComply } from "esigncomply";
const esc = new EsignComply(process.env.ESIGNCOMPLY_API_KEY);
const { data, error } = await esc.certificates.create(
{
type: "contemporaneous_record_set",
filter: { version_id: "dv_3kT9", created_after: "2026-01-01T00:00:00Z" },
reference: "Terms of Service, version 2026-11-21",
confirm_charge: true,
},
{ idempotencyKey: "cert-set-terms-2026-11-21" },
);
The two samples send the same Idempotency-Key with bodies that differ in whitespace. Run one of them, or change the key: the same key with different bytes in the body answers 409 idempotency_conflict.
This request ran against the API on November 26, 2026, and the response below is what came back. IDs are example values, and long values are shortened with ....
What it does
One statement plus a manifest that lists every record with its times and check results. The call returns 202 Accepted with status: "processing". The certificate.issued webhook carries the certificate ID when it is ready, or poll GET /v1/certificates/{id}.
Parameters
Body fields
| Field | Type | Required | Description |
|---|---|---|---|
type |
string | No | contemporaneous_record_set (default), contemporaneous_record or custodian_certification. |
filter |
object | Yes | Selects the records. One of record_ids (array), signer_external_id, document_id or version_id, each optionally bounded by created_after and created_before. |
wording |
string | No | auto or a pack code, as for one record. |
reference |
string | No | Up to 120 characters. |
include |
string[] | No | As for one record. |
confirm_charge |
boolean | When a charge results | Must be true to approve the charge shown in the quote. |
share |
object | No | { "expires_in": seconds }. Read only when the request is issued as a single record (type is contemporaneous_record and the filter matches one record). A set is issued without a share link. |
reissue_of |
string | No | ID of an earlier certificate to re-issue. Read only when the request is issued as a single record. |
A set is charged as one certificate for each 100 records, or part of 100, that it covers. A set of 250 records is three units. Included units are used first and the rest is charged: the quote shows both numbers. Records per request: Free 10 (test certificates only), Starter 100, Unlimited 10,000, Enterprise as contracted.
Records that fail a precondition (not yet timestamped, or locked under the earlier Starter quota rule) are listed in the manifest as excluded with the reason. They are never silently dropped. Signers are identified in the manifest by external ID only.
record_ids lists at most the first 100 records. record_count is the full count. When the job finishes, status becomes issued and the units are settled against the records actually covered after exclusions. If a record fails an integrity check, the whole job ends with status: "failed" and a failure object, the certificate.failed webhook is sent, and nothing is charged.
A request with type: "contemporaneous_record" whose filter matches exactly one record is issued synchronously and returns 201, like the single-record endpoint. To share a set certificate, create the link after issue with POST /v1/certificates/{id}/share.
Headers: Idempotency-Key (optional, up to 255 characters) and Esign-Comply-Version (optional, a dated API version). See API conventions.
Response
202 Accepted with a Certificate object.
201 Created: type is contemporaneous_record and the filter matches exactly one record: the certificate is issued within the request, as by the one-record call.
{
"object": "certificate",
"id": "crt_9LdY",
"type": "contemporaneous_record_set",
"status": "processing",
"livemode": false,
"record_ids": [
"rec_ssve",
"rec_0neq",
"rec_hb0C",
"rec_Ceuk",
"rec_Z4m8"
],
"record_count": 5,
"issued_at": null,
"requested_by": {
"class": "customer",
"key_id": "key_Doqa"
},
"reference": "Terms of Service, version 2026-11-21",
"wording": [
"auto"
],
"include": [],
"verification": null,
"certificate_hash": null,
"seal": {
"receipt": null,
"ledger": null,
"ledger_seq": null,
"timestamp_token": "pending"
},
"share": null,
"billing": {
"units": 1,
"amount": 0,
"currency": "usd",
"allowance": {
"used": 0,
"included": null,
"remaining": null,
"resets_at": null
},
"spend_limit": 20000,
"unit_amount": 2000,
"charge_class": "test",
"confirmed_by": null,
"month_to_date": 0
},
"reissue_of": null,
"anchor_pending": false,
"created_at": "2026-11-26T00:17:32.496Z"
}
Response fields
| Field | Type | Description |
|---|---|---|
object |
string | |
id |
string | |
type |
string | |
status |
string | processing, requested, in_review, issued or failed. |
livemode |
boolean | |
record_ids |
array of string | |
record_count |
integer | |
issued_at |
datetime | |
requested_by |
object | |
reference |
string | |
wording |
array of string | |
capture_mode |
string | |
chronology |
object | |
intervals_ms |
object | |
verification |
object | |
certificate_hash |
string | |
seal |
object | { receipt, ledger, ledger_seq, timestamp_token }. ledger is the certificate's full ledger entry, which the offline verifier recomputes. |
pdf_url |
string | |
json_url |
string | |
share |
object | The active share link { id, expires_at, opens, last_opened_at }, or null. Its url is included only in the response of the request that created the link. |
share_url |
string | Same value as share.url. Only in the response that created the link. |
share_expires_at |
datetime | Same value as share.expires_at. Only in the response that created the link. |
billing |
object | { charge_class, units, unit_amount, amount, currency, allowance, month_to_date, spend_limit, confirmed_by }. |
Errors
| Code | HTTP | When |
|---|---|---|
invalid_request |
400 | 400: filter is missing or names none of the selectors, or it matches no records. |
jurisdiction_unknown |
400 | A pack code on a profile, a session, a dry run or a certificate wording is not in the catalogue. |
plan_feature_unavailable |
403 | 403: a certificate for live records was requested on the Free plan. |
not_found |
404 | No object with that ID exists in this domain and environment. |
record_not_timestamped |
409 | A certificate was requested for a record whose external timestamp is not attached yet. |
certificate_set_too_large |
422 | 422: the set is over the plan's limit. The error carries record_count and limit. |
certificate_field_unavailable |
422 | A certificate request asks to include a field that was not captured, for example include: ["network"] for a record made under EU minimal capture. |
quota_exceeded |
402 | An evidence report, an evidence package or a certificate was requested for a record that was locked under the earlier Starter quota rule. |
certificate_charge_unconfirmed |
402 | A certificate request would incur a charge and did not carry confirm_charge: true. |
certificate_spend_limit_reached |
402 | The charge would pass the domain's monthly certificate spend limit ($200 by default). |
payment_method_required |
402 | A charge would result and the domain has no valid payment method on file, or an earlier certificate invoice is unpaid. |
rate_limit_exceeded |
429 | 429: five set certificates are already being prepared for this domain. Retry after the interval in Retry-After. |
certificate_verification_failed |
503 | An integrity check failed while a certificate was being prepared. |
Like every call made with a secret key, it can also return missing_api_key, invalid_api_key, domain_not_verified, insufficient_permission, idempotency_conflict, region_mismatch and internal_error.
Every error has the same body: error.type, error.code, error.message, error.doc_url and error.request_id. See Errors.
Questions about POST /v1/certificates
Which credential does POST /v1/certificates need?
A secret key with full_access permission. Send it as a Bearer token in the Authorization header, from your server only. A session client token is refused with insufficient_permission.
Does POST /v1/certificates work with a test key?
Yes. It works with test keys and live keys. A test key reads and writes test objects only, and a live key works once the domain is verified.
Does POST /v1/certificates count as a signature event?
No. A signature event is counted when a live record is written, by completing a session or by submitting a deferred acceptance. This call writes no record.
Is POST /v1/certificates idempotent?
Yes, with an Idempotency-Key header of up to 255 characters. A repeat with the same key and the same bytes in the body returns the original response, with the header Idempotent-Replayed: true. The same key with a different body answers 409 idempotency_conflict.
What is the rate limit for POST /v1/certificates?
The limit is counted for each key and depends on the plan: 2 requests per second on Free, 10 on Starter, 50 on Unlimited and 100 on Enterprise. Past the limit the API answers 429 rate_limit_exceeded with a Retry-After header.
Does the Node SDK have a method for POST /v1/certificates?
Yes: esc.certificates.create() in the esigncomply package. It resolves to { data, error } and does not throw.
Related
- Certificates: the overview of the resource and all of its operations.
- Quote a certificate:
POST /v1/certificates/quote - List certificates:
GET /v1/certificates - Retrieve a certificate:
GET /v1/certificates/{id} - Download a certificate as PDF:
GET /v1/certificates/{id}/pdf - Certificates
- Errors: every error code, with what to do.
- API conventions: authentication, idempotency, rate limits and versioning.
Last updated · API version 2026-11-21