> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tetherai.ca/llms.txt
> Use this file to discover all available pages before exploring further.

# Get a department by ID

> Fetch a single department by `_id` with populated managers/users; rejects cross-org reads.



## OpenAPI

````yaml /api-reference/openapi.yaml get /api/departments/{id}
openapi: 3.0.3
info:
  title: Tether Relay and Tether API
  version: 1.0.0
  description: >-
    Route-derived OpenAPI contract generated from tether-relay backend sources.
    Regenerate with scripts/sync-openapi-from-backend.mjs.
servers:
  - url: https://your-instance.example.com
    description: Production
  - url: http://localhost:2212
    description: Local API service
security: []
tags:
  - name: AI
  - name: Applications
  - name: Approval
  - name: Auth
  - name: Automations
  - name: Calls
  - name: Campaigns
  - name: Contact Analytics
  - name: Contact Metrics
  - name: Contact Notes
  - name: Contacts
  - name: Conversation Monitor
  - name: Conversations
  - name: Departments
  - name: Email
  - name: Escalation Dashboard
  - name: Event Logs
  - name: Google Sheets
  - name: Marketplace
  - name: Messages
  - name: Notification Sounds
  - name: Notifications
  - name: Org Snapshots
  - name: Organizations
  - name: Outreach
  - name: Outreach Metrics
  - name: Outreach Sources
  - name: Pipelines
  - name: Processes
  - name: Prompts
  - name: Reminders
  - name: Sms
  - name: Templates
  - name: Traces
  - name: Training
  - name: Upload
  - name: User Snapshots
  - name: Users
  - name: Vertical
  - name: Webchats
  - name: Webhook
paths:
  /api/departments/{id}:
    get:
      tags:
        - Departments
      summary: Get a department by ID
      description: >-
        Fetch a single department by `_id` with populated managers/users;
        rejects cross-org reads.
      operationId: get_departments_id
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Department returned
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DepartmentResponse'
        '400':
          description: Missing organization ID
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DepartmentErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DepartmentErrorResponse'
        '404':
          description: Department not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DepartmentErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DepartmentErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    DepartmentResponse:
      type: object
      properties:
        department:
          $ref: '#/components/schemas/DepartmentDto'
      additionalProperties: true
      example:
        department:
          _id: 65c1a0b0c0d0e0f0a0b0c0d1
          name: Sales
          description: Inbound + outbound sales reps
          organizationId: 65a0e0e0e0e0e0e0e0e0e0e0
          createdAt: '2026-01-12T09:00:00.000Z'
          updatedAt: '2026-04-04T12:30:00.000Z'
    DepartmentErrorResponse:
      type: object
      properties:
        error:
          type: string
      additionalProperties: true
      example:
        error: Department with this name already exists
    DepartmentDto:
      type: object
      properties:
        _id:
          type: string
        name:
          type: string
        description:
          type: string
        organizationId:
          type: string
        managerIds:
          type: array
          items:
            $ref: '#/components/schemas/DepartmentUserDto'
          description: Populated user objects or string IDs
        userIds:
          type: array
          items:
            $ref: '#/components/schemas/DepartmentUserDto'
          description: Populated user objects or string IDs
        createdBy:
          type: object
          description: Populated user object with fullName and email
          additionalProperties: true
        updatedBy:
          type: object
          description: Populated user object with fullName and email
          additionalProperties: true
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      additionalProperties: true
      example:
        _id: 65c1a0b0c0d0e0f0a0b0c0d1
        name: Sales
        description: Inbound + outbound sales reps
        organizationId: 65a0e0e0e0e0e0e0e0e0e0e0
        managerIds:
          - _id: 65b1f0a2c3d4e5f6a7b8c9e0
            fullName: Brenda Lee
            email: brenda@example.com
            accessRole: ADMIN
        userIds:
          - _id: 65b1f0a2c3d4e5f6a7b8c9d0
            fullName: Alice Rivera
            email: alice@example.com
            accessRole: AGENT
        createdBy:
          _id: 65b1f0a2c3d4e5f6a7b8c9e0
          fullName: Brenda Lee
          email: brenda@example.com
        updatedBy:
          _id: 65b1f0a2c3d4e5f6a7b8c9e0
          fullName: Brenda Lee
          email: brenda@example.com
        createdAt: '2026-01-12T09:00:00.000Z'
        updatedAt: '2026-04-04T12:30:00.000Z'
    DepartmentUserDto:
      type: object
      properties:
        _id:
          type: string
        fullName:
          type: string
        email:
          type: string
        accessRole:
          type: string
        departmentId:
          type: string
        phoneNumber:
          type: string
        designation:
          type: string
      additionalProperties: true
      example:
        _id: 65b1f0a2c3d4e5f6a7b8c9d0
        fullName: Alice Rivera
        email: alice@example.com
        accessRole: AGENT
        departmentId: 65c1a0b0c0d0e0f0a0b0c0d1
        phoneNumber: '+14155550100'
        designation: Sales Rep
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````