# Accept Connection

## POST /v1/connection/accept

> Accept the connection request for the requesting user

```json
{"openapi":"3.1.1","info":{"title":"Pod API","version":"20.17.1"},"servers":[{"url":"http://yourpodURL.symphony.com/pod"}],"paths":{"/v1/connection/accept":{"post":{"summary":"Accept the connection request for the requesting user","parameters":[{"schema":{"type":"string"},"name":"sessionToken","description":"Session authentication token.","in":"header","required":true}],"tags":["Connection"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserConnection"}}}},"400":{"description":"Client error, see response body for further details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized: Invalid session token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden: Caller lacks necessary entitlement.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not Found: Connection cannot be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Server error, see response body for further details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserConnectionRequest"}}},"required":true}}}},"components":{"schemas":{"UserConnection":{"type":"object","description":"Connection status between two users","properties":{"userId":{"type":"integer","format":"int64","description":"user id"},"status":{"type":"string","description":"Connection status between the requesting user and the request sender","enum":["PENDING_INCOMING","PENDING_OUTGOING","ACCEPTED","REJECTED"]},"firstRequestedAt":{"type":"integer","format":"int64","description":"unix timestamp when the first request was made"},"updatedAt":{"type":"integer","format":"int64","description":"unix timestamp on the last updated date"},"requestCounter":{"type":"integer","format":"int32","description":"number of requests made"}}},"Error":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"}}},"UserConnectionRequest":{"type":"object","description":"Request body for the Connection APIs","properties":{"userId":{"type":"integer","format":"int64","description":"user id"}}}}}}
```

This endpoint allows the user to accept a specific connection request. To define which connection request is to be accepted, the `userId` of the user who initiated the connection request must be included in the body.

> #### 📘 Note
>
> Pods from all users involved need to have `crossPod` enabled between them.

> #### 📘 Accepted Connections
>
> For users of the same private pod who are implicitly connected, this endpoint returns the connection with status of "Accepted".

### Connection Behaviour

Currently, there are four possible connection status:

* PENDING\_INCOMING: The specified user requested to connect with the calling user.
* PENDING\_OUTGOING: The calling user requested to connect with the specified user.
* ACCEPTED: The two users are connected.
* REJECTED: The two users are not connected.

The following table shows the connection current behaviors:

<table><thead><tr><th width="324.3333333333333">Initial Connection Status</th><th>Request Action</th><th>New Connection Status</th></tr></thead><tbody><tr><td>None (connection did not exist)</td><td>Connect</td><td>PENDING_OUTGOING</td></tr><tr><td>PENDING_INCOMING</td><td>Accept</td><td>ACCEPTED</td></tr><tr><td>PENDING_INCOMING</td><td>Reject</td><td>REJECTED</td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://rest-api.symphony.com/main/connections/accepted-connection.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
