# Complete a session

> Complete a session: POST /v1/sessions/{id}/complete applies the signing act, seals the session into a record and returns the record with its signed receipt.

Source: https://esigncomply.com/docs/api/sessions/complete-a-session

Last updated November 26, 2026

In the Esign Comply API, `POST /v1/sessions/{id}/complete` applies the signing act, seals the session into a record and returns the record with its signed receipt. The browser SDK calls it when the signer signs, and your server then confirms the record before granting access.

`POST /v1/sessions/{id}/complete` · 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/complete \
  -H "Authorization: Bearer $CLIENT_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: ses_5nWq-complete" \
  -d '{
    "signature": {
      "method": "checkbox",
      "label_text": "I agree to the Terms of Service and Privacy Notice",
      "button_text": "Create account"
    },
    "client_time": "2026-11-26T00:16:13.519Z"
  }'
```

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 `server_only` session.

Applies the signing act. The API records the final `signature.applied` event, runs the whole-ceremony conformance checks, writes the record durably, signs the receipt, and returns both.

## Parameters

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

### Body fields

| Field | Type | Required | Description |
|---|---|---|---|
| `signature.method` | string | No | `click`, `checkbox`, `typed`, `drawn` or `passkey`. Defaults to the control recorded with `intent.captured`, then to the profile's method. |
| `signature.label_text` | string | No | Exact label of the assent control. Defaults to the recorded intent. |
| `signature.button_text` | string | No | Exact text of the action button. Defaults to the recorded intent or notice. |
| `signature.typed_name` | string | For typed-name signatures | The name the signer typed, when it was not already recorded with `intent.captured`. |
| `client_time` | string | No | The browser's clock. Reported, not verified. |

A live signature that failed a rule on a domain set to `notify` is sealed all the same, and the response says which rule:

```json
{
  "object": "record",
  "id": "rec_4ZUj",
  "livemode": true,
  "status": "recorded",
  "advisories": [
    { "rule": "CR-01", "status": "block", "finding": "The checkbox control was checked when the page loaded.", "notice": null }
  ],
  "conformance": {
    "advisory": true,
    "rules_version": "2026.11.2",
    "enforcement": "notify",
    "findings": [],
    "reported": [
      {
        "rule": "CR-01",
        "status": "block",
        "state": "advise",
        "message": "The checkbox control was checked when the page loaded.",
        "fix": "Render every checkbox unchecked and every typed-name field empty. Never prefill or pre-check an assent control.",
        "maps_to": ["US-08"]
      }
    ]
  }
}
```

Only the fields that differ are shown.

| Field | Description |
|---|---|
| `status` | `recorded` when the receipt is signed. `pending_seal` in the rare case the signing key service could not be reached: the record is committed, `receipt` is null, and the receipt is signed within 60 seconds. |
| `signed_at` | Esign Comply's server receipt time of the final event. It is not an independently verified act time. |
| `signature_level` | `simple` for L1 to L3 signing. `not_applicable` where signing intent is not evidenced, for example a privacy-notice acknowledgment. |
| `receipt` | Compact signed token (JWS, ES256). Store it next to your own acceptance row. |
| `seal` | The external timestamp and the public anchor follow asynchronously. Watch `record.timestamped` and `record.anchored`, or read the record. A test record gets no public anchor and no `record.anchored` event: see [Record statuses](https://esigncomply.com/docs/api/records.md#record-statuses). |
| `advisories[]` | Checks in the advise state that were evaluated and not met: `rule`, `status` (`warn` or `block`), `finding`, `notice`. Never a reason to refuse sealing. |
| `conformance.enforcement` | The mode the session ran under: `notify` or `block` in live mode, `null` in test mode. |
| `conformance.findings[]` | The checks judged on the signing act itself. Test mode returns every result, live mode the ones that did not pass. |
| `conformance.reported[]` | Live mode: every finding at `block` level this record was sealed with, from any step of the ceremony, each with its `fix`. The same list is sent as the [`conformance.finding_reported`](https://esigncomply.com/docs/api/webhooks.md#conformance-finding-reported) webhook, and owners and admins get an email. Empty when nothing failed, and in test mode. |
| `quota_locked` | `true` only on a record that was locked under the earlier Starter quota rule. Records sealed now are not locked, so the value is `false`. |

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 a Record object.

```json
{
  "object": "record",
  "id": "rec_Z4m8",
  "livemode": false,
  "status": "recorded",
  "signed_at": "2026-11-26T00:16:14.024Z",
  "signature_level": "simple",
  "assurance_level": "L1",
  "capture_mode": "direct",
  "signer": {
    "external_id": "user_7c1d",
    "email": "dana@example.org",
    "name": "Dana Whitfield"
  },
  "documents": [
    {
      "version_id": "dv_3kT9",
      "content_hash": "sha256:4e712fcc..."
    },
    {
      "version_id": "dv_Lm02",
      "content_hash": "sha256:8499061f..."
    }
  ],
  "record_hash": "sha256:24ccd731...",
  "receipt": "eyJhbGciOiJFUzI1NiIsImtp...",
  "verify_url": "https://esigncomply.com/verify/rec_Z4m8",
  "seal": {
    "ledger_seq": 1,
    "timestamp": "pending",
    "anchor": "pending"
  },
  "guidance_release": "2026.11.2",
  "advisories": [],
  "conformance": {
    "advisory": true,
    "rules_version": "2026.11.2",
    "enforcement": null,
    "findings": [
      {
        "rule": "CR-09",
        "status": "pass",
        "state": "enforce",
        "message": "The signature method fits the context.",
        "measurement": {
          "method": "checkbox",
          "profile_kind": "acceptance",
          "purpose": "account_signup",
          "signer_class": "consumer"
        },
        "maps_to": [
          "US-17",
          "CA-05"
        ],
        "event_type": "signature.applied"
      }
    ],
    "reported": []
  },
  "quota_locked": false
}
```

### Response fields

| Field | Type | Description |
|---|---|---|
| `object` | string |  |
| `id` | string |  |
| `livemode` | boolean |  |
| `status` | string | pending_seal, recorded, timestamped, anchored, disputed or voided. A live record is anchored when a public anchor covers its checkpoint; a test record when its test checkpoint is signed. |
| `signed_at` | datetime | Server receipt time of the final event. |
| `signature_level` | string | simple or not_applicable for the base product. |
| `assurance_level` | string |  |
| `capture_mode` | string |  |
| `signer` | object |  |
| `documents` | array |  |
| `record_hash` | string |  |
| `receipt` | string | Compact JWS. null while pending_seal. |
| `verify_url` | string |  |
| `seal` | object | The ledger position, the timestamp, the checkpoint and the public anchor. anchor is pending on every test record: test checkpoints are not anchored publicly. |
| `organization` | object |  |
| `domain` | string |  |
| `profile` | object |  |
| `jurisdictions` | object |  |
| `events` | array |  |
| `notice` | object |  |
| `signature` | object |  |
| `context` | object |  |
| `metadata` | object |  |
| `conformance` | object | Advisory. Stored beside the record and outside the sealed hash. On the completion response: { advisory, rules_version, enforcement, findings[], reported[] }, where reported[] lists every block finding a live record was sealed with. |
| `advisories` | array | Checks in the advise state that were not met: { rule, status, finding, notice }. |
| `copy_delivery` | object |  |
| `annotations` | array |  |
| `supplements` | array |  |
| `certificates` | array |  |
| `guidance_release` | string |  |
| `api_version` | string |  |
| `quota_locked` | boolean |  |

## Rules

- **Required steps.** Completion fails with `422 steps_incomplete` if any required step is absent. The error carries `missing_steps`, taken from the session's `required_steps`.
- **Durable before the response.** The record is written and the receipt is signed before the response returns, except for `pending_seal` as described above. `record.completed` fires only once the receipt exists. The external timestamp, the signed checkpoint and the public anchors complete asynchronously.
- **Do not trust this response on your server.** It is delivered to the browser. Before granting access, confirm through the `record.completed` webhook or `GET /v1/records/{id}` with a secret key: check that `status` is `recorded`, `timestamped` or `anchored`, that `livemode` is as expected, and that the signer and document versions match server-owned state. See [Server confirmation](https://esigncomply.com/docs/guides/server-confirmation.md).
- **Quota never blocks completion** of a session that has been created.
- **A failed rule.** By default a live signature that fails a rule is recorded: the response is `201` and `conformance.reported[]` names the rule and the fix. With blocking on it is refused before it is sealed: `422 conformance_failed`, no record, and the session stays open so the signer can sign again once the page is repaired. See [When a live signature fails a rule](https://esigncomply.com/docs/conformance.md#enforcement).
- **Idempotent replay.** A repeat with the same `Idempotency-Key` and body returns the original record with the header `Idempotent-Replayed: true`. A second completion without the key returns `409 session_not_active` with the `record_id` of the existing record.

## Errors

| Code | HTTP | When |
|---|---|---|
| [`invalid_request`](https://esigncomply.com/docs/api/errors.md#invalid_request) | 400 | The request is malformed: the body is not valid JSON, a known field has the wrong type, a required field is missing, a value is out of range, or a limit was passed (for example `metadata` over 50 keys, `context.extra` over 16 KB, event `data` over 256 KB, an `Idempotency-Key` over 255 characters, an unknown `Esign-Comply-Version`). |
| [`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. |
| [`session_not_active`](https://esigncomply.com/docs/api/errors.md#session_not_active) | 409 | The session is already completed (the error carries `record_id`) or cancelled. |
| [`steps_incomplete`](https://esigncomply.com/docs/api/errors.md#steps_incomplete) | 422 | A required step is missing, or a typed-name signature has no typed name (`param: "signature.typed_name"`). |
| [`conformance_failed`](https://esigncomply.com/docs/api/errors.md#conformance_failed) | 422 | Live mode with blocking on: an adopted blocking rule failed, and nothing was sealed. `rule` names it and `findings` carry the measurement and the fix. |
| [`internal_error`](https://esigncomply.com/docs/api/errors.md#internal_error) | 500 | Retry with the same `Idempotency-Key`. Never proceed without a record. If the outcome is unknown, read `record_id` from `GET /v1/sessions/{id}` before asking the signer to act again. |

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), [`domain_mismatch`](https://esigncomply.com/docs/api/errors.md#domain_mismatch), [`idempotency_conflict`](https://esigncomply.com/docs/api/errors.md#idempotency_conflict), [`region_mismatch`](https://esigncomply.com/docs/api/errors.md#region_mismatch) and [`rate_limit_exceeded`](https://esigncomply.com/docs/api/errors.md#rate_limit_exceeded).

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}/complete

### Which credential does POST /v1/sessions/{id}/complete 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}/complete 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}/complete count as a signature event?

Yes, in live mode. Each live record this call makes is one signature event, however many documents the record covers. In test mode the record counts as one test event.

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

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}/complete?

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.
- [Cancel a session](https://esigncomply.com/docs/api/sessions/cancel-a-session.md): `POST /v1/sessions/{id}/cancel`
- [Create a session](https://esigncomply.com/docs/api/sessions/create-a-session.md): `POST /v1/sessions`
- [Retrieve a session](https://esigncomply.com/docs/api/sessions/retrieve-a-session.md): `GET /v1/sessions/{id}`
- [Append a ceremony event](https://esigncomply.com/docs/api/sessions/append-a-ceremony-event.md): `POST /v1/sessions/{id}/events`
- [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.
