Skip to content

Latest commit

 

History

History
49 lines (38 loc) · 1.68 KB

File metadata and controls

49 lines (38 loc) · 1.68 KB

API Reference

USERSCHATS • CONTACTS • FILESWEBSOCKETJSON


A collection of methods for managing contacts for the user. Each method requires authentication and thus should contain Authorization: Bearer <token> in the request header. Request body is a JSON object, but placeholders for data types instead of concrete samples might be used like so: <UUID> or "…" for strings.


1. Creating a contact

Creates a contact from a user. Only is stored internally within your profile. Users who are contacts may have more permissions over other users, such as initiate calls etc.

Path:

POST /users/me/contacts

Request body:

{
    "name": "…",          // custom display name for the user with the `id`
    "isFavorite": <Bool>, // use to give the user with `id` even more permissions
    "user": {
       "id": <Int>
    }
}

Response: ContactInfo object.


2. Removing a contact

Removes a contact. The contact's user remains intact.

Path:

DELETE /users/me/contacts/<id>

Response: OK


3. Get all contacts

Gets all the contacts of the current user.

Path:

GET /users/me/contacts

Response: an array of ContactInfo objects.