Admin accounts made from the Admin Panel also have access to a direct API to our servers. Each Admin account will be granted an Access Token that can be used in correspondance with the endpoints listed here.
For more information on how to retrieve your access token, see our documentation on:
/ Query for channels
POST /api/v2/channels
Name | Data Type | Value |
|
|
|
|
|
|
Name | Data Type | Description | Attributes |
|
| The Admin's membership status to filter channels by |
|
|
| The userId to filter channels by |
|
|
| The tags to filter channels by |
|
|
| The tags to exclude in channel filter |
|
- - - |
|
|
|
Create a new channel
POST /api/v2/channel
Name | Data Type | Value |
|
|
|
|
|
|
Name | Data Type | Description | Attributes |
|
| The name of the channel (must be unique) | ​ |
|
| The channel type | enum: |
|
| The display name of the channel |
|
|
| The channel metadata |
|
|
| The channel tags |
|
|
| An array of userIds to populate the channel |
|
Update a channel's displayName
POST /api/v2/channel/displayName
Name | Data Type | Value |
|
|
|
|
|
|
Name | Data Type | Description | Attributes |
|
| The name of the channel (must be unique) | ​ |
|
| The display name of the channel | ​ |
Add a list of users to a channel
POST /api/v2/channel/:channelId/users
Name | Data Type | Value |
|
|
|
|
|
|
Name | Data Type | Description | Type | Attributes |
|
| The name of the channel | path | ​ |
|
| An array of userIds to add to the channel | ​ | ​ |
Remove a list of users from a channel
DELETE /api/v2/channel/:channelId/users
Name | Data Type | Value |
|
|
|
|
|
|
Name | Data Type | Description | Type | Attributes |
|
| The name of the channel | path | ​ |
|
| An array of userIds to remove from the channel | ​ | ​ |
Mute a channel
PUT /api/v2/channel/:channelId/mute
Name | Data Type | Value |
|
|
|
|
|
|
Name | Data Type | Description | Type | Default |
|
| The name of the channel | path | ​ |
|
| A period of time (in milliseconds) to mute the channel for | ​ | ​ |
Unmute a channel
PUT /api/v2/channel/:channelId/mute
Name | Data Type | Value |
|
|
|
|
|
|
Name | Data Type | Description | Type | Default |
|
| The name of the channel | path | ​ |
|
| A period of time (in milliseconds) to mute the channel | ​ | 0 * |
*Note: The endpoints for mute and unmute are exactly the same, channels can be unmuted by setting their
mutePeriod
as 0.
Mute users in a channel
PUT /api/v2/channel/:channelId/users/mute
Name | Data Type | Value |
|
|
|
|
|
|
Name | Data Type | Description | Type | Default |
|
| The name of the channel | path | ​ |
|
| A period of time (in milliseconds) to mute the users | ​ | ​ |
|
| An array of userIds to mute | ​ | ​ |
Unmute users in a channel
PUT /api/v2/channel/:channelId/users/mute
Name | Data Type | Value |
|
|
|
|
|
|
Name | Data Type | Description | Type | Default |
|
| The name of the channel | path | ​ |
|
| A period of time (in milliseconds) to mute the users | ​ | 0 * |
|
| An array of userIds to mute | ​ | ​ |
*Note: The endpoints for mute and unmute are exactly the same, users can be unmuted by setting their
mutePeriod
as 0.
Ban users from a channel
POST /api/v2/channel/:channelId/users/ban
Name | Data Type | Value |
|
|
|
|
|
|
Name | Data Type | Description | Type | Attributes |
|
| The name of the channel | path | ​ |
|
| An array of userIds to ban | ​ | ​ |
Unban users from a channel
POST /api/v2/channel/:channelId/users/unban
Name | Data Type | Value |
|
|
|
|
|
|
Name | Data Type | Description | Type | Attributes |
|
| The name of the channel | path | ​ |
|
| An array of userIds to unban | ​ | ​ |
Close a channel
POST /api/v2/channel/:channelId/close
Name | Data Type | Value |
|
|
|
|
|
|
Name | Data Type | Description | Type | Attributes |
|
| The name of the channel | path | ​ |
*Note: Currently, closing a channel is irreversible. Once a channel has been closed, all users will be immediately kicked from the channel and all messages deleted in the channel.
Query for messages
POST /api/v2/messages
Name | Data Type | Value |
|
|
|
|
|
|
Name | Data Type | Description | Attributes |
|
| The channelId to filter messages by | ​ |
|
| The messageId of the parent message to filter messages by |
|
|
| Filter results to only show messages with no parentId | default: |
|
| The tags to filter messages by |
|
|
| The tags to exclude in message filter |
|
- - - - |
|
|
|
Get a message
GET /api/v2/message/:messageId
Name | Data Type | Value |
|
|
|
|
|
|
Name | Data Type | Description | Attributes |
|
| The messageId of the message to get | path |
Create a message in a channel
POST /api/v2/message
Name | Data Type | Value |
|
|
|
|
|
|
Name | Data Type | Description | Attributes |
|
| The name of the channel to create a message in | ​ |
|
| The message type | enum*: |
|
| The message data (any text has to be stored in |
|
|
| The message tags |
|
|
| The parent message of this message (if the message is a comment) |
|
*Note: When the message type is
text
, our API will expect there to be a text key in the data parameter. This will be the most common use of the message API. When the message type iscustom
, Admin can store any data they wish in the data payload.
Delete a message in a channel
DELETE /api​/v2​/message​/:messageId
Name | Data Type | Value |
|
|
|
Name | Data Type | Description | Type | Attributes |
|
| The messageId of the message to delete | path | ​ |
Create an image message in a channel
POST /api/v2/messages/images
Name | Data Type | Value |
|
|
|
|
|
|
Name | Data Type | Description | Attributes | Default |
|
| The name of the channel to create a message in | ​ | ​ |
|
| The image to be sent | ​ | ​ |
|
| The caption for the image |
| ​ |
|
| The message tags |
| ​ |
|
| The parent message of this message (if the message is a comment) |
| ​ |
|
| If the original image size should be stored | ​ |
|
Get an image from a message
GET /api/v2/messages/:messageId/images?size
Name | Data Type | Value |
|
|
|
Name | Data Type | Description | Type | Attributes |
|
| The messageId of the message to get image from | path | ​ |
|
| The size of the image to retrieve | query | enum: |
*Note: The
full
size is only available when an image hasfullImage: true
when it was uploaded.
{binary <string>}
For more information on Image sizes, please have a look at our documentation on:
​Image Message​
Create a file message in a channel
POST /api/v2/messages/files
Name | Data Type | Value |
|
|
|
|
|
|
Name | Data Type | Description | Attributes |
|
| The name of the channel to create a message in | ​ |
|
| The image to be sent | ​ |
|
| The message tags |
|
|
| The parent message of this message (if the message is a comment) |
|
Get a file from a message
GET /api/v2/messages/:messageId/files
Name | Data Type | Value |
|
|
|
Name | Data Type | Description | Type | Attributes |
|
| The messageId of the message to get file from | path | ​ |
{binary <string>}
Get a list of all users
GET /api/v2/users
Name | Data Type | Value |
|
|
|
|
|
|
Name | Data Type | Description | Attributes | Default |
|
| Filter by name |
| ​ |
|
| Filter users by | enum: |
|
|
| Return the next/previous set based on pagination token |
| ​ |
|
| The number of results |
| 10 |
Update a user's information such as displayName, roles and metadata
PUT /api/v2/users
Name | Data Type | Value |
|
|
|
|
|
|
Name | Data Type | Description | Attributes |
|
| UserId to update | ​ |
|
| The updated displayName |
|
|
| The updated roles |
|
|
| The updated metadata |
|
Global ban a user, that user can no longer access the SDK
POST /api/v2/users/ban
Name | Data Type | Value |
|
|
|
|
|
|
Name | Data Type | Description | Attributes |
|
| The userId to global ban | ​ |
Global unban a user, that user can access the SDK again
POST /api/v2/users/unban
Name | Data Type | Value |
|
|
|
|
|
|
Name | Data Type | Description | Attributes |
|
| The userId to global unban | ​ |
Clear the flags on a user
DELETE /api/v2/users/:userId/flags
Name | Data Type | Value |
|
|
|
|
|
|
Name | Data Type | Description | Type | Attributes |
|
| The userId to clear flags | path | ​ |
Get a list of all roles
GET /api/v2/roles
Name | Data Type | Value |
|
|
|
|
|
|
Name | Data Type | Description | Attributes |
|
| Filter by role |
|
Add a role
PUT /api/v2/roles
Name | Data Type | Value |
|
|
|
|
|
|
Name | Data Type | Description | Attributes |
|
| The name of the new role/s | ​ |
|
| The list of permissions | ​ |
*Note: The permissions and roles on the SDK are still a work in progress. We do not yet have predefined permissions to assign to new roles. A revamp of our role system will be coming soon.
Get a list of all blacklisted words
GET /api/v2/blacklist/records
Name | Data Type | Value |
|
|
|
|
|
|
Name | Data Type | Description | Attributes |
|
| Filter by word |
|
Add blacklisted work
POST /api/v2/blacklist/records
Name | Data Type | Value |
|
|
|
|
|
|
Name | Data Type | Description | Attributes |
|
| Word to be added | ​ |
|
| Does word have to be an exact match |
|
Delete a blacklisted word
DELETE /api/v2/blacklist/records
Name | Data Type | Value |
|
|
|
|
|
|
Name | Data Type | Description | Attributes |
|
| Words to delete | ​ |
Update the word and/or settings of a blacklisted work
PUT /api/v2/blacklist/records/:ruleId
Name | Data Type | Value |
|
|
|
|
|
|
Name | Data Type | Description | Type | Attributes |
|
| Word to be updated | path | ​ |
|
| Word to be updated to | ​ | ​ |
|
| Does word have to be an exact match | ​ |
|
Get a list of all whitelisted urls
GET /api/v2/whitelist/records
Name | Data Type | Value |
|
|
|
|
|
|
Name | Data Type | Description | Attributes |
|
| Filter by url |
|
Add whitelisted url
POST /api/v2/whitelist/records
Name | Data Type | Value |
|
|
|
|
|
|
Name | Data Type | Description | Attributes |
|
| Url to be added | ​ |
Delete a whitelisted url
DELETE /api/v2/whitelist/records
Name | Data Type | Value |
|
|
|
|
|
|
Name | Data Type | Description | Attributes |
|
| Urls to delete | ​ |
Update the url and/or settings of a whitelisted url
PUT /api/v2/whitelist/records/:ruleId
Name | Data Type | Value |
|
|
|
|
|
|
Name | Data Type | Description | Type | Attributes |
|
| The url to be updated | path | ​ |
|
| Url to be updated to | ​ | ​ |
Get a list of userIds who reacted to an item
GET /api/v2/reactions
Name | Data Type | Value |
|
|
|
|
|
|
Name | Data Type | Description | Attributes |
|
| The referenceId to query reactors for | ​ |
|
| The contentType of the referenceId | enum: |
- - - |
|
|
|
Create a reaction to an item as Admin
POST /api/v2/reactions
Name | Data Type | Value |
|
|
|
|
|
|
Name | Data Type | Description | Attributes |
|
| The referenceId of the item | ​ |
|
| The contentType of the referenceId | enum: |
|
| The name of the reaction | ​ |
Delete a reaction to an item as Admin
DELETE /api/v2/reactions
Name | Data Type | Value |
|
|
|
|
|
|
Name | Data Type | Description | Attributes |
|
| The referenceId of the item | ​ |
|
| The contentType of the referenceId | enum: |
|
| The name of the reaction | ​ |
Get a list of messages with the most reactions of a certain name
GET /api/v2/reactions/messages/most
Name | Data Type | Value |
|
|
|
|
|
|
Name | Data Type | Description | Attributes |
|
| The number of results | Default: |
|
| The name of the reaction | ​ |