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

# Create Workgroup

> **Prerequisites:**
- **Required:** Bearer token — `POST /v1.0/oauth2/tokens`
- **Required:** Voice Route ID (CRID) — `POST /v1.0/voice/routes`

---

Create a new workgroup for intelligent call routing. Workgroups support types such as IVR, simultaneous ring, and round-robin distribution. Returns a unique WorkgroupId.

**What this does:** Returns the new workgroup's `WorkgroupId` (`WG-`) and full configuration. Once created, add members using `POST /v1.0/workgroups/activity` and assign the workgroup to a voice route.

**Next steps:**
- Add members — `POST /v1.0/workgroups/activity`
- View account workgroups — `GET /v1.0/account/workgroups`



## OpenAPI

````yaml /api-reference/openapi.json post /v1.0/workgroups
openapi: 3.0.3
info:
  title: mPaaS Core APIs
  version: 1.0.8
  description: >-
    The Telegent mPaaS (Mobile Platform as a Service) API gives you full
    programmatic control over mobile phone numbers, messaging, voice routing,
    subscribers, and account management. Use these APIs to provision MVNO and
    IoT numbers, send and receive SMS/MMS, configure intelligent call routing,
    manage subscriber accounts, and apply AI Guardian controls. All requests
    require a Bearer token obtained from the Authentication endpoint. For
    support, visit https://support.telegent.com/support/home
  contact:
    name: Support
    email: support@telegent.com
  termsOfService: https://telegent.com/terms
  license:
    name: Use under LICX
    url: https://telegent.com/license
servers:
  - url: https://api.telegent.com/v1.0
security:
  - BearerAuth: []
tags:
  - name: OAuth2
  - name: AI Guardian
  - name: Accounts
  - name: Distributors
  - name: Message
  - name: Numbers
  - name: Voicemail
  - name: Packages
  - name: Products
  - name: Schedules
  - name: Services
  - name: Sims
  - name: Subscribers
  - name: Subscriptions
  - name: Voice
  - name: Workgroups
