Get Available Departments by Unit Id
    • Dark
      Light
    • PDF

    Get Available Departments by Unit Id

    • Dark
      Light
    • PDF

    Article summary

    Get
    /api/v1/livechat/units/{unitId}/departments/available
    Premium tag

    Permission required: manage-livechat-units

    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
    unitId
    stringRequired

    The unit ID.

    Query parameters
    offset
    integer

    Number of items to "skip" in the query, i.e. requests return count items, skipping the first offset items.

    Example50
    count
    integer

    The number of items to return.

    Example25
    text
    string

    Filter the result with the text.

    onlyMyDepartments
    boolean

    Whether you want the result for the departments that you are part of.

    Responses
    200
    Success Example
    {
      "departments": [
        {
          "_id": "64181a0728384134ed600dcc",
          "enabled": false,
          "name": "Missing Money",
          "description": "",
          "showOnRegistration": false,
          "showOnOfflineForm": false,
          "requestTagBeforeClosingChat": false,
          "email": "[email protected]",
          "chatClosingTags": [],
          "offlineMessageChannelName": "Livestream",
          "abandonedRoomsCloseCustomMessage": "",
          "waitingQueueMessage": "",
          "departmentsAllowedToForward": [],
          "fallbackForwardDepartment": "",
          "_updatedAt": "2023-11-29T12:48:03.843Z",
          "numAgents": 3,
          "type": "d",
          "ancestors": [
            "6567236571f856761e61c9a2"
          ],
          "parentId": "6567236571f856761e61c9a2"
        }
      ],
      "count": 1,
      "offset": 0,
      "total": 1,
      "success": true
    }
    Expand All
    object
    departments
    Array of object
    object
    _id
    string
    enabled
    boolean
    name
    string
    description
    string
    showOnRegistration
    boolean
    showOnOfflineForm
    boolean
    requestTagBeforeClosingChat
    boolean
    email
    string
    chatClosingTags
    Array of object
    object
    offlineMessageChannelName
    string
    abandonedRoomsCloseCustomMessage
    string
    waitingQueueMessage
    string
    departmentsAllowedToForward
    Array of object
    object
    fallbackForwardDepartment
    string
    _updatedAt
    string
    numAgents
    integer
    type
    string
    ancestors
    Array of string
    string
    parentId
    string
    count
    integer
    offset
    integer
    total
    integer
    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?

    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.