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

# Cancel Action

> Discard a pending action without running it

## Overview

Discards a pending action. Nothing is sent or changed.

> [!NOTE]
>
> Changes data, so it needs a key that isn't read-only.

Operation name: `action.cancel`.

## Authorization

**x-api-key** `string` *required*

Your Composer API key

## Headers

**Content-Type** `string` *required*

Must be set to application/json

## Body

**token** `string` *required*

The action's token, from List Pending Actions.

```json Example theme={null}
"token": "pa_8f7e6d5c"
```

```json Example Request theme={null}
{
  "token": "pa_8f7e6d5c"
}
```

***

## Response

**cancelled** `boolean`

True when the action was discarded.

**summary** `string`

What was discarded.

**reason** `string`

When `cancelled` is false: why, for example it was already confirmed or expired.

```json Example Success Response theme={null}
{
  "cancelled": true,
  "summary": "Email Dana about Thursday's service"
}
```

***

## Example cURL

```bash cURL theme={null}
curl --request POST 'https://composer.personal.ai/lab/api/v1/op/action.cancel' \
--header 'Content-Type: application/json' \
--header 'x-api-key: <your-api-key>' \
--data '{"token": "pa_8f7e6d5c"}'
```

***

## Error Codes

| Code | Description |
| - | - |
| 400 | The body doesn't match the fields above, or the operation failed. The response body says why. |
| 401 | Missing or invalid API key |
| 403 | This key isn't allowed to call this operation (for example, a read-only key) |


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