# Unlink the agent

> Unlink the current agent client context.

`POST /v1/agent-api/unlink`

## Responses

| Status | Description                                |
| ------ | ------------------------------------------ |
| `200`  | Client context unlinked                    |
| `401`  | Session token missing, unknown, or expired |
| `403`  | Client unlinked or agent inactive          |

## Response fields

| Field     | Type   | Required | Description |
| --------- | ------ | -------- | ----------- |
| `success` | `true` | Yes      |             |

## Example

### SDK

```ts
import { createCatenaClient } from "@catena/sdk"

// Reads CATENA_SECRET_KEY
const client = createCatenaClient()

await client.unlinkAgent()
```

### CLI

```sh
catena unlink
```

### Response `200`

```json
{
  "success": true
}
```
