> ## 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.

# Cancel Onboarding

> Close a running onboarding before it finishes

Closes a running onboarding. Use it when a customer abandons verification, or before you start again under another profile or provider.

| Onboarding | Cancel |
| - | - |
| `TRUSSET`, check open and not yet approved | Revokes the identity check. A review that arrives later changes nothing |
| `TRUSSET`, `AWAITING_SIGNATURE` for the registration | Dismisses the registration from the [pending queue](https://docs.trusset.org/endpoints/customers/list-pending-verifications.md), so it can no longer be signed |
| `KYC_SOURCE`, no record delivered yet | Stops waiting for the record |
| Any other running onboarding | Refused with `409 CANNOT_CANCEL` |

An onboarding that is not running answers `200` with `cancelled: false` and stays as it is. Cancelling removes nothing from a register: an identity your wallet already registered stays until you revoke it with [Revoke Identity](https://docs.trusset.org/endpoints/customers/revoke-identity.md).

A cancelled identity check reads `EXPIRED` afterwards, with `reason.code` `CHECK_CANCELLED` or `REGISTRATION_DISMISSED`. [Start Onboarding](https://docs.trusset.org/endpoints/customers/start-onboarding.md) opens a new one.

## Path Parameters

**customer** `string` *required*

The customer `id`, your `externalId`, the reference key or a wallet address of the customer.

## Response Fields

**data** `object`

**cancelled** `boolean`

`false` when nothing was running.

**onboarding** `object`

The onboarding after the call.

```bash cURL theme={null}
curl -X POST "https://api.trusset.org/customers/api/onboarding/client-48213/cancel" \
  -H "X-API-Key: trusset_your_key_here"
```

```typescript TypeScript theme={null}
const response = await fetch(
  'https://api.trusset.org/customers/api/onboarding/client-48213/cancel',
  { method: 'POST', headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await response.json();
console.log(data.cancelled, data.onboarding.status);
```

## Error Codes

| Code | HTTP | Cause |
| - | - | - |
| `CUSTOMER_NOT_FOUND` | `404` | No customer of your instance matches `customer` |
| `CANNOT_CANCEL` | `409` | The identity check was submitted through the hosted page or approved, the identity is registered, or a sealed record was delivered. Reject a delivered record with [Decide Record](https://docs.trusset.org/endpoints/customers/decide-onboarding-record.md) |
| `RATE_LIMIT_EXCEEDED` | `429` | More than 120 onboarding writes in the minute |
| `ONBOARDING_CANCEL_FAILED` | `500` | The cancel failed on the server |


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