---
title: "Accept or decline an invitation"
method: POST
path: "/v1/actions/respond_to_invitation"
tags: ["Network"]
---

# Accept or decline an invitation

`POST /v1/actions/respond_to_invitation`

## Request

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

Accept or decline one invitation you received.

LinkedIn also needs a per-invitation token to answer one; this action finds it itself by reading your received invitations again.

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

## Request body

- object
  - `invitationId` string, required: The invitation to answer (from list_received_invitations).
  - `action` 'accept' | 'decline', required: accept or decline.
  - `connectionId` string: Which of your LinkedIn accounts to act from (its id from list_linkedin_accounts). Omit to use your first live one.

## Response `200`

It worked. Inside result: invitationId, status, from, usedToday, dailyLimit.

- 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)
