# st.withdrawConnectionRequest

> The API Reference is also the SDK and CLI reference. Consecutive code fences marked `tab=HTTP`, `tab=Node`, `tab=Python` and `tab=CLI` are the same call on each surface (a fence marked `tab=HTTP,CLI` is the same text for both), and a block between `:::surface <names>` and `:::` applies only to the surfaces it names. Identifiers in the text are written as in Node and in HTTP JSON (camelCase); the Python SDK spells methods, parameters and result attributes in snake_case (`sendMessage` → `send_message`, `reconnectionLink` → `reconnection_link`), while names inside HTTP JSON stay camelCase.

This action allows you to withdraw the connection request sent to a person.

:::surface node,python
In the SDK this is the `withdrawConnectionRequest` method. It takes the parameters below except `label` and `then`, which exist only in workflow JSON. It returns no `data`: a failed action comes back in `errors`, with one of the error types below.
:::

:::surface cli
In the CLI this is `linkedin connection withdraw` – the command is below, under [Parameters](#parameters).
:::

## Constraints

> ⏺️ **Root Start:** allowed, when `personUrl` parameter is provided.

> ⬆️ **Parent Actions:** [st.openPersonPage](/docs/action-st-open-person-page).

> ⬇️ **Child Actions:** N/A.

## Parameters

```json tab=HTTP
{
  "actionType": "st.withdrawConnectionRequest",
  "label": "person1",
  "personUrl": "https://www.linkedin.com/in/person1",
  "unfollow": true
}
```

```typescript tab=Node
const workflow = await linkedapi.withdrawConnectionRequest.execute({
  personUrl: "https://www.linkedin.com/in/person1",
  unfollow: true
});

const { errors } = await linkedapi.withdrawConnectionRequest.result(workflow.workflowId);
```

```python tab=Python
from linkedapi import WithdrawConnectionRequestParams

workflow = linkedapi.withdraw_connection_request.execute(
    WithdrawConnectionRequestParams(
        person_url="https://www.linkedin.com/in/person1",
        unfollow=True,
    )
)

result = linkedapi.withdraw_connection_request.result(workflow.workflow_id)
```

```bash tab=CLI
linkedin connection withdraw https://www.linkedin.com/in/person1 --unfollow
```

In AI assistants, the MCP server runs this action as the `withdraw_connection_request` tool.

:::surface cli
In the CLI this is `linkedin connection withdraw`:

```bash
linkedin connection withdraw <url> [flags]
```

| Flag | Type | Default | Description |
| --- | --- | --- | --- |
| `--unfollow` / `--no-unfollow` | boolean | `true` | Also unfollow the person |
:::

- `label` (optional) – custom label for tracking this action in workflow completion.
- `personUrl` (required for root start, forbidden for parent start) – [public or hashed](/faq/what-are-hashed-url-and-public-url) LinkedIn URL of the person you want to withdraw the connection request from.
- `unfollow` (optional) – boolean indicating whether you want to unfollow the person when withdrawing the request. The default value is `false`: if you omit it, the request is withdrawn and you keep following the person. The CLI is the exception – `linkedin connection withdraw` sends `true` unless you pass `--no-unfollow`.

## Result options

1. **Successful connection request withdrawal:**

```json
{
  "actionType": "st.withdrawConnectionRequest",
  "success": true,
  "label": "person1"
}
```

- `label` – included only if specified in the action parameters.

2. **Failed connection request withdrawal:**

```json
{
  "actionType": "st.withdrawConnectionRequest",
  "label": "person1",
  "success": false,
  "error": {
    "type": "notPending",
    "message": "There is no pending connection request to this person."
  }
}
```

- `label` – included only if specified in the action parameters.
- `error.type` – enum with the following possible values:
  - `personNotFound` – provided URL is not an existing LinkedIn person.
  - `selfProfileNotAllowed` – action cannot be performed on your own profile.
  - `notPending` – there is no pending connection request to this person.
