---
title: "Unmark Transaction for Erasure"
slug: "unmark-transaction-for-erasure"
updated: 2025-06-27T20:00:06Z
published: 2025-06-27T20:00:06Z
canonical: "docs.onespan.com/unmark-transaction-for-erasure"
---

> ## Documentation Index
> Fetch the complete documentation index at: https://docs.onespan.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Unmark Transaction for Erasure

With the Unmark Transaction for Erasure API, marking for erasure can be reverted. Transactions that were marked for erasure before are unmarked and will not be deleted.

## Syntax

```http
POST /api/transactions/unmark-for-erasure
```

## Examples

### Example request

```http
POST /api/transactions/unmark-for-erasure
Authorization: Bearer token
Content-Type: application/json
X-Tenant: dealflo
{
  "transaction_ids": [
    "6cca2f64-2781-49fc-85de-f80361581968",
    "6cca2f64-2781-49fc-85de-f80361581969",
    "6cca2f64-2781-49fc-85de-f80361581970"
  ]
}'
```

### Example response

```json
{
message: "Some of the transactions could be unmarked for erasure other couldn't."
 
transactions: [
 
  {
    transaction_id: "xxxx-xxxxxx-xxxxxxx-xxxxxx",
    unmarking_event: "Transaction Recovery - Accepted" # TBC Transaction Recovery - Unmarked
    message: "Success unmarked for erasure and won't be deleted until the data retention policy has been reached." # In 1 Use Case
  },
 
  {
    transaction_id: "xxxx-xxxxxx-xxxxxxx-xxxxxx",
    unmarking_event: "Transaction Recovery - ID field error"
    message: ""
  },
 
  {
    transaction_id: "xxxx-xxxxxx-xxxxxxx-xxxxxx",
    unmarking_event: "Transaction Recovery - Transaction Not Found"
    message: "This transaction doesn't exist, therefore cannot be marked for erasure."
  },
 
  {
    transaction_id: "xxxx-xxxxxx-xxxxxxx-xxxxxx",
    unmarking_event: "Transaction Recovery - Fail"
    message: "Failed to unmark for erasure, the transaction was not marked for erasure."
  }
]
}
```

### Headers

#### Request headers

The following headers are included in the request:

- [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2): The OAuth/JWT token to authenticate.
- [Content-Type](https://tools.ietf.org/html/rfc7231#section-3.1.1.5): application/json
- X-Tenant: The tenant ID (optional).

### Status codes

[Status codes](/docs/unmark-transaction-for-erasure#Tab_Status_codes) lists the status codes.

| **Status codes** |
| --- |
| Status code | Name | Description |
| 202 | Accepted | All transactions were unmarked for deletion. |
| 207 |  | Some transactions were unmarked for deletion, others were not. See each transaction operation status in the response body. |
| 400 | Bad Request | Validation error. Empty list of transaction_ids. Can occur if one of the following applies: - X-Tenant is not matching the token. - grace_period is a negative number. - None of the transaction_ids were accepted. - There are too few or too many transactions. |
| 401 | Unauthorized | Invalid token. |
| 404 | Not Found | Wrong URL. Transactions provided in the list were not found. |
| 500 | Internal Server Error | Server or application error. |
