--- title: "Department" slug: "partner-api-global-department" updated: 2022-07-05T03:28:00Z published: 2022-07-05T03:28:00Z canonical: "developer.comm100.com/partner-api-global-department" --- > ## Documentation Index > Fetch the complete documentation index at: https://developer.comm100.com/llms.txt > Use this file to discover all available pages before exploring further. # Department You need the Manage Site permission to manage departments. - `Departments` - Departments Manage - `GET global/sites/{siteId}/departments` - [Get site Departments](/docs/partner-api-global-department#get-site-departments) ## Department JSON Format Department is represented as simple flat JSON objects with the following keys: | Name | Type | Description | | --- | --- | --- | | `id` | guid | Id of the department. | | `name` | string | Name of the department. | | `description` | string | Description of the department. | | `isAvailableInLiveChat` | bool | When the value is false, the department will not be displayed in the Pre-chat window, department drop down list, routing rules, chat transfer rules etc. Default: true. | | `isAvailableInTicketingAndMessaging` | bool | When the value is false, the department name will not be displayed in the 'Assigned Department' field. Default: true. | | `offlineMessageMailTo` | string | Allowed values are "toAllAgents", "toEmailAddresses". | | `offlineMessageEmailAddresses` | string | The specified email addresses that offline messages are sent to. Available and required when Offline Message Mail Type is "toEmailAddresses". | | `agentIds` | array | ID of the agents in this department. | | `isDeleted` | bool | Whether the department is deleted or not. | | `chatbotSmartTriggerActionIds` | array | The guid array of chatbot smart trigger actions for the selected departments. | | `shiftIds` | array | The guid array of shifts for the selected departments. | | `segmentIds` | array | The guid array of segmentations for the selected departments. | ## Get site Departments `GET global/sites/{siteId}/departments` - #### Parameters: | Name | Type | in | Required | Description | | --- | --- | --- | --- | --- | | `keywords` | string | query | no | Filter by keywords in name of the department. | | `include` | string | query | no | Allowed value is "agent". | | `siteId` | int | query | yes | Id of the Site. | - #### Response: An array of [Department](/docs/partner-api-global-department#department-json-format) - #### Example Sample Request: ``` curl https://partnerapi.comm100.io/v4/global/sites/100/departments \ -X 'GET' \ -H 'Authorization: Bearer {access_token}' \ ``` Response: HTTP/1.1 200 OK ``` [ { "id": "a0831b44-a2d0-4bed-96c4-43f7eb69b095", "name": "markting", "description": "markting departments", "isAvailableInLiveChat": true, "isAvailableInTicketingAndMessaging": true, "offlineMessageMailTo": "toAllAgents", "offlineMessageEmailAddresses": "andy@comm100.com", "isDeleted": false, "agentIds": [ "3CA2EF45-7D46-EB11-8100-00155D081D0B" ], "chatbotSmartTriggerActionIds": [], "shiftIds": [], "segmentIds": [] } ] ```