# Roll back an adoption

> Roll back an adoption: POST /v1/profiles/{id}/rollback restores the baseline a profile had before its latest adoption and writes a new profile version.

Source: https://esigncomply.com/docs/api/guidance/roll-back-an-adoption

Last updated November 26, 2026

In the Esign Comply API, `POST /v1/profiles/{id}/rollback` restores the baseline a profile had before its latest adoption and writes a new profile version. Call it within 90 days of an adoption when the adopted conditions need to be undone. It takes a secret key with `full_access` permission.

`POST /v1/profiles/{id}/rollback` · 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 -X POST https://esigncomply.com/v1/profiles/prof_signup_4f1a/rollback \
  -H "Authorization: Bearer $ESIGNCOMPLY_API_KEY"
```

### Node SDK

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

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

const { data, error } = await esc.profiles.rollback("prof_signup_4f1a");
```

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

Returns the profile to the baseline it had before its latest adoption. Available for 90 days after that adoption (`baseline_detail.rollback_until`). It creates a new profile version. Records sealed in between keep the conditions that applied to them.

The body is the [profile object](https://esigncomply.com/docs/api/profiles.md#the-profile-object) at its new version, plus `baseline_detail`.

The `profile.rolled_back` webhook is sent with `profile_id`, `profile_version`, `baseline` and `rolled_back_by`.

## Parameters

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

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

`200 OK` with a Profile object.

```json
{
  "object": "profile",
  "id": "prof_signup_4f1a",
  "version": 5,
  "livemode": false,
  "name": "Signup",
  "jurisdictions": [
    "US-FED",
    "US-CA",
    "US-NY",
    "US-TX"
  ],
  "jurisdiction_mode": "auto",
  "on_unknown_region": "strictest",
  "governing_law": null,
  "allow_session_packs": false,
  "strict_jurisdictions": false,
  "pack_versions": "latest",
  "signer_class": null,
  "document_type": null,
  "purpose": null,
  "method": "checkbox",
  "assurance_level": "L1",
  "failure_mode": "fail_closed",
  "consumer_econsent": false,
  "capture_mode": "standard",
  "receipts_enabled": true,
  "signer_certificates_enabled": false,
  "rules_version": "2026.11.2",
  "baseline": "bl_SPNT",
  "prompt_id": null,
  "change_note": "Rolled back to baseline bl_SPNT.",
  "created_at": "2026-11-26T00:17:49.604Z",
  "baseline_detail": {
    "id": "bl_SPNT",
    "pack_versions": {
      "US-CA": "2026-11-21",
      "US-FED": "2026-11-22"
    }
  }
}
```

### Response fields

| Field | Type | Description |
|---|---|---|
| `object` | string |  |
| `id` | string |  |
| `version` | integer |  |
| `livemode` | boolean |  |
| `name` | string |  |
| `jurisdictions` | array of string |  |
| `jurisdiction_mode` | string |  |
| `on_unknown_region` | string |  |
| `governing_law` | string |  |
| `allow_session_packs` | boolean |  |
| `strict_jurisdictions` | boolean |  |
| `signer_class` | string |  |
| `document_type` | string |  |
| `purpose` | string |  |
| `method` | string |  |
| `assurance_level` | string |  |
| `failure_mode` | string |  |
| `consumer_econsent` | boolean |  |
| `capture_mode` | string |  |
| `receipts_enabled` | boolean |  |
| `baseline` | string |  |
| `prompt_id` | string |  |
| `created_at` | datetime |  |
| `pending_conditions` | array |  |
| `versions` | array |  |
| `warnings` | array of string |  |

## Errors

| Code | HTTP | When |
|---|---|---|
| [`not_found`](https://esigncomply.com/docs/api/errors.md#not_found) | 404 | `404`: no such profile. |
| [`rollback_unavailable`](https://esigncomply.com/docs/api/errors.md#rollback_unavailable) | 409 | `409`: there is no earlier baseline, or the 90-day window has passed. |

Like every call made with a secret key, it can also return [`invalid_request`](https://esigncomply.com/docs/api/errors.md#invalid_request), [`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), [`insufficient_permission`](https://esigncomply.com/docs/api/errors.md#insufficient_permission), [`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/profiles/{id}/rollback

### Which credential does POST /v1/profiles/{id}/rollback 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/profiles/{id}/rollback 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/profiles/{id}/rollback 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/profiles/{id}/rollback 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/profiles/{id}/rollback?

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/profiles/{id}/rollback?

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

## Related

- [Guidance and adoption](https://esigncomply.com/docs/api/guidance.md): the overview of the resource and all of its operations.
- [List guidance notices](https://esigncomply.com/docs/api/guidance/list-guidance-notices.md): `GET /v1/guidance/notices`
- [Retrieve a guidance notice](https://esigncomply.com/docs/api/guidance/retrieve-a-guidance-notice.md): `GET /v1/guidance/notices/{id}`
- [Acknowledge a guidance notice](https://esigncomply.com/docs/api/guidance/acknowledge-a-guidance-notice.md): `POST /v1/guidance/notices/{id}/acknowledge`
- [List guidance releases](https://esigncomply.com/docs/api/guidance/list-guidance-releases.md): `GET /v1/guidance/releases`
- [Guidance and adoption](https://esigncomply.com/docs/guides/guidance.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.
