# Cancel approval

Source: https://business-api-docs.youhodler.com/docs/api/reference/approvals/approvals-cancel

## Request

**Request URL — POST**
```http
POST /approvals/{approval_id}/cancel
```

**Request Body — application/json**
```json
{
  "reason": null
}
```

## Responses

**200 Operation succeeded**

Operation succeeded.

```json
{
  "action_family": "withdrawal",
  "created_at": "2026-05-01T10:00:00Z",
  "decision": null,
  "expires_at": "2026-05-01T10:00:00Z",
  "governed_ref": "clients/b8e2f1a0-4c3d-4e5f-9a1b-2c3d4e5f6a7b",
  "id": "b8e2f1a0-4c3d-4e5f-9a1b-2c3d4e5f6a7b",
  "initiated_by": {
    "actor": null,
    "approved_by": null,
    "authenticated_principal": {
      "id": "b8e2f1a0-4c3d-4e5f-9a1b-2c3d4e5f6a7b",
      "kind": "user",
      "tenant_ref": "enterprises/b8e2f1a0-4c3d-4e5f-9a1b-2c3d4e5f6a7b"
    },
    "enterprise_binding": {
      "tenant_type": "enterprise",
      "topology_ref": "enterprises/b8e2f1a0-4c3d-4e5f-9a1b-2c3d4e5f6a7b"
    },
    "federation": null,
    "identity_source": "platform-managed",
    "initiated_by": null,
    "subject": {
      "id": "b8e2f1a0-4c3d-4e5f-9a1b-2c3d4e5f6a7b",
      "kind": "user",
      "tenant_ref": "enterprises/b8e2f1a0-4c3d-4e5f-9a1b-2c3d4e5f6a7b"
    }
  },
  "operation_id": "b8e2f1a0-4c3d-4e5f-9a1b-2c3d4e5f6a7b",
  "requirement_snapshot": {
    "authority_ref": "enterprises/b8e2f1a0-4c3d-4e5f-9a1b-2c3d4e5f6a7b",
    "expires_at": "2026-05-01T10:00:00Z",
    "governed_ref": "clients/b8e2f1a0-4c3d-4e5f-9a1b-2c3d4e5f6a7b",
    "initiator_cannot_approve": true,
    "reason_code": "high_value",
    "required_human_approvals": 1,
    "requirement_key": "withdrawal_approval",
    "source": "policy"
  },
  "resource": "approval",
  "status": "pending",
  "updated_at": "2026-05-01T10:00:00Z"
}
```

**400 Invalid request payload**

Invalid request payload, query, or parameter shape.

```json
{
  "code": "invalid_request",
  "message": "Invalid request payload."
}
```

**401 Caller is not authenticated or the bearer token is invalid**

Caller is not authenticated or the bearer token is invalid.

```json
{
  "code": "unauthorized",
  "message": "Caller is not authenticated."
}
```

**403 Caller lacks the required capability or permitted scope**

Caller lacks the required capability or permitted scope.

```json
{
  "code": "forbidden_capability_scope",
  "message": "Caller lacks the required capability or scope."
}
```

**404 Resource not found**

Resource not found.

```json
{
  "code": "resource_not_found",
  "message": "Resource not found."
}
```

**409 State conflict — the request cannot be applied to the current resource state**

State conflict — the request cannot be applied to the current resource state.

```json
{
  "code": "state_conflict",
  "message": "State conflict — the approval is not in a state that allows this action."
}
```

**422 Operation is not admissible — it violates a business rule**

Operation is not admissible — it violates a business rule, policy constraint, or lifecycle precondition specific to this resource.

```json
{
  "code": "not_admissible",
  "details": {
    "reason": "not_admissible"
  },
  "message": "The operation is not admissible in the current state."
}
```

**429 Request rate limit exceeded**

Request rate limit exceeded. Retry after the delay indicated in the `details.retry_after_ms` field.

```json
{
  "code": "rate_limited",
  "details": {
    "retry_after_ms": 5000
  },
  "message": "Too many requests."
}
```

**502 Upstream service returned an unexpected error**

Upstream service returned an unexpected error.

```json
{
  "code": "upstream_error",
  "message": "An upstream service returned an unexpected error."
}
```

**503 Service is temporarily unavailable**

Service is temporarily unavailable; retry with backoff.

```json
{
  "code": "temporarily_unavailable",
  "message": "Service is temporarily unavailable; retry with backoff."
}
```

**Related endpoints:**

- `GET` [Get approval](/docs/api/reference/approvals/approvals-get) — Read current state first
