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

# connection_request.accepted

> Triggered when a lead accepts your connection request

This event is triggered when a lead accepts your LinkedIn connection request. This is a key milestone indicating the lead is now a 1st-degree connection and can receive direct messages.

## When This Event Fires

* A lead clicks "Accept" on your connection request
* The acceptance is detected by SendPilot
* The lead's status changes to `CONNECTION_ACCEPTED`

## Payload

```json theme={null}
{
  "eventId": "evt_1708456789123_abc123def",
  "eventType": "connection_request.accepted",
  "timestamp": "2024-02-24T10:30:00.000Z",
  "workspaceId": "ws_abc123xyz",
  "data": {
    "leadId": "lead_abc123",
    "campaignId": "camp_xyz789",
    "linkedinUrl": "https://www.linkedin.com/in/john-doe",
    "senderId": "sender_def456",
    "acceptedAt": "2024-02-24T10:30:00.000Z"
  }
}
```

## Payload Fields

| Field              | Type   | Description                                         |
| ------------------ | ------ | --------------------------------------------------- |
| `eventId`          | string | Unique event identifier for idempotency             |
| `eventType`        | string | Always `connection_request.accepted`                |
| `timestamp`        | string | ISO 8601 timestamp when the event was detected      |
| `workspaceId`      | string | Your workspace ID                                   |
| `data.leadId`      | string | The lead who accepted the connection                |
| `data.campaignId`  | string | The campaign this lead belongs to                   |
| `data.linkedinUrl` | string | LinkedIn profile URL of the lead                    |
| `data.senderId`    | string | LinkedIn sender account whose request was accepted  |
| `data.acceptedAt`  | string | ISO 8601 timestamp when the connection was accepted |

## Use Cases

<CardGroup cols={2}>
  <Card title="Warm Lead Alert" icon="fire">
    Notify sales team of new warm connections
  </Card>

  <Card title="CRM Update" icon="database">
    Update lead status in your CRM
  </Card>

  <Card title="Acceptance Tracking" icon="chart-line">
    Track connection acceptance rates
  </Card>

  <Card title="Welcome Workflow" icon="hand-wave">
    Trigger welcome message or nurture sequence
  </Card>
</CardGroup>

## Example Handler

```javascript theme={null}
app.post('/webhooks/sendpilot', async (req, res) => {
  const event = req.body;
  
  if (event.eventType === 'connection_request.accepted') {
    const { leadId, campaignId, linkedinUrl, acceptedAt } = event.data;
    
    // Update CRM
    await crm.updateLead(leadId, {
      status: 'connected',
      connectionAcceptedAt: acceptedAt
    });
    
    // Notify sales team
    await slack.postMessage({
      channel: '#new-connections',
      text: `🤝 New connection accepted!\n` +
            `Profile: ${linkedinUrl}\n` +
            `Campaign: ${campaignId}`
    });
    
    // The lead is now a 1st-degree connection - follow-up messages
    // will be sent automatically by the campaign sequence
    
    console.log(`Connection accepted by ${linkedinUrl}`);
  }
  
  res.status(200).send('OK');
});
```

<Tip>
  When a connection is accepted, the lead becomes a 1st-degree connection. The campaign will automatically proceed to send follow-up messages according to the sequence.
</Tip>
