# Cancel Entity Onboarding (Banking Connectivity)

Cancel a pending onboarding. Only onboardings that have not reached a terminal status can be cancelled. See [Onboarding statuses](/reference/banking-connectivity#onboarding-statuses) for which statuses are terminal.

**POST** `/banking/entities/{entity_id}/onboardings/{onboarding_id}/cancel`

Base URL: `https://api-sandbox.whitelabel.com/v1`

Cancel Entity Onboarding (Banking Connectivity)

## Authorization

- public-api-key (apiKey in header)
- private-secret-key (apiKey in header)

## Path parameters

- `entity_id` (string, required)
  The `id` of the entity obtained from [Create Entity](/reference/create-entity).
- `onboarding_id` (string, required)
  The `id` of the entity obtained from [Create Entity](/reference/create-entity).

## Responses

### 200

- `id` (string)
- `entity_id` (string)
- `yuno_account_id` (string)
- `provider` (object)
  - `entity_id` (string)
  - `status` (string)
- `onboarding_type` (string)
- `status` (string)
- `requirements` (object[])
- `created_at` (string)
- `updated_at` (string)
- `expires_at` (string)

Example:

```json
{
  "id": "onb_990e8400-e29b-41d4-a716-446655440000",
  "entity_id": "ent_660e8400-e29b-41d4-a716-446655440000",
  "yuno_account_id": "550e8400-e29b-41d4-a716-446655440000",
  "provider": {
    "entity_id": "col_entity_onboarded_123",
    "status": "cancelled"
  },
  "onboarding_type": "ONE_STEP",
  "status": "CANCELLED",
  "requirements": [
    {}
  ],
  "created_at": "2026-02-01T10:00:00Z",
  "updated_at": "2026-02-02T08:45:00Z",
  "expires_at": "2026-02-08T10:00:00Z"
}
```

### 202

Accepted

- `id` (string)
- `entity_id` (string)
- `yuno_account_id` (string)
- `provider` (object)
  - `entity_id` (string)
  - `status` (string)
- `onboarding_type` (string)
- `status` (string)
- `requirements` (object[])
- `created_at` (string)
- `updated_at` (string)
- `expires_at` (string)

Example:

```json
{
  "id": "onb_990e8400-e29b-41d4-a716-446655440000",
  "entity_id": "ent_660e8400-e29b-41d4-a716-446655440000",
  "yuno_account_id": "550e8400-e29b-41d4-a716-446655440000",
  "provider": {
    "entity_id": "col_entity_onboarded_123",
    "status": "cancelled"
  },
  "onboarding_type": "ONE_STEP",
  "status": "CANCELLED",
  "requirements": [
    {}
  ],
  "created_at": "2026-02-01T10:00:00Z",
  "updated_at": "2026-02-02T08:45:00Z",
  "expires_at": "2026-02-08T10:00:00Z"
}
```

### 400

Bad Request

- `code` (string)
- `messages` (string[])
- `http_code` (integer)

Example:

```json
{
  "code": "VALIDATION_ERROR",
  "messages": [
    "Onboarding has reached a terminal status and cannot be cancelled"
  ],
  "http_code": 400
}
```

### 404

Not Found

- `code` (string)
- `messages` (string[])
- `http_code` (integer)

Example:

```json
{
  "code": "ONBOARDING_NOT_FOUND",
  "messages": [
    "Onboarding not found"
  ],
  "http_code": 404
}
```