---
url: /apidocs/speeddating.md
---
## Speed dating API

| Endpoint | Method | Description |
|-----|-----|-----|
| [social:startSpeedDating](#start-speed-dating) | websocket | Start speed dating |
| [social:stopSpeedDating](#stop-speed-dating) | websocket | Stop speed dating |
| [social:getSpeedDatingStatus](#get-speed-dating-status) | websocket | Get speed dating status |
| [social:speedDatingStarted](#start-speed-dating-event) | websocketEvent | Start speed dating event |
| [social:speedDatingStopped](#stop-speed-dating-event) | websocketEvent | Stop speed dating event |

### Start speed dating

**Method:** websocket

**Endpoint:** social:startSpeedDating

**Description:** Endpoint prepares map of participants and list of rounds for speed dating, and sends event with speed dating status to all participants.

User must be an owner of the room in order to start speed dating process and become moderator.

Endpoint could return following errors:

* 8201 - Invalid speed dating shuffle mode \* 8202 - Invalid speed dating participants \* 8203 - Invalid speed dating seating limit \* 8204 - Invalid speed dating round duration \* 8205 - Speed dating already exists in hub

**Request:**

**Response:**

### Stop speed dating

**Method:** websocket

**Endpoint:** social:stopSpeedDating

**Request:**

**Response:**

### Get speed dating status

**Method:** websocket

**Endpoint:** social:getSpeedDatingStatus

**Description:** Endpoint returns speed dating status in room, in case if user participates in one.

Endpoint returns encounters for all participants in case if user is moderator, and only current user encounters in case if user is participant.

Each encounter contains a list of round sequential number, opponent id and opponent group. In case if user doesn't have encounter for the round, list will be null.

Encounter opponents example: `[[1, "opponentId1", "Candidate"], null, [2, "opponentId2", "Candidate"]]`

**Request:**

**Response:**

### Start speed dating event

**Event:** social:speedDatingStarted

**Data:**

### Stop speed dating event

**Event:** social:speedDatingStopped

**Data:**
