This API will soon be deprecated. Please use another API.

    Send Messages

    A message bot can send a message to a specified user.

    Put your LINE WORKS account information, which is either an email address or group name, in the accountId field to send a message.

    You can send various kinds of information to users by using a button template or list template, which is available in the client version 2.2 or later.

    Using a button of each template, the server can receive a postback message as a callback. For the postback type, refer to Receive Messages - Callback Type.

    The following figure shows the structures of each template.

    그림 1 템플릿 구조

    Figure 1 Template structure

    Caution

    • There are limits on API requests, based on the number of users.
      • When the number of users does not exceed 100: up to 20,000 requests per day
      • When the number of users is over 100: up to 20,000 requests per day + 100 requests per extra user
    • The number of API requests will be reset at midnight based on GMT +9.
    • When the number of API requests reaches 80%, 90%, and 100% of the quota, a notification message on this will be sent to the Admin.

    API Type

    Server API

    Request URL

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

    HTTP Method

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

    Request - Common

    Parameter Type Required Description
    botNo number Y Message bot number used to send a message.
    accountId string N User account to which you want to send a message. (Either roomId or accountId must be specified.)
    roomId string N Room ID to which you want to send a message (Either roomId or accountId must be specified.)
    content object Y Message content
    ● type "text": See "Request content" in "Send a Message (text)."
    ● type "image": See "Request content" in "Send a Message (image)."
    ● type "link": See "Request content" in "Send a Message (link)."
    ● type "buttonTemplate": See "Request content" in "Send a Message (buttonTemplate)."
    ● type "listTemplate": See "Request content" in "Send a Message (listTemplate)."
    ● type "sticker": See "Request content" in "Send a Message (sticker)."