Create a Chat Room with a Bot

    Creates a chat room 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 chat room with the bot.

    API Type

    Server API

    Request URL

    https://apis.worksmobile.com/r/{API ID}/message/v1/bot/{botNo}/room

    HTTP Method

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

    Path Parameters

    Parameter Required Description
    botNo Y Message bot number you want to create a chat room for

    Request

    Parameter Type Required Description
    accountIds array Y List of members to join the chat room
    title string N Chat room name.
    Max length: 1000 characters

    Request Example

    simple

    
    POST https://apis.worksmobile.com/r/apiid/message/v1/bot/123/room
    {
      "accountIds": ["user1@example.com", "user2@example.com"]
    }
    
    detail
    
    POST https://apis.worksmobile.com/r/apiid/message/v1/bot/123/room
    {
      "accountIds": ["user1@example.com", "user2@example.com"],
      "title": "my title"
    }
    

    Response

    It returns HTTP status 200 with a created chat room ID as a response if successful.

    Property Type Description
    roomId string Created room ID

    Response Example

    
    {
      "roomId": "12345"
    }
    

    Error Code

    If the API call fails, it returns an error code and message.
    For error codes, refer to Message Bot REST API Error Codes.