# Request deactivation

> Requests the deactivation of an enrollment's active products. The Rapid team confirms it, and the enrollment keeps receiving alerts until the confirmation.

Página: https://doc.rapidchargeback.com/en/canais/enrollments/pedir-desativacao/

Requests the deactivation of one of your company's enrollments. Every `active` product of the enrollment moves to `deactivation_requested`, and the Rapid team confirms the deactivation.

**Until the confirmation, the enrollment keeps receiving alerts**, which still count as usual. Once confirmed, the product becomes `inactive`.

## Endpoint

```
POST https://api.rapidchargeback.com/api/v1/enrollments/:enrollment_id/request-deactivation
```

## Authentication

```
Authorization: Basic base64(client_id:client_secret)
Content-Type: application/json
```

---

## URL parameters

| Param | Type | Description |
|---|---|---|
| `enrollment_id` | string (UUID) | The enrollment `id` |

## Request body

Optional.

| Field | Type | Required | Description |
|---|---|---|---|
| `reason` | string (1 to 500) | No | The reason, which the Rapid team sees with the request |

A field outside the table is rejected with `422 VALIDATION_ERROR` (`Unknown field: <name>`).

### Repeating

| Situation | Response |
|---|---|
| Some product `active` | `200`, `meta.result: "deactivation_requested"` |
| No product `active`, some already in `deactivation_requested` | `200`, `meta.result: "unchanged"`. Nothing changes |
| No product `active` or in `deactivation_requested` | `422 ENROLLMENT_NOTHING_TO_DEACTIVATE` |

A request still `pending` cannot be deactivated here: only an already approved product.

---

## Request example

```bash
curl -X POST https://api.rapidchargeback.com/api/v1/enrollments/00000000-0000-0000-0000-0000000000aa/request-deactivation \
  -H "Authorization: Basic Y2xpZW50X2lkOmNsaWVudF9zZWNyZXQ=" \
  -H "Content-Type: application/json" \
  -d '{ "reason": "Seller closed the account" }'
```

---

## Response

### Success

```
HTTP/1.1 200 OK
```

```json
{
  "data": {
    "id": "00000000-0000-0000-0000-0000000000aa",
    "merchant_id": "00000000-0000-0000-0000-000000000001",
    "merchant_ref": "PB-1001",
    "enrollment_type": "descriptor",
    "descriptor_value": "loja exemplo",
    "descriptor_rule": "exact",
    "bin": null,
    "caid": null,
    "arn": null,
    "products": {
      "alert": { "status": "deactivation_requested", "rejection_reason": null, "approved_at": "2026-11-07T15:00:00.000Z" },
      "prevention": null
    },
    "created_at": "2026-11-06T12:00:00.000Z",
    "updated_at": "2026-12-01T10:00:00.000Z"
  },
  "meta": { "result": "deactivation_requested" }
}
```

### Nothing to deactivate

```
HTTP/1.1 422 Unprocessable Entity
```

```json
{
  "error": {
    "code": "ENROLLMENT_NOTHING_TO_DEACTIVATE",
    "message": "No active products to deactivate on this enrollment"
  }
}
```

### Errors

| HTTP | Code | When |
|---|---|---|
| 404 | `ENROLLMENT_NOT_FOUND` | The enrollment does not exist, belongs to another company, or the id is not a UUID |
| 422 | `ENROLLMENT_NOTHING_TO_DEACTIVATE` | No product active or with deactivation requested |
| 422 | `VALIDATION_ERROR` | Unknown field, or `reason` empty or above 500 characters (`params.field`) |
| 403 | `KYB_NOT_APPROVED`, `COMPANY_NOT_ACTIVE`, `COMPANY_BLOCKED` | Company without an approved registration, inactive or blocked |
| 429 | `RATE_LIMIT_EXCEEDED` | More than 60 writes per minute |
| 503 | `SERVICE_UNAVAILABLE` | Temporarily unavailable: repeat after `Retry-After` |

---

## Notes

- **One enrollment per call.** When a seller leaves, list its enrollments with [List enrollments](https://doc.rapidchargeback.com/en/canais/enrollments/listar-enrollments/) filtering by `merchant_ref` and request the deactivation of each one.
- **Follow the confirmation** through the [enrollments list](https://doc.rapidchargeback.com/en/canais/enrollments/listar-enrollments/#following-the-approval) with `updated_since`.
- **Activity:** every request shows up in the dashboard Activity as made by the integration.
