API Reference
Admin accounts made from the Amity Social Cloud Console also have access to a direct API to our servers. Each Admin account will be granted an Access Token that can be used in correspondence with the endpoints listed here.
For more information on how to retrieve your access token, see our documentation on:
Channel API
Query for Channels
/ Query for channels
Headers
Name | Data Type | Value |
|
|
|
|
|
|
Parameters
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 Channel
Create a new channel
Headers
Name | Data Type | Value |
|
|
|
|
|
|
Parameters
Name | Data Type | Description | Attributes |
|
| The name of the channel (must be unique) | Content |
|
| 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 Channel displayName
Update a channel's displayName
Headers
Name | Data Type | Value |
|
|
|
|
|
|
Parameters
Name | Data Type | Description | Attributes |
|
| The name of the channel (must be unique) | Content |
|
| The display name of the channel | Content |
Add Users to Channel
Add a list of users to a channel
Headers
Name | Data Type | Value |
|
|
|
|
|
|
Parameters
Name | Data Type | Description | Type | Attributes |
|
| The name of the channel | path | Content |
|
| An array of userIds to add to the channel | Content | Content |
Remove Users from Channel
Remove a list of users from a channel
Headers
Name | Data Type | Value |
|
|
|
|
|
|
Parameters
Name | Data Type | Description | Type | Attributes |
|
| The name of the channel | path | Content |
|
| An array of userIds to remove from the channel | Content | Content |
Mute Channel
Mute a channel
Headers
Name | Data Type | Value |
|
|
|
|
|
|
Parameters
Name | Data Type | Description | Type | Default |
|
| The name of the channel | path | Content |
|
| A period of time (in milliseconds) to mute the channel for | Content | Content |
Unmute Channel
Unmute a channel
Headers
Name | Data Type | Value |
|
|
|
|
|
|
Parameters
Name | Data Type | Description | Type | Default |
|
| The name of the channel | path | Content |
|
| A period of time (in milliseconds) to mute the channel | Content | 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 Channel
Mute users in a channel
Headers
Name | Data Type | Value |
|
|
|
|
|
|
Parameters
Name | Data Type | Description | Type | Default |
|
| The name of the channel | path | Content |
|
| A period of time (in milliseconds) to mute the users | Content | Content |
|
| An array of userIds to mute | Content | Content |
Unmute Users in Channel
Unmute users in a channel
Headers
Name | Data Type | Value |
|
|
|
|
|
|
Parameters
Name | Data Type | Description | Type | Default |
|
| The name of the channel | path | Content |
|
| A period of time (in milliseconds) to mute the users | Content | 0 * |
|
| An array of userIds to mute | Content | Content |
*Note: The endpoints for mute and unmute are exactly the same, users can be unmuted by setting their
mutePeriod
as 0.
Ban Users from Channel
Ban users from a channel
Headers
Name | Data Type | Value |
|
|
|
|
|
|
Parameters
Name | Data Type | Description | Type | Attributes |
|
| The name of the channel | path | Content |
|
| An array of userIds to ban | Content | Content |
Unban Users from Channel
Unban users from a channel
Headers
Name | Data Type | Value |
|
|
|
|
|
|
Parameters
Name | Data Type | Description | Type | Attributes |
|
| The name of the channel | path | Content |
|
| An array of userIds to unban | Content | Content |
Close a Channel
Close a channel
Headers
Name | Data Type | Value |
|
|
|
|
|
|
Parameters
Name | Data Type | Description | Type | Attributes |
|
| The name of the channel | path | Content |
*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.
Message API
Query for Messages
Query for messages
Headers
Name | Data Type | Value |
|
|
|
|
|
|
Parameters
Name | Data Type | Description | Attributes |
|
| The channelId to filter messages by | Content |
|
| 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 a message
Headers
Name | Data Type | Value |
|
|
|
|
|
|
Parameters
Name | Data Type | Description | Attributes |
|
| The messageId of the message to get | path |
Create a Message
Create a message in a channel
Headers
Name | Data Type | Value |
|
|
|
|
|
|
Parameters
Name | Data Type | Description | Attributes |
|
| The name of the channel to create a message in | Content |
|
| 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 Message
Delete a message in a channel
Headers
Name | Data Type | Value |
|
|
|
Parameters
Name | Data Type | Description | Type | Attributes |
|
| The messageId of the message to delete | path | Content |
Create Image Message
Create an image message in a channel
Headers
Name | Data Type | Value |
|
|
|
|
|
|
Parameters
Name | Data Type | Description | Attributes | Default |
|
| The name of the channel to create a message in | Content | Content |
|
| The image to be sent | Content | Content |
|
| The caption for the image |
| Content |
|
| The message tags |
| Content |
|
| The parent message of this message (if the message is a comment) |
| Content |
|
| If the original image size should be stored | Content |
|
Get Image Message
Get an image from a message
Headers
Name | Data Type | Value |
|
|
|
Parameters
Name | Data Type | Description | Type | Attributes |
|
| The messageId of the message to get image from | path | Content |
|
| 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.
Response
For more information on Image sizes, please have a look at our documentation on:
Create File Message
Create a file message in a channel
Headers
Name | Data Type | Value |
|
|
|
|
|
|
Parameters
Name | Data Type | Description | Attributes |
|
| The name of the channel to create a message in | Content |
|
| The image to be sent | Content |
|
| The message tags |
|
|
| The parent message of this message (if the message is a comment) |
|
Get File Message
Get a file from a message
Headers
Name | Data Type | Value |
|
|
|
Parameters
Name | Data Type | Description | Type | Attributes |
|
| The messageId of the message to get file from | path | Content |
Response
User API
Query for Users
Get a list of all users
Headers
Name | Data Type | Value |
|
|
|
|
|
|
Parameters
Name | Data Type | Description | Attributes | Default |
|
| Filter by name |
| Content |
|
| Filter users by | enum: |
|
|
| Return the next/previous set based on pagination token |
| Content |
|
| The number of results |
| 10 |
Update User
Update a user's information such as displayName, roles and metadata
Headers
Name | Data Type | Value |
|
|
|
|
|
|
Parameters
Name | Data Type | Description | Attributes |
|
| UserId to update | Content |
|
| The updated displayName |
|
|
| The updated roles |
|
|
| The updated metadata |
|
Global Ban User
Global ban a user, that user can no longer access the SDK
Headers
Name | Data Type | Value |
|
|
|
|
|
|
Parameters
Name | Data Type | Description | Attributes |
|
| The userId to global ban | Content |
Global Unban User
Global unban a user, that user can access the SDK again
Headers
Name | Data Type | Value |
|
|
|
|
|
|
Parameters
Name | Data Type | Description | Attributes |
|
| The userId to global unban | Content |
Clear User Flags
Clear the flags on a user
Headers
Name | Data Type | Value |
|
|
|
|
|
|
Parameters
Name | Data Type | Description | Type | Attributes |
|
| The userId to clear flags | path | Content |
Roles API
Query for Roles
Get a list of all roles
Headers
Name | Data Type | Value |
|
|
|
|
|
|
Parameters
Name | Data Type | Description | Attributes |
|
| Filter by role |
|
Add a Role
Add a role
Headers
Name | Data Type | Value |
|
|
|
|
|
|
Parameters
Name | Data Type | Description | Attributes |
|
| The name of the new role/s | Content |
|
| The list of permissions | Content |
*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.
Blacklists API
Query for Blacklisted Words
Get a list of all blacklisted words
Headers
Name | Data Type | Value |
|
|
|
|
|
|
Parameters
Name | Data Type | Description | Attributes |
|
| Filter by word |
|
Add Blacklisted Word
Add blacklisted work
Headers
Name | Data Type | Value |
|
|
|
|
|
|
Parameters
Name | Data Type | Description | Attributes |
|
| Word to be added | Content |
|
| Does word have to be an exact match |
|
Delete Blacklisted Word
Delete a blacklisted word
Headers
Name | Data Type | Value |
|
|
|
|
|
|
Parameters
Name | Data Type | Description | Attributes |
|
| Words to delete | Content |
Update Blacklisted Word
Update the word and/or settings of a blacklisted work
Headers
Name | Data Type | Value |
|
|
|
|
|
|
Parameters
Name | Data Type | Description | Type | Attributes |
|
| Word to be updated | path | Content |
|
| Word to be updated to | Content | Content |
|
| Does word have to be an exact match | Content |
|
Whitelists API
Query for Whitelisted URLs
Get a list of all whitelisted urls
Headers
Name | Data Type | Value |
|
|
|
|
|
|
Parameters
Name | Data Type | Description | Attributes |
|
| Filter by url |
|
Add Whitelisted URL
Add whitelisted url
Headers
Name | Data Type | Value |
|
|
|
|
|
|
Parameters
Name | Data Type | Description | Attributes |
|
| Url to be added | Content |
Delete Whitelisted URL
Delete a whitelisted url
Headers
Name | Data Type | Value |
|
|
|
|
|
|
Parameters
Name | Data Type | Description | Attributes |
|
| Urls to delete | Content |
Update Whitelisted URL
Update the url and/or settings of a whitelisted url
Headers
Name | Data Type | Value |
|
|
|
|
|
|
Parameters
Name | Data Type | Description | Type | Attributes |
|
| The url to be updated | path | Content |
|
| Url to be updated to | Content | Content |
Reactions API
Query for Reactors
Get a list of userIds who reacted to an item
Headers
Name | Data Type | Value |
|
|
|
|
|
|
Parameters
Name | Data Type | Description | Attributes |
|
| The referenceId to query reactors for | Content |
|
| The contentType of the referenceId | enum: |
- - - |
|
|
|
Create a Reaction
Create a reaction to an item as Admin
Headers
Name | Data Type | Value |
|
|
|
|
|
|
Parameters
Name | Data Type | Description | Attributes |
|
| The referenceId of the item | Content |
|
| The contentType of the referenceId | enum: |
|
| The name of the reaction | Content |
Delete a Reaction
Delete a reaction to an item as Admin
Headers
Name | Data Type | Value |
|
|
|
|
|
|
Parameters
Name | Data Type | Description | Attributes |
|
| The referenceId of the item | Content |
|
| The contentType of the referenceId | enum: |
|
| The name of the reaction | Content |
Query for Messages With Most Reactions
Get a list of messages with the most reactions of a certain name
Headers
Name | Data Type | Value |
|
|
|
|
|
|
Parameters
Name | Data Type | Description | Attributes |
|
| The number of results | Default: |
|
| The name of the reaction | Content |
Last updated