Create a Chatroom with a Bot

    Creates a chatroom with a bot included.

    You can obtain a room ID after a bot is created.
    The room ID is used to send messages or get a list of members who belong to the chatroom with the bot.

    API Type

    Server API

    Request URL

    https://apis.worksmobile.com/{API ID}/message/createRoom

    HTTP Method

    POST(Content-Type: application/json; charset=UTF-8)

    Request

    Parameter Type Required Description
    botNo number Y Message bot number you want to create a chatroom for
    accountIdList array<string> Y List of members to join the chatroom
    title stirng N Chatroom name.
    Max: 1000 characters

    Request Example

    {
      "botNo": 123,
      "accountIdList": ["user1@example.com", "user2@example.com"],
      "title": "my title"
    }
    

    Response

    It returns code 200 when the API call is successful.

    Property Type Description
    code number ● 200: Success
    ● 4xx: Client request errors
    ● 5xx: Unexpected errors and server internal errors
    message string Description about the code
    roomId string Created room ID

    Response Example

    {
      "code": 200,
      "message": "OK",
      "roomId": "12345"
    }