# Withdraw consent to electronic records

> Withdraw consent to electronic records with POST /v1/signers/{external_id}/consents/withdraw: parameters, a tested request, the response and every error.

Source: https://esigncomply.com/docs/api/signers/withdraw-consent-to-electronic-records

Last updated November 26, 2026

In the Esign Comply API, `POST /v1/signers/{external_id}/consents/withdraw` records that a signer withdrew consent to electronic records by adding a `consent_withdrawn` annotation to one of their records. Call it when a withdrawal reaches you through your own channels, such as support or account settings.

`POST /v1/signers/{external_id}/consents/withdraw` · 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](https://esigncomply.com/docs/api.md#authentication).

## Request example

### cURL

```bash
curl https://esigncomply.com/v1/signers/user_7c1d/consents/withdraw \
  -H "Authorization: Bearer $ESIGNCOMPLY_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: withdraw-user_7c1d-2027-01-04" \
  -d '{
    "note": "Requested by phone on 2027-01-04. Ticket 55120."
  }'
```

### Node SDK

```ts
import { EsignComply } from "esigncomply";

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

const { data, error } = await esc.signers.withdrawConsent(
  "user_7c1d",
  { note: "Requested by phone on 2027-01-04. Ticket 55120." },
  { idempotencyKey: "withdraw-user_7c1d-2027-01-04" },
);
```

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`](https://esigncomply.com/docs/api/errors.md#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

Records that a consumer withdrew consent to receive records electronically. Call it when the withdrawal reaches you through your own channels, such as support or account settings. Signers can also withdraw themselves from the link in every receipt.

Esign Comply adds a `consent_withdrawn` annotation to a record of that signer, timestamps it, and sends the `consent.withdrawn` webhook. Withdrawal is prospective only: earlier records remain. What you do after a withdrawal, such as switching the person to paper delivery, is your responsibility. See the [consumer consent guide](https://esigncomply.com/docs/guides/consumer-econsent.md).

## Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `external_id` | path | string | Yes | Your own ID for the signer: the signer.external_id of its sessions. |

### Body fields

| Field | Type | Required | Description |
|---|---|---|---|
| `record_id` | string | No | The record to attach the withdrawal to. It must belong to this signer. Default: the signer's latest record in which electronic-records consent was given, otherwise the latest record. |
| `scope` | string, up to 64 characters | No | What the withdrawal covers. Default `electronic_records`. |
| `note` | string, up to 2,000 characters | No | Free text, for example how the request arrived. |

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 ConsentWithdrawal object.

```json
{
  "object": "consent_withdrawal",
  "signer": "user_7c1d",
  "record_id": "rec_Z4m8",
  "annotation_id": "ann_Jir0",
  "recorded_at": "2026-11-26T00:17:38.337Z"
}
```

### Response fields

| Field | Type | Description |
|---|---|---|
| `object` | string |  |
| `signer` | string | The signer's external ID. |
| `record_id` | string |  |
| `annotation_id` | string |  |
| `recorded_at` | datetime |  |

## 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`). |
| [`not_found`](https://esigncomply.com/docs/api/errors.md#not_found) | 404 | No session has named this external ID in this domain and environment, so there is no such signer. Also when `record_id` is not one of the signer's records. |
| [`subject_not_found`](https://esigncomply.com/docs/api/errors.md#subject_not_found) | 404 | The signer exists, because a session named them, and has no completed record yet: there is nothing to attach the withdrawal to. |
| [`insufficient_permission`](https://esigncomply.com/docs/api/errors.md#insufficient_permission) | 403 | The key does not have `full_access`. |

Like every call made with 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), [`rate_limit_exceeded`](https://esigncomply.com/docs/api/errors.md#rate_limit_exceeded) 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/signers/{external_id}/consents/withdraw

### Which credential does POST /v1/signers/{external_id}/consents/withdraw 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/signers/{external_id}/consents/withdraw 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/signers/{external_id}/consents/withdraw 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/signers/{external_id}/consents/withdraw 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/signers/{external_id}/consents/withdraw?

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/signers/{external_id}/consents/withdraw?

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

## Related

- [Signers](https://esigncomply.com/docs/api/signers.md): the overview of the resource and all of its operations.
- [Start an erasure or restriction](https://esigncomply.com/docs/api/signers/start-an-erasure-or-restriction.md): `POST /v1/signers/{external_id}/erasure-requests`
- [List a signer's records](https://esigncomply.com/docs/api/signers/list-a-signers-records.md): `GET /v1/signers/{external_id}/records`
- [Retrieve signer status](https://esigncomply.com/docs/api/signers/retrieve-signer-status.md): `GET /v1/signers/{external_id}/status`
- [Re-acceptance of a new version](https://esigncomply.com/docs/guides/reacceptance.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.
