Skip to content
DocsMenu

Create a supplement

View as Markdown

Open this page inChatGPTClaudeCursor

In the Esign Comply API, POST /v1/supplements seals text, JSON or files you supply about a record, session, signer, document version or domain and returns the supplement. Call it from your server to put on file what happened outside the signing flow, such as a renewal reminder.

POST /v1/supplements · API version 2026-11-21

Authentication

Send a secret key in the Authorization header: Bearer $ESIGNCOMPLY_API_KEY. The key needs full_access or recording_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/supplements \
  -H "Authorization: Bearer $ESIGNCOMPLY_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: renewal-notice-user_7c1d-2027-01" \
  -d '{
    "subject": {
      "record": "rec_Z4m8"
    },
    "type": "notice.sent",
    "occurred_at": "2027-01-04T15:02:11Z",
    "text": "Annual renewal reminder emailed to the address on the account. Template v7.",
    "data": {
      "notice_kind": "renewal_reminder",
      "channel": "email",
      "template": "renewal-v7",
      "provider_message_id": "0100018d-3f2a"
    },
    "files": [
      "fil_dZ8g"
    ],
    "labels": [
      "renewal",
      "2027"
    ]
  }'

Node SDK

import { EsignComply } from "esigncomply";

const esc = new EsignComply(process.env.ESIGNCOMPLY_API_KEY);

const { data, error } = await esc.supplements.create(
  {
    subject: { record: "rec_Z4m8" },
    type: "notice.sent",
    occurred_at: "2027-01-04T15:02:11Z",
    text: "Annual renewal reminder emailed to the address on the account. Template v7.",
    data: {
      notice_kind: "renewal_reminder",
      channel: "email",
      template: "renewal-v7",
      provider_message_id: "0100018d-3f2a",
    },
    files: ["fil_dZ8g"],
    labels: ["renewal", "2027"],
  },
  { idempotencyKey: "renewal-notice-user_7c1d-2027-01" },
);

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

Idempotent with Idempotency-Key: a repeat with the same key and body returns the same supplement and adds no ledger entry. The request body is limited to 600 KB.

At least one of text, data or files is required. Nothing else is.

Parameters

Body fields

Field Type Required Description
subject object No Exactly one of record, session, signer (your external ID), document_version or domain. Omitted means the domain as a whole. A supplement on a completed session is attached to its record.
type string No A name from the type catalogue or any custom.<slug>. Unknown names are stored with type_recognized: false. Up to 80 characters.
occurred_at timestamp No When you say the thing happened. Asserted by you, never verified.
rule_ids string[] No Up to 20 rule IDs the material relates to, for example NY-05. An unknown ID is kept and returns the warning rule_unknown:<id>.
text string One of three UTF-8 text, up to 20,000 characters.
data any JSON One of three Any JSON value, up to 256 KB. Unknown fields inside it are kept as sent.
files string[] One of three Up to 10 file IDs from POST /v1/files. Each file must be uploaded and may belong to one supplement only.
labels string[] No Up to 20 strings for your own filtering.
supersedes string No ID of an earlier supplement this one corrects. Both stay visible.

Free-form material with no type and no structure is equally valid:

{ "subject": { "signer": "user_7c1d" }, "text": "Customer called support on March 3 to cancel. Agent: J. Ortiz. Ticket 55120." }

Headers: Idempotency-Key (optional, up to 255 characters) and Esign-Comply-Version (optional, a dated API version). See API conventions.

Response

201 Created with a Supplement object.

{
  "object": "supplement",
  "id": "sup_5Hc1",
  "livemode": false,
  "subject": {
    "record": "rec_Z4m8"
  },
  "type": "notice.sent",
  "type_recognized": true,
  "provenance": "customer_supplied",
  "occurred_at": "2027-01-04T15:02:11.000Z",
  "received_at": "2026-11-26T00:16:55.721Z",
  "gap_seconds": -3422715,
  "rule_ids": [],
  "labels": [
    "renewal",
    "2027"
  ],
  "content_hash": "sha256:6ef213d9...",
  "size": 426,
  "has_text": true,
  "has_data": true,
  "files": [
    {
      "id": "fil_dZ8g",
      "name": "renewal-notice.eml",
      "size": 237,
      "sha256": "sha256:f96e3ce7...",
      "status": "stored"
    }
  ],
  "supersedes": null,
  "withdrawn": false,
  "withdrawn_at": null,
  "submitted_by": "key:key_Doqa",
  "seal": {
    "receipt": "eyJhbGciOiJFUzI1NiIsImtp...",
    "ledger_seq": 9,
    "status": "recorded"
  },
  "note": "Esign Comply received and sealed this material at the time shown and did not verify it.",
  "warnings": [
    "suggested_field_absent:recipient_ref",
    "suggested_field_absent:content_sha256"
  ]
}

Response fields

Field Type Description
object string
id string
livemode boolean
subject object
type string
type_recognized boolean
provenance string Always "customer_supplied".
occurred_at datetime Asserted by the customer.
received_at datetime Esign Comply server time.
content_hash string
files array
seal object
rule_ids array of string
labels array of string
supersedes string
withdrawn boolean
warnings array of string

Errors

Code HTTP When
invalid_request 400 None of text, data, files was sent; subject holds more than one key; data is over 256 KB; a file is still pending, already belongs to another supplement, or the record already has 200 supplements (10,000 for domain-level supplements).
subject_not_found 404 The record, session, signer, document version, file or superseded supplement does not exist in this domain and environment.
file_type_refused 422 A referenced file was rejected.
file_hash_mismatch 422 The bytes stored at the file's upload_url do not match the sha256 declared in POST /v1/files.
insufficient_permission 403 A read_only key cannot create supplements.

Like every call made with a secret key, it can also return missing_api_key, invalid_api_key, domain_not_verified, idempotency_conflict, region_mismatch, rate_limit_exceeded 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/supplements

Which credential does POST /v1/supplements need?

A secret key with full_access or recording_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/supplements 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/supplements 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/supplements 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/supplements?

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/supplements?

Yes: esc.supplements.create() in the esigncomply package. It resolves to { data, error } and does not throw.

Last updated · API version 2026-11-21