Difference between revisions of "Room creation"
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...") |
Ashley DeBon (talk | contribs) (→Create Video Message Room) |
||
| Line 1: | Line 1: | ||
| − | == Create Video Message Room == | + | == [[Mobile_API]] »Create Video Message Room == |
=== Base URL === | === Base URL === | ||
Revision as of 13:34, 21 July 2026
Contents
Mobile_API »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 already exists between those two users, 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 | Unique identifier of the other user to open a room with (must not be the authenticated user’s own ID) |
Successful Response (200)
Indicates that a room was created, or an existing room 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 room identifier |
| uri | string | Requested resource URI |
Error Responses
| Status Code | Meaning |
|---|---|
| 200 | Validation / business-rule failed – 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, cross-company messaging not allowed, or "Error while creating room").
- 401 – Authentication failed or the access token is missing/expired.