# Remove Connection

## POST /v1/connection/user/{uid}/remove

> Removes a connection with a user.

```json
{"openapi":"3.1.1","info":{"title":"Pod API","version":"20.17.1"},"servers":[{"url":"http://yourpodURL.symphony.com/pod"}],"paths":{"/v1/connection/user/{uid}/remove":{"post":{"summary":"Removes a connection with a user.","parameters":[{"schema":{"type":"string"},"name":"sessionToken","description":"Session authentication token.","in":"header","required":true},{"schema":{"type":"integer","format":"int64"},"name":"uid","description":"User ID as a decimal integer\n","in":"path","required":true}],"tags":["Connection"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponse"}}}},"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"}}}}}}}},"components":{"schemas":{"SuccessResponse":{"type":"object","properties":{"format":{"type":"string","enum":["TEXT","XML"]},"message":{"type":"string"}}},"Error":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"}}}}}}
```

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

> #### 📘 HTTP 400
>
> This endpoint returns **400 Bad Request** when the users are not connected. For example, when a user has not yet accepted a connection request from another user.

### 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:

| Initial Connection Status | Request Action | New Connection Status                 |
| ------------------------- | -------------- | ------------------------------------- |
| ACCEPTED                  | Remove         | None (the connection no longer exist) |
| PENDING\_INCOMING         | Remove         | REJECTED                              |
| REJECTED                  | Remove         | PENDING\_INCOMING                     |