paths:
  /v1.0/workgroups:
    post:
      tags:
        - Workgroups
      summary: Create Workgroup
      description: >-
        **Prerequisites:**

        - **Required:** Bearer token — `POST /v1.0/oauth2/tokens`

        - **Required:** Voice Route ID (CRID) — `POST /v1.0/voice/routes`


        ---


        Create a new workgroup for intelligent call routing. Workgroups support
        types such as IVR, simultaneous ring, and round-robin distribution.
        Returns a unique WorkgroupId.


        **What this does:** Returns the new workgroup's `WorkgroupId` (`WG-`)
        and full configuration. Once created, add members using `POST
        /v1.0/workgroups/activity` and assign the workgroup to a voice route.


        **Next steps:**

        - Add members — `POST /v1.0/workgroups/activity`

        - View account workgroups — `GET /v1.0/account/workgroups`
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - Name
                - Type
              properties:
                Name:
                  type: string
                  description: Friendly name for the workgroup
                  example: IVR Workgroup
                TelegentPhone:
                  type: string
                  description: Phone number assigned to this workgroup (E.164 format)
                  example: '+1234567890'
                Type:
                  type: string
                  enum:
                    - IVR
                    - simultaneous
                    - round-robin
                  description: Workgroup routing type
                  example: IVR
                CallOrder:
                  type: string
                  description: Call distribution order
                  example: '1'
                AnnouncementText:
                  type: string
                  description: Text-to-speech announcement played to callers
                AnnouncementUrl:
                  type: string
                  format: uri
                  description: URL of audio file for announcement
                InternalExtension:
                  type: string
                  description: Internal extension number
                CallerIdType:
                  type: string
                  description: Caller ID type configuration
                CallerIdName:
                  type: string
                  description: Caller ID name
                RecordCalls:
                  type: boolean
                  description: Enable call recording
                  example: true
                TranscribeRecordings:
                  type: boolean
                  description: Enable transcription of recordings
                  example: false
                ScheduleId:
                  type: string
                  description: Schedule ID to associate with this workgroup
                  example: SID-3741d220-0663-4289-85df-c203f43db5a6
                TimeZone:
                  type: string
                  description: Timezone for schedule (e.g., America/New_York)
                HoldMusicId:
                  type: string
                  description: ID of hold music to play
                AiRecording:
                  type: boolean
                  description: Enable AI-enhanced recording
                OffHoursType:
                  type: string
                  description: Off-hours routing type (User or Workgroup)
                OffHoursId:
                  type: string
                  description: User ID or Workgroup ID for off-hours routing
                OnHoursType:
                  type: string
                  description: On-hours routing type (User or Workgroup)
                OnHoursId:
                  type: string
                  description: User ID or Workgroup ID for on-hours routing
                WaitBetween:
                  type: string
                  description: Wait time between call attempts
                TollFreeNumber:
                  type: string
                  description: Toll-free number associated with workgroup
                AccountId:
                  type: string
                  description: Account ID to associate workgroup with
      responses:
        '200':
          description: Success — returns the new Workgroup ID (WID-) and configuration
          content:
            application/json:
              schema:
                type: object
              examples:
                example:
                  value:
                    WorkgroupId: WID-12345-abc-12345
                    Name: IVR Workgroup
                    TelegentPhone: '+1234567890'
                    Type: IVR
                    CallOrder: '1'
                    AnnouncementText: >-
                      Hello, welcome to Telegent. Press 1 for Sales, Press 2 for
                      Support.
                    ScheduleId: SID-3741d220-0663-4289-85df-c203f43db5a6
                    AccountId: AID-ab12345-2725-45a1-bd5e-526ed19799xx
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest_Result'
              example:
                StatusCode: 400
                Message: >-
                  Bad request: one or more required fields are missing or
                  contain an invalid value.
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized_Result'
              example:
                StatusCode: 401
                Message: >-
                  Unauthorized: Bearer token is missing, expired, or invalid.
                  Re-authenticate via POST /v1.0/oauth2/tokens.
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden_Result'
              example:
                StatusCode: 403
                Message: >-
                  Forbidden: your token does not have permission to access this
                  resource. Check the ApiEndpoint scope.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound_Result'
              example:
                StatusCode: 404
                Message: >-
                  Not found: the requested resource does not exist or belongs to
                  a different account.
        '405':
          description: Method Not Allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MethodNotAllowed_Result'
              example:
                StatusCode: 405
                Message: >-
                  Method not allowed: verify the HTTP method required for this
                  endpoint.
        '408':
          description: Request Timeout
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RequestTimeout_Result'
              example:
                StatusCode: 408
                Message: >-
                  Request timeout: the server did not receive a complete request
                  within the allowed time. Retry with exponential backoff.
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequests_Result'
              example:
                StatusCode: 429
                Message: >-
                  Too many requests: rate limit exceeded. Slow your request
                  cadence and retry after a short delay.
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerError_Result'
              example:
                StatusCode: 500
                Message: >-
                  Internal server error: an unexpected error occurred. If the
                  problem persists contact support@telegent.com.
        '503':
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceUnavailable_Result'
              example:
                StatusCode: 503
                Message: >-
                  Service unavailable: the API is temporarily unavailable. Retry
                  after a short delay.
        '504':
          description: Gateway Timeout
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayTimeout_Result'
              example:
                StatusCode: 504
                Message: >-
                  Gateway timeout: an upstream service did not respond in time.
                  Retry with exponential backoff.
      x-codeSamples:
        - lang: JSON
          source: |-
            {
              "Name": "IVR Workgroup",
              "TelegentPhone": "+1234567890",
              "Type": "IVR",
              "CallOrder": "1",
              "AnnouncementText": "Hello, welcome to Telegent. Press 1 for Sales, Press 2 for Support.",
              "ScheduleId": "SID-3741d220-0663-4289-85df-c203f43db5a6",
              "RecordCalls": true,
              "TranscribeRecordings": false
            }
        - lang: cURL
          source: |-
            curl -X POST https://api.telegent.com/v1.0/workgroups \
              -H 'Authorization: Bearer YOUR_TOKEN' \
              -H 'Content-Type: application/json' \
              -d '{
                "Name": "IVR Workgroup",
                "TelegentPhone": "+1234567890",
                "Type": "IVR",
                "ScheduleId": "SID-3741d220-0663-4289-85df-c203f43db5a6"
              }'
