---
title: "Preview withdrawing invitations"
method: POST
path: "/v1/actions/preview_withdraw_invitations"
tags: ["Network"]
---

# Preview withdrawing invitations

`POST /v1/actions/preview_withdraw_invitations`

## Request

- Base URL: `https://api.heyreagent.com`
- URL: `https://api.heyreagent.com/v1/actions/preview_withdraw_invitations`
- Auth: HTTP bearer

Count the sent invitations a withdrawal would take back, per campaign.

Pass campaignId or linkedinConnectionId, exactly one.

Only invitations a campaign sent are counted, and only those pending at least daysThreshold days and at most 42.

When nothing qualifies the answer is a plain sentence, not an object.

Docs: https://heyreagent.com/docs/actions/preview_withdraw_invitations

## Request body

- object
  - `campaignId` string: ID of a specific campaign to withdraw invites for. Provide either campaignId OR linkedinConnectionId, not both.
  - `linkedinConnectionId` string: LinkedIn sender account ID. When provided (without campaignId), withdraws eligible invites across ALL campaigns using this account.
  - `daysThreshold` number: Only withdraw invites that have been pending for at least this many days (default: 7).
  - `withdrawLimit` number: Max number of profiles to withdraw per campaign run. Omit for no limit.

## Response `200`

It worked. Inside result: summary, breakdown.

- Worked
  - `ok` true, required
  - `result` object, required: What was asked for. A field that does not apply is left out, or is null.

## Other responses

- `default`: It did not work. The message says why, in plain English.

---

[API](https://skmtc.dev/heyreagent/apis/heyreagent-api.md) · [All operations](https://skmtc.dev/heyreagent/apis/heyreagent-api/llms.txt) · [OpenAPI document](https://skmtc.dev/heyreagent/apis/heyreagent-api/revisions/917360c5f841?raw)
