> ## Documentation Index
> Fetch the complete documentation index at: https://docs.linkupapi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Accept Invitation

> Accept or decline a pending connection invitation.

## Overview

Accepts a pending connection invitation using the invitation's `shared_secret` and `entity_urn`. These values can be obtained from the [List Invitations](/api-reference/v2/network/list-invitations) endpoint.

To **decline** an invitation, use [Decline Invitation](/api-reference/v2/network/decline) (`action: "decline"`, same params). Sending this request with `decline: true` is still supported and equivalent.

<Note>This endpoint consumes **1 credit** per request. Ignore this if you're on per-seat pricing: usage is unlimited.</Note>

## Request

<ParamField header="x-api-key" type="string" required>
  Your API key for authentication.
</ParamField>

<ParamField body="account_id" type="string" required>
  The unique identifier of the account to use.
</ParamField>

<ParamField body="action" type="string" required>
  Must be `"accept"`.
</ParamField>

<ParamField body="params" type="object" required>
  <Expandable title="params properties">
    <ParamField body="shared_secret" type="string" required>
      The shared secret associated with the invitation. Obtained from the invitation data.
    </ParamField>

    <ParamField body="entity_urn" type="string" required>
      The entity URN of the invitation to accept.
    </ParamField>

    <ParamField body="decline" type="boolean" default={false}>
      `true` ignores (declines) the invitation instead of accepting it. The sender is not notified, as on LinkedIn.
    </ParamField>
  </Expandable>
</ParamField>

## Response

<ResponseField name="success" type="boolean">
  Indicates whether the request was successful.
</ResponseField>

<ResponseField name="data" type="object">
  Confirmation of the accepted invitation.
</ResponseField>

<ResponseField name="metadata" type="object">
  <Expandable title="metadata properties">
    <ResponseField name="action" type="string">
      The action that was performed (`"accept"`).
    </ResponseField>

    <ResponseField name="account_id" type="string">
      The account ID used for the request.
    </ResponseField>

    <ResponseField name="credits_consumed" type="integer">
      Number of credits consumed (1).
    </ResponseField>

    <ResponseField name="timestamp" type="string">
      ISO 8601 timestamp of the response.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": true,
    "data": {},
    "metadata": {
      "action": "accept",
      "account_id": "your-account-id",
      "credits_consumed": 1,
      "timestamp": "2026-03-24T12:00:00Z"
    }
  }
  ```

  ```json 400 theme={null}
  {
    "success": false,
    "error": {
      "code": "INVALID_PARAMS",
      "message": "shared_secret and entity_urn are required."
    },
    "metadata": {
      "action": "accept",
      "account_id": "your-account-id",
      "credits_consumed": 0,
      "timestamp": "2026-03-24T12:00:00Z"
    }
  }
  ```
</ResponseExample>
