Roomcreation
Revision as of 13:26, 21 July 2026 by Ashley DeBon (talk | contribs) (Created page with "== Create Video Message Room == === Base URL === https://apimobile.callproof.com === Endpoint === /api/create-room === Purpose === Creates a one-to-one video message room b...")
Contents
Create Video Message Room
Base URL
https://apimobile.callproof.com
Endpoint
/api/create-room
Purpose
Creates a one-to-one video message room between the authenticated user and another user. If a room between those two users already exists, the existing room ID is returned instead of creating a duplicate.
HTTP Method
POST
Headers
| Header | Required | Description |
|---|---|---|
| Authorization | Yes | Bearer access token |
Security
- Yes – Requires Bearer Token authentication.
Parameters
Path Parameters
None.
Query Parameters
None.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
| toId | integer/string | Yes | User ID of the other participant. Must not be the same as the authenticated user |
Successful Response (200)
Indicates that the room was created successfully, or that an existing room between the users was found.
| Field | Type | Description |
|---|---|---|
| clientStatusCode | integer | Status indicator for the client (for example, 200) |
| user_id | integer | Identifier of the authenticated user |
| company_id | integer | Identifier of the authenticated user’s company |
| message | string | Confirmation message (for example, "Room created successfully") |
| room_id | string | Unique identifier of the video message room |
| uri | string | Requested resource URI |
Error Responses
| Status Code | Meaning |
|---|---|
| 200 | Validation / business-rule failure – response body uses clientStatusCode 401 with an error message
|
| 400 | Bad Request – the room could not be created |
| 401 | Unauthorized – missing, invalid, or expired Bearer token |
- Validation / rule (HTTP 200, clientStatusCode 401) – Missing
toId, ortoIdmatches the logged-in user (for example, "Provided user matched with login users! please try some other users"). - 400 – Room creation failed (for example, "Error while creating room"), including cases where cross-company messaging is not allowed for the recipient.
- 401 – Authentication failed or the access token is missing/expired.