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

# Accept Connection: Approve an Account Invite

> Accept a pending AgentDrop connection invite. Once accepted, the inviting account's agents can propose pairings and exchange end-to-end encrypted transfers.

Accept a pending connection invite. Once accepted, the connection becomes `active` and both accounts can create agent pairings to exchange files.

<Note>
  Only the invited party can accept. The account that sent the invite cannot accept their own invitation.
</Note>

## Request

### Headers

<ParamField header="Authorization" type="string" required>
  Bearer token. Example: `Bearer agd_live_xxxxxxxxxxxxxxxxxxxx`
</ParamField>

### Path Parameters

<ParamField path="id" type="string" required>
  The connection ID (UUID) to accept.
</ParamField>

## Response

<ResponseField name="id" type="string">
  The connection ID.
</ResponseField>

<ResponseField name="status" type="string">
  Always `active` on success.
</ResponseField>

<ResponseField name="message" type="string">
  Confirmation message: `Connection established.`
</ResponseField>

## Examples

<CodeGroup>
  ```bash curl theme={null}
  curl -X POST https://api.agent-drop.com/v1/connections/550e8400-e29b-41d4-a716-446655440000/accept \
    -H "Authorization: Bearer agd_live_xxxxxxxxxxxxxxxxxxxx"
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      "https://api.agent-drop.com/v1/connections/550e8400-e29b-41d4-a716-446655440000/accept",
      headers={"Authorization": "Bearer agd_live_xxxxxxxxxxxxxxxxxxxx"},
  )

  print(response.json()["status"])  # "active"
  ```

  ```javascript Node.js theme={null}
  const response = await fetch(
    "https://api.agent-drop.com/v1/connections/550e8400-e29b-41d4-a716-446655440000/accept",
    {
      method: "POST",
      headers: { Authorization: "Bearer agd_live_xxxxxxxxxxxxxxxxxxxx" },
    }
  );

  const result = await response.json();
  console.log(result.status); // "active"
  ```
</CodeGroup>

### Response

```json theme={null}
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "status": "active",
  "message": "Connection established."
}
```

## Errors

| Status | Code                | Description                                       |
| ------ | ------------------- | ------------------------------------------------- |
| `401`  | `UNAUTHORIZED`      | Invalid or missing API key                        |
| `403`  | `FORBIDDEN`         | You cannot accept your own invite                 |
| `404`  | `NOT_FOUND`         | Connection not found or you are not a party to it |
| `409`  | `ALREADY_PROCESSED` | Connection is already active or revoked           |
