Download OpenAPI specification:Download
Chat Adapter documentation.
Chat Adapter documentation.
Retrieve the information of the message with the matching ID.
This operation requires one of the following:
- super user permission (i.e. user typeId =100, or internal service)
- a user subscription to the topic with 'read' permission
- an organization subscription to the topic with the 'read' permission, and the user is in the organization with any role
readStatusForOrg | string (objectId) ^[0-9a-z]{24}$ Example: readStatusForOrg=0123456789ab0123456789ab When specified, Note that this can only be used by users who have a role in the specified organization. |
$expand | string Value: "user" Include extra information that are not included in responses by default in the response.
By default, the fields that supports this query contain only You can expand recursively by specifying nested fields after a dot (.). until For example, requesting You can use the expand param on any endpoint which returns expandable fields, including list, create, and update endpoints. You can expand multiple objects at once by identifying multiple items in comma-separated style. Examples:Include full category and organization information in the response. Before expanding,
By using $expand parameter,
It will returns full information:
|
{- "id": "0123456789ab0123456789ab",
- "category": "string",
- "title": "Title",
- "content": "This is a message",
- "customFields": {
- "notes": "This is a custom note field"
}, - "organizationId": "0123456789ab0123456789ab",
- "priority": "important",
- "receiptId": "0123456789ab0123456789ab",
- "readStatus": "read",
- "senderType": "superUser",
- "senderId": "0123456789ab0123456789ab",
- "topicId": "0123456789ab0123456789ab",
- "typeId": "message",
- "createdAt": "2023-01-01T00:00:00.000Z",
- "updatedAt": "2023-01-01T00:00:00.000Z"
}
Soft delete an existing message.
This operation requires one of the following:
- super user permission (i.e. user typeId =100, or internal service)
- the message belongs to the authenticated user
{- "code": "string",
- "message": "string",
- "target": "string",
- "details": [
- { }
], - "innererror": {
- "code": "string",
- "innererror": { }
}
}
Update the information of an existing message.
This operation requires one of the following:
- super user permission (i.e. user typeId =100, or internal service)
- a user subscription to the topic with 'read' permission
- an organization subscription to the topic with the 'read' permission, and the user is in the organization with any role
$expand | string Value: "user" Include extra information that are not included in responses by default in the response.
By default, the fields that supports this query contain only You can expand recursively by specifying nested fields after a dot (.). until For example, requesting You can use the expand param on any endpoint which returns expandable fields, including list, create, and update endpoints. You can expand multiple objects at once by identifying multiple items in comma-separated style. Examples:Include full category and organization information in the response. Before expanding,
By using $expand parameter,
It will returns full information:
|
Patch Message body
title | string (title) Title of the message |
customFields | object (customFields) CustomFields of the message. What's inside depends on what was configured when initializing the service. |
content | string (content) Content of the message |
priority | string (priority) Indicate how important the message is |
category | string (category) Category of the message (for human management). |
{- "title": "Title",
- "customFields": {
- "notes": "This is a custom note field"
}, - "content": "This is a message",
- "priority": "important",
- "category": "string"
}
{- "id": "0123456789ab0123456789ab",
- "category": "string",
- "title": "Title",
- "content": "This is a message",
- "customFields": {
- "notes": "This is a custom note field"
}, - "organizationId": "0123456789ab0123456789ab",
- "priority": "important",
- "receiptId": "0123456789ab0123456789ab",
- "readStatus": "read",
- "senderType": "superUser",
- "senderId": "0123456789ab0123456789ab",
- "topicId": "0123456789ab0123456789ab",
- "typeId": "message",
- "createdAt": "2023-01-01T00:00:00.000Z",
- "updatedAt": "2023-01-01T00:00:00.000Z"
}
Create a new Message.
This operation requires one of the following:
- super user permission (i.e. user typeId =100, or internal service)
- the message to be a private chat message
- a user subscription to the topic with 'write' permission
- an organization subscription to the topic with the 'write' permission, and the user is in the organization with any role
$expand | string Value: "user" Include extra information that are not included in responses by default in the response.
By default, the fields that supports this query contain only You can expand recursively by specifying nested fields after a dot (.). until For example, requesting You can use the expand param on any endpoint which returns expandable fields, including list, create, and update endpoints. You can expand multiple objects at once by identifying multiple items in comma-separated style. Examples:Include full category and organization information in the response. Before expanding,
By using $expand parameter,
It will returns full information:
|
Create Message body
category required | string (category) Category of the message (for human management). |
title | string (title) Title of the message |
customFields | object (customFields) CustomFields of the message. What's inside depends on what was configured when initializing the service. |
content required | string (content) Content of the message |
organizationId | string (objectId) ^[0-9a-z]{24}$ A 24 character hexadecimal string value. |
priority required | string (priority) Indicate how important the message is |
receiptId | string (objectId) ^[0-9a-z]{24}$ A 24 character hexadecimal string value. |
senderType required | string (senderType) Enum: "superUser" "system" "normalUser" The type of the sender who sent this message |
senderId | string (objectId) ^[0-9a-z]{24}$ A 24 character hexadecimal string value. |
topicId required | string (objectId) ^[0-9a-z]{24}$ A 24 character hexadecimal string value. |
typeId required | string (typeId) Value: "message" The type of message (e.g., image for image uploads, or file for file uploads) |
{- "category": "string",
- "title": "Title",
- "customFields": {
- "notes": "This is a custom note field"
}, - "content": "This is a message",
- "organizationId": "0123456789ab0123456789ab",
- "priority": "important",
- "receiptId": "0123456789ab0123456789ab",
- "senderType": "superUser",
- "senderId": "0123456789ab0123456789ab",
- "topicId": "0123456789ab0123456789ab",
- "typeId": "message"
}
{- "id": "0123456789ab0123456789ab",
- "category": "string",
- "title": "Title",
- "content": "This is a message",
- "customFields": {
- "notes": "This is a custom note field"
}, - "organizationId": "0123456789ab0123456789ab",
- "priority": "important",
- "receiptId": "0123456789ab0123456789ab",
- "readStatus": "read",
- "senderType": "superUser",
- "senderId": "0123456789ab0123456789ab",
- "topicId": "0123456789ab0123456789ab",
- "typeId": "message",
- "createdAt": "2023-01-01T00:00:00.000Z",
- "updatedAt": "2023-01-01T00:00:00.000Z"
}
Get list of all messages.
This operation requires the super user permission (i.e. user typeId =100, or internal service)
$filter | string Return only items which matches to a condition (The operators below are listed in order of precedence from highest to lowest).
| |||||||||||||||||||||||||||||||||
$top | integer number of object want to fetch | |||||||||||||||||||||||||||||||||
$skip | integer number of object want to skip | |||||||||||||||||||||||||||||||||
$nextToken | string Token for get next batch of list data | |||||||||||||||||||||||||||||||||
$previousToken | string Token for get previous batch of list data | |||||||||||||||||||||||||||||||||
$expand | string Value: "user" Include extra information that are not included in responses by default in the response.
By default, the fields that supports this query contain only You can expand recursively by specifying nested fields after a dot (.). until For example, requesting You can use the expand param on any endpoint which returns expandable fields, including list, create, and update endpoints. You can expand multiple objects at once by identifying multiple items in comma-separated style. Examples:Include full category and organization information in the response. Before expanding,
By using $expand parameter,
It will returns full information:
|
{- "total": 0,
- "count": 0,
- "@nextLink": "string",
- "@previousLink": "string",
- "value": [
- {
- "id": "0123456789ab0123456789ab",
- "category": "string",
- "title": "Title",
- "content": "This is a message",
- "customFields": {
- "notes": "This is a custom note field"
}, - "organizationId": "0123456789ab0123456789ab",
- "priority": "important",
- "receiptId": "0123456789ab0123456789ab",
- "readStatus": "read",
- "senderType": "superUser",
- "senderId": "0123456789ab0123456789ab",
- "topicId": "0123456789ab0123456789ab",
- "typeId": "message",
- "createdAt": "2023-01-01T00:00:00.000Z",
- "updatedAt": "2023-01-01T00:00:00.000Z"
}
]
}
List messages that are visible to a given user. These messages include all topics that the user is subscribed to with the 'read' permission. This endpoint also give user's read status for each message.
This operation requires the login user.
userId required | any |
$filter | string Return only items which matches to a condition (The operators below are listed in order of precedence from highest to lowest).
| |||||||||||||||||||||||||||||||||
$top | integer number of object want to fetch | |||||||||||||||||||||||||||||||||
$skip | integer number of object want to skip | |||||||||||||||||||||||||||||||||
$nextToken | string Token for get next batch of list data | |||||||||||||||||||||||||||||||||
$previousToken | string Token for get previous batch of list data | |||||||||||||||||||||||||||||||||
$expand | string Value: "user" Include extra information that are not included in responses by default in the response.
By default, the fields that supports this query contain only You can expand recursively by specifying nested fields after a dot (.). until For example, requesting You can use the expand param on any endpoint which returns expandable fields, including list, create, and update endpoints. You can expand multiple objects at once by identifying multiple items in comma-separated style. Examples:Include full category and organization information in the response. Before expanding,
By using $expand parameter,
It will returns full information:
|
{- "total": 0,
- "count": 0,
- "@nextLink": "string",
- "@previousLink": "string",
- "value": [
- {
- "id": "0123456789ab0123456789ab",
- "category": "string",
- "title": "Title",
- "content": "This is a message",
- "customFields": {
- "notes": "This is a custom note field"
}, - "organizationId": "0123456789ab0123456789ab",
- "priority": "important",
- "receiptId": "0123456789ab0123456789ab",
- "readStatus": "read",
- "senderType": "superUser",
- "senderId": "0123456789ab0123456789ab",
- "topicId": "0123456789ab0123456789ab",
- "typeId": "message",
- "createdAt": "2023-01-01T00:00:00.000Z",
- "updatedAt": "2023-01-01T00:00:00.000Z"
}
]
}
Updates read status of messages in a topic. Messages can be read by both users and organizations. In the chat service, if a message is marked as read, all messages in the same topic with createdAt before the message will also be marked as read.
This operation requires one of the following:
- super user permission (i.e. user typeId =100, or internal service)
- userId for read status belongs to the authenticated user
- organizationId for read status belongs to organization that the authenticated user belongs to (with any role)
This operation also requires a subscription to the topic with 'read' permission, either via user or by organization.
Mark message read body
userId required | string |
messageId required | string (objectId) ^[0-9a-z]{24}$ A 24 character hexadecimal string value. |
{- "organizationId": "string",
- "messageId": "0123456789ab0123456789ab"
}
{- "code": "string",
- "message": "string",
- "target": "string",
- "details": [
- { }
], - "innererror": {
- "code": "string",
- "innererror": { }
}
}
List messages that belong to one topic. Users can only retrieve messages they have permission to read. This endpoint also gives read status for each message.
This operation requires one of the following:
- super user permission (i.e. user typeId =100, or internal service)
- a user subscription to the topic with 'read' permission
- an organization subscription to the topic with the 'read' permission, and the user is in the organization with any role
topicId required | any |
readStatusForOrg | string (objectId) ^[0-9a-z]{24}$ Example: readStatusForOrg=0123456789ab0123456789ab When specified, Note that this can only be used by users who have a role in the specified organization. | |||||||||||||||||||||||||||||||||
$filter | string Return only items which matches to a condition (The operators below are listed in order of precedence from highest to lowest).
| |||||||||||||||||||||||||||||||||
$top | integer number of object want to fetch | |||||||||||||||||||||||||||||||||
$skip | integer number of object want to skip | |||||||||||||||||||||||||||||||||
$nextToken | string Token for get next batch of list data | |||||||||||||||||||||||||||||||||
$previousToken | string Token for get previous batch of list data | |||||||||||||||||||||||||||||||||
$expand | string Value: "user" Include extra information that are not included in responses by default in the response.
By default, the fields that supports this query contain only You can expand recursively by specifying nested fields after a dot (.). until For example, requesting You can use the expand param on any endpoint which returns expandable fields, including list, create, and update endpoints. You can expand multiple objects at once by identifying multiple items in comma-separated style. Examples:Include full category and organization information in the response. Before expanding,
By using $expand parameter,
It will returns full information:
|
{- "total": 0,
- "count": 0,
- "@nextLink": "string",
- "@previousLink": "string",
- "value": [
- {
- "id": "0123456789ab0123456789ab",
- "category": "string",
- "title": "Title",
- "content": "This is a message",
- "customFields": {
- "notes": "This is a custom note field"
}, - "organizationId": "0123456789ab0123456789ab",
- "priority": "important",
- "receiptId": "0123456789ab0123456789ab",
- "readStatus": "read",
- "senderType": "superUser",
- "senderId": "0123456789ab0123456789ab",
- "topicId": "0123456789ab0123456789ab",
- "typeId": "message",
- "createdAt": "2023-01-01T00:00:00.000Z",
- "updatedAt": "2023-01-01T00:00:00.000Z"
}
]
}
List subscriptions that belong to one topic.
This operation requires one of the following:
- super user permission (i.e. user typeId =100, or internal service)
- a user subscription to the topic with 'read' permission
- an organization subscription to the topic with the 'read' permission, and the user is in the organization with any role
topicId required | any |
$filter | string Return only items which matches to a condition (The operators below are listed in order of precedence from highest to lowest).
| |||||||||||||||||||||||||||||||||
$top | integer number of object want to fetch | |||||||||||||||||||||||||||||||||
$skip | integer number of object want to skip | |||||||||||||||||||||||||||||||||
$nextToken | string Token for get next batch of list data | |||||||||||||||||||||||||||||||||
$previousToken | string Token for get previous batch of list data | |||||||||||||||||||||||||||||||||
$expand | string Value: "user" Include extra information that are not included in responses by default in the response.
By default, the fields that supports this query contain only You can expand recursively by specifying nested fields after a dot (.). until For example, requesting You can use the expand param on any endpoint which returns expandable fields, including list, create, and update endpoints. You can expand multiple objects at once by identifying multiple items in comma-separated style. Examples:Include full category and organization information in the response. Before expanding,
By using $expand parameter,
It will returns full information:
|
{- "total": 0,
- "count": 0,
- "@nextLink": "string",
- "@previousLink": "string",
- "value": [
- {
- "id": "0123456789ab0123456789ab",
- "topicId": "0123456789ab0123456789ab",
- "organizationId": "0123456789ab0123456789ab",
- "userId": "0123456789ab0123456789ab",
- "approved": true,
- "permissions": [
- "read"
], - "subscribedAt": "2023-01-01T00:00:00.000Z",
- "customFields": {
- "notes": "This is a custom note field"
}
}
]
}
Creates a subscription. A subscription gives permission over a topic. Subscriptions can be created for users or for organizations. Duplicate subscriptions for the same user or organization to the same topic are not allowed.
This operation requires one of the following:
- super user permission (i.e. user typeId =100, or internal service)
- a user subscription to the topic with 'admin' permission
- an organization subscription to the topic with the 'admin' permission, and the user is in the organization with any role
$expand | string Value: "user" Include extra information that are not included in responses by default in the response.
By default, the fields that supports this query contain only You can expand recursively by specifying nested fields after a dot (.). until For example, requesting You can use the expand param on any endpoint which returns expandable fields, including list, create, and update endpoints. You can expand multiple objects at once by identifying multiple items in comma-separated style. Examples:Include full category and organization information in the response. Before expanding,
By using $expand parameter,
It will returns full information:
|
Create Subscription body
userId required | string ID of the user to subscribe |
topicId required | string Topic ID of the message |
permissions | Array of strings (permissions) Permissions granted to user |
approved | boolean (approved) Whether the subscription is approved |
customFields | object (customFields) CustomFields of the message. What's inside depends on what was configured when initializing the service. |
{- "organizationId": "string",
- "topicId": "string",
- "permissions": "read",
- "approved": true,
- "customFields": {
- "notes": "This is a custom note field"
}
}
{- "id": "0123456789ab0123456789ab",
- "topicId": "0123456789ab0123456789ab",
- "organizationId": "0123456789ab0123456789ab",
- "userId": "0123456789ab0123456789ab",
- "approved": true,
- "permissions": [
- "read"
], - "subscribedAt": "2023-01-01T00:00:00.000Z",
- "customFields": {
- "notes": "This is a custom note field"
}
}
Lists all subscriptions.
This operation requires the super user permission (i.e. user typeId =100, or internal service)
$filter | string Return only items which matches to a condition (The operators below are listed in order of precedence from highest to lowest).
| |||||||||||||||||||||||||||||||||
$top | integer number of object want to fetch | |||||||||||||||||||||||||||||||||
$skip | integer number of object want to skip | |||||||||||||||||||||||||||||||||
$nextToken | string Token for get next batch of list data | |||||||||||||||||||||||||||||||||
$previousToken | string Token for get previous batch of list data | |||||||||||||||||||||||||||||||||
$expand | string Value: "user" Include extra information that are not included in responses by default in the response.
By default, the fields that supports this query contain only You can expand recursively by specifying nested fields after a dot (.). until For example, requesting You can use the expand param on any endpoint which returns expandable fields, including list, create, and update endpoints. You can expand multiple objects at once by identifying multiple items in comma-separated style. Examples:Include full category and organization information in the response. Before expanding,
By using $expand parameter,
It will returns full information:
|
{- "total": 0,
- "count": 0,
- "@nextLink": "string",
- "@previousLink": "string",
- "value": [
- {
- "id": "0123456789ab0123456789ab",
- "topicId": "0123456789ab0123456789ab",
- "organizationId": "0123456789ab0123456789ab",
- "userId": "0123456789ab0123456789ab",
- "approved": true,
- "permissions": [
- "read"
], - "subscribedAt": "2023-01-01T00:00:00.000Z",
- "customFields": {
- "notes": "This is a custom note field"
}
}
]
}
Get a subscription by ID.
This operation requires the login user, and user subscribed to the topic
$expand | string Value: "user" Include extra information that are not included in responses by default in the response.
By default, the fields that supports this query contain only You can expand recursively by specifying nested fields after a dot (.). until For example, requesting You can use the expand param on any endpoint which returns expandable fields, including list, create, and update endpoints. You can expand multiple objects at once by identifying multiple items in comma-separated style. Examples:Include full category and organization information in the response. Before expanding,
By using $expand parameter,
It will returns full information:
|
{- "id": "0123456789ab0123456789ab",
- "topicId": "0123456789ab0123456789ab",
- "organizationId": "0123456789ab0123456789ab",
- "userId": "0123456789ab0123456789ab",
- "approved": true,
- "permissions": [
- "read"
], - "subscribedAt": "2023-01-01T00:00:00.000Z",
- "customFields": {
- "notes": "This is a custom note field"
}
}
Delete subscription by ID.
This operation requires one of the following:
- super user permission (i.e. user typeId =100, or internal service)
- a user subscription to the topic with 'admin' permission
- an organization subscription to the topic with the 'admin' permission, and the user is in the organization with any role
- the subscription belongs to the user in question or the organization the user is in (via any role)
{- "code": "string",
- "message": "string",
- "target": "string",
- "details": [
- { }
], - "innererror": {
- "code": "string",
- "innererror": { }
}
}
Get list of all topics This operation requires superuser permission (i.e. user typeId =100, or internal service)
Supported $expands
user
- expandsownerIds
toowners
arrayorganization
- expandsownerIds
toowners
arraysubscribedUsers
- appendssubscriptions
array to each topic, containing expandedusers
key for each subscriptionmessage
- appendslastMessage
key to each topic, containing expandedmessage
object
This operation requires the super user permission (i.e. user typeId =100, or internal service)
$filter | string Return only items which matches to a condition (The operators below are listed in order of precedence from highest to lowest).
| |||||||||||||||||||||||||||||||||
$top | integer number of object want to fetch | |||||||||||||||||||||||||||||||||
$skip | integer number of object want to skip | |||||||||||||||||||||||||||||||||
$nextToken | string Token for get next batch of list data | |||||||||||||||||||||||||||||||||
$previousToken | string Token for get previous batch of list data | |||||||||||||||||||||||||||||||||
$expand | string Value: "user" Include extra information that are not included in responses by default in the response.
By default, the fields that supports this query contain only You can expand recursively by specifying nested fields after a dot (.). until For example, requesting You can use the expand param on any endpoint which returns expandable fields, including list, create, and update endpoints. You can expand multiple objects at once by identifying multiple items in comma-separated style. Examples:Include full category and organization information in the response. Before expanding,
By using $expand parameter,
It will returns full information:
|
{- "total": 0,
- "count": 0,
- "@nextLink": "string",
- "@previousLink": "string",
- "value": [
- {
- "id": "0123456789ab0123456789ab",
- "name": "topic-name",
- "typeId": "channel",
- "app": "user",
- "isPublic": true,
- "lastMessageAt": "2023-01-01T00:00:00.000Z",
- "lastMessageId": "0123456789ab0123456789ab",
- "ownerType": "user",
- "ownerIds": [
- "0123456789ab0123456789ab"
], - "unreadCount": 3,
- "customFields": {
- "notes": "This is a custom note field"
}, - "createdAt": "2023-01-01T00:00:00.000Z",
- "updatedAt": "2023-01-01T00:00:00.000Z"
}
]
}
Create a new topic.
If a topic is created with ownerType=user
, then the current user will be
subscribed to the topic.
In addition, if ownerIds
is provided with ownerType=user
, then
the provided users will also be subscribed to the topic.
If a topic is created with ownerType=organization
, then the organization
ownerIds provided will be subscribed to the topic.
For Organization owners, if no ownerIds are provided, the topic will be created with no owners or subscriptions. This means that no users will be able to access or modify the topic. Ensure that at least one owner is specified when using organization owners.
Other than being logged in to the platform, this request has no other authentication restrictions.
$expand | string Value: "user" Include extra information that are not included in responses by default in the response.
By default, the fields that supports this query contain only You can expand recursively by specifying nested fields after a dot (.). until For example, requesting You can use the expand param on any endpoint which returns expandable fields, including list, create, and update endpoints. You can expand multiple objects at once by identifying multiple items in comma-separated style. Examples:Include full category and organization information in the response. Before expanding,
By using $expand parameter,
It will returns full information:
|
Create Topic
name required | string Name of the topic |
typeId required | string Enum: "channel" "private" The type of topic (used for configuring who can subscribe) |
app | string Which App the topic belongs to. |
isPublic | boolean If the topic public to normal user. |
ownerType required | string Enum: "user" "organization" Type of the owner |
ownerIds required | Array of strings (ObjectId) |
customFields | object (customFields) CustomFields of the message. What's inside depends on what was configured when initializing the service. |
{- "name": "topic-name",
- "typeId": "channel",
- "app": "user",
- "isPublic": true,
- "ownerType": "user",
- "ownerIds": [
- "0123456789ab0123456789ab"
], - "customFields": {
- "notes": "This is a custom note field"
}
}
{- "id": "0123456789ab0123456789ab",
- "name": "topic-name",
- "typeId": "channel",
- "app": "user",
- "isPublic": true,
- "lastMessageAt": "2023-01-01T00:00:00.000Z",
- "lastMessageId": "0123456789ab0123456789ab",
- "ownerType": "user",
- "ownerIds": [
- "0123456789ab0123456789ab"
], - "unreadCount": 3,
- "customFields": {
- "notes": "This is a custom note field"
}, - "createdAt": "2023-01-01T00:00:00.000Z",
- "updatedAt": "2023-01-01T00:00:00.000Z"
}
Gets list of topics that the organization is subscribed to. Topics will only be returned if a subscription exists between the organization and the topic.
Supported $expands
user
- expandsownerIds
toowners
arrayorganization
- expandsownerIds
toowners
arraysubscribedUsers
- appendssubscriptions
array to each topic, containing expandedusers
key for each subscriptionmessage
- appendslastMessage
key to each topic, containing expandedmessage
object
This operation requires one of the following:
- super user permission (i.e. user typeId =100, or internal service)
- user belongs to organization with any role
userId required | string |
readStatusForOrg | string (objectId) ^[0-9a-z]{24}$ Example: readStatusForOrg=0123456789ab0123456789ab When specified, Note that this can only be used by users who have a role in the specified organization. | |||||||||||||||||||||||||||||||||
$filter | string Return only items which matches to a condition (The operators below are listed in order of precedence from highest to lowest).
| |||||||||||||||||||||||||||||||||
$top | integer number of object want to fetch | |||||||||||||||||||||||||||||||||
$skip | integer number of object want to skip | |||||||||||||||||||||||||||||||||
$nextToken | string Token for get next batch of list data | |||||||||||||||||||||||||||||||||
$previousToken | string Token for get previous batch of list data | |||||||||||||||||||||||||||||||||
$expand | string Value: "user" Include extra information that are not included in responses by default in the response.
By default, the fields that supports this query contain only You can expand recursively by specifying nested fields after a dot (.). until For example, requesting You can use the expand param on any endpoint which returns expandable fields, including list, create, and update endpoints. You can expand multiple objects at once by identifying multiple items in comma-separated style. Examples:Include full category and organization information in the response. Before expanding,
By using $expand parameter,
It will returns full information:
|
{- "total": 0,
- "count": 0,
- "@nextLink": "string",
- "@previousLink": "string",
- "value": [
- {
- "id": "0123456789ab0123456789ab",
- "name": "topic-name",
- "typeId": "channel",
- "app": "user",
- "isPublic": true,
- "lastMessageAt": "2023-01-01T00:00:00.000Z",
- "lastMessageId": "0123456789ab0123456789ab",
- "ownerType": "user",
- "ownerIds": [
- "0123456789ab0123456789ab"
], - "unreadCount": 3,
- "customFields": {
- "notes": "This is a custom note field"
}, - "createdAt": "2023-01-01T00:00:00.000Z",
- "updatedAt": "2023-01-01T00:00:00.000Z"
}
]
}
Gets list of topics that the organization is an owner for. The topics must have the organization as one of the 'ownerIds', with ownerType 'organization'.
Supported $expands
user
- expandsownerIds
toowners
arrayorganization
- expandsownerIds
toowners
arraysubscribedUsers
- appendssubscriptions
array to each topic, containing expandedusers
key for each subscriptionmessage
- appendslastMessage
key to each topic, containing expandedmessage
object
This operation requires one of the following:
- super user permission (i.e. user typeId =100, or internal service)
- user is admin or owner of the specified organization
orgId required | string |
readStatusForOrg | string (objectId) ^[0-9a-z]{24}$ Example: readStatusForOrg=0123456789ab0123456789ab When specified, Note that this can only be used by users who have a role in the specified organization. | |||||||||||||||||||||||||||||||||
$filter | string Return only items which matches to a condition (The operators below are listed in order of precedence from highest to lowest).
| |||||||||||||||||||||||||||||||||
$top | integer number of object want to fetch | |||||||||||||||||||||||||||||||||
$skip | integer number of object want to skip | |||||||||||||||||||||||||||||||||
$nextToken | string Token for get next batch of list data | |||||||||||||||||||||||||||||||||
$previousToken | string Token for get previous batch of list data | |||||||||||||||||||||||||||||||||
$expand | string Value: "user" Include extra information that are not included in responses by default in the response.
By default, the fields that supports this query contain only You can expand recursively by specifying nested fields after a dot (.). until For example, requesting You can use the expand param on any endpoint which returns expandable fields, including list, create, and update endpoints. You can expand multiple objects at once by identifying multiple items in comma-separated style. Examples:Include full category and organization information in the response. Before expanding,
By using $expand parameter,
It will returns full information:
|
{- "total": 0,
- "count": 0,
- "@nextLink": "string",
- "@previousLink": "string",
- "value": [
- {
- "id": "0123456789ab0123456789ab",
- "name": "topic-name",
- "typeId": "channel",
- "app": "user",
- "isPublic": true,
- "lastMessageAt": "2023-01-01T00:00:00.000Z",
- "lastMessageId": "0123456789ab0123456789ab",
- "ownerType": "user",
- "ownerIds": [
- "0123456789ab0123456789ab"
], - "unreadCount": 3,
- "customFields": {
- "notes": "This is a custom note field"
}, - "createdAt": "2023-01-01T00:00:00.000Z",
- "updatedAt": "2023-01-01T00:00:00.000Z"
}
]
}
Gets list of topics that the user is subscribed to. Topics will only be returned if a subscription exists between the user and the topic.
Supported $expands
user
- expandsownerIds
toowners
arrayorganization
- expandsownerIds
toowners
arraysubscribedUsers
- appendssubscriptions
array to each topic, containing expandedusers
key for each subscriptionmessage
- appendslastMessage
key to each topic, containing expandedmessage
object
This operation requires that the user is logged in as the user specified in the path parameter.
userId required | string |
$filter | string Return only items which matches to a condition (The operators below are listed in order of precedence from highest to lowest).
| |||||||||||||||||||||||||||||||||
$top | integer number of object want to fetch | |||||||||||||||||||||||||||||||||
$skip | integer number of object want to skip | |||||||||||||||||||||||||||||||||
$nextToken | string Token for get next batch of list data | |||||||||||||||||||||||||||||||||
$previousToken | string Token for get previous batch of list data | |||||||||||||||||||||||||||||||||
$expand | string Value: "user" Include extra information that are not included in responses by default in the response.
By default, the fields that supports this query contain only You can expand recursively by specifying nested fields after a dot (.). until For example, requesting You can use the expand param on any endpoint which returns expandable fields, including list, create, and update endpoints. You can expand multiple objects at once by identifying multiple items in comma-separated style. Examples:Include full category and organization information in the response. Before expanding,
By using $expand parameter,
It will returns full information:
|
{- "total": 0,
- "count": 0,
- "@nextLink": "string",
- "@previousLink": "string",
- "value": [
- {
- "id": "0123456789ab0123456789ab",
- "name": "topic-name",
- "typeId": "channel",
- "app": "user",
- "isPublic": true,
- "lastMessageAt": "2023-01-01T00:00:00.000Z",
- "lastMessageId": "0123456789ab0123456789ab",
- "ownerType": "user",
- "ownerIds": [
- "0123456789ab0123456789ab"
], - "unreadCount": 3,
- "customFields": {
- "notes": "This is a custom note field"
}, - "createdAt": "2023-01-01T00:00:00.000Z",
- "updatedAt": "2023-01-01T00:00:00.000Z"
}
]
}
Gets list of topics that the user is an owner for. The topics must have the user as one of the 'ownerIds', with ownerType 'user'.
Supported $expands
user
- expandsownerIds
toowners
arrayorganization
- expandsownerIds
toowners
arraysubscribedUsers
- appendssubscriptions
array to each topic, containing expandedusers
key for each subscriptionmessage
- appendslastMessage
key to each topic, containing expandedmessage
object
This operation requires that the user is logged in as the user specified in the path parameter.
userId required | string |
$filter | string Return only items which matches to a condition (The operators below are listed in order of precedence from highest to lowest).
| |||||||||||||||||||||||||||||||||
$top | integer number of object want to fetch | |||||||||||||||||||||||||||||||||
$skip | integer number of object want to skip | |||||||||||||||||||||||||||||||||
$nextToken | string Token for get next batch of list data | |||||||||||||||||||||||||||||||||
$previousToken | string Token for get previous batch of list data | |||||||||||||||||||||||||||||||||
$expand | string Value: "user" Include extra information that are not included in responses by default in the response.
By default, the fields that supports this query contain only You can expand recursively by specifying nested fields after a dot (.). until For example, requesting You can use the expand param on any endpoint which returns expandable fields, including list, create, and update endpoints. You can expand multiple objects at once by identifying multiple items in comma-separated style. Examples:Include full category and organization information in the response. Before expanding,
By using $expand parameter,
It will returns full information:
|
{- "total": 0,
- "count": 0,
- "@nextLink": "string",
- "@previousLink": "string",
- "value": [
- {
- "id": "0123456789ab0123456789ab",
- "name": "topic-name",
- "typeId": "channel",
- "app": "user",
- "isPublic": true,
- "lastMessageAt": "2023-01-01T00:00:00.000Z",
- "lastMessageId": "0123456789ab0123456789ab",
- "ownerType": "user",
- "ownerIds": [
- "0123456789ab0123456789ab"
], - "unreadCount": 3,
- "customFields": {
- "notes": "This is a custom note field"
}, - "createdAt": "2023-01-01T00:00:00.000Z",
- "updatedAt": "2023-01-01T00:00:00.000Z"
}
]
}
Get topic by ID.
Supported $expands
user
- expandsownerIds
toowners
arrayorganization
- expandsownerIds
toowners
arraysubscribedUsers
- appendssubscriptions
array to each topic, containing expandedusers
key for each subscriptionmessage
- appendslastMessage
key to each topic, containing expandedmessage
object
This operation requires one of the following:
- super user permission (i.e. user typeId =100, or internal service)
- user is an owner of the topic (i.e. user is in the
ownerIds
array)- user is admin or owner of organization that is an owner of the topic
- a user subscription to the topic with 'read' permission
- an organization subscription to the topic with the 'read' permission, and the user is in the organization with any role
topicId required | string |
readStatusForOrg | string (objectId) ^[0-9a-z]{24}$ Example: readStatusForOrg=0123456789ab0123456789ab When specified, Note that this can only be used by users who have a role in the specified organization. |
$expand | string Value: "user" Include extra information that are not included in responses by default in the response.
By default, the fields that supports this query contain only You can expand recursively by specifying nested fields after a dot (.). until For example, requesting You can use the expand param on any endpoint which returns expandable fields, including list, create, and update endpoints. You can expand multiple objects at once by identifying multiple items in comma-separated style. Examples:Include full category and organization information in the response. Before expanding,
By using $expand parameter,
It will returns full information:
|
{- "id": "0123456789ab0123456789ab",
- "name": "topic-name",
- "typeId": "channel",
- "app": "user",
- "isPublic": true,
- "lastMessageAt": "2023-01-01T00:00:00.000Z",
- "lastMessageId": "0123456789ab0123456789ab",
- "ownerType": "user",
- "ownerIds": [
- "0123456789ab0123456789ab"
], - "unreadCount": 3,
- "customFields": {
- "notes": "This is a custom note field"
}, - "createdAt": "2023-01-01T00:00:00.000Z",
- "updatedAt": "2023-01-01T00:00:00.000Z"
}
Update topic information.
This operation requires either
- the super user permission (i.e. user typeId =100, or internal service)
- user is an owner of the topic (i.e. user is in the
ownerIds
array)- user is admin or owner of organization that is an owner of the topic
topicId required | string |
$expand | string Value: "user" Include extra information that are not included in responses by default in the response.
By default, the fields that supports this query contain only You can expand recursively by specifying nested fields after a dot (.). until For example, requesting You can use the expand param on any endpoint which returns expandable fields, including list, create, and update endpoints. You can expand multiple objects at once by identifying multiple items in comma-separated style. Examples:Include full category and organization information in the response. Before expanding,
By using $expand parameter,
It will returns full information:
|
Patch Topic
name | string Name of the topic |
typeId | string Enum: "channel" "private" The type of topic (used for configuring who can subscribe) |
app | string Which App the topic belongs to. |
isPublic | boolean If the topic public to normal user. |
ownerIds | Array of strings (ObjectId) |
customFields | object (customFields) CustomFields of the message. What's inside depends on what was configured when initializing the service. |
{- "name": "topic-name",
- "typeId": "channel",
- "app": "user",
- "isPublic": true,
- "ownerIds": [
- "0123456789ab0123456789ab"
], - "customFields": {
- "notes": "This is a custom note field"
}
}
{- "id": "0123456789ab0123456789ab",
- "name": "topic-name",
- "typeId": "channel",
- "app": "user",
- "isPublic": true,
- "lastMessageAt": "2023-01-01T00:00:00.000Z",
- "lastMessageId": "0123456789ab0123456789ab",
- "ownerType": "user",
- "ownerIds": [
- "0123456789ab0123456789ab"
], - "unreadCount": 3,
- "customFields": {
- "notes": "This is a custom note field"
}, - "createdAt": "2023-01-01T00:00:00.000Z",
- "updatedAt": "2023-01-01T00:00:00.000Z"
}
Delete a topic by ID
This operation requires either
- the super user permission (i.e. user typeId =100, or internal service)
- user is an owner of the topic (i.e. user is in the
ownerIds
array)- user is admin or owner of organization that is an owner of the topic
topicId required | string |
{- "code": "string",
- "message": "string",
- "target": "string",
- "details": [
- { }
], - "innererror": {
- "code": "string",
- "innererror": { }
}
}
Create a new Message Template.
This operation requires the login user, and the user must be one of:
- super user (i.e. user typeId =100, or internal service)
- belongs to an organization
Create Message Template body
title required | string |
content required | string |
orgId | string |
permissions | Array of any |
{- "title": "string",
- "content": "string",
- "orgId": "string",
- "permissions": [
- null
]
}
{- "id": "0123456789ab0123456789ab",
- "title": "string",
- "content": "string",
- "orgId": "0123456789ab0123456789ab",
- "permissions": [ ]
}
Retrieve the information of all message templates.
This operation requires the super user permission (i.e. user typeId =100, or internal service)
{- "total": 0,
- "count": 0,
- "@nextLink": "string",
- "@previousLink": "string",
- "value": [
- {
- "id": "0123456789ab0123456789ab",
- "title": "string",
- "content": "string",
- "orgId": "0123456789ab0123456789ab",
- "permissions": [ ]
}
]
}
Update a Message Template.
This operation requires the login user, and the user must be one of:
- super user (i.e. user typeId =100, or internal service)
- belongs to an organization, and same orgId owns the message template
messageTemplateId required | string |
Patch Message Template body
title | string |
content | string |
orgId | string |
permissions | Array of any |
{- "title": "string",
- "content": "string",
- "orgId": "string",
- "permissions": [
- null
]
}
{- "id": "0123456789ab0123456789ab",
- "title": "string",
- "content": "string",
- "orgId": "0123456789ab0123456789ab",
- "permissions": [ ]
}
Retrieve the information of a message template by ID.
This operation requires the login user, and the user must be one of:
- super user (i.e. user typeId =100, or internal service)
- belongs to an organization, and same orgId owns the message template
messageTemplateId required | string |
{- "id": "0123456789ab0123456789ab",
- "title": "string",
- "content": "string",
- "orgId": "0123456789ab0123456789ab",
- "permissions": [ ]
}
Update Message Template.
This operation requires the login user, and the user must be one of:
- super user (i.e. user typeId =100, or internal service)
- belongs to an organization, and same orgId owns the message template
messageTemplateId required | string |
{- "code": "string",
- "message": "string",
- "target": "string",
- "details": [
- { }
], - "innererror": {
- "code": "string",
- "innererror": { }
}
}
Retrieve the information of the message templates by the organization ID.
This operation requires the user need to be a member of the organization.
orgId required | string Organization ID |
$filter | string Return only items which matches to a condition (The operators below are listed in order of precedence from highest to lowest).
| |||||||||||||||||||||||||||||||||
$top | integer number of object want to fetch | |||||||||||||||||||||||||||||||||
$skip | integer number of object want to skip | |||||||||||||||||||||||||||||||||
$nextToken | string Token for get next batch of list data | |||||||||||||||||||||||||||||||||
$previousToken | string Token for get previous batch of list data | |||||||||||||||||||||||||||||||||
$expand | string Value: "user" Include extra information that are not included in responses by default in the response.
By default, the fields that supports this query contain only You can expand recursively by specifying nested fields after a dot (.). until For example, requesting You can use the expand param on any endpoint which returns expandable fields, including list, create, and update endpoints. You can expand multiple objects at once by identifying multiple items in comma-separated style. Examples:Include full category and organization information in the response. Before expanding,
By using $expand parameter,
It will returns full information:
|
{- "total": 0,
- "count": 0,
- "@nextLink": "string",
- "@previousLink": "string",
- "value": [
- {
- "id": "0123456789ab0123456789ab",
- "title": "string",
- "content": "string",
- "orgId": "0123456789ab0123456789ab",
- "permissions": [ ]
}
]
}
Create a topic attachment
This operation requires
- valid Authorization specified in request header
- Authorization have super user permission or
- user subscribed to the topic and have write permission on the topic
attachment data
objectId | string non-empty objectId in storage |
type | string non-empty type of the attachment |
ownerId | string non-empty owner of the attachment |
[- {
- "objectId": "string",
- "type": "string",
- "ownerId": "string"
}
]
{- "id": "string",
- "ownerId": "string",
- "ownerType": "string",
- "type": "string",
}
Get list of topic attachments
This operation requires
- valid Authorization specified in request header
- Authorization have super user permission or
- user subscribed to the topic and have read permission on the topic
[- {
- "id": "string",
- "ownerId": "string",
- "ownerType": "string",
- "type": "string",
}
]
Get a specific topic attachment
This operation requires
- valid Authorization specified in request header
- Authorization have super user permission or
- user subscribed to the topic and have read permission on the topic
topicId required | string The ID of the topic |
attachmentId required | string The ID of the attachment |
{- "id": "string",
- "ownerId": "string",
- "ownerType": "string",
- "type": "string",
}
Delete an topic attachment
This operation requires
- valid Authorization specified in request header
- Authorization have super user permission or
- user subscribed to the topic and have write permission on the topic
topicId required | string The ID of the topic |
attachmentId required | string The ID of the attachment |
{- "code": "string",
- "message": "string",
- "target": "string",
- "details": [
- { }
], - "innererror": {
- "code": "string",
- "innererror": { }
}
}
Create signed url for user to upload an attachment
This operation requires
- valid Authorization specified in request header
- Authorization have super user permission or
- user subscribed to the topic and have write permission on the topic
null