This document lists all required REST endpoints of simplex messaging API.
Also see [Simplex messaging protocol implementation](simplex-messaging-implementation.md) for more details.
## POST /connection
### Create connection
### Request:
- Supported content types are:
-`application/json;charset=utf-8`
-`application/json`
- Example (`application/json;charset=utf-8`, `application/json`):
```javascript
{"recipientKey":"BODbZxmtKUUF1l8pj4nVjQ"}
```
### Response:
- Status code 201
- Headers: []
- Supported content types are:
-`application/json;charset=utf-8`
-`application/json`
- Example (`application/json;charset=utf-8`, `application/json`):
```javascript
{"senderId":"N9pA3g","recipientId":"Qxz93A"}
```
## DELETE /connection/:connectionId
### Delete connection
### Captures:
- *connectionId*: Recipient connection ID - unique connection ID to be used by connection recipient
### Response:
- Status code 200
- Headers: []
- Supported content types are:
-`application/json;charset=utf-8`
-`application/json`
- Example (`application/json;charset=utf-8`, `application/json`):
```javascript
```
## PUT /connection/:connectionId
### Secure connection
### Captures:
- *connectionId*: Recipient connection ID - unique connection ID to be used by connection recipient
### Request:
- Supported content types are:
-`application/json;charset=utf-8`
-`application/json`
- Example (`application/json;charset=utf-8`, `application/json`):
```javascript
{"senderKey":"XPaVEVNunkYKqqK0dnAT5Q"}
```
### Response:
- Status code 200
- Headers: []
- Supported content types are:
-`application/json;charset=utf-8`
-`application/json`
- Example (`application/json;charset=utf-8`, `application/json`):
```javascript
```
## GET /connection/:connectionId/messages
### Get messages
### Captures:
- *connectionId*: Recipient connection ID - unique connection ID to be used by connection recipient
### GET Parameters:
- fromMessageId
- **Values**: *message ID, e.g., `p8PCiGPZ`*
- **Description**: if set, the server will respond with the messages received starting from the message with server message ID (unique per server) passed in this parameter.
### Response:
- Status code 200
- Headers: []
- Supported content types are:
-`application/json;charset=utf-8`
-`application/json`
- Example (`application/json;charset=utf-8`, `application/json`):