Update Unit
    • Dark
      Light
    • PDF

    Update Unit

    • Dark
      Light
    • PDF

    Article summary

    Post
    /api/v1/livechat/units/{id}
    Premium tag

    Permission required: manage-livechat-units

    Changelog

    VersionDescription
    4.2.0Added
    Header parameters
    X-Auth-Token
    stringRequired

    The authToken of the authenticated user.

    ExampleRScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f
    X-User-Id
    stringRequired

    The userId of the authenticated user.

    ExamplerbAXPnMktTFbNpwtJ
    Path parameters
    id
    stringRequired

    The unit ID that you want to update.

    Body parameters
    Example 1
    {
      "unitData": {
        "name": "unitxx2",
        "visibility": "private"
      },
      "unitMonitors": [
        {
          "monitorId": "GT67Tv6x5p5y5xZWN",
          "username": "testerio"
        }
      ],
      "unitDepartments": [
        {
          "departmentId": "CgM4vfNNtj8t4QEMd"
        }
      ]
    }
    Expand All
    object
    unitData
    objectRequired

    The object containing the unit data.

    name
    string Required

    The name of the unit that you are creating.

    visibility
    string Required

    The visibility of the unit. For example, public or private.

    unitMonitors
    Array of object Required

    The object containing the unit monitors information.

    object
    monitorId
    string Required

    The monitor ID that you want to add to the unit.

    username
    string Required

    The user name of the monitor.

    unitDepartments
    Array of object Required

    The object containing the department information.

    object
    departmentId
    string Required

    The department ID that you want to add to the unit.

    Responses
    200
    Success Example
    {
      "name": "unitxx2",
      "visibility": "private",
      "type": "u",
      "numMonitors": 1,
      "numDepartments": 1,
      "_updatedAt": "2021-12-06T14:40:59.478Z",
      "_id": "o5zNtKy7BcTMgyXtm",
      "success": true
    }
    object
    name
    string
    visibility
    string
    type
    string
    numMonitors
    integer
    numDepartments
    integer
    _updatedAt
    string
    _id
    string
    success
    boolean
    401

    Unauthorized

    Authorization Error
    {
      "status": "error",
      "message": "You must be logged in to do this."
    }
    object
    status
    string
    message
    string
    403

    Forbidden

    Example 1
    {
      "success": false,
      "error": "User does not have the permissions required for this action [error-unauthorized]"
    }
    Example 2
    {
      "success": false,
      "error": "unauthorized"
    }
    object
    success
    boolean
    error
    string


    Was this article helpful?

    What's Next
    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.