# respond_to_invitation: Accept or decline an invitation

Accept or decline one invitation you received. This action can change or spend something, and it happens right away. Plan: Free and Connect.

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

{
  "invitationId": "PASTE_INVITATION_ID_HERE",
  "action": "accept"
}
```

## What you give it

- `invitationId` (needed): a invitation id. The invitation to answer (from list_received_invitations). Where to get it: Run `list_received_invitations` and use `invitations[].invitationId`.
- `action` (needed): one of: accept, decline. accept or decline.
- `connectionId` (optional): a connection id. Which of your LinkedIn accounts to act from (its id from list_linkedin_accounts). Omit to use your first live one. Where to get it: Run `list_linkedin_accounts` and use `accounts[].id`.

## What you get back

- `invitationId`
- `status`
- `from`: the account it ran on
- `usedToday`: number
- `dailyLimit`: number

## Good to know

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

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