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

# Archive Customer

> Soft-delete a customer by marking it as archived

Archives a customer record. Archived customers are excluded from list queries by default but can be included by passing `includeArchived=true`. This is a soft delete: no data is permanently removed.

> [!WARNING]
>
> Archiving changes the record only. The identity on the registry and its claims stay in place, so a verified wallet keeps passing identity checks. If it should stop, revoke it with [Revoke Identity](https://docs.trusset.org/endpoints/customers/revoke-identity.md) before archiving, and do the same for any linked wallet the registry holds an identity for.

An archived record answers `404` on [Get Customer](https://docs.trusset.org/endpoints/customers/get.md), [Update Customer](https://docs.trusset.org/endpoints/customers/update.md), the wallet endpoints and [Link Wallet](https://docs.trusset.org/endpoints/customers/link-wallet.md), and drops out of [Batch Get Countries](https://docs.trusset.org/endpoints/customers/batch-countries.md). [Get Lending Positions](https://docs.trusset.org/endpoints/customers/get-lending-positions.md) still reads it, and loans already attributed to it stay attributed. A new loan cannot name it as its `clientReference`.

Its linked wallets stay attached and stay reserved, so no other customer on your instance can add them. Its `externalId` is released for a new record.

Archiving also ends the customer's onboarding. Every open verification link of the customer, including one whose identity check is still in review and one waiting for a wallet, is closed as if revoked (`EXPIRED`), so a review that arrives later registers nothing. Rows of its wallet waiting in the [pending queue](https://docs.trusset.org/endpoints/customers/list-pending-verifications.md) are dismissed, and building a registration for a wallet that belongs only to an archived customer is refused with `409 CUSTOMER_ARCHIVED`.

There is no restore endpoint on the API. [Create Customer](https://docs.trusset.org/endpoints/customers/create.md) with the archived record's primary wallet restores the record and overwrites its fields from the request body.

A company record is refused while individuals that are not archived are linked to it. Unlink them first by sending `companyId: null` to Update Customer, or archive them.

## Path Parameters

**customerId** `string` *required*

Customer ID.

## Response Fields

**success** `boolean`

Request status

**data** `object`

**archived** `boolean`

Always `true` on success

```bash cURL theme={null}
curl -X DELETE "https://api.trusset.org/customers/api/manage/cmt0k3b9x0004cghxw7r2d5ya" \
  -H "X-API-Key: trusset_abc123xy_secret..."
```

```typescript TypeScript theme={null}
const response = await fetch(
  'https://api.trusset.org/customers/api/manage/cmt0k3b9x0004cghxw7r2d5ya',
  {
    method: 'DELETE',
    headers: { 'X-API-Key': 'trusset_abc123xy_secret...' }
  }
);
const { data } = await response.json();
```

```json Response theme={null}
{
  "success": true,
  "data": {
    "archived": true
  },
  "metadata": {
    "requestId": "550e8400-e29b-41d4-a716-446655440000",
    "timestamp": "2026-09-30T12:00:00.000Z"
  }
}
```

## Error Codes

| Code | HTTP | Cause |
| - | - | - |
| `NOT_FOUND` | `404` | No such customer on your instance, or the record is already archived |
| `COMPANY_HAS_MEMBERS` | `409` | The record is a company with individuals linked to it that are not archived |
| `ARCHIVE_FAILED` | `500` | The record could not be archived |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.