# Append a ceremony event

> POST /v1/sessions/{id}/events appends one event to a signing session, such as a document presented or intent captured, and returns its conformance result.

Source: https://esigncomply.com/docs/api/sessions/append-a-ceremony-event

Last updated November 26, 2026

In the Esign Comply API, `POST /v1/sessions/{id}/events` appends one event to a signing session, such as a document presented or intent captured, and returns its conformance result. The browser SDK calls it for every step of the signing flow; call it yourself only for a `server_only` session.

`POST /v1/sessions/{id}/events` · API version `2026-11-21`

## Authentication

Send the client token of the session (`esc_ct_...`) or a secret key with `full_access` or `recording_access` permission, in the `Authorization` header: `Bearer $CLIENT_TOKEN` or `Bearer $ESIGNCOMPLY_API_KEY`. A client token works for its own session only, from a page inside the registered domain (live) or on the test allowlist (test). A secret key is used from your server only. Test and live credentials both work.

## Request example

### cURL

```bash
curl https://esigncomply.com/v1/sessions/ses_5nWq/events \
  -H "Authorization: Bearer $CLIENT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "document.presented",
    "version_id": "dv_3kT9",
    "client_time": "2026-11-26T00:16:12.264Z",
    "data": {
      "mode": "hyperlink",
      "link_text": "Terms of Service",
      "link_visible": true,
      "link_style": {
        "underlined": true,
        "contrast_ratio": 7.2,
        "font_px": 14
      },
      "link_target_render_hash": "sha256:56dbea58ea77c0ea7094f842ed9dcaf3b72463fcd7bf4586345dd46231cf076a",
      "viewport": {
        "width": 390,
        "height": 844
      }
    }
  }'
```

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

A secret key is accepted only for a session created with `capture_mode: "server_only"`.

The browser SDK calls this for every step. Events are append-only, strictly ordered by `sequence`, and chained by hash. Each event is stored with Esign Comply's server receipt time. Any client-reported time is kept separately.

## Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `id` | path | string | Yes | ID of the session. |

### Body fields

| Field | Type | Required | Description |
|---|---|---|---|
| `type` | string | Yes | One of the event types below. Any other value returns `400 invalid_request`. |
| `version_id` | string | For `document.presented` | The pinned version this event is about. |
| `client_time` | string | No | The browser's clock, RFC 3339 with offset. Reported, not verified. |
| `data` | object, up to 256 KB | No | Event payload. See "Event data". |