components:
  schemas:
    BadRequest_Result:
      required:
        - StatusCode
      type: object
      properties:
        StatusCode:
          type: integer
          format: int32
          example: 400
        Message:
          type: string
          nullable: true
          example: >-
            Bad request: one or more required fields are missing or contain an
            invalid value.
      additionalProperties: false
      example:
        StatusCode: 400
        Message: >-
          Bad request: one or more required fields are missing or contain an
          invalid value.
    Unauthorized_Result:
      required:
        - StatusCode
      type: object
      properties:
        StatusCode:
          type: integer
          format: int32
          example: 401
        Message:
          type: string
          nullable: true
          example: 'Unauthorized: Bearer token is missing, expired, or invalid.'
      additionalProperties: false
      example:
        StatusCode: 401
        Message: 'Unauthorized: Bearer token is missing, expired, or invalid.'
    Forbidden_Result:
      required:
        - StatusCode
      type: object
      properties:
        StatusCode:
          type: integer
          format: int32
          example: 403
        Message:
          type: string
          nullable: true
          example: >-
            Forbidden: your token does not have permission to access this
            resource.
      additionalProperties: false
      example:
        StatusCode: 403
        Message: >-
          Forbidden: your token does not have permission to access this
          resource.
    NotFound_Result:
      required:
        - StatusCode
      type: object
      properties:
        StatusCode:
          type: integer
          format: int32
          example: 404
        Message:
          type: string
          nullable: true
          example: >-
            Not found: the requested resource does not exist or belongs to a
            different account.
      additionalProperties: false
      example:
        StatusCode: 404
        Message: >-
          Not found: the requested resource does not exist or belongs to a
          different account.
    MethodNotAllowed_Result:
      required:
        - StatusCode
      type: object
      properties:
        StatusCode:
          type: integer
          format: int32
          example: 405
        Message:
          type: string
          nullable: true
          example: >-
            Method not allowed: verify the HTTP method required for this
            endpoint.
      additionalProperties: false
      example:
        StatusCode: 405
        Message: 'Method not allowed: verify the HTTP method required for this endpoint.'
    RequestTimeout_Result:
      required:
        - StatusCode
      type: object
      properties:
        StatusCode:
          type: integer
          format: int32
          example: 408
        Message:
          type: string
          nullable: true
          example: >-
            Request timeout: the server did not receive a complete request in
            time.
      additionalProperties: false
      example:
        StatusCode: 408
        Message: >-
          Request timeout: the server did not receive a complete request in
          time.
    TooManyRequests_Result:
      required:
        - StatusCode
      type: object
      properties:
        StatusCode:
          type: integer
          format: int32
          example: 429
        Message:
          type: string
          nullable: true
          example: >-
            Too many requests: rate limit exceeded. Slow your request cadence
            and retry.
      additionalProperties: false
      example:
        StatusCode: 429
        Message: >-
          Too many requests: rate limit exceeded. Slow your request cadence and
          retry.
    InternalServerError_Result:
      required:
        - StatusCode
      type: object
      properties:
        StatusCode:
          type: integer
          format: int32
          example: 500
        Message:
          type: string
          nullable: true
          example: 'Internal server error: an unexpected error occurred.'
      additionalProperties: false
      example:
        StatusCode: 500
        Message: 'Internal server error: an unexpected error occurred.'
    ServiceUnavailable_Result:
      required:
        - StatusCode
      type: object
      properties:
        StatusCode:
          type: integer
          format: int32
          example: 503
        Message:
          type: string
          nullable: true
          example: 'Service unavailable: the API is temporarily unavailable.'
      additionalProperties: false
      example:
        StatusCode: 503
        Message: 'Service unavailable: the API is temporarily unavailable.'
    GatewayTimeout_Result:
      required:
        - StatusCode
      type: object
      properties:
        StatusCode:
          type: integer
          format: int32
          example: 504
        Message:
          type: string
          nullable: true
          example: 'Gateway timeout: an upstream service did not respond in time.'
      additionalProperties: false
      example:
        StatusCode: 504
        Message: 'Gateway timeout: an upstream service did not respond in time.'

````