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

    Register a Message Bot

    Register a Message Bot

    Registers a message bot to be used by the client.
    A message bot is registered on a tenant basis, so you should register its domain if you want to use it on a domain basis. You can use a message bot only after registering both its tenant and domain by using the registerBot API and the registerBotDomain API.

    You can specify the scope of domains for a bot.
    If the scope is not all domains, only specified domains can be registered.

    You can register bots in multiple languages.
    Add a bot's name, photo and description in multiple languages, and they will be displayed in the language that matches the client's language settings.

    You can also choose a chat type.
    The default is 1:1 chat, and you can enable "Invitation to team/group or 1:N chat room available" using the useGroupJoin parameter.

    Caution

    • You can add up to 300 message bots.
    • A new line character in the name parameter is substituted with a blank space.

    API Type

    Server API

    Request URL

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

    HTTP Method

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

    Request

    Parameter Type Required Description
    name string Y Message bot name
    Max: 100 characters
    i18nNames[] array N Multilingual names
    i18nNames[].language string Y Language code
    ●ko_KR
    ●ja_JP
    ●zh_CN
    ●zh_TW
    ●en_US
    i18nNames[].name string Y Name in the language
    Max: 100 characters
    photoUrl string Y The URL of a message bot profile image (PNG format and only HTTPS allowed)
    i18nPhotoUrls[] array N URLs of multilingual images
    i18nPhotoUrls[].language string Y Language code
    ●ko_KR
    ●ja_JP
    ●zh_CN
    ●zh_TW
    ●en_US
    i18nPhotoUrls[].photoUrl string Y URL of a multilingual image
    Max: 1000 characters
    description string Y Description of the message bot
    i18nDescriptions[] array N Multilingual descriptions of the message bot
    i18nDescriptions[].language string Y Language code
    ●ko_KR
    ●ja_JP
    ●zh_CN
    ●zh_TW
    ●en_US
    i18nDescriptions[].description string Y Multilingual description of the message bot
    Max: 100 characters
    managerList array<string> Y Primary contacts of the message bot (at least 1 and up to 3 accounts)
    submanagerList array<string> N Secondary contacts of the message bot (up to 3 accounts)
    useGroupJoin boolean N Chat type
    ● false: 1:1 chat only (default)
    ● true: Invitation to team/group or 1:N chat room available
    useDomainScope boolean N Specify the scope of domains for a bot.
    ● false: All domains (default)
    ● true: Custom domains
    domainIdList array<number> N Specify domains if useDomainScope is "true."
    At least one domain should be specified.

    Request Example

    {
      "name": "echo bot",
      "i18nNames": [{
        "language": "ko_KR",
        "name": "에코봇"
      }, {
        "language": "ja_JP",
        "name": "エコボッ"
      }],
      "photoUrl": "https://developers.worksmobile.com/favicon.png",
      "description": "WorksMobile's A.I. conversation enabled bot",
      "i18nDescriptions": [{
        "language": "ko_KR",
        "description": "웍스모바일의 A.I 대화가 가능한 봇"
      },{
        "language": "ja_JP",
        "description": "ワークスモバイルのA.I対話が可能なボット"
      }],
      "managerList": ["manager@example.com", "manager2@example.com"],
      "submanagerList": ["submanager@example.com"],
      "useGroupJoin": true,
      "useDomainScope": false
    }
    

    Response

    It returns a message bot number 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
    botNo number The number of the message bot registered

    Response Example

    {"code": 200, "message": "OK", "botNo": 123}