Headers: `Idempotency-Key` (optional, up to 255 characters) and `Esign-Comply-Version` (optional, a dated API version). See [API conventions](https://esigncomply.com/docs/api.md).

## Response

`201 Created` with an Event object.

```json
{
  "object": "event",
  "id": "evt_Rtbw",
  "type": "document.presented",
  "tag": "observed",
  "server_time": "2026-11-26T00:16:12.372Z",
  "sequence": 3,
  "conformance": {
    "status": "pass",
    "rules_version": "2026.11.2",
    "findings": [
      {
        "rule": "CR-08",
        "status": "pass",
        "state": "enforce",
        "message": "The link resolves to the registered version.",
        "measurement": {
          "mode": "hyperlink",
          "link_href": null,
          "link_target_render_hash": "sha256:56dbea58...",
          "render_hash_registered": "sha256:56dbea58...",
          "target_checked": true
        },
        "maps_to": [
          "US-02",
          "US-14"
        ],
        "event_type": "document.presented",
        "version_id": "dv_3kT9"
      },
      {
        "rule": "CR-05",
        "status": "pass",
        "state": "enforce",
        "message": "Document link differs from surrounding text by colour.",
        "measurement": {
          "contrast_ratio": 7.2,
          "underlined": true,
          "font_px": 14,
          "link_visible": true
        },
        "maps_to": [
          "US-11"
        ],
        "event_type": "document.presented",
        "version_id": "dv_3kT9"
      }
    ]
  },
  "remaining_steps": [
    "document.presented:dv_Lm02",
    "notice.captured",
    "intent.captured",
    "signature.applied"
  ],
  "session_status": "in_progress"
}
```

### Response fields

| Field | Type | Description |
|---|---|---|
| `object` | string |  |
| `id` | string |  |
| `type` | string |  |
| `tag` | string | observed or asserted. |
| `server_time` | datetime |  |
| `sequence` | integer |  |
| `conformance` | object | { status, rules_version, findings[] }. |
| `remaining_steps` | array of string |  |
| `session_status` | string |  |

## Event types

| `type` | Step it satisfies | Tag | SDK method |
|---|---|---|---|
| `client.attached` | `client.attached` | observed | `EsignComply.attach` |
| `disclosure.presented` | `disclosure.presented` | observed | `presentDisclosure` |
| `access.demonstrated` | `access.demonstrated` | observed | `demonstrateAccess` |
| `econsent.given` | `econsent.given` | observed | `giveEConsent` |
| `document.presented` | `document.presented:<version_id>` | observed | `presentDocument` |
| `notice.captured` | `notice.captured` | observed | `observeAssent` |
| `intent.captured` | `intent.captured` | observed | `observeAssent`, on the signer's action |
| `review.presented` | `review.presented` | observed | `reviewPresented` |
| `language.selected` | Optional event | observed | `languageSelected` |
| `renewal_terms.presented` | `renewal_terms.presented` | observed | `renewalTerms` |
| `renewal.consent_given` | `renewal_consent.captured` | observed | `renewalConsent` |
| `electronic_agreement.given` | `electronic_agreement.captured` | observed | `electronicAgreement` |
| `sensitive_capture.consent_given` | `sensitive_capture_consent.captured` | observed | `sensitiveCaptureConsent` |
| `acknowledgment.given` | `acknowledgment.captured` | observed | `acknowledge` |
| `signer.age_attested` | Optional event | asserted | `ageAttested` |
| `billing.confirm` | Optional event | asserted | `billingConfirm` |
| `withdrawal.submitted` | Optional event | asserted | Sent by your page |
| `copy.delivered` | Optional event | asserted | Sent by your page |

The four `asserted` types are statements, not observations, so they are tagged asserted even on the direct browser channel. In a `server_only` session every event is tagged asserted. `session.created`, `identity.verified` and `signature.applied` are produced by Esign Comply and are not accepted here.

## Order

- In a `direct` session, `client.attached` must be recorded before anything else.
- `access.demonstrated` needs `disclosure.presented`. `econsent.given` needs both.
- `renewal.consent_given` needs `renewal_terms.presented`.
- `intent.captured` needs every step the session requires from this list: `client.attached`, `disclosure.presented`, `access.demonstrated`, `econsent.given`, each `document.presented:<version_id>`, `notice.captured`, `renewal_terms.presented`.

An out-of-order event returns [`step_out_of_order`](https://esigncomply.com/docs/api/errors.md#step_out_of_order) with `missing_steps`, the steps to record first.

## Event data

`data` is an open object. These are the fields the conformance checks read. The SDK fills them from the elements you pass.

| Event | Fields in `data` |
|---|---|
| `client.attached` | `sdk_version`, `page_url`, `viewport { width, height }`, `language`, `timezone` |
| `document.presented` | `mode` (`hyperlink`, `inline`, `scrollbox`), `language`, `downloadable`, `printable`. For `hyperlink`: `link_text`, `link_href`, `link_href_within_domain`, `link_visible`, `link_opened`, `link_style { underlined, contrast_ratio, font_px }`, `link_target_render_hash`. For `inline` and `scrollbox`: `render_hash` of the text found in the container. |
| `notice.captured` | `text`, `html`, `styles { font_px, body_font_px, contrast_ratio }`, `layout { same_viewport, notice_above_action, notice_to_action_px, viewport }`, `controls { primary_buttons, competing_controls, checkbox { initial_checked, label_text }, typed { initial_empty }, submit { label } }`, `links[]`, `slots {}` (values for `required_strings` slots) |
| `intent.captured` | `control` (`checkbox`, `button`, `typed`, `drawn`), `label_text`, `button_text`, `initial_state` (`unchecked` or `empty`), `trusted` (the change came from a real user event), `typed_name` |
| `econsent.given`, `renewal.consent_given`, `electronic_agreement.given`, `sensitive_capture.consent_given`, `acknowledgment.given` | `control`, `label_text`, `initial_state`, `trusted`, `separate_from_terms` |
| `renewal_terms.presented` | `text`, `elements { renewal_term, price, cancellation_policy, cancel_path }`, `proximity_px`, `same_container`, `styles { font_px, surrounding_font_px, font_weight, contrast_ratio, set_off }` |
| `review.presented` | `text_hash`, `correctable` |
| `language.selected` | `language` |
| `access.demonstrated` | `code` (compared with the sample, then replaced by `matched: true`) |

What is stored:

- Keystrokes are never stored, only the submitted name.
- Drawn strokes are stored only when drawn capture is switched on for the domain.
- In minimal capture, `html`, `styles`, `layout`, `link_style`, `viewport`, `timezone` and other optional device fields are dropped, and the IP address and user agent are not kept.

## Conformance result

Every event returns a conformance result. `conformance.status` is the strongest status among the findings: `pass`, `warn` or `block`.

| Finding field | Description |
|---|---|
| `rule` | Conformance rule ID, `CR-01` to `CR-28`. See [Conformance](https://esigncomply.com/docs/conformance.md). |
| `status` | `pass`, `warn` or `block`. |
| `state` | What a `block` result does to a live signature. `enforce`: it is refused before it is sealed. `advise`: it is recorded and the finding is reported to you. A live session set to `notify` runs every check in `advise`. |
| `message`, `fix` | What was measured and a plain-language repair for the page. |
| `measurement` | The numbers and flags behind the result. Measurements are sealed in the record as facts. |
| `maps_to[]` | Pack rules that fired for this session and are implemented by this check. |

In test mode the response lists every finding, including passes, and nothing blocks. In live mode it lists only findings that did not pass. By default a live signature with a `block` finding is recorded, and you are told at once which rule failed and what to fix. With blocking on, a finding with `status: "block"` and `state: "enforce"` stops completion. A finding marked `block` or `warn` names the rule your screen missed and the fix. See [When a live signature fails a rule](https://esigncomply.com/docs/conformance.md#enforcement).

## Errors

| Code | HTTP | When |
|---|---|---|
| [`invalid_request`](https://esigncomply.com/docs/api/errors.md#invalid_request) | 400 | Unknown `type`, `document.presented` without a `version_id` of this session, or `data` over 256 KB. Truncate a notice snapshot to the assent region. |
| [`client_token_expired`](https://esigncomply.com/docs/api/errors.md#client_token_expired) | 401 | The token or the session has expired. Create a new session and attach again. |
| [`insufficient_permission`](https://esigncomply.com/docs/api/errors.md#insufficient_permission) | 403 | A secret key was used on a `direct` session. |
| [`not_found`](https://esigncomply.com/docs/api/errors.md#not_found) | 404 | No object with that ID exists in this domain and environment. |
| [`step_out_of_order`](https://esigncomply.com/docs/api/errors.md#step_out_of_order) | 409 | A prerequisite step is missing. `missing_steps` lists it. |
| [`session_not_active`](https://esigncomply.com/docs/api/errors.md#session_not_active) | 409 | The session is completed or cancelled. |
| [`render_mismatch`](https://esigncomply.com/docs/api/errors.md#render_mismatch) | 422 | Live mode with blocking on: the text on the page, or behind the link, does not match the registered version and CR-08 is enforced. The error carries `rule: "CR-08"`, `findings` and `event_id`. The event itself is kept as evidence of what the page presented. |
| [`verification_failed`](https://esigncomply.com/docs/api/errors.md#verification_failed) | 422 | `access.demonstrated` with a code that does not match the sample. |
| [`domain_mismatch`](https://esigncomply.com/docs/api/errors.md#domain_mismatch) | 403 | The `Origin` is outside the registered domain or the test allowlist. Live calls with no `Origin` are refused. |
| [`rate_limit_exceeded`](https://esigncomply.com/docs/api/errors.md#rate_limit_exceeded) | 429 | More than 240 client-token calls in a minute on this session. |

Like every call made with a client token or a secret key, it can also return [`missing_api_key`](https://esigncomply.com/docs/api/errors.md#missing_api_key), [`invalid_api_key`](https://esigncomply.com/docs/api/errors.md#invalid_api_key), [`domain_not_verified`](https://esigncomply.com/docs/api/errors.md#domain_not_verified), [`idempotency_conflict`](https://esigncomply.com/docs/api/errors.md#idempotency_conflict), [`region_mismatch`](https://esigncomply.com/docs/api/errors.md#region_mismatch) and [`internal_error`](https://esigncomply.com/docs/api/errors.md#internal_error).

Every error has the same body: `error.type`, `error.code`, `error.message`, `error.doc_url` and `error.request_id`. See [Errors](https://esigncomply.com/docs/api/errors.md).

## Questions about POST /v1/sessions/{id}/events

### Which credential does POST /v1/sessions/{id}/events need?

The client token of the session, or a secret key with full_access or recording_access permission. Send either one as a Bearer token in the Authorization header. A client token works for its own session only.

### Does POST /v1/sessions/{id}/events work with a test key?

Yes. It works in test mode and in live mode. A client token carries the mode of the key that created its session.

### Does POST /v1/sessions/{id}/events 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/sessions/{id}/events 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/sessions/{id}/events?

With a client token, 240 calls per minute for each session. With a secret key, the plan's limit for each key: 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/sessions/{id}/events?

No. Call it over HTTP, or with esc.request() in the esigncomply package, which sends the key and returns { data, error }.

## Related

- [Sessions](https://esigncomply.com/docs/api/sessions.md): the overview of the resource and all of its operations.
- [Get the access sample](https://esigncomply.com/docs/api/sessions/get-the-access-sample.md): `GET /v1/sessions/{id}/access-sample`
- [Start a verification](https://esigncomply.com/docs/api/sessions/start-a-verification.md): `POST /v1/sessions/{id}/verifications`
- [Confirm a verification](https://esigncomply.com/docs/api/sessions/confirm-a-verification.md): `POST /v1/sessions/{id}/verifications/{ver_id}/confirm`
- [Complete a session](https://esigncomply.com/docs/api/sessions/complete-a-session.md): `POST /v1/sessions/{id}/complete`
- [Quickstart](https://esigncomply.com/docs/quickstart.md)
- [Browser SDK](https://esigncomply.com/docs/sdk/browser.md)
- [Errors](https://esigncomply.com/docs/api/errors.md): every error code, with what to do.
- [API conventions](https://esigncomply.com/docs/api.md): authentication, idempotency, rate limits and versioning.
