Send New Livechat Message
    • Dark
      Light
    • PDF

    Send New Livechat Message

    • Dark
      Light
    • PDF

    Article summary

    Post
    /api/v1/livechat/message

    Send a new message in a Livechat room.

    Body parameters
    Example 1
    {
      "token": "54fc5544030bcecda053311cb6b",
      "rid": "hGFwSKA28nRKut3pD",
      "msg": "Hello World!",
      "agent": {
        "agentId": "CkCPNcvsvCDfmWLqC",
        "username": "kim.jane"
      }
    }
    Expand All
    object
    token
    string Required

    The visitor token.

    ExampleiNKE8a6k6cjbqWhWd
    rid
    string Required

    The room ID.

    ExamplezRAeTszXor8CCPceB
    msg
    string Required

    The message to send to the visitor.

    ExampleHello World!
    _id
    string

    If you do not enter any value, a message ID is automatically generated. If you want to override the message ID in the database with your own, enter a random unique string.

    Exampleabcdje928390
    agent
    object

    Enter the ID and the username of the agent to whom you want to send the message.

    agentId
    string
    username
    string
    Responses
    200
    Success Example
    {
      "message": {
        "_id": "djsajdkscks787",
        "rid": "hGFwSKA28nRKut3pD",
        "msg": "Hello World!",
        "token": "54fc5544030bcecda053311cb6b98920bdf953f242c129d7b8065000b1f9b2e9",
        "alias": "Baek",
        "ts": "2023-10-31T13:14:29.804Z",
        "u": {
          "_id": "6523dc0ba2f73c7460e18d4d",
          "username": "guest-35",
          "name": "Baek"
        },
        "_updatedAt": "2023-10-31T13:14:29.960Z",
        "urls": [],
        "mentions": [],
        "channels": [],
        "md": [
          {
            "type": "PARAGRAPH",
            "value": [
              {
                "type": "PLAIN_TEXT",
                "value": "Hello World!"
              }
            ]
          }
        ]
      },
      "success": true
    }
    Expand All
    object
    message
    object
    _id
    string
    rid
    string
    msg
    string
    token
    string
    alias
    string
    ts
    string
    u
    object
    _id
    string
    username
    string
    name
    string
    _updatedAt
    string
    urls
    Array of object
    object
    mentions
    Array of object
    object
    channels
    Array of object
    object
    md
    Array of object
    object
    type
    string
    value
    Array of object
    object
    type
    string
    value
    string
    success
    boolean
    400

    Bad Request

    Example 1
    {
      "success": false,
      "error": "must have required property 'token' [invalid-params]",
      "errorType": "invalid-params"
    }
    object
    success
    boolean
    error
    string
    errorType
    string

    Was this article helpful?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.