openapi: 3.0.0
info:
  title: Departments
  description: |
    Departments in Cliq represent groups of members assigned to specific areas within your organization, such as Sales, Marketing, Product Development, and more. Note: If your organization is integrated with Zoho People, the department APIs for creating, updating, and deleting will not work.
  contact: {}
  version: 1.0.0
externalDocs:
  description: Find out more about Zoho Cliq APIs V2
  url: https://www.zoho.com/cliq/help/restapi/v2/
servers:
  - url: https://cliq.zoho.com/api/v2
    description: Zoho Cliq US DC
tags:
  - name: departments
    description: Departments Module
paths:
  /departments:
    post:
      summary: Create a Department
      operationId: Create a Department
      description: |
        Use this API to create a department. This API will not return success if your Cliq organization is integrated with Zoho People.
         <br><br> 
        <p>
          <b>Threshold limit</b>: 20 requests per min per user<br>
          Number of API calls allowed within a minute.<br><br>
          <b>Lock period</b>: 10 minutes<br>Wait time before consecutive API requests.<br>
        </p>
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DepartmentCreateRequest'
      responses:
        '200':
          description: The request was successfully completed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DepartmentCreateResponse'
        '400':
          description: Bad Request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: The request cannot be performed. Usually because of malformed parameter or missing parameter.
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Request was rejected because of invalid AuthToken.
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: The user does not have enough permission or possibly not an user of the respective organization to access the resource.
        '404':
          description: Invalid URL.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: The URL you've sent is wrong. It's possible that the resource you've requested has been moved to another URL.
        '405':
          description: Method Not Allowed.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: The requested resource does not support the HTTP method used. For example, requesting List of all customers API with PUT as the HTTP method.
        '406':
          description: Not Acceptable.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: The response has been received but the requested response type is not supported by the browser.
        '429':
          description: Too many requests.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Too many requests within a certain time frame.
        '500':
          description: Internal Server Error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Cliq server encountered an error which prevents it from fulfilling the request.
      security:
        - Cliq_Auth:
            - ZohoCliq.Departments.CREATE
      tags:
        - departments
    get:
      summary: List all Departments
      operationId: List all Departments
      description: |
        Use this API to get the list of all departments in your organization.
         <br><br> 
        <p>
          <b>Threshold limit</b>: 20 requests per min per user<br>
          Number of API calls allowed within a minute.<br><br>
          <b>Lock period</b>: 10 minutes<br>Wait time before consecutive API requests.<br>
        </p>
      parameters:
        - name: limit
          in: query
          required: false
          description: |
            The total number of departments to be fetched. If limit is not specified, a maximum of 25 departments will be returned for a request.
          schema:
            type: string
            maxLength: 25
        - name: search
          in: query
          required: false
          description: |
            A string to search for departments by name.

              Note: This param is mandatory if your Cliq organization is integrated with Zoho People.
          schema:
            type: string
        - name: next_token
          in: query
          required: false
          description: |
            Use this parameter to fetch the next set of departments.
          schema:
            type: string
            example: 2a4e39fab27032f106ced7277c5b336d
      responses:
        '200':
          description: The request was successfully completed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DepartmentListResponse'
        '400':
          description: Bad Request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: The request cannot be performed. Usually because of malformed parameter or missing parameter.
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Request was rejected because of invalid AuthToken.
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: The user does not have enough permission or possibly not an user of the respective organization to access the resource.
        '404':
          description: Invalid URL.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: The URL you've sent is wrong. It's possible that the resource you've requested has been moved to another URL.
        '405':
          description: Method Not Allowed.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: The requested resource does not support the HTTP method used. For example, requesting List of all customers API with PUT as the HTTP method.
        '406':
          description: Not Acceptable.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: The response has been received but the requested response type is not supported by the browser.
        '429':
          description: Too many requests.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Too many requests within a certain time frame.
        '500':
          description: Internal Server Error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Cliq server encountered an error which prevents it from fulfilling the request.
      security:
        - Cliq_Auth:
            - ZohoCliq.Departments.READ
            - ZohoPeople.employee.READ
      tags:
        - departments
  /departments/{DEPARTMENT_ID}:
    get:
      summary: Get Department Details
      operationId: Get Department Details
      description: |
        Use this API to get details of a department.
         <br><br> 
        <p>
          <b>Threshold limit</b>: 20 requests per min per user<br>
          Number of API calls allowed within a minute.<br><br>
          <b>Lock period</b>: 10 minutes<br>Wait time before consecutive API requests.<br>
        </p>
      parameters:
        - name: DEPARTMENT_ID
          in: path
          required: true
          description: Unique identifier of the department To learn how to retrieve this ID, see <a href="/cliq/help/restapi/v2/glossary/#DEPARTMENT_ID">DEPARTMENT_ID</a> in the Glossary page.
          schema:
            type: string
      responses:
        '200':
          description: The request was successfully completed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DepartmentDetailResponse'
        '400':
          description: Bad Request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: The request cannot be performed. Usually because of malformed parameter or missing parameter.
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Request was rejected because of invalid AuthToken.
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: The user does not have enough permission or possibly not an user of the respective organization to access the resource.
        '404':
          description: Invalid URL.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: The URL you've sent is wrong. It's possible that the resource you've requested has been moved to another URL.
        '405':
          description: Method Not Allowed.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: The requested resource does not support the HTTP method used. For example, requesting List of all customers API with PUT as the HTTP method.
        '406':
          description: Not Acceptable.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: The response has been received but the requested response type is not supported by the browser.
        '429':
          description: Too many requests.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Too many requests within a certain time frame.
        '500':
          description: Internal Server Error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Cliq server encountered an error which prevents it from fulfilling the request.
      security:
        - Cliq_Auth:
            - ZohoCliq.Departments.READ
            - ZohoPeople.forms.READ
      tags:
        - departments
    put:
      summary: Update Department
      operationId: Update Department
      description: |
        Use this API to update details of a department. This API will not return success if your Cliq Organization is integrated with Zoho People.
         <br><br> 
        <p>
          <b>Threshold limit</b>: 20 requests per min per user<br>
          Number of API calls allowed within a minute.<br><br>
          <b>Lock period</b>: 10 minutes<br>Wait time before consecutive API requests.<br>
        </p>
      parameters:
        - name: DEPARTMENT_ID
          in: path
          required: true
          description: Unique identifier of the department which needs to be modified To learn how to retrieve this ID, see <a href="/cliq/help/restapi/v2/glossary/#DEPARTMENT_ID">DEPARTMENT_ID</a> in the Glossary page.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DepartmentCreateRequest'
      responses:
        '200':
          description: The request was successfully completed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DepartmentCreateResponse'
        '400':
          description: Bad Request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: The request cannot be performed. Usually because of malformed parameter or missing parameter.
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Request was rejected because of invalid AuthToken.
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: The user does not have enough permission or possibly not an user of the respective organization to access the resource.
        '404':
          description: Invalid URL.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: The URL you've sent is wrong. It's possible that the resource you've requested has been moved to another URL.
        '405':
          description: Method Not Allowed.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: The requested resource does not support the HTTP method used. For example, requesting List of all customers API with PUT as the HTTP method.
        '406':
          description: Not Acceptable.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: The response has been received but the requested response type is not supported by the browser.
        '429':
          description: Too many requests.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Too many requests within a certain time frame.
        '500':
          description: Internal Server Error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Cliq server encountered an error which prevents it from fulfilling the request.
      security:
        - Cliq_Auth:
            - ZohoCliq.Departments.UPDATE
      tags:
        - departments
    delete:
      summary: Delete Department
      operationId: Delete Department
      description: |
        Use this API to delete a department.
         <br><br> 
        <p>
          <b>Threshold limit</b>: 20 requests per min per user<br>
          Number of API calls allowed within a minute.<br><br>
          <b>Lock period</b>: 10 minutes<br>Wait time before consecutive API requests.<br>
        </p>
      parameters:
        - name: DEPARTMENT_ID
          in: path
          required: true
          description: Unique identifier of the department which needs to be deleted To learn how to retrieve this ID, see <a href="/cliq/help/restapi/v2/glossary/#DEPARTMENT_ID">DEPARTMENT_ID</a> in the Glossary page.
          schema:
            type: string
      responses:
        '200':
          description: The request was successfully completed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/no-response'
        '400':
          description: Bad Request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: The request cannot be performed. Usually because of malformed parameter or missing parameter.
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Request was rejected because of invalid AuthToken.
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: The user does not have enough permission or possibly not an user of the respective organization to access the resource.
        '404':
          description: Invalid URL.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: The URL you've sent is wrong. It's possible that the resource you've requested has been moved to another URL.
        '405':
          description: Method Not Allowed.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: The requested resource does not support the HTTP method used. For example, requesting List of all customers API with PUT as the HTTP method.
        '406':
          description: Not Acceptable.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: The response has been received but the requested response type is not supported by the browser.
        '429':
          description: Too many requests.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Too many requests within a certain time frame.
        '500':
          description: Internal Server Error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Cliq server encountered an error which prevents it from fulfilling the request.
      security:
        - Cliq_Auth:
            - ZohoCliq.Departments.DELETE
      tags:
        - departments
  /departments/{DEPARTMENT_ID}/members:
    get:
      summary: Get Department Members
      operationId: Get Department Members
      description: |
        Use this API to get the list of all the department members.
         <br><br> 
        <p>
          <b>Threshold limit</b>: 20 requests per min per user<br>
          Number of API calls allowed within a minute.<br><br>
          <b>Lock period</b>: 10 minutes<br>Wait time before consecutive API requests.<br>
        </p>
      parameters:
        - name: DEPARTMENT_ID
          in: path
          required: true
          description: Unique identifier for the department from which the list of members should be retrieved To learn how to retrieve this ID, see <a href="/cliq/help/restapi/v2/glossary/#DEPARTMENT_ID">DEPARTMENT_ID</a> in the Glossary page.
          schema:
            type: string
      responses:
        '200':
          description: The request was successfully completed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserListResponse'
        '400':
          description: Bad Request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: The request cannot be performed. Usually because of malformed parameter or missing parameter.
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Request was rejected because of invalid AuthToken.
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: The user does not have enough permission or possibly not an user of the respective organization to access the resource.
        '404':
          description: Invalid URL.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: The URL you've sent is wrong. It's possible that the resource you've requested has been moved to another URL.
        '405':
          description: Method Not Allowed.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: The requested resource does not support the HTTP method used. For example, requesting List of all customers API with PUT as the HTTP method.
        '406':
          description: Not Acceptable.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: The response has been received but the requested response type is not supported by the browser.
        '429':
          description: Too many requests.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Too many requests within a certain time frame.
        '500':
          description: Internal Server Error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Cliq server encountered an error which prevents it from fulfilling the request.
      security:
        - Cliq_Auth:
            - ZohoCliq.Departments.READ
            - ZohoPeople.dashboard.READ
      tags:
        - departments
    post:
      summary: Add Department Members
      operationId: Add Department Members
      description: |
        Use this API to add members to a department. This API will not return success if your Cliq Organization is integrated with Zoho People.
         <br><br> 
        <p>
          <b>Threshold limit</b>: 20 requests per min per user<br>
          Number of API calls allowed within a minute.<br><br>
          <b>Lock period</b>: 10 minutes<br>Wait time before consecutive API requests.<br>
        </p>
      parameters:
        - name: DEPARTMENT_ID
          in: path
          required: true
          description: Unique identifier for the department in which a list of members need to be added To learn how to retrieve this ID, see <a href="/cliq/help/restapi/v2/glossary/#DEPARTMENT_ID">DEPARTMENT_ID</a> in the Glossary page.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DepartmentMembersRequest'
      responses:
        '200':
          description: The request was successfully completed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/no-response'
        '400':
          description: Bad Request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: The request cannot be performed. Usually because of malformed parameter or missing parameter.
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Request was rejected because of invalid AuthToken.
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: The user does not have enough permission or possibly not an user of the respective organization to access the resource.
        '404':
          description: Invalid URL.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: The URL you've sent is wrong. It's possible that the resource you've requested has been moved to another URL.
        '405':
          description: Method Not Allowed.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: The requested resource does not support the HTTP method used. For example, requesting List of all customers API with PUT as the HTTP method.
        '406':
          description: Not Acceptable.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: The response has been received but the requested response type is not supported by the browser.
        '429':
          description: Too many requests.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Too many requests within a certain time frame.
        '500':
          description: Internal Server Error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Cliq server encountered an error which prevents it from fulfilling the request.
      security:
        - Cliq_Auth:
            - ZohoCliq.Departments.UPDATE
      tags:
        - departments
    delete:
      summary: Delete Department Members
      operationId: Delete Department Members
      description: |
        Use this API to delete members from a department.
         <br><br> 
        <p>
          <b>Threshold limit</b>: 20 requests per min per user<br>
          Number of API calls allowed within a minute.<br><br>
          <b>Lock period</b>: 10 minutes<br>Wait time before consecutive API requests.<br>
        </p>
      parameters:
        - name: DEPARTMENT_ID
          in: path
          required: true
          description: Unique identifier for the department from which list of members need to be deleted To learn how to retrieve this ID, see <a href="/cliq/help/restapi/v2/glossary/#DEPARTMENT_ID">DEPARTMENT_ID</a> in the Glossary page.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeleteUsersRequest'
      responses:
        '200':
          description: The request was successfully completed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/no-response'
        '400':
          description: Bad Request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: The request cannot be performed. Usually because of malformed parameter or missing parameter.
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Request was rejected because of invalid AuthToken.
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: The user does not have enough permission or possibly not an user of the respective organization to access the resource.
        '404':
          description: Invalid URL.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: The URL you've sent is wrong. It's possible that the resource you've requested has been moved to another URL.
        '405':
          description: Method Not Allowed.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: The requested resource does not support the HTTP method used. For example, requesting List of all customers API with PUT as the HTTP method.
        '406':
          description: Not Acceptable.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: The response has been received but the requested response type is not supported by the browser.
        '429':
          description: Too many requests.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Too many requests within a certain time frame.
        '500':
          description: Internal Server Error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Cliq server encountered an error which prevents it from fulfilling the request.
      security:
        - Cliq_Auth:
            - ZohoCliq.Departments.DELETE
      tags:
        - departments
