Update a Message Bot Domain

    Updates a specified message bot domain.
    You can update a domain only after it is registered using the Register a Message Bot Domain API.

    A message bot can be public or private in the domain.
    A public message bot is shown on the client's bot list from which users can invite the bot to their chats.

    If you choose to allow "only specified members" to use the bot, you can assign bot permissions only to those members.

    Caution

    • You can specify up to 150 members.

    API Type

    Server API

    Request URL

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

    HTTP Method

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

    Path Parameters

    Parameter Required Description
    botNo Y Message bot number
    domainId Y Domain ID to allow to use the message bot

    Request

    Parameter Type Required Description
    usePublic boolean N Indicates whether to show the bot on the client's organization chart.
    ○ false: Private (default)
    ○ true: Public
    usePermission boolean N Indicates whether to allow only specified members to use the bot.
    ○ false: All (default)
    ○ true: Specified members only
    accountIds array N Specify members if usePermission is “true.”

    Request Example

    simple

    
    PUT https://apis.worksmobile.com/r/apiid/message/v1/bot/123/domain/456
    
    detail
    
    PUT https://apis.worksmobile.com/r/apiid/message/v1/bot/123/domain/456
    {
      "usePublic": true,
      "usePermission": true,
      "accountIds": ["manager@example.com"]
    }
    

    Response

    It returns HTTP status 200 with no response if successful.

    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.