
# Reject a deprovision hold

`POST /v1/directories/{directory_id}/deprovision-holds/{hold_id}:reject` · permission `directories:write`

Rejects the directory's mass deprovision hold: the held deprovisions are discarded and the affected records are marked drifted. Audited as `directory.deprovision_hold_rejected`. A hold that is no longer open, or one past its 72-hour timeout (it is approved by the timeout and this decision is not applied), returns `409 conflict`.

## Request

| Field | Type | Required | Description |
|---|---|---|---|
| `directory_id` | path | yes | SCIM directory ID (`dir_…`). |
| `hold_id` | path | yes | The hold ID: `open_deprovision_hold.id` of `GET /v1/directories/{directory_id}` (lower-case UUID). |

There is no request body.

## Response

`200 OK` with the decision.

```json
{
  "id": "0192a3c0-1d2e-7f3a-8b4c-5d6e7f8a9b0c",
  "directory_id": "dir_01j9xm2n4p6q8r0s2t4v6w8y0z",
  "status": "rejected"
}
```

## Errors

| HTTP | code | When |
|---|---|---|
| 404 | `not_found` | The directory or the hold does not exist in this environment, or the hold belongs to another directory. |
| 409 | `conflict` | The hold was already decided or passed its 72-hour timeout. |
| 401 | `unauthenticated` | The credential is missing, invalid or revoked. |
| 403 | `insufficient_permissions` | The credential lacks the required permission. |
| 429 | `rate_limited` | The rate limit was exceeded; retry after the `Retry-After` period. |
| 503 | `service_unavailable` | Directory sync is temporarily unavailable or not configured in this deployment; retry after the `Retry-After` period. |

## Example

```bash
curl -i -X POST "https://api.eu.keenauth.com/v1/directories/dir_01j9xm2n4p6q8r0s2t4v6w8y0z/deprovision-holds/0192a3c0-1d2e-7f3a-8b4c-5d6e7f8a9b0c:reject" \
  -H "Authorization: Bearer $KEENAUTH_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
```
