Upload Files to Room
    • Dark
      Light
    • PDF

    Upload Files to Room

    • Dark
      Light
    • PDF

    Article summary

    Post
    /api/v1/livechat/upload/{rid}

    Upload files to a Livechat room.

    Header parameters
    x-visitor-token
    stringRequired

    The visitor token

    ExampleiNKE8a6k6cjyPyOyI
    Path parameters
    rid
    stringRequired

    The room ID.

    Body parameters
    Example 1
    {
      "file": "/home/rodriq/Desktop/cod.png",
      "description": "image file description here"
    }
    object
    file
    string Required

    The file to be uploaded.

    description
    string

    The file description.

    Responses
    200

    OK

    Success Example
    {
      "_id": "CeswhhAKTQMsnEbc8",
      "rid": "cbjQCtywHbuTYzmLx",
      "msg": "",
      "token": "932a1c3019aeeaa9b687bb04b979d",
      "file": {
        "_id": "uredcLri4GdehDQnD",
        "name": "globe.png",
        "type": "image/png"
      },
      "attachments": [
        {
          "ts": "1970-01-01T00:00:00.000Z",
          "title": "globe.png",
          "title_link": "/file-upload/uredcLri4GdehDQnD/globe.png",
          "title_link_download": true,
          "image_dimensions": {
            "width": 1746,
            "height": 1624
          },
          "image_preview": "/9j/2wBDAAYEBQYFBAYGzMKHSdwCQf2EhyBetVviuOVGrulRJ9NsHpQPgQH/9k=",
          "image_url": "/file-upload/uredcLri4GdehDQnD/globe.png",
          "image_type": "image/png",
          "image_size": 562975,
          "type": "file",
          "description": "Here is the file",
          "descriptionMd": [
            {
              "type": "PARAGRAPH",
              "value": [
                {
                  "type": "PLAIN_TEXT",
                  "value": "Here is the file"
                }
              ]
            }
          ]
        }
      ],
      "alias": "James",
      "ts": "2023-03-21T16:21:39.131Z",
      "u": {
        "_id": "6410766605957d866e0fcf37",
        "username": "guest-3",
        "name": "James"
      },
      "_updatedAt": "2023-03-21T16:21:39.173Z",
      "urls": [],
      "mentions": [],
      "channels": [],
      "newRoom": false,
      "showConnecting": false,
      "success": true
    }
    Expand All
    object
    _id
    string
    rid
    string
    msg
    string
    token
    string
    file
    object
    _id
    string
    name
    string
    type
    string
    attachments
    Array of object
    object
    ts
    string
    title
    string
    title_link
    string
    title_link_download
    boolean
    image_dimensions
    object
    width
    integer
    height
    integer
    image_preview
    string
    image_url
    string
    image_type
    string
    image_size
    integer
    type
    string
    description
    string
    descriptionMd
    Array of object
    object
    type
    string
    value
    Array of object
    object
    type
    string
    value
    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
    newRoom
    boolean
    showConnecting
    boolean
    success
    boolean
    403

    Forbidden

    Example 1
    {
      "success": false,
      "error": "unauthorized"
    }
    object
    success
    boolean
    error
    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.