Get Direct rooms
GET/assistants/{assistantId}/directRooms
Base URL: https://api.tinkermode.com
Get a list of rooms the assistant has joined. The response doesn't include rooms whose type is pair talk.
This endpoint is available only when the chatPlatform of the specified Assistant is Direct.
This API returns only rooms that have a name.
NOTE:
/slackChannels endpoint returns all public channels, but this API returns only rooms the assistant has already joined. There is no public room in Direct in the first place and bots can send messages to the channels the bot has already joined.
Authentication
Send an Authorization header of the form ModeCloud <AUTH_CODE>.
Must contain the key of a user or service account with permissions to read assistant instances, or a project API key.
Path parameters
| Name | Type | Required | Constraints | Description |
|---|---|---|---|---|
assistantId | integer | Yes | The unique ID for a specific Assistant instance. |
Responses
200 Successfully retrieved the list of rooms.
Content type: application/json
A Direct room associated with an Assistant instance.
An array of objects with the following shape:
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
id | string | Yes | read-only (server-generated) | The unique identifier for the Direct room. |
name | string | Yes | read-only (server-generated) | The name of the Direct room. |
401 Authorization is required to access this resource.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | No | read-only (server-generated) | Any relevant data related to error. |
reason | string | Yes | read-only (server-generated) | Reason of error. |
403 The client doesn't have the permission to access the specified Assistant or the chatPlatform of the specified Assistant is not Direct.
429 Request failed because of rate limit.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | No | read-only (server-generated) | Any relevant data related to error. |
reason | string | Yes | read-only (server-generated) | Reason of error. |
500 An unexpected error has occurred.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | No | read-only (server-generated) | Any relevant data related to error. |
reason | string | Yes | read-only (server-generated) | Reason of error. |
503 The service is temporarily unavailable.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | No | read-only (server-generated) | Any relevant data related to error. |
reason | string | Yes | read-only (server-generated) | Reason of error. |