> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getpara.com/llms.txt
> Use this file to discover all available pages before exploring further.

# cancelApprovalCase

> Cancels one of your app's pending approval cases.

## Import

Call this method on a server-side ParaRestClient created with your server secret key.

```ts theme={null}
import { ParaRestClient } from "@getpara/rest-sdk";
```

async

Cancels one of your app's pending approval cases.

Copy method signature

### Returns

[`Promise<PermissionsV2ConditionalApprovalCaseSummary>`](https://docs.getpara.com/v3/references/types/permissions#permissionsv2conditionalapprovalcasesummary)

The case with status cancelled.

## Route

The request addresses a case in your app by its `caseId`.

```text theme={null}
POST /v1/permissions-v2/approval-cases/{caseId}/cancel
```

Only a `pending` case can be cancelled. The case ends with status `cancelled` and `terminalReason` `case_cancelled`. When a pending transaction from a user's wallet is waiting on the case, Para discards it, so that request never signs. A request that should still go ahead needs a new attempt, which opens a new case.

The user who started a request can also cancel its case from the client SDKs with [cancelApprovalCase](https://docs.getpara.com/v3/references/core/permissions/cancelapprovalcase.md).

## Example

Inspect the returned status to confirm that the pending case was cancelled.

```ts theme={null}
const approvalCase = await para.cancelApprovalCase(caseId);
const isCancelled = approvalCase.status === "cancelled";
```

## Errors

A non-success response throws `ParaRestError` with the HTTP `status`, the error `code` and a `message`. [Permissions errors](https://docs.getpara.com/v3/references/permissions/errors.md) lists every error code.

An empty path argument throws `ParaRestValidationError` before the request is sent.

| Status | Code | When |
| - | - | - |
| 404 | `NOT_FOUND` | No case with this ID belongs to your app. |
| 409 | `CONFLICT` | The case is not pending. It already completed, or it was rejected, expired, invalidated or cancelled. |


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