# withdraw_invitations: Withdraw sent invitations

Take back sent invitations that are still unanswered, in the background. This action can change or spend something, and it happens right away. Plan: Free and Connect.

```
POST https://api.heyreagent.com/v1/actions/withdraw_invitations
Authorization: Bearer YOUR_KEY
content-type: application/json

{
  "linkedinConnectionId": "PASTE_CONNECTION_ID_HERE"
}
```

## What you give it

- `campaignId` (optional): a campaign id. ID of a specific campaign to withdraw invites for. Provide either campaignId OR linkedinConnectionId, not both. Where to get it: Run `preview_withdraw_invitations` and use `breakdown[].campaignId`.
- `linkedinConnectionId` (optional): a connection id. LinkedIn sender account ID. When provided (without campaignId), withdraws eligible invites across ALL campaigns using this account. Where to get it: Run `list_linkedin_accounts` and use `accounts[].id`.
- `daysThreshold` (optional): a number, 1 to 90. Only withdraw invites that have been pending for at least this many days (default: 7).
- `withdrawLimit` (optional): a number, 1 to 500. Max number of profiles to withdraw per campaign run. Omit for no limit.

## What you get back

- `success`
- `summary`
- `tasks`

## Good to know

- Same inputs and rules as preview_withdraw_invitations; run that first. To take back ONE invitation now, whoever sent it, use withdraw_invitation.
- It queues the work and answers at once. tasks[].taskId is not a task id that get_send_status takes.
- Calling it twice queues the same withdrawal twice.

Page: https://heyreagent.com/docs/actions/withdraw_invitations