components:
  schemas:
    no-response:
      type: object
      description: Represents an empty server response where no content is returned.
      properties:
        Response Code:
          type: string
          description: HTTP response code indicating no content is returned.
          example: 204 No response
    UserListResponse:
      type: object
      description: Response schema representing a list of users in the organization.
      properties:
        data:
          type: array
          description: List of user objects.
          items:
            type: object
            description: A single user record.
            properties:
              email_id:
                type: string
                description: Email address of the user.
                example: amelia.b@zylker.com
              zuid:
                type: string
                description: Unique Zoho User ID.
                example: '636000786'
              zoid:
                type: string
                description: Unique Zoho Organization ID associated with the user.
                example: '54107592'
              display_name:
                type: string
                description: Display name of the user.
                example: Amelia
              name:
                type: string
                description: Full name of the user.
                example: Amelia Burrows
              organization_id:
                type: string
                description: ID of the organization the user belongs to.
                example: '631836344'
              id:
                type: string
                description: Unique identifier of the user.
                example: '636000786'
    DepartmentMembersRequest:
      type: object
      description: Request schema to add members to a department using either user IDs or email IDs.
      properties:
        user_ids:
          type: array
          description: List of user ID strings to be added to the department.
          items:
            type: string
            description: A unique identifier for a user in the system.
          example:
            - '1234567'
            - '9875466'
            - '3456789'
        email_ids:
          type: array
          description: List of email ID strings to be added to the department.
          items:
            type: string
            format: email
            description: A valid email address of a user in the system.
          example:
            - amy@zylker.com
            - ben@zylker.com
            - claire@zylker.com
      oneOf:
        - type: object
          required:
            - user_ids
        - type: object
          required:
            - email_ids
    DeleteUsersRequest:
      type: object
      description: Request schema to delete users from the organization.
      required:
        - user_ids
      properties:
        user_ids:
          type: array
          description: List of all user IDs to be deleted.
          items:
            type: string
            description: A unique identifier (ZUID) of a user to be deleted from the organization.
          example:
            - '169917679'
            - '123456799'
    DepartmentCreateRequest:
      type: object
      description: Request schema to create a new department.
      required:
        - name
        - lead_zuid
        - user_ids
      properties:
        name:
          type: string
          description: Name of the department you're creating.
          example: Zylker Support
        lead_zuid:
          type: string
          description: ZUID of the user who will be assigned as the department lead.
          example: '67839566'
        parent_department_id:
          type: string
          description: (Optional) ID of the parent department to which this new department belongs.
          example: '190135625778924001'
        user_ids:
          type: array
          description: List of user IDs who will be added as department members.
          items:
            type: string
            description: A unique identifier (ZUID) of a user to be added as a department member.
          example:
            - '163319973'
            - '673890827'
            - '654321789'
    DepartmentCreateResponse:
      type: object
      description: Response schema for department creation containing department details.
      properties:
        data:
          type: object
          description: Department details.
          properties:
            lead:
              type: object
              description: Information about the department lead.
              properties:
                id:
                  type: string
                  description: Unique identifier of the lead user.
                  example: '631830849'
                organization_id:
                  type: string
                  description: ID of the organization the lead belongs to.
                  example: '631836344'
                zoid:
                  type: string
                  description: Zoho Organization ID associated with the lead.
                  example: '54107592'
                display_name:
                  type: string
                  description: Display name of the lead.
                  example: Scott Fisher
                email_id:
                  type: string
                  description: Email address of the lead.
                  example: scott.fisher@zylker.com
                zuid:
                  type: string
                  description: Unique Zoho User ID of the lead.
                  example: '631830849'
                name:
                  type: string
                  description: Full name of the lead.
                  example: Scott Fisher
            name:
              type: string
              description: Name of the department.
              example: Zylker APAC Sales
            parent_department_id:
              type: string
              description: ID of the parent department.
              example: '1901318000001424001'
            lead_zuid:
              type: string
              description: ZUID of the department lead.
              example: '631830849'
            is_default:
              type: boolean
              description: Indicates if this is the default department.
              example: false
            id:
              type: string
              description: Unique identifier of the department.
              example: '1901318000002280001'
    DepartmentListResponse:
      type: object
      description: Response schema representing a list of departments in the organization.
      properties:
        data:
          type: array
          description: List of department objects.
          items:
            type: object
            description: A single department record.
            properties:
              name:
                type: string
                description: Name of the department.
                example: Zylker Widgets Inc
              is_default:
                type: boolean
                description: Indicates if this is the default department.
                example: true
              id:
                type: string
                description: Unique identifier of the department.
                example: '1901318000001071001'
              members_count:
                type: string
                description: Number of members in the department.
                example: '7'
              lead:
                type: object
                description: Information about the department lead.
                properties:
                  name:
                    type: string
                    description: Full name of the lead.
                    example: Scott Fisher
                  id:
                    type: string
                    description: Unique identifier of the lead user.
                    example: '631830849'
                  country:
                    type: string
                    description: Country of the lead.
                    example: us
                  email_id:
                    type: string
                    description: Email address of the lead.
                    example: scott.fisher@zylker.com
                  zoid:
                    type: string
                    description: Zoho Organization ID associated with the lead.
                    example: '54107592'
                  timezone:
                    type: string
                    description: Timezone of the lead.
                    example: Asia/Kolkata
                  first_name:
                    type: string
                    description: First name of the lead.
                    example: Scott
                  full_name:
                    type: string
                    description: Full name of the lead.
                    example: Scott Fisher
                  zuid:
                    type: string
                    description: Unique Zoho User ID of the lead.
                    example: '631830849'
                  display_name:
                    type: string
                    description: Display name of the lead.
                    example: Scott Fisher
                  last_name:
                    type: string
                    description: Last name of the lead.
                    example: Fisher
              parent_department_id:
                type: string
                description: ID of the parent department.
                example: '1901318000001424001'
              lead_zuid:
                type: string
                description: ZUID of the department lead.
                example: '631830849'
        next_token:
          type: string
          description: Token for fetching the next set of paginated results.
          example: 2a4e39fab27032f106ced7277c5b336d
    DepartmentDetailResponse:
      type: object
      description: Response schema representing detailed information of a specific department.
      properties:
        data:
          type: object
          description: Department details.
          properties:
            members_count:
              type: string
              description: Number of members in the department.
              example: '7'
            lead:
              type: object
              description: Information about the department lead.
              properties:
                id:
                  type: string
                  description: Unique identifier of the lead user.
                  example: '631830849'
                organization_id:
                  type: string
                  description: ID of the organization the lead belongs to.
                  example: '631836344'
                zoid:
                  type: string
                  description: Zoho Organization ID associated with the lead.
                  example: '54107592'
                display_name:
                  type: string
                  description: Display name of the lead.
                  example: Scott Fisher
                email_id:
                  type: string
                  description: Email address of the lead.
                  example: scott.fisher@zylker.com
                zuid:
                  type: string
                  description: Unique Zoho User ID of the lead.
  securitySchemes:
    Cliq_Auth:
      type: oauth2
      x-authorization-example: Bearer 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f
      flows:
        implicit:
          authorizationUrl: https://accounts.zoho.com/oauth/v2/auth
          scopes:
            ZohoCliq.Departments.CREATE: Add Departments
            ZohoCliq.Departments.UPDATE: Update Departments
            ZohoCliq.Departments.DELETE: Delete Departments
            ZohoCliq.Departments.READ: Read Departments
