openapi: 3.0.3
info:
  title: RingCentral API
  description: RingCentral API specification
  version: 1.0.60-20260812-12a43af6
  contact:
    name: RingCentral Developers Support
    url: https://developers.ringcentral.com/support
  termsOfService: https://www.ringcentral.com/legal/apilitos.html
  license:
    name: RingCentral API License Agreement
    url: https://www.ringcentral.com/legal/apilitos.html
servers:
  - url: https://platform.ringcentral.com
    description: Production API entry point
  - url: https://media.ringcentral.com
    description: Production Media entry point
x-tagGroups:
  - name: Voice
    popular: true
    tags:
      - Business Hours
      - Call Blocking
      - Call Control
      - Call Forwarding
      - Call Handling Rules
      - States
      - State-based Rules
      - Interaction Rules
      - Forwarding Targets
      - Call Flip
      - Call Log
      - Call History
      - Call Log Export
      - Call Monitoring Groups
      - Call Queues
      - Call Recordings
      - Call Recording Settings
      - Device SIP Registration
      - Greetings
      - IVR
      - RingOut
      - Verification Calls
      - Telephony Metadata
      - Spam Numbers
  - name: SMS and Fax
    popular: true
    tags:
      - Fax
      - Message Exports
      - Message Store
      - Pager Messages
      - SMS
      - High Volume SMS
      - SMS Log Export
      - SMS Templates
      - SMS Consents
      - Voicemails
      - Voicemail Broadcasting
      - Distribution Lists
      - SMS Brands/Campaigns
      - SMS Transport API
      - Message Threads
      - Fax Cover Pages
  - name: Team Messaging
    popular: true
    tags:
      - Adaptive Cards
      - Bots
      - Calendar Events
      - Chats
      - Conversations
      - Compliance Exports
      - Contacts
      - Incoming Webhooks
      - Notes
      - Posts
      - Profile
      - Tasks
      - Teams
  - name: Video
    popular: true
    tags:
      - Bridge Management
      - Delegation Management
      - Meetings History
      - Meeting Recordings
      - Meetings Media
  - name: Webinar
    popular: true
    tags:
      - Webinars and Sessions
      - Invitees
      - Historical Webinars
      - Historical Recordings
      - Registration Management
      - Registrants
      - Webinar Analytics
      - Webinar Subscriptions
  - name: Analytics
    popular: true
    tags:
      - Business Analytics
      - IVA Analytics
      - Nova Analytics
      - ACE Analytics
  - name: Artificial Intelligence
    popular: true
    tags:
      - AI Conversation Expert
      - Insights
      - Audio
      - Text
      - Status
  - name: Authentication
    tags:
      - OAuth and OIDC
      - Interoperability
  - name: Account
    tags:
      - Company
      - Custom Fields
      - Licenses
      - Tax Locations
      - Cost Centers
      - Multi-Site
      - Phone Numbers
      - Presence
      - Presence Monitored Lists
      - Regional Settings
      - User Permissions
      - User Settings
      - User Credentials
      - Audit Trail
      - Calling Rates
      - Appearance Customization
      - Account Integrations
      - Custom Preferences
      - Company Policies
      - Financial Info
      - Subpoena Support
      - Extension Tags
  - name: Provisioning
    tags:
      - Automatic Location Updates
      - Devices
      - Extensions
      - Paging Only Groups
      - Park Locations
      - Phone Lines
      - SCIM
      - Shared Lines
      - Group Call Pickup
      - Delegated Lines Groups
      - Directed Call Pickup
      - IVR Apps
      - Web Voice Extensions
      - Video Configuration
      - Number Porting
      - SMB
      - Account Federation
      - Integrations
      - Enterprise Portal API
      - Push to Talk Provisioning
      - BYOC
      - Support Agent Permissions
      - MS Teams Direct Routing
      - Application Extensions
      - AUX Codes
      - Call Disposition Codes
  - name: Address Book
    tags:
      - External Contacts
      - Internal Contacts
      - Hybrid Directory Contacts
      - Overlay Contacts
      - External Shared Directory
  - name: Roles and Permissions
    tags:
      - Permissions
      - Role Management
      - Site Administration
      - User Groups
  - name: Billing
    tags:
      - Billing Information
      - Payment Method Info
      - Billing Statements
      - Contract Information
      - Tax Settings
      - Billing Contact Info
      - Order
      - Package Operations
      - Sales Operations
      - Service Categories
      - MixPanel
      - Billing Reports
      - Text-to-Quote Support
      - NGBS Custom Bids Approval
  - name: Events and Notifications
    tags:
      - Subscriptions
  - name: User Integrations
    tags:
      - Integration Sessions
      - Integration Configurations
      - Integration Profiles and Providers
      - Calendar Management
      - Calendar Event Management
      - Calendar Presence Link
      - Calendar Booking
      - Calendar Booking Types
      - Cloud Personal Contacts
      - Cloud Shared Contacts
      - Cloud Directory
      - Deprecated Calendar API
  - name: Rooms
    tags:
      - Rooms Client API
      - Rooms Management
      - Rooms Administration
  - name: App Management
    tags:
      - App Gallery
      - App Rating Review
      - Bot Provisioning
  - name: Workflow Builder
    tags:
      - Flows
      - Flow Editor
      - Flow User Settings
      - Flow Log
      - Flow Templates
      - Flows Execution Preference
  - name: RingCX
    tags:
      - RingCX Provisioning
      - RingCX Queues
      - RingCX Assets
      - Category Groups
      - Channels
      - Cloud Profiles
      - Dial Groups
      - Queues
      - Track Groups
      - Workflows
      - Users
      - Agent Assist
      - Supervisor Assist
      - Tracker Configuration
      - Feature Configuration
      - Roles
      - Sub Accounts
      - Agent Groups
      - Dialog Requests
  - name: Utilities
    tags:
      - API Info
      - Application Settings
      - Async Tasks
      - User Notifications
      - Client Versions
      - End-to-End Encryption
      - Entry Point Discovery
security:
  - OAuth2: []
tags:
  - name: SMS
  - name: Greetings
  - name: Audit Trail
  - name: Incoming Webhooks
  - name: Registration Management
    description: External APIs for registration flow management
  - name: Meeting Recordings
  - name: SMS Templates
  - name: Call Monitoring Groups
  - name: State-based Rules
  - name: Business Hours
  - name: Message Exports
    description: External interface to export user's messages
  - name: Message Store
  - name: MS Teams Direct Routing
  - name: Call Forwarding
  - name: Registrants
    description: External APIs for registrants management
  - name: Device SIP Registration
  - name: Call Queues
  - name: Posts
  - name: Compliance Exports
  - name: Message Threads
  - name: Call Handling Rules
  - name: OAuth and OIDC
    description: Public OAuth 2.0 and OpenID Connect 1.0 Resources
  - name: Phone Numbers
  - name: Invitees
    description: External APIs to manage webinar invitees and invitations
  - name: API Info
  - name: Tasks
  - name: Business Analytics
  - name: User Permissions
  - name: High Volume SMS
  - name: Internal Contacts
  - name: Webinars and Sessions
    description: External APIs for webinar and session management
  - name: AI Conversation Expert
    description: Get the insights of call recordings
  - name: Chats
  - name: States
  - name: Delegation Management
  - name: Forwarding Targets
  - name: SMS Brands/Campaigns
  - name: Calendar Events
  - name: Devices
  - name: Conversations
  - name: Call Control
  - name: Company
  - name: Call Recording Settings
  - name: Video Configuration
  - name: Call Log
  - name: SMS Consents
  - name: Fax
  - name: Audio
    description: Conversational AI audio processing APIs
  - name: User Settings
  - name: Text
    description: Conversational AI text processing APIs
  - name: Site Administration
  - name: Insights
    description: Conversational AI insight APIs
  - name: Pager Messages
  - name: Custom Fields
  - name: External Contacts
  - name: Bridge Management
  - name: RingOut
  - name: Adaptive Cards
  - name: Call Blocking
  - name: Historical Webinars
    description: Historical webinars and sessions information
  - name: Regional Settings
  - name: Webinar Subscriptions
    description: General interface to manage webinar subscriptions
  - name: Paging Only Groups
  - name: Call Flip
  - name: Subscriptions
    description: General interface to manage subscriptions
  - name: Multi-Site
  - name: Presence
  - name: Teams
  - name: Notes
  - name: Automatic Location Updates
  - name: SCIM
  - name: Meetings History
  - name: Call Recordings
  - name: Interaction Rules
  - name: Extensions
  - name: Historical Recordings
    description: Historical webinar recordings management (host and admin interfaces)
  - name: Status
    description: Conversational AI async job status
  - name: Profile
  - name: Role Management
  - name: IVR
  - name: Cost Centers
paths:
  "/restapi/v1.0/account/{accountId}/extension/{extensionId}/address-book/contact":
    get:
      tags:
        - External Contacts
      summary: List Contacts
      description: |
        Returns the user personal contacts.
      operationId: listContacts
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
        - name: startsWith
          in: query
          description: |
            If specified, only contacts which 'First name' or 'Last name' start
            with the mentioned substring will be returned. Case-insensitive
          schema:
            type: string
        - name: sortBy
          in: query
          description: Sorts results by the specified property
          style: form
          explode: true
          schema:
            type: array
            items:
              type: string
              enum:
                - FirstName
                - LastName
                - Company
        - $ref: "#/components/parameters/Page"
        - $ref: "#/components/parameters/PerPage"
        - name: phoneNumber
          in: query
          description: Phone number in e.164 format
          style: form
          explode: true
          schema:
            type: array
            items:
              type: string
      responses:
        "200":
          description: Contact list
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ContactList"
      x-feature: ReadPersonalContacts
      x-availability: High
      x-throttling-group: Heavy
      x-app-permission: ReadContacts
      x-user-permission: ReadPersonalContacts
    post:
      tags:
        - External Contacts
      summary: Create User Contact
      description: |
        Creates the user personal contact.
      operationId: createContact
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
        - name: dialingPlan
          in: query
          description: |
            Country code value complying with the [ISO 3166-1 alpha-2](https://ru.wikipedia.org/wiki/ISO_3166-1_alpha-2)
            format. The default value is home country of the current extension
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PersonalContactRequest"
        required: true
      responses:
        "200":
          description: Created contact information
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PersonalContactResource"
        "400":
          description: "Contact cannot be created: max contacts count reached ($limit)"
      x-feature: EditPersonalContacts
      x-availability: Limited
      x-throttling-group: Heavy
      x-app-permission: Contacts
      x-user-permission: EditPersonalContacts
  "/restapi/v1.0/account/{accountId}/extension/{extensionId}/address-book/contact/{contactId}":
    get:
      tags:
        - External Contacts
      summary: Get User Contact(s)
      description: |
        Returns the user personal contact(s).
        [Bulk request syntax](https://developers.ringcentral.com/guide/basics/batch-requests) is supported.
      operationId: readContact
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
        - $ref: "#/components/parameters/ContactIds"
      responses:
        "200":
          description: User personal contact(s) information
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PersonalContactResource"
      x-feature: ReadPersonalContacts
      x-availability: High
      x-throttling-group: Heavy
      x-app-permission: ReadContacts
      x-user-permission: ReadPersonalContacts
    put:
      tags:
        - External Contacts
      summary: Update User Contact(s)
      description: |
        Updates the user personal contact(s) (full resource update).
        [Bulk request syntax](https://developers.ringcentral.com/guide/basics/batch-requests) is supported.
      operationId: updateContact
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
        - $ref: "#/components/parameters/ContactIds"
        - name: dialingPlan
          in: query
          description: |
            Country code value complying with the [ISO 3166-1 alpha-2](https://ru.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.
            The default value is home country of the current extension
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PersonalContactRequest"
        required: true
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PersonalContactResource"
      x-feature: EditPersonalContacts
      x-availability: Limited
      x-throttling-group: Heavy
      x-app-permission: Contacts
      x-user-permission: EditPersonalContacts
    patch:
      tags:
        - External Contacts
      summary: Update Contact Attributes
      description: |
        Updates particular values of a personal contact attributes specified in request (partial resource update). Omitted attributes will remain unchanged.
        If any attribute is passed in request body with the null value, then this attribute value will be removed.
      operationId: patchContact
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
        - $ref: "#/components/parameters/ContactId"
        - name: dialingPlan
          in: query
          description: |
            Country code value complying with the [ISO 3166-1 alpha-2](https://ru.wikipedia.org/wiki/ISO_3166-1_alpha-2)
            format. The default value is home country of the current extension
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PersonalContactRequest"
        required: true
      responses:
        "200":
          description: Edited personal contact information
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PersonalContactResource"
      x-availability: Limited
      x-throttling-group: Heavy
      x-app-permission: Contacts
      x-user-permission: EditPersonalContacts
    delete:
      tags:
        - External Contacts
      summary: Delete User Contact(s)
      description: |
        Deletes the user personal contact(s).
        [Bulk request syntax](https://developers.ringcentral.com/guide/basics/batch-requests) is supported.
      operationId: deleteContact
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
        - $ref: "#/components/parameters/ContactIds"
      responses:
        "204":
          description: No Content
      x-feature: EditPersonalContacts
      x-availability: Limited
      x-throttling-group: Heavy
      x-app-permission: Contacts
      x-user-permission: EditPersonalContacts
  "/restapi/v1.0/account/{accountId}/extension/{extensionId}/address-book-sync":
    get:
      tags:
        - External Contacts
      summary: Address Book Synchronization
      description: |
        Synchronizes user contacts.
      operationId: syncAddressBook
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
        - name: syncType
          in: query
          description: Type of synchronization
          schema:
            type: string
            enum:
              - FSync
              - ISync
        - name: syncToken
          in: query
          description: |
            Value of syncToken property of the last sync request response
          schema:
            type: string
        - name: perPage
          in: query
          description: |
            Number of records per page to be returned. Max number of
            records is 250, which is also the default.
            For 'FSync' - if the number of records exceeds the parameter value
            (either specified or default), all of the pages can be retrieved
            in several requests. For 'ISync' - if the number of records exceeds
            page size, then the number of incoming changes to this
            number is limited
          schema:
            type: integer
            format: int32
        - name: pageId
          in: query
          description: |
            Internal identifier of a page. It can be obtained from the 'nextPageId'
            parameter passed in response body
          schema:
            type: integer
            format: int64
      responses:
        "200":
          description: Synchronized user contacts
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AddressBookSync"
      x-feature: ReadPersonalContacts
      x-availability: High
      x-throttling-group: Heavy
      x-app-permission: ReadContacts
      x-user-permission: ReadPersonalContacts
  "/restapi/v1.0/account/{accountId}/extension/{extensionId}/favorite":
    get:
      tags:
        - External Contacts
      summary: List Favorite Contacts
      description: |
        Returns the list of favorite contacts of the current extension.
        Favorite contacts include both company contacts (extensions) and personal
        contacts (address book records).
      operationId: listFavoriteContacts
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
      responses:
        "200":
          description: Favorite Contact List
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/FavoriteContactList"
      x-throttling-group: Light
      x-feature: ReadPersonalContacts
      x-availability: High
      x-user-permission: ReadPersonalContacts
      x-app-permission: ReadContacts
      x-notifications:
        - $ref: "#/components/schemas/ExtensionFavoritesEvent"
    put:
      tags:
        - External Contacts
      summary: Update Favorite Contact List
      description: |
        Updates the list of favorite contacts of the current extension.
        Favorite contacts include both company contacts (extensions) and personal
        contacts (address book records).**Please note**: Currently personal address
        book size is limited to 10 000 contacts.
      operationId: updateFavoriteContactList
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/FavoriteCollection"
        required: true
      responses:
        "200":
          description: Favorite contacts list
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/FavoriteContactList"
      x-feature: EditPersonalContacts
      x-availability: Limited
      x-throttling-group: Medium
      x-app-permission: Contacts
      x-user-permission: EditPersonalContacts
  "/restapi/v1.0/account/{accountId}/address-book-bulk-upload":
    post:
      tags:
        - External Contacts
      summary: Upload Multiple User Contacts
      description: |
        Uploads multiple contacts for multiple extensions at once.
        Maximum 500 extensions can be uploaded per request. Max amount
        of contacts that can be uploaded per extension is 10,000.
        Each contact uploaded for a certain extension is not visible
        to other extensions.
      operationId: addressBookBulkUpload
      parameters:
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AddressBookBulkUploadRequest"
        required: true
      responses:
        "202":
          description: Accepted
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AddressBookBulkUploadResponse"
      x-request-max-body-size: 20m
      x-throttling-group: Heavy
      x-feature: EditPersonalContacts
      x-availability: Limited
      x-app-permission: Contacts
      x-user-permission: EditPersonalContacts
  "/restapi/v1.0/account/{accountId}/address-book-bulk-upload/tasks/{taskId}":
    get:
      tags:
        - External Contacts
      summary: Get Contacts Upload Task
      description: |
        Returns the status of a task on adding multiple contacts to multiple extensions.
      operationId: getAddressBookBulkUploadTask
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - name: taskId
          in: path
          description: Internal identifier of a task
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Contacts upload task
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AddressBookBulkUploadResponse"
      x-feature: EditPersonalContacts
      x-availability: Limited
      x-throttling-group: Light
      x-app-permission: Contacts
      x-user-permission: EditPersonalContacts
  "/restapi/v1.0/account/{accountId}/extension/{extensionId}/business-hours":
    get:
      tags:
        - Business Hours
      summary: Get User Business Hours
      description: Returns the user business hours schedule. Business hours (and After hours - all the remaining time) schedules are commonly used for setting call handling rules - `business-hours-rule` and `after-hours-rule` correspondingly. **Please note:** If the user business hours are set to 'Custom hours' then a particular schedule is returned; however if set to '24 hours/7 days a week' the schedule will be empty.
      operationId: readUserBusinessHours
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GetUserBusinessHoursResponse"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-feature: ReadExtensions
      x-availability: High
      x-throttling-group: Light
      x-app-permission: ReadAccounts
      x-user-permission: ReadExtensions
    put:
      tags:
        - Business Hours
      summary: Update User Business Hours
      description: Updates the user business hours schedule.
      operationId: updateUserBusinessHours
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
      requestBody:
        description: JSON body
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UserBusinessHoursUpdateRequest"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UserBusinessHoursUpdateResponse"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-feature: EditExtensionAnsweringRules
      x-availability: Limited
      x-throttling-group: Medium
      x-app-permission: EditExtensions
      x-user-permission: EditUserAnsweringRules
  "/restapi/v1.0/account/{accountId}/business-hours":
    get:
      tags:
        - Business Hours
      summary: Get Company Business Hours
      description: Returns the company business hours schedule. Business hours (and After hours - all the remaining time) schedules are commonly used for setting call handling rules - `business-hours-rule` and `after-hours-rule` correspondingly.
      operationId: readCompanyBusinessHours
      parameters:
        - $ref: "#/components/parameters/AccountId"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CompanyBusinessHours"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-feature: ReadExtensionAnsweringRules
      x-availability: High
      x-throttling-group: Light
      x-app-permission: ReadAccounts
      x-user-permission: ReadCompanyAnsweringRules
    put:
      tags:
        - Business Hours
      summary: Update Company Business Hours
      description: Updates the company business hours schedule.
      operationId: updateCompanyBusinessHours
      parameters:
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        description: JSON body
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CompanyBusinessHoursUpdateRequest"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CompanyBusinessHours"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-feature: EditExtensionAnsweringRules
      x-availability: Limited
      x-throttling-group: Medium
      x-app-permission: EditExtensions
      x-user-permission: EditUserAnsweringRules
  "/restapi/v1.0/account/{accountId}/extension/{extensionId}/caller-blocking":
    get:
      tags:
        - Call Blocking
      summary: Get Caller Blocking Settings
      description: Returns the current caller blocking settings of a user.
      operationId: readCallerBlockingSettings
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CallerBlockingSettings"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-feature: ReadBlockedNumbers
      x-availability: High
      x-throttling-group: Light
      x-app-permission: ReadAccounts
      x-user-permission: ReadBlockedNumbers
    put:
      tags:
        - Call Blocking
      summary: Update Caller Blocking Settings
      description: Updates the current caller blocking settings of a user.
      operationId: updateCallerBlockingSettings
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CallerBlockingSettingsUpdate"
        required: false
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CallerBlockingSettings"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-availability: Limited
      x-throttling-group: Light
      x-app-permission: EditExtensions
      x-user-permission: EditBlockedNumbers
  "/restapi/v1.0/account/{accountId}/extension/{extensionId}/caller-blocking/phone-numbers":
    get:
      tags:
        - Call Blocking
      summary: List Blocked/Allowed Phone Numbers
      description: Returns the lists of blocked and allowed phone numbers.
      operationId: listBlockedAllowedNumbers
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
        - $ref: "#/components/parameters/Page"
        - $ref: "#/components/parameters/PerPage"
        - name: status
          in: query
          description: Status of phone number blocking to filter results
          schema:
            $ref: "#/components/schemas/BlockedNumberStatusEnum"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BlockedAllowedPhoneNumbersList"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-feature: ReadBlockedNumbers
      x-availability: High
      x-throttling-group: Light
      x-app-permission: ReadAccounts
      x-user-permission: ReadBlockedNumbers
    post:
      tags:
        - Call Blocking
      summary: Add Blocked/Allowed Number
      description: Updates either blocked or allowed phone number list with a new phone number.
      operationId: createBlockedAllowedNumber
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
      requestBody:
        description: JSON body
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AddBlockedAllowedPhoneNumber"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BlockedAllowedPhoneNumberInfo"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-feature: EditBlockedNumbers
      x-availability: Limited
      x-throttling-group: Medium
      x-app-permission: EditExtensions
      x-user-permission: EditBlockedNumbers
  "/restapi/v1.0/account/{accountId}/extension/{extensionId}/caller-blocking/phone-numbers/{blockedNumberId}":
    get:
      tags:
        - Call Blocking
      summary: Get Blocked/Allowed Number
      description: |
        Returns blocked or allowed phone number(s) by their ID(s).
        [Bulk request syntax](https://developers.ringcentral.com/guide/basics/batch-requests) is supported.
      operationId: readBlockedAllowedNumber
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
        - $ref: "#/components/parameters/BlockedNumberId"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BlockedAllowedPhoneNumberInfo"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-availability: High
      x-throttling-group: Light
      x-app-permission: ReadAccounts
      x-user-permission: ReadBlockedNumbers
    put:
      tags:
        - Call Blocking
      summary: Update Blocked/Allowed Number
      description: |
        Updates blocked or allowed phone number(s) by their ID(s).
        [Bulk request syntax](https://developers.ringcentral.com/guide/basics/batch-requests) is supported.
      operationId: updateBlockedAllowedNumber
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
        - $ref: "#/components/parameters/BlockedNumberId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AddBlockedAllowedPhoneNumber"
        required: false
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BlockedAllowedPhoneNumberInfo"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-availability: Limited
      x-throttling-group: Medium
      x-app-permission: EditExtensions
      x-user-permission: EditBlockedNumbers
    delete:
      tags:
        - Call Blocking
      summary: Delete Blocked/Allowed Number
      description: |
        Deletes blocked or allowed phone number(s) by their ID(s).
        [Bulk request](https://developers.ringcentral.com/guide/basics/batch-requests) is supported.
      operationId: deleteBlockedAllowedNumber
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
        - $ref: "#/components/parameters/BlockedNumberId"
      responses:
        "204":
          description: No Content
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-availability: Limited
      x-throttling-group: Medium
      x-app-permission: EditExtensions
      x-user-permission: EditBlockedNumbers
  "/restapi/v1.0/account/{accountId}/extension/{extensionId}/forwarding-number":
    get:
      tags:
        - Call Forwarding
      summary: List Forwarding Numbers
      description: |
        Returns the list of extension phone numbers used for call forwarding
        and call flip. The returned list contains all the extension phone numbers
        used for call forwarding and call flip.
      operationId: listForwardingNumbers
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
        - $ref: "#/components/parameters/Page"
        - $ref: "#/components/parameters/PerPage"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GetExtensionForwardingNumberListResponse"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-availability: High
      x-throttling-group: Light
      x-app-permission: ReadAccounts
      x-user-permission: ReadUserForwardingFlipNumbers
    post:
      tags:
        - Call Forwarding
      summary: Create Forwarding Number
      description: Adds a new forwarding number to the forwarding number list.
      operationId: createForwardingNumber
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
      requestBody:
        description: JSON body
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateForwardingNumberRequest"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ForwardingNumberInfo"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-feature: EditExtensionAnsweringRules
      x-availability: Limited
      x-throttling-group: Medium
      x-app-permission: EditExtensions
      x-user-permission: EditUserForwardingFlipNumbers
    delete:
      tags:
        - Call Forwarding
      summary: Delete Forwarding Numbers
      description: Deletes multiple forwarding numbers from the forwarding number list by IDs.
      operationId: deleteForwardingNumbers
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
      requestBody:
        description: JSON body
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/DeleteForwardingNumbersRequest"
        required: true
      responses:
        "204":
          description: No content
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-feature: EditExtensionAnsweringRules
      x-availability: Limited
      x-throttling-group: Medium
      x-app-permission: EditExtensions
      x-user-permission: EditUserForwardingFlipNumbers
  "/restapi/v2/accounts/{accountId}/extensions/{extensionId}/call-flip-numbers":
    get:
      tags:
        - Call Flip
      summary: Get Call Flip Settings
      description: |
        Returns call flip settings. Call flip destination is an extension level setting.
        The following numbers can be used for call flip:

        * User's DL numbers (added/removed automatically by the System)
        * PSTN numbers in E.164 format (added/removed manually by User)

        Call flip list is generally limited up to 10 numbers.

        **Please note:** This API is only working with the new Communication Handling flow.
        To ensure that please check if the 'NewCallHandlingAndForwarding' feature is supported.
      operationId: readCallFlipSettings
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CallFlipNumberListResource"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-feature: ReadExtensionAnsweringRules
      x-availability: Limited
      x-throttling-group: Light
      x-app-permission: ReadAccounts
    put:
      tags:
        - Call Flip
      summary: Update Call Flip Settings
      operationId: updateCallFlipSettings
      description: |
        Updates call flip settings. Call flip destination is an extension level setting.
        The following numbers can be used for call flip:

        * User's DL numbers (added/removed automatically by the System)
        * PSTN numbers in E.164 format (added/removed manually by User)

        Call flip list is generally limited up to 10 numbers.

        **Please note:** This API is only working with the new Communication Handling flow.
        To ensure that please check if the 'NewCallHandlingAndForwarding' feature is supported.
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
      requestBody:
        description: JSON body
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CallFlipNumberListResource"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CallFlipNumberListResource"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-feature: ReadExtensionAnsweringRules
      x-availability: Limited
      x-throttling-group: Medium
      x-app-permission: EditExtensions
  "/restapi/v1.0/account/{accountId}/extension/{extensionId}/forwarding-number/{forwardingNumberId}":
    get:
      tags:
        - Call Forwarding
      summary: Get Forwarding Number
      description: Returns a specific forwarding number.
      operationId: readForwardingNumber
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
        - $ref: "#/components/parameters/ForwardingNumberId"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ForwardingNumberInfo"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-availability: High
      x-throttling-group: Light
      x-app-permission: ReadAccounts
      x-user-permission: ReadUserForwardingFlipNumbers
    put:
      tags:
        - Call Forwarding
      summary: Update Forwarding Number
      description: Updates the existing forwarding number from the forwarding number list.
      operationId: updateForwardingNumber
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
        - $ref: "#/components/parameters/ForwardingNumberId"
      requestBody:
        description: JSON body
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateForwardingNumberRequest"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ForwardingNumberInfo"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-feature: EditExtensionAnsweringRules
      x-availability: Limited
      x-throttling-group: Medium
      x-app-permission: EditExtensions
      x-user-permission: EditUserForwardingFlipNumbers
    delete:
      tags:
        - Call Forwarding
      summary: Delete Forwarding Number
      description: Deletes a forwarding number from the forwarding number list by its ID.
      operationId: deleteForwardingNumber
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
        - $ref: "#/components/parameters/ForwardingNumberId"
      responses:
        "204":
          description: No content
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-feature: EditExtensionAnsweringRules
      x-availability: Limited
      x-throttling-group: Medium
      x-app-permission: EditExtensions
      x-user-permission: EditUserForwardingFlipNumbers
  "/restapi/v1.0/account/{accountId}/extension/{extensionId}/answering-rule":
    get:
      tags:
        - Call Handling Rules
      summary: List Call Handling Rules
      description: Returns call handling rules of an extension.
      operationId: listAnsweringRules
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
        - name: type
          in: query
          description: Type of an answering rule. Multiple values are supported
          explode: true
          schema:
            type: array
            items:
              $ref: "#/components/schemas/RuleTypeInfo"
        - name: view
          in: query
          description: The level of details to be returned about each answering rule
          schema:
            type: string
            default: Simple
            enum:
              - Detailed
              - Simple
        - name: enabledOnly
          in: query
          description: If true, then only active call handling rules are returned
          schema:
            type: boolean
            default: false
        - name: internalIds
          in: query
          description: If true, internal identifiers are returned in the response
          schema:
            type: boolean
            default: false
        - $ref: "#/components/parameters/Page"
        - $ref: "#/components/parameters/PerPage"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UserAnsweringRuleList"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-feature: ReadExtensionAnsweringRules
      x-availability: High
      x-throttling-group: Medium
      x-app-permission: ReadAccounts
      x-user-permission: ReadUserAnsweringRules
    post:
      tags:
        - Call Handling Rules
      summary: Create Call Handling Rule
      description: Creates a custom call handling rule for a particular caller ID.
      operationId: createAnsweringRule
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
      requestBody:
        description: JSON body
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateAnsweringRuleRequest"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CustomAnsweringRuleInfo"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-feature: EditExtensionAnsweringRules
      x-availability: Limited
      x-throttling-group: Medium
      x-app-permission: EditExtensions
      x-user-permission: EditUserAnsweringRules
  "/restapi/v1.0/account/{accountId}/extension/{extensionId}/answering-rule/{ruleId}":
    get:
      tags:
        - Call Handling Rules
      summary: Get Call Handling Rule
      description: Returns a call handling rule by ID.
      operationId: readAnsweringRule
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
        - $ref: "#/components/parameters/CallHandlingRuleId"
        - name: showInactiveNumbers
          in: query
          description: Indicates whether inactive numbers should be returned or not
          schema:
            type: boolean
            default: false
        - name: internalIds
          in: query
          description: If true, internal identifiers are returned in the response
          schema:
            type: boolean
            default: false
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CallHandlingRuleInfo"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-feature: ReadExtensionAnsweringRules
      x-availability: High
      x-throttling-group: Light
      x-app-permission: ReadAccounts
      x-user-permission: ReadUserAnsweringRules
    put:
      tags:
        - Call Handling Rules
      summary: Update Call Handling Rule
      description: Updates a custom call handling rule for a particular caller ID.
      operationId: updateAnsweringRule
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
        - $ref: "#/components/parameters/CallHandlingRuleId"
      requestBody:
        description: JSON body
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateAnsweringRuleRequest"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CallHandlingRuleInfo"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-feature: EditExtensionAnsweringRules
      x-availability: Limited
      x-throttling-group: Medium
      x-app-permission: EditExtensions
      x-user-permission: EditUserAnsweringRules
    delete:
      tags:
        - Call Handling Rules
      summary: Delete Call Handling Rule
      description: Deletes a custom call handling rule by a particular ID.
      operationId: deleteAnsweringRule
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
        - $ref: "#/components/parameters/CallHandlingRuleId"
      responses:
        "204":
          description: No Content
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-feature: EditExtensionAnsweringRules
      x-availability: Limited
      x-throttling-group: Medium
      x-app-permission: EditExtensions
      x-user-permission: EditUserAnsweringRules
  "/restapi/v1.0/account/{accountId}/answering-rule":
    get:
      tags:
        - Call Handling Rules
      summary: List Company Call Handling Rules
      description: Returns a list of company call handling rules.
      operationId: listCompanyAnsweringRules
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - name: type
          in: query
          description: Type of an answering rule. Multiple values are supported
          explode: true
          schema:
            type: array
            items:
              $ref: "#/components/schemas/RuleTypeInfo"
        - $ref: "#/components/parameters/Page"
        - $ref: "#/components/parameters/PerPage"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CompanyAnsweringRuleList"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-feature: ReadAccountAnsweringRules
      x-availability: High
      x-throttling-group: Medium
      x-app-permission: ReadAccounts
      x-user-permission: ReadCompanyAnsweringRules
    post:
      tags:
        - Call Handling Rules
      summary: Create Company Call Handling Rule
      description: Creates call handling rule on account level.
      operationId: createCompanyAnsweringRule
      parameters:
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        description: JSON body
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CompanyAnsweringRuleRequest"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CompanyAnsweringRuleInfo"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-feature: EditAccountAnsweringRules
      x-availability: Limited
      x-throttling-group: Medium
      x-app-permission: EditAccounts
      x-user-permission: EditCompanyAnsweringRules
  "/restapi/v1.0/account/{accountId}/answering-rule/{ruleId}":
    get:
      tags:
        - Call Handling Rules
      summary: Get Company Call Handling Rule
      description: Returns a company call handling rule by ID.
      operationId: readCompanyAnsweringRule
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/CallHandlingRuleId"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CompanyAnsweringRuleInfo"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-feature: ReadAccountAnsweringRules
      x-availability: High
      x-throttling-group: Light
      x-app-permission: ReadAccounts
      x-user-permission: ReadCompanyAnsweringRules
    put:
      tags:
        - Call Handling Rules
      summary: Update Company Call Handling Rule
      description: Updates a company call handling rule.
      operationId: updateCompanyAnsweringRule
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/CallHandlingRuleId"
      requestBody:
        description: JSON body
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CompanyAnsweringRuleUpdate"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CompanyAnsweringRuleInfo"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-feature: EditAccountAnsweringRules
      x-availability: Limited
      x-throttling-group: Medium
      x-app-permission: EditAccounts
      x-user-permission: EditCompanyAnsweringRules
    delete:
      tags:
        - Call Handling Rules
      summary: Delete Company Call Handling Rule
      description: Deletes a company custom call handling rule by a particular ID.
      operationId: deleteCompanyAnsweringRule
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/CallHandlingRuleId"
      responses:
        "204":
          description: No Content
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-feature: EditAccountAnsweringRules
      x-availability: Limited
      x-throttling-group: Medium
      x-app-permission: EditAccounts
      x-user-permission: EditCompanyAnsweringRules
  /restapi/v1.0/dictionary/greeting:
    get:
      tags:
        - Greetings
      summary: List Standard Greetings
      description: |
        Returns the list of predefined standard greetings. Custom greetings
        recorded by user are not returned in response to this request. See Get Extension
        Custom Greetings.
      operationId: listStandardGreetings
      parameters:
        - $ref: "#/components/parameters/Page"
        - $ref: "#/components/parameters/PerPage"
        - name: type
          in: query
          description: Type of greeting, specifying the case when the greeting is played
          schema:
            type: string
            enum:
              - Introductory
              - Announcement
              - ConnectingMessage
              - ConnectingAudio
              - Voicemail
              - Unavailable
              - HoldMusic
              - Company
        - name: usageType
          in: query
          description: Usage type of greeting, specifying if the greeting is applied for user extension or department (call queue) extension
          schema:
            type: string
            enum:
              - UserExtensionAnsweringRule
              - ExtensionAnsweringRule
              - DepartmentExtensionAnsweringRule
              - CompanyAnsweringRule
              - CompanyAfterHoursAnsweringRule
              - VoicemailExtensionAnsweringRule
              - AnnouncementExtensionAnsweringRule
              - SharedLinesGroupAnsweringRule
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DictionaryGreetingList"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-availability: High
      x-throttling-group: Medium
  "/restapi/v1.0/dictionary/greeting/{greetingId}":
    get:
      tags:
        - Greetings
      summary: Get Standard Greeting
      description: Returns a standard greeting by ID.
      operationId: readStandardGreeting
      parameters:
        - $ref: "#/components/parameters/CallHandlingGreetingId"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DictionaryGreetingInfo"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-availability: High
      x-throttling-group: Medium
  "/restapi/v1.0/account/{accountId}/greeting":
    post:
      tags:
        - Greetings
      summary: Create Company Greeting
      description: Creates a custom company greeting.
      operationId: createCompanyGreeting
      parameters:
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        content:
          multipart/mixed:
            schema:
              type: object
              required:
                - binary
                - type
              properties:
                type:
                  type: string
                  description: |
                    Type of greeting, specifying the case when the greeting
                    is played.
                  enum:
                    - Company
                    - StartRecording
                    - StopRecording
                    - AutomaticRecording
                    - TemplateGreeting
                answeringRule:
                  $ref: "#/components/schemas/AnsweringRuleQueryRequest"
                languageId:
                  type: string
                  description: |
                    Internal identifier of a language. See Get Language
                    List
                binary:
                  type: string
                  description: Media file to upload
                  format: binary
          multipart/form-data:
            schema:
              type: object
              required:
                - binary
                - type
              properties:
                type:
                  type: string
                  description: |
                    Type of greeting, specifying the case when the greeting
                    is played.
                  enum:
                    - Company
                    - StartRecording
                    - StopRecording
                    - AutomaticRecording
                    - TemplateGreeting
                answeringRuleId:
                  type: string
                  description: Internal identifier of an answering rule
                languageId:
                  type: string
                  description: |
                    Internal identifier of a language. See Get Language
                    List
                text:
                  $ref: "#/components/schemas/TextForSpeech"
                binary:
                  type: string
                  description: Media file to upload
                  format: binary
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CustomCompanyGreetingInfo"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-request-max-body-size: 20m
      x-throttling-group: Medium
      x-feature: ReadExtensionInfo
      x-availability: Limited
      x-app-permission: EditAccounts
      x-user-permission: ReadUserInfo
  "/restapi/v1.0/account/{accountId}/extension/{extensionId}/greeting":
    post:
      tags:
        - Greetings
      summary: Create Custom User Greeting
      description: Creates custom greeting for an extension user.
      operationId: createCustomUserGreeting
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
        - name: apply
          in: query
          description: |
            Specifies whether to apply an answering rule or not. If set to
            true then `answeringRule` parameter is mandatory. If set to false, then
            the answering rule is not applied even if specified
          schema:
            type: boolean
            default: true
      requestBody:
        content:
          multipart/mixed:
            schema:
              type: object
              required:
                - answeringRule
                - binary
                - type
              properties:
                type:
                  type: string
                  description: Type of greeting, specifying the case when the greeting is played.
                  enum:
                    - Introductory
                    - Announcement
                    - ConnectingMessage
                    - ConnectingAudio
                    - Voicemail
                    - Unavailable
                    - HoldMusic
                    - TemplateGreeting
                answeringRule:
                  $ref: "#/components/schemas/AnsweringRuleQueryRequest"
                interactionRuleId:
                  type: string
                  description: |
                    Internal identifier of an interaction rule. Supported for all User type extensions
                    if the new call handling service is activated on account
                stateId:
                  type: string
                  description: |
                    Internal identifier of a state-based rule. Supported for all User type extensions if
                    the new call handling service is activated on account
                  enum:
                    - after-hours
                    - work-hours
                    - do-not-disturb
                    - forward-all-calls
                    - agent
                binary:
                  type: string
                  description: Media file to upload
                  format: binary
          multipart/form-data:
            schema:
              type: object
              required:
                - answeringRuleId
                - binary
                - type
              properties:
                type:
                  type: string
                  description: Type of greeting, specifying the case when the greeting is played.
                  enum:
                    - Introductory
                    - Announcement
                    - ConnectingMessage
                    - ConnectingAudio
                    - Voicemail
                    - Unavailable
                    - HoldMusic
                    - TemplateGreeting
                answeringRuleId:
                  type: string
                  description: Internal identifier of an answering rule
                text:
                  $ref: "#/components/schemas/TextForSpeech"
                binary:
                  type: string
                  description: Media file to upload
                  format: binary
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CustomUserGreetingInfo"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-request-max-body-size: 20m
      x-throttling-group: Heavy
      x-feature: EditExtensionAnsweringRules
      x-availability: Limited
      x-app-permission: EditExtensions
      x-user-permission: EditUserAnsweringRules
  "/restapi/v1.0/account/{accountId}/extension/{extensionId}/greeting/{greetingId}/content":
    get:
      tags:
        - Greetings
      summary: Get Extension Greeting Media Content
      description: |
        Returns extension-level greeting media contents.

        **This API must be called via media API entry point, e.g. https://media.ringcentral.com**
      operationId: readGreetingContent
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
        - $ref: "#/components/parameters/CallHandlingGreetingId"
        - $ref: "#/components/parameters/ContentDisposition"
        - $ref: "#/components/parameters/ContentDispositionFilename"
      responses:
        "200":
          description: Successful response
          content:
            audio/*:
              schema:
                type: string
                format: binary
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-media-api: true
      x-availability: High
      x-throttling-group: Heavy
      x-app-permission: ReadAccounts
  "/restapi/v1.0/account/{accountId}/greeting/{greetingId}/content":
    get:
      tags:
        - Greetings
      summary: Get Account Greeting Media Content
      description: |
        Returns account-level greeting media contents.

        **This API must be called via media API entry point, e.g. https://media.ringcentral.com**
      operationId: readAccountGreetingContent
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/CallHandlingGreetingId"
        - $ref: "#/components/parameters/ContentDisposition"
        - $ref: "#/components/parameters/ContentDispositionFilename"
      responses:
        "200":
          description: Successful response
          content:
            audio/*:
              schema:
                type: string
                format: binary
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-media-api: true
      x-availability: High
      x-throttling-group: Heavy
      x-app-permission: ReadAccounts
  "/restapi/v1.0/account/{accountId}/extension/{extensionId}/greeting/{greetingId}":
    get:
      tags:
        - Greetings
      summary: Get Custom Greeting
      description: Returns a custom user greeting by ID.
      operationId: readCustomGreeting
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
        - $ref: "#/components/parameters/CallHandlingGreetingId"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CustomUserGreetingInfo"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-feature: ReadExtensionInfo
      x-availability: High
      x-throttling-group: Medium
      x-app-permission: ReadAccounts
      x-user-permission: ReadUserInfo
  "/restapi/v1.0/account/{accountId}/extension/{extensionId}/greeting/hold-music":
    get:
      tags:
        - Greetings
      summary: Get Hold Music Greeting
      description: Returns a custom hold music greeting for user.
      operationId: readHoldMusicGreeting
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CustomUserGreetingInfo"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-feature: ReadExtensionInfo
      x-availability: High
      x-throttling-group: Medium
      x-app-permission: ReadAccounts
      x-user-permission: ReadUserInfo
  "/restapi/v1.0/account/{accountId}/ivr-prompts":
    get:
      tags:
        - IVR
      summary: List IVR Prompts
      description: Returns the list of IVR prompts.
      operationId: listIvrPrompts
      parameters:
        - $ref: "#/components/parameters/AccountId"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/IvrPrompts"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-feature: ReadAccountGreetings
      x-availability: High
      x-throttling-group: Medium
      x-app-permission: ReadAccounts
      x-user-permission: ReadCompanyGreetings
    post:
      tags:
        - IVR
      summary: Create IVR Prompts
      description: Creates an IVR prompt.
      operationId: createIVRPrompt
      parameters:
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - attachment
              properties:
                attachment:
                  type: string
                  description: Audio file that will be used as a prompt. Attachment cannot be empty, only audio files are supported
                  format: binary
                name:
                  type: string
                  description: Description of file contents.
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PromptInfo"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-request-max-body-size: 20m
      x-throttling-group: Heavy
      x-feature: EditAccountGreetings
      x-availability: Limited
      x-app-permission: EditAccounts
      x-user-permission: EditCompanyGreetings
  "/restapi/v1.0/account/{accountId}/ivr-prompts/{promptId}":
    get:
      tags:
        - IVR
      summary: Get IVR Prompt
      description: Returns an IVR prompt by ID.
      operationId: readIVRPrompt
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/IvrPromptId"
      responses:
        "200":
          description: Prompt Information
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PromptInfo"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-feature: ReadAccountGreetings
      x-availability: High
      x-throttling-group: Medium
      x-app-permission: ReadAccounts
      x-user-permission: ReadCompanyGreetings
    put:
      tags:
        - IVR
      summary: Update IVR Prompt
      description: Updates an IVR prompt by ID
      operationId: updateIVRPrompt
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/IvrPromptId"
      requestBody:
        description: JSON body
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateIVRPromptRequest"
        required: false
      responses:
        "200":
          description: Updated Prompt Information
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PromptInfo"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-feature: EditAccountGreetings
      x-availability: Limited
      x-throttling-group: Medium
      x-app-permission: EditAccounts
      x-user-permission: EditCompanyGreetings
    delete:
      tags:
        - IVR
      summary: Delete IVR Prompt
      description: Deletes an IVR prompt by ID.
      operationId: deleteIVRPrompt
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/IvrPromptId"
      responses:
        "204":
          description: No Content
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-feature: EditAccountGreetings
      x-availability: Limited
      x-throttling-group: Heavy
      x-app-permission: EditAccounts
      x-user-permission: EditCompanyGreetings
  "/restapi/v1.0/account/{accountId}/ivr-prompts/{promptId}/content":
    get:
      tags:
        - IVR
      summary: Get IVR Prompt Content
      description: |
        Returns media content of an IVR prompt by ID.

        **This API must be called via media API entry point, e.g. https://media.ringcentral.com**
      operationId: readIVRPromptContent
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/IvrPromptId"
        - $ref: "#/components/parameters/ContentDisposition"
        - $ref: "#/components/parameters/ContentDispositionFilename"
      responses:
        "200":
          description: IVR Prompt Media Data
          content:
            audio/*:
              schema:
                type: string
                format: binary
      x-media-api: true
      x-availability: High
      x-throttling-group: Heavy
      x-app-permission: ReadAccounts
  "/restapi/v1.0/account/{accountId}/ivr-menus":
    get:
      tags:
        - IVR
      summary: List IVR Menus
      description: Returns a company IVR menus.
      operationId: readIvrMenuList
      parameters:
        - $ref: "#/components/parameters/AccountId"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/IvrMenuList"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-feature: ReadAccountGreetings
      x-availability: High
      x-throttling-group: Medium
      x-app-permission: ReadAccounts
    post:
      tags:
        - IVR
      summary: Create IVR Menu
      description: Creates a company IVR menu.
      operationId: createIVRMenu
      parameters:
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        description: JSON body
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/IvrMenuInfoCreate"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/IvrMenuInfo"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-feature: EditAutoReceptionist
      x-availability: Limited
      x-throttling-group: Heavy
      x-app-permission: EditAccounts
      x-user-permission: AutoReceptionist
  "/restapi/v1.0/account/{accountId}/ivr-menus/{ivrMenuId}":
    get:
      tags:
        - IVR
      summary: Get IVR Menu
      description: Returns a company IVR menu by ID.
      operationId: readIVRMenu
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/IvrMenuId"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/IvrMenuInfo"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-feature: EditAutoReceptionist
      x-availability: High
      x-throttling-group: Medium
      x-app-permission: ReadAccounts
      x-user-permission: AutoReceptionist
    put:
      tags:
        - IVR
      summary: Update IVR Menu
      description: Updates a company IVR menu by ID. Omitted fields are not changed.
      operationId: updateIVRMenu
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/IvrMenuId"
      requestBody:
        description: JSON body
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/IvrMenuInfoUpdate"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/IvrMenuInfo"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-feature: EditAutoReceptionist
      x-availability: Limited
      x-throttling-group: Medium
      x-app-permission: ReadAccounts
      x-user-permission: AutoReceptionist
  "/restapi/v1.0/account/{accountId}/call-recording":
    get:
      tags:
        - Call Recording Settings
      summary: Get Call Recording Settings
      description: Returns call recording settings.
      operationId: readCallRecordingSettings
      parameters:
        - $ref: "#/components/parameters/AccountId"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CallRecordingSettingsResource"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-feature: ReadCompanyInfo
      x-availability: High
      x-throttling-group: Light
      x-app-permission: ReadAccounts
      x-user-permission: ReadCompanyInfo
    put:
      tags:
        - Call Recording Settings
      summary: Update Call Recording Settings
      description: Updates current call recording settings.
      operationId: updateCallRecordingSettings
      parameters:
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CallRecordingSettingsResource"
        required: false
      responses:
        "200":
          description: "OK: Updated Call Recording Settings"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CallRecordingSettingsResource"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-feature: EditCompanyInfo
      x-availability: Limited
      x-throttling-group: Medium
      x-app-permission: EditAccounts
      x-user-permission: EditCompanyInfo
  "/restapi/v1.0/account/{accountId}/call-recording/extensions":
    get:
      tags:
        - Call Recording Settings
      summary: List Call Recording Extensions
      description: Returns the list of extensions to be recorded.
      operationId: listCallRecordingExtensions
      parameters:
        - $ref: "#/components/parameters/AccountId"
      responses:
        "200":
          description: Extension List
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CallRecordingExtensions"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-feature: ReadCompanyInfo
      x-availability: High
      x-throttling-group: Medium
      x-app-permission: ReadAccounts
      x-user-permission: ReadCompanyInfo
  "/restapi/v1.0/account/{accountId}/call-recording/bulk-assign":
    post:
      tags:
        - Call Recording Settings
      summary: Update Call Recording Extensions
      description: Creates or updates the list of extensions to be recorded.
      operationId: updateCallRecordingExtensions
      parameters:
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/BulkAccountCallRecordingsResource"
        required: true
      responses:
        "204":
          description: Successful response
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-feature: ReadCompanyInfo
      x-availability: Limited
      x-throttling-group: Medium
      x-app-permission: ReadAccounts
      x-user-permission: ReadCompanyInfo
  "/restapi/v1.0/account/{accountId}/call-recording/custom-greetings":
    get:
      tags:
        - Call Recording Settings
      summary: List Call Recording Custom Greetings
      description: Returns call recording custom greetings.
      operationId: listCallRecordingCustomGreetings
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - name: type
          in: query
          description: Type of custom greetings to filter results
          schema:
            type: string
            enum:
              - StartRecording
              - StopRecording
              - AutomaticRecording
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CallRecordingCustomGreetings"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-feature: ReadCompanyInfo
      x-availability: High
      x-throttling-group: Medium
      x-app-permission: ReadAccounts
      x-user-permission: ReadCompanyInfo
    delete:
      tags:
        - Call Recording Settings
      summary: Delete Call Recording Custom Greetings
      description: Deletes call recording custom greetings.
      operationId: deleteCallRecordingCustomGreetings
      parameters:
        - $ref: "#/components/parameters/AccountId"
      responses:
        "204":
          description: No Content
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-feature: EditCompanyInfo
      x-availability: Limited
      x-throttling-group: Medium
      x-app-permission: EditAccounts
      x-user-permission: EditCompanyInfo
  "/restapi/v1.0/account/{accountId}/call-recording/custom-greetings/{greetingId}":
    delete:
      tags:
        - Call Recording Settings
      summary: Delete Call Recording Custom Greeting
      description: Deletes call recording custom greeting(s).
      operationId: deleteCallRecordingCustomGreeting
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/CallHandlingGreetingId"
      responses:
        "200":
          description: Success
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-feature: EditCompanyInfo
      x-availability: Limited
      x-throttling-group: Medium
      x-app-permission: EditAccounts
      x-user-permission: EditCompanyInfo
  "/restapi/v1.0/account/{accountId}/forward-all-calls":
    get:
      tags:
        - Call Handling Rules
      summary: Get Forward All Company Calls
      description: Returns information about *Forward All Company Calls* feature setting.
      operationId: getForwardAllCompanyCalls
      parameters:
        - $ref: "#/components/parameters/AccountId"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ForwardAllCompanyCallsInfo"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-availability: High
      x-throttling-group: Light
      x-app-permission: ReadAccounts
      x-user-permission: ReadCompanyAnsweringRules
    patch:
      tags:
        - Call Handling Rules
      summary: Update Forward All Company Calls
      description: Updates *Forward All Company Calls* feature setting.
      operationId: updateForwardAllCompanyCalls
      parameters:
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        description: JSON body
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ForwardAllCompanyCallsRequest"
        required: true
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ForwardAllCompanyCallsInfo"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-availability: High
      x-throttling-group: Medium
      x-app-permission: EditAccounts
      x-user-permission: EditCompanyAnsweringRules
  /restapi/v1.0/client-info/sip-provision:
    post:
      tags:
        - Device SIP Registration
      summary: Register Device
      description: |
        Creates SIP registration of a device/application (WebPhone, Mobile, Softphone).
      operationId: createSIPRegistration
      requestBody:
        description: JSON body
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateSipRegistrationRequest"
        required: true
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CreateSipRegistrationResponse"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-availability: High
      x-throttling-group: Heavy
      x-app-permission: VoipCalling
  "/restapi/v1.0/account/{accountId}/custom-fields":
    get:
      tags:
        - Custom Fields
      summary: List Custom Fields
      description: Returns the list of created custom fields.
      operationId: listCustomFields
      parameters:
        - $ref: "#/components/parameters/AccountId"
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CustomFieldList"
      x-feature: EditUsers
      x-throttling-group: Light
      x-availability: High
      x-app-permission: ReadAccounts
      x-user-permission: ReadUserInfo
    post:
      tags:
        - Custom Fields
      summary: Create Custom Field
      description: Creates custom field attached to the object.
      operationId: createCustomField
      parameters:
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CustomFieldCreateRequest"
        required: true
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CustomFieldModel"
      x-feature: EditUsers
      x-throttling-group: Medium
      x-availability: High
      x-app-permission: EditAccounts
      x-user-permission: Users
  "/restapi/v1.0/account/{accountId}/custom-fields/{fieldId}":
    put:
      tags:
        - Custom Fields
      summary: Update Custom Field
      description: Updates custom field by ID specified in path.
      operationId: updateCustomField
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/FieldId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CustomFieldUpdateRequest"
        required: true
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CustomFieldModel"
      x-feature: EditUsers
      x-throttling-group: Medium
      x-availability: High
      x-app-permission: EditAccounts
      x-user-permission: Users
    delete:
      tags:
        - Custom Fields
      summary: Delete Custom Field
      description: Deletes custom field(s) by ID(s) with the corresponding values.
      operationId: deleteCustomField
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/FieldId"
      responses:
        "204":
          description: Successful response
      x-feature: EditUsers
      x-throttling-group: Medium
      x-availability: High
      x-app-permission: EditAccounts
      x-user-permission: Users
  "/restapi/v1.0/account/{accountId}/device/{deviceId}":
    get:
      tags:
        - Devices
      summary: Get Device
      description: Returns account device(s) by their ID(s).
      operationId: readDevice
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/DeviceId"
        - name: syncEmergencyAddress
          in: query
          description: Specifies if an emergency address should be synchronized or not
          schema:
            type: boolean
            default: false
      responses:
        "200":
          description: Account device(s) information
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DeviceResource"
      x-feature: ReadAccountDevices
      x-availability: High
      x-throttling-group: Light
      x-app-permission: ReadAccounts
      x-user-permission: ReadCompanyDevices
    put:
      tags:
        - Devices
      summary: Update Device
      description: Updates account device(s) by their ID(s).
      operationId: updateDevice
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/DeviceId"
        - name: prestatement
          in: query
          description: Specifies if pre-statement should be generated.
          schema:
            type: boolean
            default: false
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AccountDeviceUpdate"
        required: true
      responses:
        "200":
          description: Updated device(s) information
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DeviceResource"
        "409":
          $ref: "#/components/responses/Conflict"
      x-feature: EditAccountDevices
      x-availability: Limited
      x-throttling-group: Medium
      x-app-permission: EditAccounts
      x-user-permission: EditCompanyDevices
  "/restapi/v1.0/account/{accountId}/device/{deviceId}/sip-info":
    get:
      tags:
        - Devices
      summary: Get Device SIP Info
      description: Returns device SIP information.
      operationId: readDeviceSipInfo
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/DeviceId"
      responses:
        "200":
          description: Device SIP information
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SipInfoResource"
      x-feature: ReadAccountDevices
      x-availability: High
      x-throttling-group: Light
      x-app-permission: ReadAccounts
      x-user-permission: ReadCompanyDevices
  "/restapi/v1.0/account/{accountId}/extension/{extensionId}/device":
    get:
      tags:
        - Devices
      summary: List Extension Devices
      description: |
        Returns devices of an extension or multiple extensions by their ID(s).
        [Bulk request syntax](https://developers.ringcentral.com/guide/basics/batch-requests) is supported.
      operationId: listExtensionDevices
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
        - $ref: "#/components/parameters/Page"
        - $ref: "#/components/parameters/PerPage"
        - name: linePooling
          in: query
          description: Pooling type of device - Host - a device with standalone paid phone line which can be linked to a soft client instance - Guest - a device with a linked phone line - None - a device without a phone line or with specific line (free, BLA, etc.)
          required: false
          schema:
            type: string
            enum:
              - Host
              - Guest
              - None
        - $ref: "#/components/parameters/DeviceFeature"
        - name: type
          in: query
          description: Device type or multiple device types
          required: false
          style: form
          explode: true
          schema:
            type: array
            items:
              type: string
              enum:
                - HardPhone
                - SoftPhone
                - OtherPhone
                - WebRTC
                - Room
        - name: lineType
          in: query
          description: Phone line type or multiple phone line types
          required: false
          style: form
          explode: true
          schema:
            type: array
            items:
              $ref: "#/components/schemas/PhoneLineTypeEnum"
      responses:
        "200":
          description: Extension devices information
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GetExtensionDevicesResponse"
      x-feature: ReadExtensionDevices
      x-availability: High
      x-throttling-group: Light
      x-app-permission: ReadAccounts
      x-user-permission: ReadUserDevices
  "/restapi/v1.0/account/{accountId}/device/{deviceId}/emergency":
    put:
      tags:
        - Devices
      summary: Update Device Emergency Info
      description: Updates account device emergency information.
      operationId: updateDeviceEmergency
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/DeviceId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AccountDeviceUpdate"
        required: true
      responses:
        "200":
          description: Updated emergency information of a device
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DeviceResource"
      x-availability: Limited
      x-throttling-group: Medium
      x-app-permission: EditAccounts
      x-user-permission: EditCompanyDevices
  "/restapi/v1.0/account/{accountId}/extension/{extensionId}/webapp-devices":
    get:
      tags:
        - Devices
      summary: List User Web Phone Devices
      operationId: listWebAppDevices
      description: |
        Returns the list of Web Phone (RC App) devices of the specified user extension,
        and their current registration status (`Online`/`Offline`).
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
      responses:
        "200":
          description: List of Web Phone devices
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/WebAppDevicesResponse"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "500":
          $ref: "#/components/responses/InternalError"
      x-feature: ReadExtensionDevices
      x-availability: Limited
      x-throttling-group: Medium
      x-app-permission: ReadAccounts
  "/restapi/v2/accounts/{accountId}/cost-centers":
    get:
      tags:
        - Cost Centers
      summary: List Cost Centers
      description: Returns the list of cost centers of the account specified in path.
      operationId: listCostCenters
      parameters:
        - $ref: "#/components/parameters/AccountId"
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CostCenterList"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "429":
          $ref: "#/components/responses/TooManyRequests"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-availability: Limited
      x-throttling-group: Light
      x-app-permission: ReadAccounts
      x-user-permission: CostCenterManagement
  "/restapi/v2/accounts/{accountId}":
    get:
      tags:
        - Company
      summary: Get Account Info
      description: Returns basic information about particular RingCentral account
      operationId: getAccountInfoV2
      parameters:
        - $ref: "#/components/parameters/AccountId"
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AccountInfo"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "429":
          $ref: "#/components/responses/TooManyRequests"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-availability: Limited
      x-throttling-group: Light
      x-app-permission: ReadAccounts
      x-user-permission: ReadCompanyInfo
  "/restapi/v2/accounts/{accountId}/devices/bulk-add":
    post:
      tags:
        - Devices
      summary: Add BYOD Devices
      description: Adds multiple BYOD (customer provided) devices to an account.
      operationId: bulkAddDevicesV2
      parameters:
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/BulkAddDevicesRequest"
        required: true
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BulkAddDevicesResponse"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "429":
          $ref: "#/components/responses/TooManyRequests"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-availability: Limited
      x-throttling-group: Heavy
      x-app-permission: EditAccounts
      x-user-permission: AddRemoveDevices
  "/restapi/v2/accounts/{accountId}/device-inventory":
    post:
      summary: Add Phone to Inventory
      description: Adds an existing phone (customer provided device - BYOD) as an unassigned device to the account inventory.
      tags:
        - Devices
      operationId: addDeviceToInventory
      parameters:
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AddDeviceToInventoryRequest"
        required: true
      responses:
        "201":
          description: Created
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AddDeviceToInventoryResponse"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "429":
          $ref: "#/components/responses/TooManyRequests"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-feature: EditAccountDevices
      x-availability: Limited
      x-throttling-group: Heavy
      x-app-permission: EditAccounts
    delete:
      summary: Delete Device from Inventory
      description: |
        Deletes an existing unassigned (without digital line or phone number) device or multiple devices
        from the account inventory. It is possible to delete up to 10 devices per request.
      tags:
        - Devices
      operationId: deleteDeviceFromInventory
      parameters:
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/DeleteDeviceFromInventoryRequest"
        required: true
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DeleteDeviceFromInventoryResponse"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "429":
          $ref: "#/components/responses/TooManyRequests"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-feature: AddRemoveDevices
      x-availability: Limited
      x-throttling-group: Heavy
      x-app-permission: EditAccounts
  "/restapi/v2/accounts/{accountId}/devices/{deviceId}":
    delete:
      tags:
        - Devices
      summary: Remove Phone Line
      description: |
        Disassociates a phone line (DL & Device) from an extension:

         - if the value of `keepAssetsInInventory` is `true`,
        the given device is moved to unassigned devices and the number is moved to the number inventory;
         - if the value of `keepAssetsInInventory` is `false`, the given device and number is removed from the account;
         - if the parameter `keepAssetsInInventory` is not set (empty body), default value `true` is set.
      operationId: removeLineJWSPublic
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - name: deviceId
          in: path
          description: Internal identifier of a source device
          required: true
          schema:
            type: string
          example: "65462346462"
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/RemoveLineRequest"
      responses:
        "200":
          description: |
            Successful response (when `keepAssetsInInventory` is `true`)
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoveLineResponse"
        "204":
          description: |
            Successful response (when `keepAssetsInInventory` is `false`)
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
      x-availability: Limited
      x-throttling-group: Medium
      x-app-permission: EditAccounts
      x-user-permission: EditAccountDevices
  "/restapi/v2/accounts/{accountId}/extensions/{extensionId}/devices/{deviceId}/replace":
    post:
      tags:
        - Devices
      summary: Swap Devices
      description: |
        Replaces the user device with another device, which is assigned to an extension
        or is stored in the inventory of the same account.
        Currently, the following device types can be swapped - `HardPhone` and `OtherPhone`.

        Please note:

         - This method allows replacing a device itself, while a phone number,
           a digital Line and an emergency address associated with this device remain unchanged
           and will still work together in a chain with the replacement device.
         - If a target device is from the inventory, then a source device will be moved
           to the inventory, and a target device will be assigned to the current extension.
         - If a target device is currently assigned to another extension,
           then the devices will be just swapped.
      operationId: replaceDevicesJWSPublic
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
        - name: deviceId
          in: path
          description: Internal identifier of a source device that is currently assigned to the given extension
          required: true
          schema:
            type: string
          example: "65462346462"
      responses:
        "204":
          description: No content
        "400":
          $ref: "#/components/responses/InvalidRequest"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SwapDeviceRequest"
        required: true
      x-availability: Limited
      x-throttling-group: Medium
      x-app-permission: EditAccounts
      x-user-permission: EditUserDevices
  "/restapi/v2/accounts/{accountId}/extensions":
    delete:
      tags:
        - User Settings
      summary: Delete Multiple Extensions
      description: |
        Deletes extension(s) of User and Limited types, and depending on device type either keeps or destroys
        the assets - numbers and devices. If a device is rented or bought in RC, it will be moved to the inventory.
        A BYOD (Other Phone) device will be deleted. Multiple extensions can be deleted by a single API call.
      operationId: bulkDeleteUsersV2
      parameters:
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/BulkDeleteUsersRequest"
        required: true
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BulkDeleteUsersResponse"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "429":
          $ref: "#/components/responses/TooManyRequests"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-feature: EditUsers
      x-availability: Limited
      x-throttling-group: Heavy
      x-app-permission: EditAccounts
      x-user-permission: Users
  "/restapi/v2/accounts/{accountId}/send-welcome-email":
    post:
      tags:
        - Company
      summary: Send Welcome Email
      description: Sends or re-sends welcome email to the system user of confirmed account
      operationId: sendWelcomeEmailV2
      parameters:
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: string
                  format: email
                  example: user@email.com
      responses:
        "200":
          description: Successful response
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-availability: Limited
      x-throttling-group: Medium
      x-app-permission: EditExtensions
      x-user-permission: Users
  "/restapi/v2/accounts/{accountId}/send-activation-email":
    post:
      tags:
        - Company
      summary: Send/Resend Activation Email
      description: Sends/resends activation email to the system user of unconfirmed account.
      operationId: sendActivationEmailV2
      parameters:
        - $ref: "#/components/parameters/AccountId"
      responses:
        "200":
          description: Successful response
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-availability: Limited
      x-throttling-group: Medium
      x-app-permission: EditAccounts
      x-user-permission: AccountAdministration
  "/restapi/v1.0/account/{accountId}/sms-registration-brands":
    get:
      tags:
        - SMS Brands/Campaigns
      operationId: listAllTcrBrands
      summary: List TCR Brands
      description: Returns a list of all TCR brands.
      parameters:
        - $ref: "#/components/parameters/AccountId"
      responses:
        "200":
          description: List of TCR brands
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BrandListResponse"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "429":
          $ref: "#/components/responses/TooManyRequests"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-throttling-group: Light
      x-app-permission: ReadAccounts
  "/restapi/v1.0/account/{accountId}/sms-registration-brands/{tcrBrandId}":
    get:
      tags:
        - SMS Brands/Campaigns
      operationId: findTcrBrandById
      summary: Get TCR Brand
      description: Returns the TCR brand by ID.
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/TcrBrandId"
      responses:
        "200":
          description: TCR brand details
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TcrBrandRecord"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "429":
          $ref: "#/components/responses/TooManyRequests"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-throttling-group: Light
      x-app-permission: ReadAccounts
      x-user-permission: ReadSMSRegistration
  "/restapi/v1.0/account/{accountId}/sms-registration-brands/{tcrBrandId}/campaigns":
    get:
      tags:
        - SMS Brands/Campaigns
      operationId: listAllTcrCampaigns
      summary: List TCR Campaigns
      description: Returns a list of TCR campaigns by the TCR brand ID.
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/TcrBrandId"
      responses:
        "200":
          description: List of TCR campaigns
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CampaignListResponse"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "429":
          $ref: "#/components/responses/TooManyRequests"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-throttling-group: Light
      x-app-permission: ReadAccounts
      x-user-permission: ReadSMSRegistration
  "/restapi/v1.0/account/{accountId}/sms-registration-brands/{tcrBrandId}/campaigns/{tcrCampaignId}":
    get:
      tags:
        - SMS Brands/Campaigns
      operationId: findTcrCampaignById
      summary: Get TCR Campaign
      description: Returns the TCR campaign by ID.
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/TcrBrandId"
        - $ref: "#/components/parameters/TcrCampaignId"
      responses:
        "200":
          description: TCR campaign details
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TcrCampaignRecord"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "429":
          $ref: "#/components/responses/TooManyRequests"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-throttling-group: Light
      x-app-permission: ReadAccounts
      x-user-permission: ReadSMSRegistration
  "/restapi/v1.0/account/{accountId}/sms-registration-brands/{tcrBrandId}/campaigns/{tcrCampaignId}/submit-phone-numbers":
    post:
      tags:
        - SMS Brands/Campaigns
      operationId: linkNumbers
      summary: Link Phone Number to TCR Campaign
      description: Links phone number(s) to a TCR campaign.
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/TcrBrandId"
        - $ref: "#/components/parameters/TcrCampaignId"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AssignNumbersRequest"
      responses:
        "200":
          description: Numbers linked successfully
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "429":
          $ref: "#/components/responses/TooManyRequests"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-throttling-group: Light
      x-app-permission: EditAccounts
      x-user-permission: EditCompanyPhoneNumbers
  "/restapi/v1.0/account/{accountId}/extension/{extensionId}/notification-settings":
    get:
      tags:
        - User Settings
      summary: Get Notification Settings
      description: |
        Returns notification settings for the current extension.

        Knowledge Article: [User Settings - Set Up Message Notifications](https://success.ringcentral.com/articles/RC_Knowledge_Article/9740)
      operationId: readNotificationSettings
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
      responses:
        "200":
          description: Notification settings
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NotificationSettings"
      x-feature: ReadMessageAndNotificationSettings
      x-availability: High
      x-throttling-group: Light
      x-app-permission: ReadAccounts
      x-user-permission: ReadMessagesNotificationsSettings
    put:
      tags:
        - User Settings
      summary: Update Notification Settings
      description: |
        Updates notification settings for the current extension.
        Knowledge Article: [User Settings - Set Up Message Notifications](https://success.ringcentral.com/articles/RC_Knowledge_Article/9740)
      operationId: updateNotificationSettings
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/NotificationSettingsUpdateRequest"
        required: true
      responses:
        "200":
          description: Updated notification settings
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NotificationSettings"
      x-availability: Limited
      x-throttling-group: Medium
      x-app-permission: EditExtensions
      x-user-permission: EditMessagesNotificationsSettings
  "/restapi/v2/accounts/{accountId}/batch-provisioning/users":
    post:
      tags:
        - User Settings
      summary: Create Multiple User Extensions
      description: |
        Creates multiple user extensions with BYOD (customer provided) devices.
        If "extensionNumber" is not specified, the next available extension number will be assigned.
      operationId: postBatchProvisionUsers
      parameters:
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/BatchProvisionUsersRequest"
        required: true
      responses:
        "200":
          description: Successful response (partial success is possible)
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BatchProvisionUsersResponse"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "429":
          $ref: "#/components/responses/TooManyRequests"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-throttling-group: Heavy
      x-app-permission: EditAccounts
  "/restapi/v2/accounts/{accountId}/regional-settings":
    parameters:
      - $ref: "#/components/parameters/AccountId"
    get:
      tags:
        - Regional Settings
      summary: Get Account Regional Settings
      description: Returns the account's regional settings.
      operationId: getAccountRegionalSettings
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RegionalSettings"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "429":
          $ref: "#/components/responses/TooManyRequests"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-feature: ReadCompanyInfo
      x-throttling-group: Light
      x-app-permission: ReadAccounts
    patch:
      tags:
        - Regional Settings
      summary: Update Account Regional Settings
      description: Updates the account's regional settings.
      operationId: patchAccountRegionalSettings
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AccountRegionalSettingRequest"
        required: true
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RegionalSettings"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "429":
          $ref: "#/components/responses/TooManyRequests"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-feature: EditCompanyInfo
      x-throttling-group: Medium
      x-app-permission: EditAccounts
  "/restapi/v2/accounts/{accountId}/phone-numbers":
    get:
      tags:
        - Phone Numbers
      summary: List Account Phone Numbers
      description: |
        Returns the list of phone numbers assigned to RingCentral customer
        account. Both company-level and extension-level numbers are returned.
        Conferencing numbers, and ELIN numbers are not returned.
      operationId: listAccountPhoneNumbersV2
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/Page"
        - $ref: "#/components/parameters/PerPage"
        - name: type
          in: query
          description: Types of phone numbers to be returned
          required: false
          schema:
            type: array
            items:
              $ref: "#/components/schemas/PhoneNumberType"
        - name: usageType
          in: query
          description: Usage type(s) of phone numbers to be returned
          style: form
          explode: true
          schema:
            type: array
            items:
              $ref: "#/components/schemas/PhoneNumberUsageTypeV2"
        - name: status
          in: query
          required: false
          description: Status of the phone number(s) to be returned
          schema:
            $ref: "#/components/schemas/PhoneNumberStatus"
        - name: tollType
          in: query
          required: false
          description: Toll type of phone numbers to return
          schema:
            $ref: "#/components/schemas/PhoneNumberTollType"
        - name: extensionStatus
          in: query
          description: Statuses of extensions to return phone numbers for
          required: false
          schema:
            $ref: "#/components/schemas/ExtensionStatusEnumFull"
        - name: byocNumber
          in: query
          description: The parameter reflects whether this number is BYOC or not
          required: false
          schema:
            type: boolean
        - name: mobileNumber
          in: query
          description: The parameter reflects whether this number is mobileNumber or not
          required: false
          schema:
            type: boolean
        - name: phoneNumber
          in: query
          description: |
            Phone number in e.164 format to be searched for.
            Parameter value can include wildcards (e.g. "+165012345**")
            or be an exact number "+16501234500" - single number is searched in that case.
            Make sure you escape the "+" in the URL as "%2B"
          required: false
          schema:
            type: string
            maxLength: 18
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AccountPhoneNumberList"
              examples:
                ListAccountPhoneNumbersResponse:
                  $ref: "#/components/examples/ListAccountPhoneNumbersResponse"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "429":
          $ref: "#/components/responses/TooManyRequests"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-availability: Limited
      x-throttling-group: Heavy
      x-app-permission: ReadAccounts
      x-user-permission: ReadCompanyPhoneNumbers
    delete:
      tags:
        - Phone Numbers
      summary: Delete Numbers from Inventory
      description: |
        This method can only delete numbers that of the following usage types:
          - `Inventory`,
          - `ForwardedNumber`,
          - `ForwardedCompanyNumber`.

        In other words, this method will not delete numbers which are in use on the account - extension direct numbers,
        main number, etc. It is possible to indicate phone numbers to be deleted using their IDs or exact string values
        in e.164 format. However, the same lookup method (by ID or by value) must be used for all numbers within the same API call.
      operationId: deleteNumbersFromInventoryV2
      parameters:
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/DeletePhoneNumbersRequest"
            examples:
              DeletePhoneNumbersRequest:
                $ref: "#/components/examples/DeletePhoneNumbersRequest"
        required: true
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DeletePhoneNumbersResponse"
              examples:
                DeletePhoneNumbersResponse:
                  $ref: "#/components/examples/DeletePhoneNumbersResponse"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "429":
          $ref: "#/components/responses/TooManyRequests"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-availability: Limited
      x-throttling-group: Medium
      x-app-permission: EditAccounts
      x-user-permission: EditCompanyPhoneNumbers
  "/restapi/v2/accounts/{accountId}/phone-numbers/bulk-add":
    post:
      tags:
        - Phone Numbers
      summary: Add Numbers to Inventory
      description: |
        Adds phone numbers to the account Inventory as unassigned. Currently, we support the following values: `Inventory`,
        `InventoryPartnerBusinessMobileNumber`, `PartnerBusinessMobileNumber`, `InventoryMobileNumber`.
        Later we may support some other values like `ForwardedNumber`, etc.
      operationId: addNumbersToInventoryV2
      parameters:
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        description: List of phone numbers
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AddPhoneNumbersRequest"
            examples:
              AddPhoneNumbersRequest:
                $ref: "#/components/examples/AddPhoneNumbersRequest"
        required: true
      responses:
        "200":
          description: Successful response (synchronous operation)
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AddPhoneNumbersResponse"
              examples:
                AddPhoneNumbersResponse:
                  $ref: "#/components/examples/AddPhoneNumbersResponse"
        "202":
          description: Successful response (asynchronous operation)
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AddPhoneNumbersTask"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "429":
          $ref: "#/components/responses/TooManyRequests"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-availability: Limited
      x-throttling-group: Heavy
      x-app-permission: EditAccounts
      x-user-permission: EditCompanyPhoneNumbers
  "/restapi/v2/accounts/{accountId}/phone-numbers/bulk-add/{taskId}":
    get:
      tags:
        - Phone Numbers
      summary: Get Add Numbers Task Results
      description: |
        Returns the result of asynchronous operation which adds phone numbers to the account inventory.
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - name: taskId
          in: path
          description: Identifier of a task returned by asynchronous bulk add operation
          required: true
          schema:
            type: string
      operationId: getBulkAddTaskResultsV2
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: "#/components/schemas/AddPhoneNumbersResponse"
                  - $ref: "#/components/schemas/AddPhoneNumbersTask"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "429":
          $ref: "#/components/responses/TooManyRequests"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-availability: Limited
      x-throttling-group: Heavy
      x-app-permission: EditAccounts
      x-user-permission: EditCompanyPhoneNumbers
  "/restapi/v2/accounts/{accountId}/phone-numbers/{phoneNumberId}":
    patch:
      tags:
        - Phone Numbers
      summary: Assign Phone Number
      description: |
        Assigns or reassigns a phone number as a company or extension number.

        Assign scenarios supported:
        - from inventory to a company number;
        - from inventory to an extension number.

        Reassign scenarios supported:
        - from an extension to another extension;
        - from an extension to a company number;
        - from a company number to an extension.
      operationId: assignPhoneNumberV2
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/PhoneNumberId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AssignPhoneNumberRequest"
            examples:
              AssignPhoneNumberRequest:
                $ref: "#/components/examples/AssignPhoneNumberRequest"
        required: true
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AccountPhoneNumberInfo"
              examples:
                AssignPhoneNumberResponse:
                  $ref: "#/components/examples/AssignPhoneNumberResponse"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "429":
          $ref: "#/components/responses/TooManyRequests"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-availability: Limited
      x-throttling-group: Medium
      x-app-permission: EditAccounts
      x-user-permission: EditCompanyPhoneNumbers
  "/restapi/v2/accounts/{accountId}/phone-numbers/{phoneNumberId}/replace":
    post:
      tags:
        - Phone Numbers
      summary: Replace Phone Number
      description: |
        Replaces (swaps) phone numbers from inventory with the main, company, direct or company fax numbers.
        This method is used to replace temporary numbers when the porting process is complete.
      operationId: replacePhoneNumberV2
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/PhoneNumberId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ReplacePhoneNumberRequest"
        required: true
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AccountPhoneNumberInfo"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "429":
          $ref: "#/components/responses/TooManyRequests"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-availability: Limited
      x-throttling-group: Medium
      x-app-permission: EditAccounts
      x-user-permission: EditCompanyPhoneNumbers
  "/restapi/v1.0/account/{accountId}/extension/{extensionId}/profile-image":
    get:
      tags:
        - User Settings
      summary: Get User Profile Image
      description: |
        Returns a profile image of an extension.
      operationId: readUserProfileImageLegacy
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
      responses:
        "200":
          description: User Profile Image (Media Data)
          content:
            image/png:
              schema:
                type: string
                format: binary
            image/jpeg:
              schema:
                type: string
                format: binary
            image/gif:
              schema:
                type: string
                format: binary
        "304":
          description: Not Modified
      x-feature: ReadExtensions
      x-availability: High
      x-throttling-group: Medium
      x-app-permission: ReadAccounts
      x-user-permission: ReadExtensions
    put:
      tags:
        - User Settings
      summary: Update User Profile Image
      description: |
        Updates the extension profile image.
      operationId: updateUserProfileImage
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                image:
                  type: string
                  format: binary
        required: true
      responses:
        "204":
          description: No Content
      x-request-max-body-size: 10m
      x-throttling-group: Heavy
      x-feature: EditExtensionInfo
      x-availability: High
      x-app-permission: EditExtensions
      x-user-permission: EditUserInfo
    post:
      tags:
        - User Settings
      summary: Upload User Profile Image
      description: |
        Uploads the extension profile image.
      operationId: createUserProfileImage
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - image
              properties:
                image:
                  type: string
                  format: binary
        required: true
      responses:
        "204":
          description: No Content
      x-request-max-body-size: 10m
      x-throttling-group: Heavy
      x-feature: EditExtensionInfo
      x-availability: High
      x-app-permission: EditExtensions
      x-user-permission: EditUserInfo
    delete:
      tags:
        - User Settings
      summary: Delete User Profile Image
      description: |
        Deletes the user profile image.
      operationId: deleteUserProfileImage
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
      responses:
        "204":
          description: No Content
      x-feature: EditExtensionInfo
      x-availability: High
      x-throttling-group: Medium
      x-app-permission: EditExtensions
      x-user-permission: EditUserInfo
  "/restapi/v1.0/account/{accountId}/extension/{extensionId}/profile-image/{scaleSize}":
    get:
      tags:
        - User Settings
      summary: Get Scaled Profile Image
      description: |
        Returns the scaled profile image of an extension.

        **This API must be called via media API entry point, e.g. https://media.ringcentral.com**
      operationId: readScaledProfileImage
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
        - $ref: "#/components/parameters/ProfileImageScale"
        - $ref: "#/components/parameters/ContentDisposition"
        - $ref: "#/components/parameters/ContentDispositionFilename"
      responses:
        "200":
          description: Successful response
          content:
            image/*:
              schema:
                type: string
                format: binary
      x-media-api: true
      x-availability: High
      x-throttling-group: Medium
      x-app-permission: ReadAccounts
  "/restapi/v1.0/account/{accountId}/extension/{extensionId}/phone-number/{phoneNumberId}/sms-configuration":
    get:
      tags:
        - Phone Numbers
      summary: Get SMS Configuration
      description: |
        Returns SMS configuration for the specified phone number of the extension.
      operationId: smsConfigurationInfo
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
        - name: phoneNumberId
          in: path
          description: Internal identifier of a phone number
          required: true
          schema:
            type: integer
            format: int64
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SmsConfigurationResource"
      x-feature: ReadExtensionPhoneNumbers
      x-availability: High
      x-throttling-group: Light
      x-app-permission: ReadAccounts
  "/restapi/v1.0/account/{accountId}/extension/{extensionId}/phone-number":
    get:
      tags:
        - Phone Numbers
      summary: Get Extension Phone Number List
      description: |
        Returns the list of phone numbers that are used by a particular extension,
        can be filtered by the phone number type. The returned list contains all
        numbers which are directly mapped to the given extension. Plus the features
        and company-level numbers that may be used when performing different operations
        on behalf of this extension.
      operationId: listExtensionPhoneNumbers
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
        - name: status
          in: query
          description: Status of a phone number
          schema:
            $ref: "#/components/schemas/PhoneNumberStatus"
        - name: usageType
          in: query
          description: Usage type of a phone number
          style: form
          explode: true
          schema:
            type: array
            items:
              $ref: "#/components/schemas/PhoneNumberUsageType"
        - name: page
          in: query
          description: |
            Indicates a page number to retrieve. Only positive number values
            are allowed. Default value is '1'
          schema:
            type: integer
            format: int32
            default: 1
        - name: perPage
          in: query
          description: Indicates a page size (number of items). If not specified, the value is '100' by default
          schema:
            type: integer
            format: int32
            default: 100
      responses:
        "200":
          description: "OK: User Phone Number List"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GetExtensionPhoneNumbersResponse"
        "404":
          $ref: "#/components/responses/NotFound"
      x-feature: ReadExtensionPhoneNumbers
      x-availability: High
      x-throttling-group: Light
      x-app-permission: ReadAccounts
      x-user-permission: ReadUserPhoneNumbers
  "/restapi/v1.0/account/{accountId}/extension/{extensionId}":
    get:
      tags:
        - User Settings
      summary: Get Extension
      description: |
        Returns basic information about a particular extension of an account.
      operationId: readExtension
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
      responses:
        "200":
          description: Extension information
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GetExtensionInfoResponse"
      x-throttling-group: Light
      x-feature: ReadExtensions
      x-availability: High
      x-app-permission: ReadAccounts
      x-user-permission: ReadExtensions
      x-notifications:
        - $ref: "#/components/schemas/ExtensionInfoEvent"
    put:
      tags:
        - User Settings
      summary: Update Extension
      description: Updates the user settings.
      operationId: updateExtension
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
      requestBody:
        description: JSON body
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ExtensionUpdateRequest"
        required: true
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GetExtensionInfoResponse"
      x-feature: EditExtensionInfo OR EditCredentials
      x-availability: Limited
      x-throttling-group: Medium
      x-app-permission: EditExtensions
      x-user-permission: EditUserInfo OR EditUserCredentials
    delete:
      tags:
        - User Settings
      summary: Delete Extension
      operationId: deleteExtension
      description: |
        Deletes extension(s) by ID(s). When an extension is being deleted
        the default API behavior is as follows:

        - user's direct numbers are preserved by becoming additional company numbers;
        - user's digital lines (both device & associated phone number) are deleted.

        You can change this behavior using the filters:

        - create unassigned extensions for each digital line of the deleted extension by
          setting the query parameter `savePhoneLines` to `true` in request path;
        - remove direct numbers of the deleted extension by setting the `savePhoneNumbers`
          query parameter to `false` in request path

        **Note!** Since this API is now deprecated, please use the following API method `DELETE /restapi/v2/accounts/{accountId}/extensions` for users deletion.
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
        - name: savePhoneLines
          in: query
          description: |
            If `true`, the digital lines from the deleted extension are saved in inventory.
          schema:
            type: boolean
            default: false
        - name: savePhoneNumbers
          in: query
          description: |
            If `true`, the phone numbers from the deleted extension are saved in inventory.
          schema:
            type: boolean
            default: true
      responses:
        "204":
          description: No Content
      deprecated: true
      x-feature: EditUsers
      x-availability: Limited
      x-throttling-group: Medium
      x-app-permission: EditAccounts
      x-user-permission: AddRemoveUsers
  "/restapi/v1.0/account/{accountId}/extension/{extensionId}/caller-id":
    get:
      tags:
        - User Settings
      summary: Get Extension Caller ID
      description: |
        Returns information on an outbound caller ID of an extension.
      operationId: readExtensionCallerId
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
      responses:
        "200":
          description: Caller ID information
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ExtensionCallerIdInfo"
      x-feature: ReadOutboundCallerId
      x-availability: High
      x-throttling-group: Light
      x-app-permission: ReadAccounts
      x-user-permission: ReadCallerIDSettings
    put:
      tags:
        - User Settings
      summary: Update Extension Caller ID
      description: |
        Updates outbound caller ID information of an extension.
      operationId: updateExtensionCallerId
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
      requestBody:
        description: JSON body
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ExtensionCallerIdInfo"
        required: true
      responses:
        "200":
          description: Updated caller ID information
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ExtensionCallerIdInfo"
      x-availability: Limited
      x-throttling-group: Medium
      x-app-permission: EditExtensions
      x-user-permission: EditCallerIDSettings
  "/restapi/v1.0/account/{accountId}/extension/{extensionId}/grant":
    get:
      tags:
        - User Settings
      summary: List Extension Grants
      description: |
        Returns a list of extensions including information on grants given to the current extension towards them.
        Currently the list of grants includes: picking up a call, call monitoring, calling or receiving a call on behalf
        of somebody, call delegation and calling paging groups.
      operationId: listExtensionGrants
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
        - name: extensionType
          style: form
          explode: true
          in: query
          description: |
            Type of extension to be returned. Multiple values are supported.
            **Please note that legacy 'Department' extension type corresponds
            to 'Call Queue' extensions in modern RingCentral product terminology**
          schema:
            $ref: "#/components/schemas/SearchGrantExtensionTypeEnumList"
        - name: page
          in: query
          description: |
            Indicates a page number to retrieve. Only positive number values
            are allowed
          schema:
            type: integer
            format: int32
            default: 1
        - name: perPage
          in: query
          description: Indicates a page size (number of items)
          schema:
            type: integer
            format: int32
            default: 100
      responses:
        "200":
          description: List of extension grants
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GetExtensionGrantListResponse"
      x-throttling-group: Light
      x-feature: ReadExtensionGrant
      x-availability: High
      x-app-permission: ReadAccounts
      x-user-permission: ReadExtensionGrant
      x-notifications:
        - $ref: "#/components/schemas/ExtensionGrantListEvent"
  "/restapi/v1.0/account/{accountId}/extension/{extensionId}/conferencing":
    get:
      tags:
        - User Settings
      summary: Get User Conferencing Settings
      description: |
        Returns information on Free Conference Calling (FCC) feature
        for a given extension.
      operationId: readConferencingSettings
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
        - name: countryId
          in: query
          description: |
            Internal identifier of a country. If not specified, the response
            is returned for the brand country
          schema:
            type: string
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GetConferencingInfoResponse"
      x-feature: Conferencing
      x-availability: High
      x-throttling-group: Light
      x-app-permission: ReadAccounts
      x-user-permission: OrganizeConference
    put:
      tags:
        - User Settings
      summary: Update User Conferencing Settings
      description: |
        Updates the default conferencing number for the current extension.
        The number can be selected from conferencing numbers of the current extension.
        Updates the setting, allowing participants join the conference before host.
      operationId: updateConferencingSettings
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
      requestBody:
        description: JSON body
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateConferencingInfoRequest"
        required: true
      responses:
        "200":
          description: Updated user conferencing settings
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GetConferencingInfoResponse"
      x-feature: Conferencing
      x-availability: Limited
      x-throttling-group: Medium
      x-user-permission: OrganizeConference
      x-app-permission: EditExtensions
  "/restapi/v1.0/account/{accountId}":
    get:
      tags:
        - Company
      summary: Get Account Info
      description: |
        Returns basic information about a particular RingCentral customer account.
      operationId: readAccountInfo
      parameters:
        - $ref: "#/components/parameters/AccountId"
      responses:
        "200":
          description: Account information
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GetAccountInfoResponse"
      x-feature: ReadCompanyInfo
      x-availability: High
      x-throttling-group: Light
      x-app-permission: ReadAccounts
      x-user-permission: ReadCompanyInfo
  "/restapi/v1.0/account/{accountId}/business-address":
    get:
      tags:
        - Company
      summary: Get Account Business Address
      description: |
        Returns business address of a company.
      operationId: readAccountBusinessAddress
      parameters:
        - $ref: "#/components/parameters/AccountId"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AccountBusinessAddressResource"
      x-feature: ReadCompanyInfo
      x-availability: High
      x-throttling-group: Light
      x-app-permission: ReadAccounts
      x-user-permission: ReadCompanyInfo
    put:
      tags:
        - Company
      summary: Update Company Business Address
      description: |
        Updates the business address of a company that account is linked
        to.
      operationId: updateAccountBusinessAddress
      parameters:
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        description: JSON body
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ModifyAccountBusinessAddressRequest"
        required: true
      responses:
        "200":
          description: Updated company business address
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AccountBusinessAddressResource"
      x-feature: EditCompanyInfo
      x-availability: Limited
      x-throttling-group: Medium
      x-app-permission: EditAccounts
      x-user-permission: EditCompanyInfo
  "/restapi/v1.0/account/{accountId}/service-info":
    get:
      tags:
        - Company
      summary: Get Account Service Info
      description: |
        Returns the information about service plan, available features
        and limitations for a particular RingCentral customer account.
      operationId: readAccountServiceInfo
      parameters:
        - $ref: "#/components/parameters/AccountId"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AccountServiceInfo"
      x-feature: ReadCompanyInfo
      x-availability: High
      x-throttling-group: Light
      x-app-permission: ReadAccounts
      x-user-permission: ReadCompanyInfo
  /restapi/v1.0/dictionary/language:
    get:
      tags:
        - Regional Settings
      summary: List Languages
      description: |
        Returns information about the supported languages.
      operationId: listLanguages
      responses:
        "200":
          description: Language list
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/LanguageList"
      x-availability: High
      x-throttling-group: Light
  "/restapi/v1.0/dictionary/language/{languageId}":
    get:
      tags:
        - Regional Settings
      summary: Get Language
      description: |
        Returns a language by ID.
      operationId: readLanguage
      parameters:
        - name: languageId
          in: path
          description: Internal identifier of a language
          required: true
          schema:
            type: integer
            format: int64
      responses:
        "200":
          description: Language information
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/LanguageInfo"
      x-availability: High
      x-throttling-group: Light
  /restapi/v1.0/dictionary/country:
    get:
      tags:
        - Regional Settings
      summary: List Countries
      description: |
        Returns all countries available for calling.
      operationId: listCountries
      parameters:
        - name: loginAllowed
          in: query
          description: |
            Specifies whether the logging-in with the phone numbers of this country
            is enabled or not
          schema:
            type: boolean
        - name: signupAllowed
          in: query
          description: |
            Indicates whether a signup/billing is allowed for a country. If
            not specified all countries are returned (according to other
            specified filters if any)
          schema:
            type: boolean
        - name: numberSelling
          in: query
          description: |
            Specifies if RingCentral sells phone numbers of this country
          schema:
            type: boolean
        - name: page
          in: query
          description: |
            Indicates a page number to retrieve. Only positive number values
            are accepted
          schema:
            type: integer
            format: int32
            default: 1
        - name: perPage
          in: query
          description: |
            Indicates a page size (number of items)
          schema:
            type: integer
            format: int32
            default: 100
        - name: freeSoftphoneLine
          in: query
          description: |
            Specifies if free phone line for softphone is available for a
            country or not
          schema:
            type: boolean
      responses:
        "200":
          description: Country list
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CountryListDictionaryModel"
      x-availability: High
      x-throttling-group: Light
  "/restapi/v1.0/dictionary/country/{countryId}":
    get:
      tags:
        - Regional Settings
      summary: Get Country
      description: |
        Returns information on a specific country.
      operationId: readCountry
      parameters:
        - name: countryId
          in: path
          description: Internal identifier of a country
          required: true
          schema:
            type: integer
            format: int64
      responses:
        "200":
          description: Country information
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CountryInfoDictionaryModel"
      x-availability: High
      x-throttling-group: Light
  /restapi/v1.0/dictionary/location:
    get:
      tags:
        - Regional Settings
      summary: List Locations
      description: |
        Returns all available locations for a certain state.
      operationId: listLocations
      parameters:
        - name: orderBy
          in: query
          description: Sorts results by the property specified
          schema:
            type: string
            default: City
            enum:
              - Npa
              - City
        - name: page
          in: query
          description: |
            Indicates a page number to retrieve. Only positive number values
            are accepted
          schema:
            type: integer
            format: int32
            default: 1
        - name: perPage
          in: query
          description: Indicates a page size (number of items)
          schema:
            type: integer
            format: int32
            default: 100
        - name: stateId
          in: query
          description: Internal identifier of a state
          schema:
            type: string
        - name: withNxx
          in: query
          description: Specifies if `nxx` codes are returned
          schema:
            type: boolean
      responses:
        "200":
          description: Location list
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GetLocationListResponse"
      x-availability: High
      x-throttling-group: Light
  /restapi/v1.0/dictionary/state:
    get:
      tags:
        - Regional Settings
      summary: List States
      description: |
        Returns all states of a certain country.
      operationId: listStates
      parameters:
        - name: allCountries
          in: query
          description: |
            If set to `true` then states of all countries are returned and
            `countryId` is ignored, even if specified. If the value is empty
            then the parameter is ignored
          schema:
            type: boolean
        - name: countryId
          in: query
          description: Internal identifier of a country
          schema:
            type: integer
            format: int64
        - name: page
          in: query
          description: |
            Indicates a page number to retrieve. Only positive number values
            are accepted
          schema:
            type: integer
            format: int32
            default: 1
        - name: perPage
          in: query
          description: Indicates a page size (number of items)
          schema:
            type: integer
            format: int32
            default: 100
        - name: withPhoneNumbers
          in: query
          description: |
            If `true` the list of states with phone numbers available for
            buying is returned
          schema:
            type: boolean
            default: false
      responses:
        "200":
          description: States list
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GetStateListResponse"
      x-availability: High
      x-throttling-group: Light
  "/restapi/v1.0/dictionary/state/{stateId}":
    get:
      tags:
        - Regional Settings
      summary: Get State
      description: |
        Returns information on a specific state by ID.
      operationId: readState
      parameters:
        - name: stateId
          in: path
          description: Internal identifier of a state
          required: true
          schema:
            type: integer
            format: int64
      responses:
        "200":
          description: State information
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GetStateInfoResponse"
      x-availability: High
      x-throttling-group: Light
  /restapi/v1.0/dictionary/timezone:
    get:
      tags:
        - Regional Settings
      summary: List Timezones
      description: |
        Returns all available timezones.
      operationId: listTimezones
      parameters:
        - name: page
          in: query
          description: |
            Indicates a page number to retrieve. Only positive number values
            are allowed. Default value is '1'
          schema:
            type: integer
            format: int32
            default: 1
        - name: perPage
          in: query
          description: Indicates a page size (number of items). If not specified, the value is '100' by default
          schema:
            type: integer
            format: int32
            default: 100
      responses:
        "200":
          description: Timezones list
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GetTimezoneListResponse"
      x-availability: High
      x-throttling-group: Light
  "/restapi/v1.0/dictionary/timezone/{timezoneId}":
    get:
      tags:
        - Regional Settings
      summary: Get Timezone
      description: |
        Returns information on a certain timezone.
      operationId: readTimezone
      parameters:
        - name: timezoneId
          in: path
          description: Internal identifier of a timezone
          required: true
          schema:
            type: integer
            format: int64
      responses:
        "200":
          description: Timezone information
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TimezoneInfoBase"
      x-availability: High
      x-throttling-group: Light
  "/restapi/v1.0/dictionary/brand/{brandId}/contracted-country":
    get:
      tags:
        - Company
      summary: List Contracted Countries
      description: Returns the list of contracted countries for the given brand.
      operationId: listContractedCountries
      parameters:
        - name: brandId
          in: path
          description: The internal ID of the RingCentral brand
          required: true
          schema:
            type: string
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ContractedCountryListResponse"
      x-availability: High
      x-throttling-group: Light
  "/restapi/v1.0/dictionary/brand/{brandId}/contracted-country/{contractedCountryId}":
    get:
      tags:
        - Company
      summary: List Domestic Countries
      description: |
        Returns the list of domestic countries for account contracted country and brand.
      operationId: listDomesticCountries
      parameters:
        - name: brandId
          in: path
          description: Internal identifier of a brand
          required: true
          schema:
            type: string
        - name: contractedCountryId
          in: path
          description: Internal identifier of a country
          required: true
          schema:
            type: string
        - name: page
          in: query
          description: |
            Indicates a page number to retrieve. Only positive number values
            are accepted
          schema:
            type: integer
            format: int32
            default: 1
        - name: perPage
          in: query
          description: Indicates a page size (number of items)
          schema:
            type: integer
            format: int32
            default: 100
      responses:
        "200":
          description: Domestic countries list
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CountryListDictionaryModel"
      x-availability: High
      x-throttling-group: Light
  "/restapi/v1.0/account/{accountId}/phone-number":
    get:
      tags:
        - Phone Numbers
      summary: List Company Phone Numbers
      description: |
        Returns the list of phone numbers assigned to RingCentral customer
        account. Both company-level and extension-level numbers are returned.
      operationId: listAccountPhoneNumbers
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - name: page
          in: query
          description: |
            Indicates a page number to retrieve. Only positive number values
            are accepted
          schema:
            type: integer
            format: int32
            default: 1
        - name: perPage
          in: query
          description: Indicates a page size (number of items)
          schema:
            type: integer
            format: int32
            default: 100
        - name: extensionStatus
          in: query
          description: |
            The status of extensions to filter results by
          schema:
            $ref: "#/components/schemas/ExtensionStatusEnumFull"
        - name: usageType
          in: query
          description: Usage type of a phone number
          style: form
          explode: true
          schema:
            type: array
            items:
              $ref: "#/components/schemas/PhoneNumberUsageType"
        - name: paymentType
          in: query
          description: Payment type of a phone number. Multiple values are supported
          style: form
          explode: true
          schema:
            type: array
            items:
              $ref: "#/components/schemas/PlatformPaymentType"
        - name: status
          in: query
          description: Status of a phone number. Multiple values are supported
          style: form
          explode: true
          schema:
            type: array
            items:
              $ref: "#/components/schemas/PhoneNumberStatus"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AccountPhoneNumbers"
      x-feature: ReadAccountPhoneNumbers
      x-availability: High
      x-throttling-group: Heavy
      x-app-permission: ReadAccounts
      x-user-permission: ReadCompanyPhoneNumbers
  "/restapi/v1.0/account/{accountId}/phone-number/{phoneNumberId}":
    get:
      tags:
        - Phone Numbers
      summary: Get Phone Number
      description: |
        Returns phone number(s) belonging to a certain account or extension by phoneNumberId(s).
        [Bulk request syntax](https://developers.ringcentral.com/guide/basics/batch-requests) is supported.
      operationId: readAccountPhoneNumber
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - name: phoneNumberId
          in: path
          description: Internal identifier of a phone number
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Phone number information
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CompanyPhoneNumberInfo"
      x-feature: ReadAccountPhoneNumbers
      x-availability: High
      x-throttling-group: Light
      x-app-permission: ReadAccounts
      x-user-permission: ReadCompanyPhoneNumbers
  "/restapi/v1.0/account/{accountId}/extension":
    get:
      tags:
        - Extensions
      summary: List Extensions
      description: |
        Returns the list of extensions created for a particular account.
        All types of extensions are included in this list.
      operationId: listExtensions
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - name: extensionNumber
          in: query
          description: Extension short number to filter records
          schema:
            type: string
            maxLength: 8
        - name: email
          in: query
          description: |
            Extension email address. Multiple values are accepted
          example:
            - alice.smith@example.com
            - bob.johnson@example.com
          style: form
          explode: true
          schema:
            type: array
            items:
              type: string
              maxLength: 254
        - name: page
          in: query
          description: |
            Indicates a page number to retrieve. Only positive number values
            are allowed
          schema:
            type: integer
            format: int32
            default: 1
        - name: perPage
          in: query
          description: Indicates a page size (number of items)
          schema:
            type: integer
            format: int32
            default: 100
        - name: status
          in: query
          description: |
            Extension status. Multiple values are supported. If `Unassigned`
            is specified, then extensions without `extensionNumber` attribute are returned.
            If not specified, then all extensions are returned
          allowEmptyValue: true
          style: form
          explode: true
          schema:
            type: array
            items:
              $ref: "#/components/schemas/ExtensionStatusEnumFull"
        - name: type
          in: query
          description: |
            Extension type. Please note
            that legacy 'Department' extension type corresponds to 'Call Queue'
            extensions in modern RingCentral product terminology
          required: false
          style: form
          explode: true
          schema:
            type: array
            items:
              $ref: "#/components/schemas/AllExtensionTypesEnum"
      responses:
        "200":
          description: Extension list information
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GetExtensionListResponse"
      x-throttling-group: Medium
      x-feature: ReadExtensions
      x-availability: High
      x-app-permission: ReadAccounts
      x-user-permission: ReadExtensions
      x-notifications:
        - $ref: "#/components/schemas/ExtensionListEvent"
    post:
      tags:
        - Extensions
      summary: Create Extension
      description: |
        Creates an extension.
      operationId: createExtension
      parameters:
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        description: JSON body
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ExtensionCreationRequest"
        required: true
      responses:
        "200":
          description: Created extension information
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GetExtensionInfoResponse"
        "400":
          $ref: "#/components/responses/InvalidRequest"
      x-feature: EditUsers
      x-availability: Limited
      x-throttling-group: Medium
      x-app-permission: EditAccounts
      x-user-permission: AddRemoveUsers
  "/restapi/v1.0/account/{accountId}/templates":
    get:
      tags:
        - Extensions
      summary: List User Templates
      description: |
        Returns the list of user templates for the current account.
      operationId: listUserTemplates
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - name: type
          description: Type of template
          in: query
          schema:
            $ref: "#/components/schemas/TemplateType"
        - name: page
          in: query
          description: |
            Indicates a page number to retrieve. Only positive number values
            are allowed. Default value is '1'
          schema:
            type: integer
            format: int32
            default: 1
        - name: perPage
          in: query
          description: Indicates a page size (number of items). If not specified, the value is '100' by default
          schema:
            type: integer
            format: int32
            default: 100
      responses:
        "200":
          description: User templates information
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UserTemplates"
      x-feature: ReadCompanyInfo
      x-availability: High
      x-throttling-group: Medium
      x-app-permission: ReadAccounts
      x-user-permission: ReadCompanyInfo
  "/restapi/v1.0/account/{accountId}/templates/{templateId}":
    get:
      tags:
        - Extensions
      summary: Get User Template
      description: |
        Returns the user template by ID.
      operationId: readUserTemplate
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - name: templateId
          in: path
          required: true
          description: Internal identifier of a template
          schema:
            type: string
      responses:
        "200":
          description: User template information
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TemplateInfo"
      x-feature: ReadCompanyInfo
      x-availability: High
      x-throttling-group: Light
      x-app-permission: ReadAccounts
      x-user-permission: ReadCompanyInfo
  "/restapi/v1.0/account/{accountId}/call-queues":
    get:
      tags:
        - Call Queues
      summary: List Call Queues
      description: Returns a call queue list.
      operationId: listCallQueues
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - name: page
          in: query
          description: Indicates a page number to retrieve. Only positive number values are accepted
          schema:
            type: integer
            format: int32
            default: 1
        - name: perPage
          in: query
          description: Indicates a page size (number of items)
          schema:
            type: integer
            format: int32
            default: 100
        - name: memberExtensionId
          in: query
          description: Internal identifier of an extension that is a member of every group within the result
          schema:
            type: string
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CallQueueList"
      x-feature: ReadExtensions
      x-availability: High
      x-throttling-group: Medium
      x-app-permission: ReadAccounts
      x-user-permission: ReadExtensions
  "/restapi/v1.0/account/{accountId}/call-queues/{groupId}":
    get:
      tags:
        - Call Queues
      summary: Get Call Queue
      description: Returns basic information on a call queue group extension.
      operationId: readCallQueueInfo
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - name: groupId
          in: path
          description: The internal ID of the call queue
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Call queue information
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CallQueueDetails"
      x-feature: ReadExtensions
      x-availability: Limited
      x-throttling-group: Light
      x-app-permission: ReadAccounts
      x-user-permission: ReadExtensions
    put:
      tags:
        - Call Queues
      summary: Update Call Queue
      description: |
        Updates information on a call queue group extension.
      operationId: updateCallQueueInfo
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - name: groupId
          in: path
          required: true
          description: Internal identifier of a call queue group
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CallQueueDetailsForUpdate"
        required: true
      responses:
        "200":
          description: Updated call queue information
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CallQueueDetails"
      x-feature: EditExtensionInfo
      x-availability: Limited
      x-throttling-group: Light
      x-app-permission: EditExtensions
      x-user-permission: EditUserInfo
  "/restapi/v1.0/account/{accountId}/call-queues/{groupId}/members":
    get:
      tags:
        - Call Queues
      summary: List Call Queue Members
      description: |
        Returns a list of call queue group members.
      operationId: listCallQueueMembers
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - name: groupId
          in: path
          required: true
          description: Internal identifier of a call queue group
          schema:
            type: string
        - name: page
          in: query
          description: |
            Indicates a page number to retrieve. Only positive number values
            are allowed
          schema:
            type: integer
            format: int32
            default: 1
        - name: perPage
          in: query
          description: Indicates a page size (number of items)
          schema:
            type: integer
            format: int32
            default: 100
      responses:
        "200":
          description: Call queue group members information
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CallQueueMembers"
      x-feature: ReadExtensions
      x-availability: High
      x-throttling-group: Light
      x-app-permission: ReadAccounts
      x-user-permission: ReadExtensions
  "/restapi/v1.0/account/{accountId}/call-queues/{groupId}/bulk-assign":
    post:
      tags:
        - Call Queues
      summary: Assign Multiple Call Queue Members
      description: |
        Assigns multiple call queue members to call queue group.
      operationId: assignMultipleCallQueueMembers
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - name: groupId
          in: path
          required: true
          description: Internal identifier of a call queue group
          schema:
            type: string
      requestBody:
        description: Changes for the given group
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CallQueueBulkAssignResource"
        required: true
      responses:
        "204":
          description: No Content
        "400":
          description: Extension of type [${extensionType}] cannot be included into call queue
      x-feature: EditGroups
      x-availability: Limited
      x-throttling-group: Heavy
      x-app-permission: EditExtensions
      x-user-permission: Groups
  "/restapi/v1.0/account/{accountId}/extension/{extensionId}/call-queues":
    put:
      tags:
        - Call Queues
      summary: Update User Call Queues
      description: |
        Updates a list of call queues where the user is an agent. This
        is a full update request, which means that if any call queue where the user is
        an agent is not mentioned in request, then the user is automatically removed
        from this queue.
      operationId: updateUserCallQueues
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UserCallQueues"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UserCallQueues"
      x-feature: EditCallQueuePresence
      x-availability: Limited
      x-throttling-group: Medium
      x-user-permission: EditCallQueuePresence
      x-app-permission: EditAccounts
  "/restapi/v1.0/account/{accountId}/department/{departmentId}/members":
    get:
      tags:
        - Call Queues
      summary: Get Department Member List
      description: |
        Viewing user account information (including name, business name, address
        and phone number/account number). Please note, that this method is
        deprecated and legacy 'Department' entity corresponds to 'Call Queue'
        in modern RingCentral product terminology. In order to retrieve call
        queue members please use the following method
        `GET/restapi/v1.0/account/{accountId}/call-queues/{groupId}/members`.
      operationId: listDepartmentMembers
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - name: departmentId
          in: path
          description: |
            Internal identifier of a Department extension (same as extensionId
            but only the ID of a department extension is valid). Please note that
            legacy 'Department' extension type corresponds to 'Call Queue' extensions
            in modern RingCentral product terminology
          required: true
          schema:
            type: integer
            format: int64
        - name: page
          in: query
          description: |
            Indicates a page number to retrieve. Only positive number values
            are accepted
          schema:
            type: integer
            format: int32
            default: 1
        - name: perPage
          in: query
          description: Indicates a page size (number of items)
          schema:
            type: integer
            format: int32
            default: 100
      responses:
        "200":
          description: Department members information
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DepartmentMemberList"
      deprecated: true
      x-feature: ReadExtensions
      x-availability: High
      x-throttling-group: Light
      x-app-permission: ReadAccounts
      x-user-permission: ReadExtensions
  "/restapi/v1.0/account/{accountId}/department/bulk-assign":
    post:
      tags:
        - Call Queues
      summary: Assign Multiple Department Members
      description: |
        Adds and/or removes multiple call queue members. Please note,
        that this method is deprecated and legacy 'Department' entity
        corresponds to 'Call Queue' in modern RingCentral product terminology.
        In order to assign multiple call queue members please use the following
        method `POST/restapi/v1.0/account/{accountId}/call-queues/{groupId}/bulk-assign`.
      operationId: assignMultipleDepartmentMembers
      parameters:
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/DepartmentBulkAssignResource"
        required: false
      responses:
        "204":
          description: Successful response
      deprecated: true
      x-feature: EditUserGroups
      x-availability: Limited
      x-throttling-group: Heavy
      x-app-permission: EditAccounts
      x-user-permission: UserGroups
  "/restapi/v1.0/account/{accountId}/paging-only-groups/{pagingOnlyGroupId}/users":
    get:
      tags:
        - Paging Only Groups
      summary: Get Paging Group Users
      description: |
        Returns a list of users allowed to page this group.
      operationId: listPagingGroupUsers
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - name: pagingOnlyGroupId
          in: path
          description: |
            Internal identifier of a paging group
          required: true
          schema:
            type: string
        - name: page
          in: query
          description: |
            Indicates a page number to retrieve. Only positive number values
            are accepted
          schema:
            type: integer
            format: int32
            default: 1
        - name: perPage
          in: query
          description: Indicates a page size (number of items)
          schema:
            type: integer
            format: int32
            default: 100
      responses:
        "200":
          description: Paging only group users information
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PagingOnlyGroupUsers"
      x-feature: ReadExtensionInfo
      x-availability: High
      x-throttling-group: Light
      x-app-permission: ReadAccounts
      x-user-permission: ReadUserInfo
  "/restapi/v1.0/account/{accountId}/paging-only-groups/{pagingOnlyGroupId}/devices":
    get:
      tags:
        - Paging Only Groups
      summary: Get Paging Group Devices
      description: |
        Returns a list of paging devices assigned to this group.
      operationId: listPagingGroupDevices
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - name: pagingOnlyGroupId
          in: path
          description: |
            Internal identifier of a paging group
          required: true
          schema:
            type: string
        - name: page
          in: query
          description: |
            Indicates a page number to retrieve. Only positive number values
            are accepted
          schema:
            type: integer
            format: int32
            default: 1
        - name: perPage
          in: query
          description: |
            Indicates a page size (number of items)
          schema:
            type: integer
            format: int32
            default: 100
      responses:
        "200":
          description: Paging devices information
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PagingOnlyGroupDevices"
      x-feature: ReadAccountDevices
      x-availability: High
      x-throttling-group: Light
      x-app-permission: ReadAccounts
      x-user-permission: ReadCompanyDevices
  "/restapi/v1.0/account/{accountId}/paging-only-groups/{pagingOnlyGroupId}/bulk-assign":
    post:
      tags:
        - Paging Only Groups
      summary: Assign Paging Group Users and Devices
      description: |
        Adds and/or removes paging group users and devices.
      operationId: assignMultiplePagingGroupUsersDevices
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - name: pagingOnlyGroupId
          in: path
          description: |
            Internal identifier of a paging group
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/EditPagingGroupRequest"
        required: false
      responses:
        "200":
          description: Assigned paging only groups/devices information
      x-feature: EditGroups
      x-availability: Limited
      x-throttling-group: Heavy
      x-app-permission: EditAccounts
      x-user-permission: Groups
  "/restapi/v1.0/account/{accountId}/sites":
    get:
      tags:
        - Multi-Site
      summary: List Sites
      operationId: listSites
      description: |
        Returns a list of sites for the specified account.
      parameters:
        - $ref: "#/components/parameters/AccountId"
      responses:
        "200":
          description: Sites information
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SitesList"
      x-feature: ReadExtensions
      x-availability: High
      x-throttling-group: Light
      x-app-permission: ReadAccounts
      x-user-permission: ReadExtensions
    post:
      tags:
        - Multi-Site
      summary: Create Site
      operationId: createSite
      description: |
        Creates a site for the specified account.
      parameters:
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        description: JSON body
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateSiteRequest"
        required: true
      responses:
        "200":
          description: Added site information
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SiteInfo"
      x-availability: Limited
      x-throttling-group: Medium
      x-app-permission: EditAccounts
  "/restapi/v1.0/account/{accountId}/sites/{siteId}":
    get:
      tags:
        - Multi-Site
      summary: Get Site
      operationId: readSite
      description: |
        Returns a site by ID.
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - name: siteId
          in: path
          description: Internal identifier of a site. *Please note* that `siteId` cannot take the 'main-site' value
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Site information
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SiteInfo"
      x-feature: ReadExtensions
      x-availability: High
      x-throttling-group: Light
      x-app-permission: ReadAccounts
      x-user-permission: ReadExtensions
    put:
      tags:
        - Multi-Site
      summary: Update Site
      operationId: updateSite
      description: |
        Updates a site specified in path.
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - name: siteId
          in: path
          description: Internal identifier of a site. *Please note* that `siteId` cannot take the 'main-site' value
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SiteUpdateRequest"
        required: false
      responses:
        "200":
          description: Updated site information
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SiteInfo"
      x-feature: EditSites
      x-availability: Limited
      x-throttling-group: Light
      x-app-permission: EditExtensions
      x-user-permission: Sites
    delete:
      tags:
        - Multi-Site
      summary: Delete Site
      operationId: deleteSite
      description: |
        Deletes a site specified in path.
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - name: siteId
          in: path
          description: Internal identifier of a site. *Please note* that `siteId` cannot take the 'main-site' value
          required: true
          schema:
            type: string
      responses:
        "204":
          description: No Content
        "403":
          $ref: "#/components/responses/Forbidden"
      x-feature: EditSites
      x-availability: Limited
      x-throttling-group: Light
      x-app-permission: EditAccounts
      x-user-permission: Sites
  "/restapi/v1.0/account/{accountId}/sites/{siteId}/bulk-assign":
    post:
      tags:
        - Multi-Site
      summary: Edit Sites
      operationId: assignMultipleSites
      description: |
        Assigns multiple sites to an account specified in path.
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - name: siteId
          in: path
          required: true
          description: Internal identifier of a site. *Please note* that `siteId` cannot take the 'main-site' value
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SiteMembersBulkUpdate"
        required: false
      responses:
        "204":
          description: No Content
      x-feature: EditSites
      x-availability: Limited
      x-throttling-group: Medium
      x-app-permission: EditExtensions
      x-user-permission: Sites
  "/restapi/v1.0/account/{accountId}/sites/{siteId}/ivr":
    get:
      tags:
        - Multi-Site
      summary: Get Site IVR Settings
      operationId: readSiteIvrSettings
      description: |
        Returns IVR settings for a site specified in path.
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - name: siteId
          in: path
          required: true
          description: Internal identifier of a site. *Please note* that `siteId` cannot take the 'main-site' value
          schema:
            type: string
      responses:
        "200":
          description: Site IVR settings
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SiteIVRSettings"
      x-feature: ReadExtensions
      x-availability: High
      x-throttling-group: Medium
      x-app-permission: ReadAccounts
      x-user-permission: ReadExtensions
    put:
      tags:
        - Multi-Site
      summary: Update Site IVR Settings
      operationId: updateSiteIvrSettings
      description: |
        Updates IVR settings for a site specified in path. Omitted fields are
        not changed.
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - name: siteId
          in: path
          required: true
          description: Internal identifier of a site. *Please note* that `siteId` cannot take the 'main-site' value
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SiteIVRSettingsUpdate"
        required: true
      responses:
        "200":
          description: Updated IVR settings of a site
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SiteIVRSettings"
      x-feature: EditSites
      x-availability: Limited
      x-throttling-group: Medium
      x-app-permission: EditAccounts
      x-user-permission: Sites
  "/restapi/v1.0/account/{accountId}/sites/{siteId}/members":
    get:
      tags:
        - Multi-Site
      summary: List Site Members
      operationId: listSiteMembers
      description: |
        Returns members of a site specified in path.
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - name: siteId
          in: path
          description: Internal identifier of a site. *Please note* that `siteId` cannot take the 'main-site' value
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Site members information
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SiteMembersList"
      x-feature: ReadExtensions
      x-availability: High
      x-throttling-group: Medium
      x-app-permission: ReadAccounts
      x-user-permission: ReadExtensions
  "/restapi/v1.0/account/{accountId}/call-monitoring-groups":
    get:
      tags:
        - Call Monitoring Groups
      summary: List Call Monitoring Groups
      description: |
        Returns a list of call monitoring groups filtered by an extension.
      operationId: listCallMonitoringGroups
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - name: page
          in: query
          description: |
            Indicates a page number to retrieve. Only positive number values
            are allowed
          schema:
            type: integer
            format: int32
            default: 1
        - name: perPage
          in: query
          description: Indicates a page size (number of items)
          schema:
            type: integer
            format: int32
            default: 100
        - name: memberExtensionId
          in: query
          description: |
            Internal identifier of an extension that is a member of every
            group within the result
          schema:
            type: string
        - name: siteId
          in: query
          description: Internal identifier of a site
          schema:
            type: array
            items:
              type: string
      responses:
        "200":
          description: Call monitoring groups information
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CallMonitoringGroups"
      x-feature: ReadExtensions
      x-availability: High
      x-throttling-group: Medium
      x-app-permission: ReadAccounts
      x-user-permission: ReadExtensions
    post:
      tags:
        - Call Monitoring Groups
      summary: Create Call Monitoring Group
      description: |
        Creates a new call monitoring group.
      operationId: createCallMonitoringGroup
      parameters:
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        description: Parameters of a call monitoring group that will be created
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateCallMonitoringGroupRequest"
        required: true
      responses:
        "200":
          description: Call monitoring group information
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CallMonitoringGroup"
      x-feature: EditGroups
      x-availability: High
      x-throttling-group: Medium
      x-app-permission: EditExtensions
      x-user-permission: Groups
  "/restapi/v1.0/account/{accountId}/call-monitoring-groups/{groupId}":
    put:
      tags:
        - Call Monitoring Groups
      summary: Update Call Monitoring Group
      description: |
        Updates a call monitoring group name.
      operationId: updateCallMonitoringGroup
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - name: groupId
          in: path
          description: |
            Internal identifier of a call monitoring group
          required: true
          schema:
            type: string
      requestBody:
        description: Parameters of a call monitoring group that will be updated
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateCallMonitoringGroupRequest"
        required: true
      responses:
        "200":
          description: Updated call monitoring group information
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CallMonitoringGroup"
        "400":
          description: Value for group name is unacceptable
        "403":
          description: User has no permissions to create groups
        "404":
          description: |
            Group with the given identifier doesn't belong to the account
      x-feature: EditGroups
      x-availability: High
      x-throttling-group: Medium
      x-app-permission: EditExtensions
      x-user-permission: Groups
    delete:
      tags:
        - Call Monitoring Groups
      summary: Delete Call Monitoring Group
      description: |
        Removes information about a call monitoring group specified in path.
      operationId: deleteCallMonitoringGroup
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - name: groupId
          in: path
          required: true
          description: Internal identifier of a call monitoring group
          schema:
            type: string
      responses:
        "204":
          description: No Content
        "404":
          description: Group with the given identifier doesn't belong to the account
      x-feature: EditGroups
      x-availability: Limited
      x-throttling-group: Medium
      x-app-permission: EditExtensions
      x-user-permission: Groups
  "/restapi/v1.0/account/{accountId}/extension/{extensionId}/features":
    get:
      tags:
        - User Settings
      summary: Get User Features
      description: |
        Returns a list of supported features and the information on their
        availability for the current extension. Particular feature(s) can
        be checked by providing `featureId` query parameter. Multiple values
        are supported in the format: `?featureId=Feature1&featureId=Feature2`.
        To get only available features in order to decrease response size,
        `availableOnly=true` query param can be specified. If a feature
        is available for the current user, `"available": true` is returned in
        response for the record with the corresponding feature ID. Otherwise,
        the additional attribute `reason` is returned with the appropriate code:
        - `ServicePlanLimitation` -  a feature is not included in account service plan;
        - `AccountLimitation` - a feature is turned off for account;
        - `ExtensionTypeLimitation` - a feature is not applicable for extension type;
        - `ExtensionSubTypeLimitation` - a feature is not applicable for extension sub-type;
        - `ExtensionLimitation` - a feature is not available for extension, e.g., additional license required;
        - `InsufficientPermissions` - required permission is not granted to the current user (not the one, who is specified in the URL, but the one who is calling this API);
        - `ConfigurationLimitation` - a feature is turned off for extension, e.g., by account administrator.
        - `PermissionLimitation` - a feature is unavailable due to a specific permission this extension has.

        Also, some features may have additional parameters, e.g. limits, which are returned in `params` attribute as a name-value collection:

            {
              "id": "HUD",
              "available": true,
              "params": [
                {
                  "name": "limitMax",
                  "value": "100"
                }
              ]
            }
      operationId: readExtensionFeatures
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
        - name: availableOnly
          in: query
          description: |
            Allows to filter features by availability for an extension
          schema:
            type: boolean
            default: false
        - name: featureId
          in: query
          description: Internal identifier(s) of the feature(s)
          style: form
          explode: true
          schema:
            type: array
            items:
              type: string
      responses:
        "200":
          description: Feature list
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/FeatureList"
      x-feature: ReadExtensions
      x-availability: High
      x-throttling-group: Medium
      x-app-permission: ReadAccounts
      x-user-permission: ReadExtensions
  "/restapi/v1.0/account/{accountId}/call-monitoring-groups/{groupId}/members":
    get:
      tags:
        - Call Monitoring Groups
      summary: List Call Monitoring Group Members
      description: |
        Returns a list of members for a call monitoring group specified in path.
      operationId: listCallMonitoringGroupMembers
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - name: groupId
          in: path
          required: true
          description: |
            Internal identifier of a call monitoring group
          schema:
            type: string
        - name: page
          in: query
          description: |
            Indicates a page number to retrieve. Only positive number values
            are allowed
          schema:
            type: integer
            format: int32
            default: 1
        - name: perPage
          in: query
          description: Indicates a page size (number of items)
          schema:
            type: integer
            format: int32
            default: 100
      responses:
        "200":
          description: Call monitoring group members information
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CallMonitoringGroupMemberList"
      x-feature: ReadExtensions
      x-availability: High
      x-throttling-group: Medium
      x-app-permission: ReadAccounts
      x-user-permission: ReadExtensions
  "/restapi/v1.0/account/{accountId}/call-monitoring-groups/{groupId}/bulk-assign":
    post:
      tags:
        - Call Monitoring Groups
      summary: Update Call Monitoring Group List
      description: |
        Updates a list of call monitoring groups.
      operationId: updateCallMonitoringGroupList
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - name: groupId
          in: path
          required: true
          description: |
            Internal identifier of a call monitoring group
          schema:
            type: string
      requestBody:
        description: Changes for a given call monitoring group
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CallMonitoringBulkAssign"
        required: true
      responses:
        "204":
          description: No Content
        "400":
          description: |
            Extension of type [ParkLocation] could not be a member of [call
            monitoring]
      x-feature: EditGroups
      x-availability: Limited
      x-throttling-group: Heavy
      x-app-permission: EditExtensions
      x-user-permission: Groups
  "/restapi/v1.0/account/{accountId}/extension-bulk-update":
    post:
      tags:
        - Extensions
      summary: Update Multiple Extensions
      description: |
        Updates multiple extensions at once. Maximum 500 extensions can be updated per request.
      operationId: extensionBulkUpdate
      parameters:
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        description: JSON body
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ExtensionBulkUpdateRequest"
        required: true
      responses:
        "200":
          description: Updated extensions
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ExtensionBulkUpdateTaskResource"
      x-feature: EditExtensionInfo
      x-availability: Limited
      x-throttling-group: Heavy
      x-app-permission: EditExtensions
      x-user-permission: EditExtensionInfo
  "/restapi/v1.0/account/{accountId}/extension-bulk-update/tasks/{taskId}":
    get:
      tags:
        - Extensions
      summary: Get Extension Update Task Status
      description: |
        Returns a status of a task to update multiple extensions.
      operationId: getExtensionBulkUpdateTask
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - name: taskId
          in: path
          description: |
            Internal identifier of a task
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Bulk update task status
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ExtensionBulkUpdateTaskResource"
      x-feature: EditExtensionInfo
      x-availability: Limited
      x-throttling-group: Light
      x-app-permission: EditExtensions
      x-user-permission: EditExtensionInfo
  "/restapi/v1.0/account/{accountId}/extension/{callQueueId}/overflow-settings":
    get:
      tags:
        - Call Queues
      summary: Get Call Queue Overflow Settings
      description: Returns overflow settings for a call queue specified in path.
      operationId: getCallQueueOverflowSettings
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - name: callQueueId
          in: path
          description: Internal identifier of a call queue
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Call queue overflow settings
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CallQueueOverflowSettings"
      x-availability: Limited
      x-throttling-group: Heavy
      x-app-permission: ReadAccounts
      x-user-permission: CallQueueToCallQueue
    put:
      tags:
        - Call Queues
      summary: Update Call Queue Overflow Settings
      description: Updates overflow settings for a call queue specified in path.
      operationId: updateCallQueueOverflowSettings
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - name: callQueueId
          in: path
          description: Internal identifier of a call queue
          required: true
          schema:
            type: string
      requestBody:
        description: JSON body
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CallQueueOverflowSettingsRequestResource"
        required: true
      responses:
        "200":
          description: Updated call queue overflow settings
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CallQueueOverflowSettings"
      x-availability: Limited
      x-throttling-group: Heavy
      x-app-permission: EditExtensions
      x-user-permission: CallQueueToCallQueue
  "/restapi/v1.0/account/{accountId}/extension/{extensionId}/sms-recipients/bulk-assign":
    post:
      tags:
        - Extensions
      summary: Assign SMS Recipients in Bulk
      description: |
        Updates the list of SMS recipients for a given extension.
      operationId: bulkAssignSmsRecipients
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/BulkAssignSmsRecipientsRequest"
        required: true
      responses:
        "204":
          description: No Content
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
      x-feature: EditExtensionInfo
      x-availability: Limited
      x-throttling-group: Medium
      x-app-permission: EditExtensions
  "/restapi/v1.0/account/{accountId}/extension/{extensionId}/sms-recipients":
    get:
      tags:
        - Extensions
      summary: List SMS Recipients
      description: |
        Returns a list of Extension's SMS recipients.
      operationId: getSmsRecipients
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SmsRecipientsResource"
      x-feature: ReadExtensions
      x-availability: Limited
      x-throttling-group: Light
      x-app-permission: ReadAccounts
  "/restapi/v1.0/account/{accountId}/extension/{extensionId}/authz-profile":
    get:
      tags:
        - User Permissions
      summary: Get Authorization Profile
      description: |
        Returns a list of user permissions granted at authorization procedure.
        Please note: Some permissions may be restricted by extension type.
      operationId: readAuthorizationProfile
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
        - name: targetExtensionId
          in: query
          description: |
            The target extension ID (that can be an "object" of certain permissions)
          schema:
            type: string
      responses:
        "200":
          description: List of user permissions
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AuthProfileResource"
      x-availability: High
      x-throttling-group: Medium
  "/restapi/v1.0/account/{accountId}/extension/{extensionId}/authz-profile/check":
    get:
      tags:
        - User Permissions
      summary: Check User Permission
      description: Checks if a certain user permission is activated for a particular extension.
      operationId: checkUserPermission
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
        - name: permissionId
          in: query
          description: The ID of the permission to be checked
          schema:
            type: string
        - name: targetExtensionId
          in: query
          description: |
            The target extension ID (that can be an "object" of certain permissions)
          schema:
            type: string
      responses:
        "200":
          description: Authorization profile resource
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AuthProfileCheckResource"
      x-availability: High
      x-throttling-group: Light
  "/restapi/v1.0/account/{accountId}/assigned-role":
    get:
      tags:
        - Role Management
      summary: List Company Assigned Roles
      description: Returns a list of roles assigned to the current account.
      operationId: listAssignedRoles
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - name: showHidden
          in: query
          description: Specifies if hidden roles are shown or not
          schema:
            type: boolean
      responses:
        "200":
          description: List of roles assigned to an account
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ExtensionWithRolesCollectionResource"
      x-feature: ReadAssignedRoles
      x-availability: High
      x-throttling-group: Medium
      x-app-permission: ReadAccounts
      x-user-permission: ReadAssignedRoles
  "/restapi/v1.0/account/{accountId}/extension/{extensionId}/assigned-role":
    get:
      tags:
        - Role Management
      summary: List User Assigned Roles
      description: Returns a list of roles assigned to the current extension.
      operationId: listUserAssignedRoles
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
        - name: showHidden
          in: query
          description: Specifies if hidden roles are shown or not
          schema:
            type: boolean
      responses:
        "200":
          description: List of roles assigned to an extension
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AssignedRolesResource"
      x-feature: ReadAssignedRoles
      x-availability: High
      x-throttling-group: Light
      x-app-permission: ReadAccounts
      x-user-permission: ReadAssignedRoles
    put:
      tags:
        - Role Management
      summary: Update User Assigned Roles
      description: Updates a list of roles assigned to the current user.
      operationId: updateUserAssignedRoles
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AssignedRolesResource"
        required: true
      responses:
        "200":
          description: Updated list of roles assigned to an extension
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AssignedRolesResource"
      x-availability: Limited
      x-throttling-group: Medium
      x-app-permission: RoleManagement
      x-user-permission: EditAssignedRoles
  "/restapi/v1.0/account/{accountId}/extension/{extensionId}/assigned-role/default":
    put:
      tags:
        - Role Management
      summary: Assign Default Role
      description: Assigns the default role to the currently logged-in user extension.
      operationId: assignDefaultRole
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
      responses:
        "200":
          description: Assigned user role information
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AssignedRolesResource"
      x-feature: EditUsers
      x-availability: Limited
      x-throttling-group: Medium
      x-app-permission: RoleManagement
      x-user-permission: Users
  "/restapi/v1.0/account/{accountId}/user-role/{roleId}/bulk-assign":
    post:
      tags:
        - Role Management
      summary: Assign Multiple User Roles
      description: Assigns multiple user roles.
      operationId: assignMultipleUserRoles
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - name: roleId
          in: path
          description: Internal identifier of a role
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/BulkRoleAssignResource"
        required: true
      responses:
        "204":
          description: No Content
      x-feature: EditAssignedRoles
      x-availability: Limited
      x-throttling-group: Heavy
      x-app-permission: RoleManagement
      x-user-permission: EditUserRoles
  "/restapi/v1.0/account/{accountId}/user-role/default":
    get:
      tags:
        - Role Management
      summary: Get Default User Role
      description: Returns the default user role of the current account.
      operationId: readDefaultRole
      parameters:
        - $ref: "#/components/parameters/AccountId"
      responses:
        "200":
          description: Default user role
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DefaultUserRole"
      x-feature: EditRoles
      x-availability: High
      x-throttling-group: Light
      x-app-permission: RoleManagement
      x-user-permission: Roles
    put:
      tags:
        - Role Management
      summary: Set Default User Role
      description: Updates the account default user role.
      operationId: updateDefaultUserRole
      parameters:
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        description: JSON body
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/DefaultUserRoleRequest"
        required: true
      responses:
        "200":
          description: Updated default user role
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DefaultUserRole"
      x-feature: EditRoles
      x-availability: Limited
      x-throttling-group: Medium
      x-app-permission: RoleManagement
      x-user-permission: Roles
  /restapi/v1.0/dictionary/user-role:
    get:
      tags:
        - Role Management
      summary: List Standard User Roles
      description: Returns a list of standard user roles.
      operationId: listStandardUserRole
      parameters:
        - name: servicePlanId
          in: query
          description: Internal identifier of a service plan.
          schema:
            type: string
        - $ref: "#/components/parameters/Page"
        - $ref: "#/components/parameters/PerPage"
        - $ref: "#/components/parameters/AdvancedPermissions"
      responses:
        "200":
          description: List of standard user roles
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RolesCollectionResource"
      x-availability: High
      x-throttling-group: Light
  "/restapi/v1.0/dictionary/user-role/{roleId}":
    get:
      tags:
        - Role Management
      summary: Get Standard User Role
      description: Returns a standard user role by ID.
      operationId: readStandardUserRole
      parameters:
        - name: roleId
          in: path
          required: true
          description: Internal identifier of a role
          schema:
            type: string
      responses:
        "200":
          description: Standard user role information
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RoleResource"
      x-availability: High
      x-throttling-group: Light
  "/restapi/v1.0/account/{accountId}/user-role":
    get:
      tags:
        - Role Management
      summary: List Company User Roles
      description: Returns a list of account user roles.
      operationId: listUserRoles
      parameters:
        - name: custom
          in: query
          description: |
            Specifies whether to return custom roles or predefined roles only.
            If not specified, all roles are returned
          schema:
            type: boolean
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/Page"
        - $ref: "#/components/parameters/PerPage"
      responses:
        "200":
          description: List of account user roles
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RolesCollectionResource"
      x-feature: ReadRoles
      x-availability: High
      x-throttling-group: Medium
      x-app-permission: ReadAccounts
      x-user-permission: ReadUserRoles
    post:
      tags:
        - Role Management
      summary: Create Custom Role
      description: Creates a custom user role.
      operationId: createCustomRole
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/AdvancedPermissions"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/RoleResource"
        required: true
      responses:
        "201":
          description: Created custom role information
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RoleResource"
      x-feature: EditRoles
      x-availability: Limited
      x-throttling-group: Medium
      x-app-permission: RoleManagement
      x-user-permission: EditUserRoles
  "/restapi/v1.0/account/{accountId}/user-role/{roleId}":
    get:
      tags:
        - Role Management
      summary: Get User Role
      description: Returns a user role assigned to the current account.
      operationId: readUserRole
      parameters:
        - name: roleId
          in: path
          description: Internal identifier of a role
          required: true
          schema:
            type: string
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/AdvancedPermissions"
      responses:
        "200":
          description: User role information
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RoleResource"
      x-feature: ReadRoles
      x-availability: High
      x-throttling-group: Light
      x-user-permission: ReadUserRoles
      x-app-permission: ReadAccounts
    put:
      tags:
        - Role Management
      summary: Update User Role
      description: Updates a user role assigned to the current account by ID.
      operationId: updateUserRole
      parameters:
        - name: roleId
          in: path
          description: Internal identifier of a role
          required: true
          schema:
            type: string
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/AdvancedPermissions"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/RoleResource"
        required: true
      responses:
        "200":
          description: Updated user role information
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RoleResource"
      x-feature: EditRoles
      x-availability: Limited
      x-throttling-group: Medium
      x-user-permission: EditUserRoles
      x-app-permission: RoleManagement
    delete:
      tags:
        - Role Management
      summary: Delete Custom Role
      description: Deletes a custom user role by ID.
      operationId: deleteCustomRole
      parameters:
        - name: roleId
          in: path
          description: Internal identifier of a role
          required: true
          schema:
            type: string
        - $ref: "#/components/parameters/AccountId"
        - name: validateOnly
          in: query
          description: |
            Specifies that role should be validated prior to deletion, whether
            it can be deleted or not
          schema:
            type: boolean
      responses:
        "204":
          description: No content
      x-feature: EditRoles
      x-availability: Limited
      x-throttling-group: Medium
      x-app-permission: RoleManagement
      x-user-permission: EditUserRoles
  /restapi/v1.0/dictionary/permission:
    get:
      tags:
        - User Permissions
      summary: List Permissions
      description: Returns a list of extension user permissions.
      operationId: listPermissions
      parameters:
        - $ref: "#/components/parameters/Page"
        - $ref: "#/components/parameters/PerPage"
        - name: assignable
          in: query
          description: Specifies whether to return only assignable permissions
          schema:
            type: boolean
        - name: servicePlanId
          in: query
          description: Internal identifier of a service plan
          schema:
            type: string
      responses:
        "200":
          description: List of user permissions
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PermissionCollectionResource"
      x-availability: High
      x-throttling-group: Light
  "/restapi/v1.0/dictionary/permission/{permissionId}":
    get:
      tags:
        - User Permissions
      summary: Get Permission
      description: Returns a user permission by ID.
      operationId: readPermission
      parameters:
        - name: permissionId
          in: path
          description: Internal identifier of a user permission
          required: true
          schema:
            type: string
        - name: servicePlanId
          in: query
          description: Internal identifier of a service plan
          schema:
            type: string
      responses:
        "200":
          description: Permission information
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PermissionResource"
      x-availability: High
      x-throttling-group: Light
  /restapi/v1.0/dictionary/permission-category:
    get:
      tags:
        - User Permissions
      summary: List Permission Categories
      description: Returns a list of permission categories.
      operationId: listPermissionCategories
      parameters:
        - $ref: "#/components/parameters/Page"
        - $ref: "#/components/parameters/PerPage"
        - name: servicePlanId
          in: query
          description: Internal identifier of a service plan
          schema:
            type: string
      responses:
        "200":
          description: List of permission categories
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PermissionCategoryCollectionResource"
      x-availability: High
      x-throttling-group: Light
  "/restapi/v1.0/dictionary/permission-category/{permissionCategoryId}":
    get:
      tags:
        - User Permissions
      summary: Get Permission Category
      description: Returns a permission category by ID.
      operationId: readPermissionCategory
      parameters:
        - name: permissionCategoryId
          in: path
          description: Internal identifier of a category
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Permission category
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PermissionCategoryResource"
      x-availability: High
      x-throttling-group: Light
  "/restapi/v1.0/account/{accountId}/extension/{extensionId}/administered-sites":
    get:
      tags:
        - Site Administration
      summary: List User Administered Sites
      description: Returns a list of sites administered by the current user.
      operationId: listAdministeredSites
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
      responses:
        "200":
          description: List of user administered sites
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BusinessSiteCollectionResource"
      x-feature: ReadExtensions
      x-availability: High
      x-throttling-group: Medium
      x-app-permission: ReadAccounts
      x-user-permission: ReadExtensions
    put:
      tags:
        - Site Administration
      summary: Update User Administered Sites
      operationId: updateUserAdministeredSites
      description: |
        Updates the sites administered by the current user.
        Please note: Only IDs of records are used for update.
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/BusinessSiteCollectionRequest"
        required: true
      responses:
        "200":
          description: Updated list of user administered sites
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BusinessSiteCollectionResource"
      x-feature: EditAssignedRoles
      x-availability: Limited
      x-throttling-group: Medium
      x-app-permission: EditAccounts
      x-user-permission: EditAssignedRoles
  "/restapi/v1.0/account/{accountId}/extension/{extensionId}/assignable-roles":
    get:
      tags:
        - Role Management
      summary: List Assignable Roles
      description: Returns a list of roles which can be assigned to a given extension.
      operationId: listOfAvailableForAssigningRoles
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
        - $ref: "#/components/parameters/Page"
        - $ref: "#/components/parameters/PerPage"
      responses:
        "200":
          description: List of roles which can be assigned to a given extension
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RolesCollectionResource"
      x-feature: EditUsers AND AdvancedPermissionsCapabilities
      x-availability: Limited
      x-throttling-group: Medium
      x-app-permission: RoleManagement
  /scim/v2/ServiceProviderConfig:
    get:
      tags:
        - SCIM
      summary: Get Provider Config
      description: Returns SCIM service provider configuration
      operationId: scimGetProviderConfig2
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ScimProviderConfig"
            application/scim+json:
              schema:
                $ref: "#/components/schemas/ScimProviderConfig"
      x-request-max-body-size: 1m
      x-availability: High
      x-throttling-group: Light
      x-app-permission: ReadAccounts
  /scim/v2/ResourceTypes:
    get:
      tags:
        - SCIM
      summary: List Resource Types
      description: Returns the list of supported SCIM resource types
      operationId: scimListResourceTypes2
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ScimResourceTypeSearchResponse"
            application/scim+json:
              schema:
                $ref: "#/components/schemas/ScimResourceTypeSearchResponse"
        "403":
          description: Filtering is not allowed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ScimErrorResponse"
            application/scim+json:
              schema:
                $ref: "#/components/schemas/ScimErrorResponse"
      x-request-max-body-size: 1m
      x-availability: High
      x-throttling-group: Light
      x-app-permission: ReadAccounts
  "/scim/v2/ResourceTypes/{type}":
    get:
      tags:
        - SCIM
      summary: Get Resource Type
      description: Returns resource type by ID
      operationId: scimGetResourceType2
      parameters:
        - name: type
          in: path
          description: Resource type
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ScimResourceTypeResponse"
            application/scim+json:
              schema:
                $ref: "#/components/schemas/ScimResourceTypeResponse"
        "404":
          $ref: "#/components/responses/ScimNotFound"
      x-request-max-body-size: 1m
      x-availability: High
      x-throttling-group: Light
      x-app-permission: ReadAccounts
  /scim/v2/Schemas:
    get:
      tags:
        - SCIM
      summary: List Schemas
      description: Returns the list of schemas
      operationId: scimListSchemas2
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ScimSchemaSearchResponse"
            application/scim+json:
              schema:
                $ref: "#/components/schemas/ScimSchemaSearchResponse"
        "403":
          description: Filtering is not allowed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ScimErrorResponse"
            application/scim+json:
              schema:
                $ref: "#/components/schemas/ScimErrorResponse"
      x-request-max-body-size: 1m
      x-availability: High
      x-throttling-group: Light
      x-app-permission: ReadAccounts
  "/scim/v2/Schemas/{uri}":
    get:
      tags:
        - SCIM
      summary: Get Schema
      description: Returns SCIM schema
      operationId: scimGetSchema2
      parameters:
        - name: uri
          in: path
          description: Schema URI
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ScimSchemaResponse"
            application/scim+json:
              schema:
                $ref: "#/components/schemas/ScimSchemaResponse"
        "404":
          $ref: "#/components/responses/ScimNotFound"
      x-request-max-body-size: 1m
      x-availability: High
      x-throttling-group: Light
      x-app-permission: ReadAccounts
  /scim/v2/Users:
    get:
      tags:
        - SCIM
      summary: Search/List Users
      description: Returns the list of users satisfying search criteria
      operationId: scimSearchViaGet2
      parameters:
        - name: filter
          in: query
          description: Only support 'userName' or 'email' filter expressions for now
          schema:
            type: string
        - name: startIndex
          in: query
          description: Start index (1-based)
          schema:
            type: integer
            format: int32
            default: 1
        - name: count
          in: query
          description: Page size
          schema:
            type: integer
            format: int32
            default: 100
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ScimUserSearchResponse"
            application/scim+json:
              schema:
                $ref: "#/components/schemas/ScimUserSearchResponse"
        "400":
          $ref: "#/components/responses/ScimBadRequest"
        "401":
          $ref: "#/components/responses/ScimUnauthorized"
        "403":
          $ref: "#/components/responses/ScimForbidden"
        "429":
          $ref: "#/components/responses/ScimTooManyRequests"
        "500":
          $ref: "#/components/responses/ScimInternalError"
      x-request-max-body-size: 1m
      x-availability: High
      x-throttling-group: Light
      x-app-permission: ReadAccounts
    post:
      tags:
        - SCIM
      summary: Create User
      description: Creates a new user
      operationId: scimCreateUser2
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ScimUser"
          application/scim+json:
            schema:
              $ref: "#/components/schemas/ScimUser"
        required: true
      responses:
        "201":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ScimUserResponse"
            application/scim+json:
              schema:
                $ref: "#/components/schemas/ScimUserResponse"
        "400":
          $ref: "#/components/responses/ScimBadRequest"
        "401":
          $ref: "#/components/responses/ScimUnauthorized"
        "403":
          $ref: "#/components/responses/ScimForbidden"
        "404":
          $ref: "#/components/responses/ScimNotFound"
        "409":
          $ref: "#/components/responses/ScimConflict"
        "429":
          $ref: "#/components/responses/ScimTooManyRequests"
        "500":
          $ref: "#/components/responses/ScimInternalError"
      x-request-max-body-size: 10m
      x-availability: Limited
      x-throttling-group: Heavy
      x-app-permission: EditAccounts
  /scim/v2/Users/.search:
    post:
      tags:
        - SCIM
      summary: Search/List Users
      description: Returns the list of users satisfying search criteria
      operationId: scimSearchViaPost2
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ScimSearchRequest"
          application/scim+json:
            schema:
              $ref: "#/components/schemas/ScimSearchRequest"
        required: true
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ScimUserSearchResponse"
            application/scim+json:
              schema:
                $ref: "#/components/schemas/ScimUserSearchResponse"
        "400":
          $ref: "#/components/responses/ScimBadRequest"
        "401":
          $ref: "#/components/responses/ScimUnauthorized"
        "403":
          $ref: "#/components/responses/ScimForbidden"
        "429":
          $ref: "#/components/responses/ScimTooManyRequests"
        "500":
          $ref: "#/components/responses/ScimInternalError"
      x-request-max-body-size: 1m
      x-availability: High
      x-throttling-group: Light
      x-app-permission: ReadAccounts
  "/scim/v2/Users/{scimUserId}":
    get:
      tags:
        - SCIM
      summary: Get User
      description: Returns a user by ID
      operationId: scimGetUser2
      parameters:
        - $ref: "#/components/parameters/ScimUserId"
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ScimUserResponse"
            application/scim+json:
              schema:
                $ref: "#/components/schemas/ScimUserResponse"
        "401":
          $ref: "#/components/responses/ScimUnauthorized"
        "403":
          $ref: "#/components/responses/ScimForbidden"
        "404":
          $ref: "#/components/responses/ScimNotFound"
        "429":
          $ref: "#/components/responses/ScimTooManyRequests"
        "500":
          $ref: "#/components/responses/ScimInternalError"
      x-request-max-body-size: 1m
      x-availability: High
      x-throttling-group: Light
      x-app-permission: ReadAccounts
    put:
      tags:
        - SCIM
      summary: Update/Replace User
      description: Updates a user
      operationId: scimUpdateUser2
      parameters:
        - $ref: "#/components/parameters/ScimUserId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ScimUser"
          application/scim+json:
            schema:
              $ref: "#/components/schemas/ScimUser"
        required: true
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ScimUserResponse"
            application/scim+json:
              schema:
                $ref: "#/components/schemas/ScimUserResponse"
        "400":
          $ref: "#/components/responses/ScimBadRequest"
        "401":
          $ref: "#/components/responses/ScimUnauthorized"
        "403":
          $ref: "#/components/responses/ScimForbidden"
        "404":
          $ref: "#/components/responses/ScimNotFound"
        "409":
          $ref: "#/components/responses/ScimConflict"
        "429":
          $ref: "#/components/responses/ScimTooManyRequests"
        "500":
          $ref: "#/components/responses/ScimInternalError"
      x-request-max-body-size: 10m
      x-availability: Limited
      x-throttling-group: Heavy
      x-app-permission: EditAccounts
    delete:
      tags:
        - SCIM
      summary: Delete User
      description: Deletes a user
      operationId: scimDeleteUser2
      parameters:
        - $ref: "#/components/parameters/ScimUserId"
      responses:
        "204":
          description: Successful response
        "401":
          $ref: "#/components/responses/ScimUnauthorized"
        "403":
          $ref: "#/components/responses/ScimForbidden"
        "404":
          $ref: "#/components/responses/ScimNotFound"
        "429":
          $ref: "#/components/responses/ScimTooManyRequests"
        "500":
          $ref: "#/components/responses/ScimInternalError"
      x-request-max-body-size: 1m
      x-availability: Limited
      x-throttling-group: Heavy
      x-app-permission: EditAccounts
    patch:
      tags:
        - SCIM
      summary: Update/Patch User
      description: Updates a user (partial update)
      operationId: scimPatchUser2
      parameters:
        - $ref: "#/components/parameters/ScimUserId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ScimUserPatch"
          application/scim+json:
            schema:
              $ref: "#/components/schemas/ScimUserPatch"
        required: true
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ScimUserResponse"
            application/scim+json:
              schema:
                $ref: "#/components/schemas/ScimUserResponse"
        "400":
          $ref: "#/components/responses/ScimBadRequest"
        "401":
          $ref: "#/components/responses/ScimUnauthorized"
        "403":
          $ref: "#/components/responses/ScimForbidden"
        "404":
          $ref: "#/components/responses/ScimNotFound"
        "409":
          $ref: "#/components/responses/ScimConflict"
        "429":
          $ref: "#/components/responses/ScimTooManyRequests"
        "500":
          $ref: "#/components/responses/ScimInternalError"
      x-request-max-body-size: 10m
      x-availability: Limited
      x-throttling-group: Heavy
      x-app-permission: EditAccounts
  "/restapi/v1.0/account/{accountId}/extension/{extensionId}/video-configuration":
    get:
      tags:
        - Video Configuration
      summary: Get User Video Configuration
      description: |
        Returns information about video configuration settings of the current user.
      operationId: readUserVideoConfiguration
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UserVideoConfiguration"
      x-availability: High
      x-throttling-group: Light
      x-app-permission: ReadAccounts
      x-user-permission: Meetings
  /ai/text/v1/async/summarize:
    post:
      deprecated: true
      tags:
        - Text
      summary: Conversational Summarization
      description: |
        Returns Conversational Summarization to the webhook URI for segmented transcript of audios
        with start, end, speakerId, text(alphanumeric and punctuations).
      operationId: caiSummarize
      parameters:
        - $ref: "#/components/parameters/Webhook"
      requestBody:
        $ref: "#/components/requestBodies/SummaryRequest"
      responses:
        "202":
          description: Task accepted for processing.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CaiAsyncApiResponse"
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CaiErrorResponse"
      callbacks:
        requestProcessed:
          "{$request.query.webhook}":
            post:
              parameters:
                - $ref: "#/components/parameters/CallbackRequestId"
              requestBody:
                $ref: "#/components/requestBodies/SummaryCallbackRequest"
              responses:
                "200":
                  description: Callback successfully accepted
      x-throttling-group: Heavy
      x-app-permission: AI
  /ai/text/v1/async/punctuate:
    post:
      deprecated: true
      tags:
        - Text
      summary: Smart Punctuation
      description: Returns Smart Punctuation to the provided webhook URI.
      operationId: caiPunctuate
      parameters:
        - $ref: "#/components/parameters/Webhook"
      requestBody:
        $ref: "#/components/requestBodies/PunctuateRequest"
      responses:
        "202":
          description: Task accepted for processing.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CaiAsyncApiResponse"
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CaiErrorResponse"
      callbacks:
        requestProcessed:
          "{$request.query.webhook}":
            post:
              parameters:
                - $ref: "#/components/parameters/CallbackRequestId"
              requestBody:
                $ref: "#/components/requestBodies/PunctuateCallbackRequest"
              responses:
                "200":
                  description: Callback successfully accepted
      x-throttling-group: Heavy
      x-app-permission: AI
  /ai/audio/v1/async/speaker-diarize:
    post:
      deprecated: true
      tags:
        - Audio
      summary: Speaker Diarization
      description: |
        Identifies who said what. Speaker diarization will identify the speaker for each segment
        so you can tell who spoke the sentence, paragraph, or phrase.
      operationId: caiSpeakerDiarize
      parameters:
        - $ref: "#/components/parameters/Webhook"
      requestBody:
        $ref: "#/components/requestBodies/DiarizeRequest"
      responses:
        "202":
          description: Task accepted for processing.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CaiAsyncApiResponse"
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CaiErrorResponse"
      callbacks:
        requestProcessed:
          "{$request.query.webhook}":
            post:
              parameters:
                - $ref: "#/components/parameters/CallbackRequestId"
              requestBody:
                $ref: "#/components/requestBodies/DiarizeCallbackRequest"
              responses:
                "200":
                  description: Callback successfully accepted
      x-throttling-group: Heavy
      x-app-permission: AI
  /ai/audio/v1/async/speech-to-text:
    post:
      deprecated: true
      tags:
        - Audio
      summary: Speech to Text Conversion
      description: Returns Speech to Text Conversion to the provided webhook URI.
      operationId: caiSpeechToText
      parameters:
        - $ref: "#/components/parameters/Webhook"
      requestBody:
        $ref: "#/components/requestBodies/AsrRequest"
      responses:
        "202":
          description: Task accepted for processing.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CaiAsyncApiResponse"
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CaiErrorResponse"
      callbacks:
        requestProcessed:
          "{$request.query.webhook}":
            post:
              parameters:
                - $ref: "#/components/parameters/CallbackRequestId"
              requestBody:
                $ref: "#/components/requestBodies/SpeechToTextCallbackRequest"
              responses:
                "200":
                  description: Callback successfully accepted
      x-throttling-group: Heavy
      x-app-permission: AI
  "/ai/status/v1/jobs/{jobId}":
    get:
      deprecated: true
      tags:
        - Status
      summary: Get Async Task Status
      description: Returns async task status by Job ID
      operationId: caiJobStatusGet
      parameters:
        - $ref: "#/components/parameters/JobId"
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/JobStatusResponse"
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CaiErrorResponse"
        "404":
          description: The {jobId} doesn't exist
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CaiErrorResponse"
      x-throttling-group: Heavy
      x-app-permission: AI
  /ai/insights/v1/async/analyze-interaction:
    post:
      deprecated: true
      tags:
        - Insights
      summary: Interaction Analytics
      description: |
        Returns multiple insights including summaries, key phrases, questions asked, and more in a single API call.
      operationId: caiAnalyzeInteraction
      parameters:
        - $ref: "#/components/parameters/Webhook"
      requestBody:
        $ref: "#/components/requestBodies/InteractionAnalyticsRequest"
      responses:
        "202":
          description: Task accepted for processing.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CaiAsyncApiResponse"
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CaiErrorResponse"
      callbacks:
        requestProcessed:
          "{$request.query.webhook}":
            post:
              parameters:
                - $ref: "#/components/parameters/CallbackRequestId"
              requestBody:
                $ref: "#/components/requestBodies/InteractionAnalyticsCallbackRequest"
              responses:
                "200":
                  description: Callback successfully accepted
      x-throttling-group: Heavy
      x-app-permission: AI
  "/analytics/calls/v1/accounts/{accountId}/aggregation/fetch":
    post:
      tags:
        - Business Analytics
      summary: Calls Aggregation Data
      description: Returns call aggregations filtered by parameters specified
      operationId: analyticsCallsAggregationFetch
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - name: page
          in: query
          description: The current page number (positive numbers only)
          required: false
          schema:
            type: integer
            format: int32
            minimum: 1
        - name: perPage
          in: query
          description: Number of records displayed on a page (positive numbers only, max value of 200)
          required: false
          schema:
            type: integer
            format: int32
            minimum: 1
            maximum: 200
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AggregationRequest"
        required: true
      responses:
        "200":
          description: Calls Aggregation
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AggregationResponse"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "500":
          $ref: "#/components/responses/InternalError"
      x-throttling-group: Light
      x-app-permission: Analytics
  "/analytics/calls/v1/accounts/{accountId}/timeline/fetch":
    post:
      tags:
        - Business Analytics
      summary: Calls Timeline Data
      description: Returns time-value data aggregations filtered by parameters specified
      operationId: analyticsCallsTimelineFetch
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - name: interval
          in: query
          description: Aggregation interval
          required: true
          schema:
            $ref: "#/components/schemas/Interval"
        - name: page
          in: query
          description: The current page number (positive numbers only)
          required: false
          schema:
            type: integer
            format: int32
            minimum: 1
        - name: perPage
          in: query
          description: Number of records displayed on a page (positive numbers only, max value of 20)
          required: false
          schema:
            type: integer
            format: int32
            minimum: 1
            maximum: 20
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/TimelineRequest"
        required: true
      responses:
        "200":
          description: Calls Timeline
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TimelineResponse"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "500":
          $ref: "#/components/responses/InternalError"
      x-throttling-group: Light
      x-app-permission: Analytics
  "/restapi/v1.0/account/{accountId}/audit-trail/search":
    post:
      tags:
        - Audit Trail
      summary: Search Audit Trail Data
      description: |
        Returns the audit trail data with specific filters applied.
        Audit trail searching is limited to the last 10,000 records or last 180 days, whichever comes first.
      operationId: auditTrailSearch
      parameters:
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        description: Filter
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AccountHistorySearchPublicRequest"
        required: false
      responses:
        "200":
          description: List of Account History Records
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AccountHistorySearchPublicResponse"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-throttling-group: Heavy
      x-app-permission: ReadAuditTrail
  /restapi/oauth/authorize:
    get:
      tags:
        - OAuth and OIDC
      summary: OAuth Authorization
      description: |
        Performs Authentication of the End-User by sending the User Agent to the Authorization Server's
        Authorization Endpoint for Authentication and Authorization,
        using request parameters defined by OAuth 2.0 [RFC-6749](https://datatracker.ietf.org/doc/html/rfc6749#section-3.1)
        and additional parameters and parameter values defined by
        [OpenID Connect Core 1.0](https://openid.net/specs/openid-connect-core-1_0.html#AuthorizationEndpoint).

        This is the version that uses HTTP `GET` method.
      operationId: authorize
      parameters:
        - $ref: "#/components/parameters/OauthClientId"
        - name: response_type
          in: query
          required: true
          description: |
            Determines authorization flow type. The only supported value is `code` which corresponds to OAuth 2.0 "Authorization Code Flow"
          schema:
            type: string
            enum:
              - code
        - name: redirect_uri
          in: query
          required: false
          description: |
            This is the URI where the Authorization Server redirects the User Agent to at the end of the authorization flow.
            The value of this parameter must exactly match one of the URIs registered for this client application.
            This parameter is required if there are more than one redirect URIs registered for the app.
          schema:
            type: string
            format: uri
        - name: state
          in: query
          required: false
          description: |
            An opaque value used by the client to maintain state between the request and callback.
            The authorization server includes this value when redirecting the User Agent back
            to the client. Using this parameter is strongly recommended to prevent cross-site request forgery attacks.
          schema:
            type: string
        - name: scope
          in: query
          required: false
          description: The list of space separated application permissions (OAuth scopes)
          schema:
            type: string
        - name: display
          in: query
          required: false
          description: |
            Specifies how the Authorization Server displays the authentication and consent user interface pages to the End-User.
          schema:
            $ref: "#/components/schemas/DisplayModesEnum"
        - name: prompt
          in: query
          required: false
          description: |
            Space-delimited, case-sensitive list of ASCII string values that specifies whether the Authorization Server prompts the End-User for
            re-authentication and consent. The defined values are:

            - `login` - RingCentral native login form;
            - `sso` - Single Sign-On login form;
            - `consent` - form to show the requested scope and prompt user for consent;
            - `none` - indicates that non-interactive authorization is requested
              (the flow will succeed only if the user has been already authenticated within the same browser session).
              Cannot be combined with any other prompt option.
          schema:
            type: string
            default: login sso
        - name: ui_locales
          in: query
          required: false
          description: |
            End-User's preferred languages and scripts for the user interface, represented as a space-separated list of
            [RFC-5646](https://datatracker.ietf.org/doc/html/rfc5646) language tag values, ordered by preference.
          schema:
            type: string
            example: en-US
        - name: code_challenge
          in: query
          required: false
          description: |
            The code challenge value as defined by the PKCE specification -
            [RFC-7636 "Proof Key for Code Exchange by OAuth Public Clients"](https://datatracker.ietf.org/doc/html/rfc7636)
          schema:
            type: string
        - name: code_challenge_method
          in: query
          required: false
          description: |
            The code challenge method as defined by by the PKCE specification -
            [RFC-7636 "Proof Key for Code Exchange by OAuth Public Clients"](https://datatracker.ietf.org/doc/html/rfc7636)
          schema:
            $ref: "#/components/schemas/CodeChallengeMethodEnum"
        - name: nonce
          in: query
          required: false
          description: |
            String value used to associate a Client session with an ID Token, and to mitigate replay attacks.
            The value is passed through unmodified from the Authentication Request to the ID Token.
            (This parameter is defined in OpenID Connect 1.0 specification)
          schema:
            type: string
        - name: login_hint
          in: query
          required: false
          description: |
            Hint to the Authorization Server about the login identifier the End-User might use to log in.
          schema:
            type: string
        - $ref: "#/components/parameters/OauthBrandId"
      responses:
        "302":
          description: Successful response, HTTP redirect to login form
          headers:
            Location:
              description: Full URL of the redirect target locations
              schema:
                type: string
                format: uri
        "400":
          $ref: "#/components/responses/OauthInvalidRequest"
      x-throttling-group: Auth
    post:
      tags:
        - OAuth and OIDC
      summary: OAuth Authorization (POST)
      description: |
        Performs Authentication of the End-User by sending the User Agent to the Authorization Server's
        Authorization Endpoint for Authentication and Authorization,
        using request parameters defined by OAuth 2.0 [RFC-6749](https://datatracker.ietf.org/doc/html/rfc6749#section-3.1)
        and additional parameters and parameter values defined by
        [OpenID Connect Core 1.0](https://openid.net/specs/openid-connect-core-1_0.html#AuthorizationEndpoint).

        This is the version that uses HTTP `POST` method and requires a request body instead of query parameters.
      operationId: authorize2
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: "#/components/schemas/AuthorizeRequest"
      responses:
        "302":
          description: Successful response, HTTP redirect to login form
          headers:
            Location:
              description: Full URL of the redirect target locations
              schema:
                type: string
                format: uri
        "400":
          $ref: "#/components/responses/OauthInvalidRequest"
      x-throttling-group: Auth
  /restapi/oauth/token:
    post:
      tags:
        - OAuth and OIDC
      summary: OAuth Token
      description: |
        Returns access (and potentially refresh) tokens for making API requests.

        For confidential client application types
        this endpoint requires client authentication using one of the supported
        methods:
          - `client_secret_basic` - client ID and client secret must be provided via `Authorization` header as described in
            [RFC-6749](https://datatracker.ietf.org/doc/html/rfc6749#section-2.3.1).
          - `client_secret_jwt` / `private_key_jwt` -- `client_assertion` attribute should be used to pass a signed JWT as described in
            [RFC-7523](https://datatracker.ietf.org/doc/html/rfc7523#section-2.2).

        For non-confidential client application types
        the client identifier must be provided via `client_id` request attribute.
      operationId: getToken
      security:
        - {}
        - OauthBasicScheme: []
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: "#/components/schemas/GetTokenRequest"
      responses:
        "200":
          description: Access/Refresh Tokens
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TokenInfo"
        "400":
          $ref: "#/components/responses/OauthInvalidRequest"
        "415":
          description: Unsupported Media Type
        "429":
          description: Request rate exceeded
      x-throttling-group: Auth
  /restapi/oauth/revoke:
    post:
      tags:
        - OAuth and OIDC
      summary: OAuth Revoke
      description: |
        Revokes all active access/refresh tokens and invalidates the OAuth session basing on token provided.
        The `token` parameter may be passed in query string or body and may represent access or refresh token.

        This endpoint is defined by [RFC-7009 "OAuth 2.0 Token Revocation"](https://datatracker.ietf.org/doc/html/rfc7009)

        For confidential client application types
        this endpoint requires client authentication using one of the supported
        methods:
          - `client_secret_basic` - client ID and client secret must be provided via `Authorization` header as described in
            [RFC-6749](https://datatracker.ietf.org/doc/html/rfc6749#section-2.3.1).
          - `client_secret_jwt` / `private_key_jwt` -- `client_assertion` attribute should be used to pass a signed JWT as described in
            [RFC-7523](https://datatracker.ietf.org/doc/html/rfc7523#section-2.2).

        For non-confidential client application types
        the client identifier must be provided via `client_id` request attribute.
      operationId: revokeToken
      parameters:
        - name: token
          in: query
          description: |
            Access or refresh token to be revoked (along with the entire OAuth session).

            Note: it is recommended to pass token via request body attribute
          required: false
          schema:
            type: string
      security:
        - {}
        - OauthBasicScheme: []
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: "#/components/schemas/RevokeTokenRequest"
        required: false
      responses:
        "200":
          description: Successful response
        "400":
          $ref: "#/components/responses/OauthInvalidRequest"
      x-throttling-group: Auth
  /.well-known/openid-configuration:
    get:
      tags:
        - OAuth and OIDC
      summary: OIDC Provider Configuration
      description: |
        Returns OpenID Connect provider configuration.

        This endpoint follows the [OpenID Connect Discovery 1.0](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata) specification.
        It provides a mechanism for an OpenID Connect Relying Party to discover the End-User's OpenID Provider and obtain information
        needed to interact with it, including its OAuth 2.0 endpoint locations.
      operationId: readOpenIdConfiguration
      responses:
        "200":
          description: OpenID Discovery Configuration
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OpenIdDiscovery"
      x-throttling-group: NoThrottling
  /restapi/oauth/jwks:
    get:
      tags:
        - OAuth and OIDC
      summary: JSON Web Key Set (JWKS)
      description: |
        Returns the signing key(s) in JWK Set format. Client use it to validate signatures of any JWT
        (e.g. OpenID Connect ID Token) issued by the Authorization Server
        (see [RFC-7517](https://www.rfc-editor.org/rfc/rfc7517.html#section-5))
      operationId: authJwks
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/JWKeySet"
      x-throttling-group: NoThrottling
  /restapi/oauth/userinfo:
    get:
      tags:
        - OAuth and OIDC
      summary: OIDC User Info
      description: |
        OpenID Connect User Info endpoint, as defined by [OpenID Connect Core 1.0](https://openid.net/specs/openid-connect-core-1_0.html#UserInfo) specification.
        It returns Claims about the authenticated End-User.

        This is the version that uses HTTP `GET` method.
      operationId: authUserInfo
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UserInfoResource"
      x-throttling-group: Auth
  /restapi/oauth/wstoken:
    post:
      tags:
        - OAuth and OIDC
      summary: WebSocket Token
      description: |
        Returns a special short lived token to authorize a dedicated web socket connection between this client
        and a backend.

        This API needs to be called if a client plans to use "Websocket" transport to receive
        RingCentral push notifications. The token returned by this API should be provided when establishing
        a connection to the RingCentral Websocket Gateway.
      operationId: authWsToken
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/WsTokenResponse"
      x-throttling-group: Auth
      x-app-permission: WebSocket
  "/restapi/v1.0/account/{accountId}/extension/{extensionId}/call-log":
    get:
      tags:
        - Call Log
      summary: List User Call Records
      description: Returns call log records filtered by parameters specified.
      operationId: readUserCallLog
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
        - $ref: "#/components/parameters/CallLogExtensionNumber"
        - $ref: "#/components/parameters/CallLogPhoneNumber"
        - $ref: "#/components/parameters/CallLogShowBlocked"
        - $ref: "#/components/parameters/CallDirection"
        - $ref: "#/components/parameters/CallLogSessionId"
        - $ref: "#/components/parameters/CallType"
        - $ref: "#/components/parameters/CallTransportType"
        - $ref: "#/components/parameters/CallLogView"
        - $ref: "#/components/parameters/CallLogWithRecording"
        - $ref: "#/components/parameters/CallRecordingType"
        - $ref: "#/components/parameters/CallLogDateTo"
        - $ref: "#/components/parameters/CallLogDateFrom"
        - $ref: "#/components/parameters/CallLogTelephonySessionId"
        - $ref: "#/components/parameters/CallMetadataCategory"
        - $ref: "#/components/parameters/PerPageWithMax"
        - name: page
          in: query
          description: Indicates the page number to retrieve. Only positive number values are allowed
          schema:
            type: integer
            format: int32
            minimum: 1
            default: 1
        - name: showDeleted
          in: query
          description: Indicates that deleted call records should be returned
          schema:
            type: boolean
            default: false
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CallLogResponse"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-feature: ReadExtensionCallLog
      x-availability: High
      x-throttling-group: Heavy
      x-app-permission: ReadCallLog
      x-user-permission: ReadCallLog
    delete:
      tags:
        - Call Log
      summary: Delete User Call Records
      description: Deletes filtered call log records.
      operationId: deleteUserCallLog
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
        - name: dateTo
          in: query
          description: |
            The time boundary to delete all older records in ISO 8601 format including
            timezone, for example *2016-03-10T18:07:52.534Z*. The default value is current time
          schema:
            type: string
            format: date-time
      responses:
        "204":
          description: Successful response
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-feature: EditExtensionCallLog
      x-availability: Limited
      x-throttling-group: Heavy
      x-app-permission: EditCallLog
      x-user-permission: EditCallLog
  "/restapi/v1.0/account/{accountId}/extension/{extensionId}/call-log-sync":
    get:
      tags:
        - Call Log
      summary: Sync User Call Log
      description: Synchronizes the user call log records.
      operationId: syncUserCallLog
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
        - $ref: "#/components/parameters/CallLogSyncType"
        - name: syncToken
          in: query
          description: A `syncToken` value from the previous sync response (for `ISync` mode only, mandatory)
          schema:
            type: string
        - name: dateFrom
          in: query
          description: |
            Starting date for the resulting records in ISO 8601 format, including
            timezone, for example *2016-03-10T18:07:52.534Z*. The range is limited to the last 30 days from the current moment.
            If not specified, the default value is a log history date (date of account creation/call log deletion), and
            no time range limitation applied
          schema:
            type: string
            format: date-time
        - name: recordCount
          in: query
          description: |
            For `FSync` mode this parameter is mandatory, it limits the number of records to be returned in response.

            For `ISync` mode this parameter specifies the number of records to extend the sync frame with to the past
            (the maximum number of records is 250)
          schema:
            type: integer
            format: int32
        - $ref: "#/components/parameters/CallLogStatusGroup"
        - $ref: "#/components/parameters/CallLogView"
        - name: showDeleted
          in: query
          description: Supported for `ISync` mode. Indicates that deleted call records should be returned
          schema:
            type: boolean
            default: false
        - $ref: "#/components/parameters/CallLogWithRecording"
        - $ref: "#/components/parameters/CallRecordingType"
        - $ref: "#/components/parameters/CallMetadataCategory"
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CallLogSyncResponse"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-feature: ReadExtensionCallLog
      x-availability: High
      x-throttling-group: Heavy
      x-app-permission: ReadCallLog
      x-user-permission: ReadCallLog
  "/restapi/v1.0/account/{accountId}/extension/{extensionId}/call-log/{callRecordId}":
    get:
      tags:
        - Call Log
      summary: Get User Call Record(s)
      description: |
        Returns the user's individual call log record(s) by ID(s).
        [Bulk syntax](https://developers.ringcentral.com/guide/basics/batch-requests) is supported:
        multiple IDs can be specified as a comma-separated list in `{callRecordId}` (up to 50 IDs).
        A single ID returns HTTP 200 with `application/json`. Multiple IDs return HTTP 207 with
        `multipart/mixed` (one status part, then one part per record).
      operationId: readUserCallRecord
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
        - $ref: "#/components/parameters/CallRecordId"
        - $ref: "#/components/parameters/CallLogView"
      responses:
        "200":
          description: Call log record (single ID in path)
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CallLogRecord"
        "207":
          description: |
            Bulk result when multiple comma-separated IDs are specified in path.
            The first `multipart/mixed` part contains per-record HTTP status metadata; subsequent parts
            contain `CallLogRecord` JSON objects (or error bodies for failed IDs).
          content:
            multipart/mixed:
              schema:
                $ref: "#/components/schemas/CallLogRecord"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-feature: ReadExtensionCallLog
      x-availability: High
      x-throttling-group: Heavy
      x-app-permission: ReadCallLog
      x-user-permission: ReadCallLog
  "/restapi/v1.0/account/{accountId}/extension/{extensionId}/active-calls":
    get:
      tags:
        - Call Log
      summary: List User Active Calls
      description: |
        Returns records of all extension calls that are in progress, ordered
        by start time in descending order.
      operationId: listExtensionActiveCalls
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
        - $ref: "#/components/parameters/CallDirection"
        - $ref: "#/components/parameters/CallLogView"
        - $ref: "#/components/parameters/CallType"
        - $ref: "#/components/parameters/CallTransportType"
        - $ref: "#/components/parameters/ConferenceCallType"
        - $ref: "#/components/parameters/PerPageWithMax"
        - name: page
          in: query
          description: Indicates the page number to retrieve. Only positive number values are allowed
          schema:
            type: integer
            format: int32
            default: 1
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CallLogResponse"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-feature: ReadExtensionCallLog
      x-availability: Limited
      x-throttling-group: Heavy
      x-app-permission: ReadCallLog
      x-user-permission: ReadCallLog
  "/restapi/v1.0/account/{accountId}/call-log":
    get:
      tags:
        - Call Log
      summary: List Company Call Records
      description: Returns call log records filtered by parameters specified.
      operationId: readCompanyCallLog
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/CallLogExtensionNumber"
        - $ref: "#/components/parameters/CallLogPhoneNumber"
        - $ref: "#/components/parameters/CallDirection"
        - $ref: "#/components/parameters/CallType"
        - $ref: "#/components/parameters/CallLogView"
        - $ref: "#/components/parameters/CallLogWithRecording"
        - $ref: "#/components/parameters/CallRecordingType"
        - $ref: "#/components/parameters/CallLogDateFrom"
        - $ref: "#/components/parameters/CallLogDateTo"
        - $ref: "#/components/parameters/CallLogSessionId"
        - $ref: "#/components/parameters/CallLogTelephonySessionId"
        - $ref: "#/components/parameters/CallMetadataCategory"
        - $ref: "#/components/parameters/PerPageWithMax"
        - name: page
          in: query
          description: Indicates the page number to retrieve. Only positive number values are accepted
          schema:
            type: integer
            format: int32
            minimum: 1
            default: 1
        - name: showDeleted
          in: query
          description: Indicates that deleted calls records should be returned
          schema:
            type: boolean
            default: false
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CallLogResponse"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-feature: ReadAccountCallLog
      x-availability: High
      x-throttling-group: Heavy
      x-app-permission: ReadCallLog
      x-user-permission: FullCompanyCallLog
  "/restapi/v1.0/account/{accountId}/call-log-sync":
    get:
      tags:
        - Call Log
      summary: Sync Company Call Log
      description: Synchronizes company call log records.
      operationId: syncAccountCallLog
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/CallLogSyncType"
        - name: syncToken
          in: query
          description: Value of syncToken property of last sync request response. Mandatory parameter for 'ISync' sync type
          schema:
            type: string
        - name: dateFrom
          in: query
          description: |
            Starting date for the resulting records in ISO 8601 format, including
            timezone, for example *2016-03-10T18:07:52.534Z*. The range is limited to the last 30 days from the current moment.
            If not specified, the default value is a log history date (date of account creation/call log deletion), and
            no time range limitation applied
          schema:
            type: string
            format: date-time
        - name: recordCount
          in: query
          description: |
            For `FSync` mode this parameter is mandatory, it limits the number of records to be returned in response.

            For `ISync` mode this parameter specifies the number of records to extend the sync frame with to the past
            (the maximum number of records is 250)
          schema:
            type: integer
            format: int32
            minimum: 1
        - $ref: "#/components/parameters/CallLogStatusGroup"
        - $ref: "#/components/parameters/CallLogView"
        - name: showDeleted
          in: query
          description: Supported for `ISync` mode. Indicates that deleted call records should be returned
          schema:
            type: boolean
            default: false
        - $ref: "#/components/parameters/CallLogWithRecording"
        - $ref: "#/components/parameters/CallRecordingType"
        - $ref: "#/components/parameters/CallMetadataCategory"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CallLogSyncResponse"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-feature: ReadAccountCallLog
      x-availability: High
      x-throttling-group: Heavy
      x-app-permission: ReadCallLog
      x-user-permission: ReadCallLog
  "/restapi/v1.0/account/{accountId}/call-log-extract-sync":
    get:
      tags:
        - Call Log
      summary: Extract Sync Company Call Log
      description: Extracts all company's call log records that were updated after the specified time.
      operationId: extractSyncAccountCallLog
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/CallLogSyncType"
        - name: syncToken
          in: query
          description: Value of `syncToken` property of the last extract-sync request response. Mandatory for 'ISync' type
          schema:
            type: string
        - name: dateFrom
          in: query
          description: Starting datetime for resulting records in ISO 8601 format including timezone, for example 2016-03-10T18:07:52.534Z. The default value is one hour before the current moment
          schema:
            type: string
            format: date-time
        - name: recordCount
          in: query
          description: |
            Allowed for `FSync` mode only. It limits the number of records to be returned in response
            (the maximum number of records is 1000, the default value is 250).

            Actual number of calls could extend the limit in case there are several calls at borderline
            modification time (millisecond precision).
          schema:
            type: integer
            format: int32
            default: 250
            minimum: 1
        - $ref: "#/components/parameters/CallLogView"
        - $ref: "#/components/parameters/CallMetadataCategory"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CallLogExtractSyncResponse"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-feature: ReadAccountCallLog
      x-availability: High
      x-throttling-group: Heavy
      x-app-permission: ReadCallLog
      x-user-permission: ReadCallLog
  "/restapi/v1.0/account/{accountId}/call-log/{callRecordId}":
    get:
      tags:
        - Call Log
      summary: Get Company Call Record(s)
      description: |
        Returns the company's call log record(s) by ID(s).
        [Bulk syntax](https://developers.ringcentral.com/guide/basics/batch-requests) is supported:
        multiple IDs can be specified as a comma-separated list in `{callRecordId}` (up to 50 IDs).
        A single ID returns HTTP 200 with `application/json`. Multiple IDs return HTTP 207 with
        `multipart/mixed` (one status part, then one part per record).
      operationId: readCompanyCallRecord
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/CallRecordId"
        - $ref: "#/components/parameters/CallLogView"
      responses:
        "200":
          description: Call log record (single ID in path)
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CallLogRecord"
        "207":
          description: |
            Bulk result when multiple comma-separated IDs are specified in path.
            The first `multipart/mixed` part contains per-record HTTP status metadata; subsequent parts
            contain `CallLogRecord` JSON objects (or error bodies for failed IDs).
          content:
            multipart/mixed:
              schema:
                $ref: "#/components/schemas/CallLogRecord"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-feature: ReadAccountCallLog
      x-availability: High
      x-throttling-group: Heavy
      x-app-permission: ReadCallLog
      x-user-permission: FullCompanyCallLog
  "/restapi/v1.0/account/{accountId}/active-calls":
    get:
      tags:
        - Call Log
      summary: List Company Active Calls
      description: Returns records of all calls that are in progress, ordered by start time in descending order.
      operationId: listCompanyActiveCalls
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/CallDirection"
        - $ref: "#/components/parameters/CallLogView"
        - $ref: "#/components/parameters/CallType"
        - $ref: "#/components/parameters/CallTransportType"
        - $ref: "#/components/parameters/ConferenceCallType"
        - $ref: "#/components/parameters/PerPageWithMax"
        - name: page
          in: query
          description: Indicates the page number to retrieve. Only positive number values are accepted
          schema:
            type: integer
            format: int32
            default: 1
            minimum: 1
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CallLogResponse"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-feature: EditAccountCallLog
      x-availability: Limited
      x-throttling-group: Heavy
      x-app-permission: ReadCallLog
      x-user-permission: ReadCallLog
  "/restapi/v1.0/account/{accountId}/recording/{recordingId}":
    get:
      tags:
        - Call Recordings
      summary: Get Call Recording
      description: Returns call recordings by ID(s).
      operationId: readCallRecording
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/CallRecordingId"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GetCallRecordingResponse"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-feature: ReadAccountCallRecordings
      x-availability: High
      x-throttling-group: Heavy
      x-app-permission: ReadCallRecording
      x-user-permission: ReadCallRecording
  "/restapi/v1.0/account/{accountId}/call-recordings":
    delete:
      tags:
        - Call Recordings
      summary: Delete Company Call Recordings
      description: |
        Deletes company call recordings by their IDs. *Please note:* This method deletes the recording file itself,
        not the record of it in the call log.
      operationId: deleteCompanyCallRecordings
      parameters:
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CallRecordingIds"
      responses:
        "204":
          description: Successful response
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-availability: High
      x-throttling-group: Heavy
      x-app-permission: EditCallLog
      x-user-permission: EditCompanyCallRecordings
  "/restapi/v1.0/account/{accountId}/recording/{recordingId}/content":
    get:
      tags:
        - Call Recordings
      summary: Get Call Recording Content
      description: |
        Returns media content of a call recording (`audio/mpeg` or `audio/wav`)

        **This API must be called via media API entry point, e.g. https://media.ringcentral.com**
      operationId: readCallRecordingContent
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/CallRecordingId"
        - $ref: "#/components/parameters/ContentDisposition"
        - $ref: "#/components/parameters/ContentDispositionFilename"
      responses:
        "200":
          description: Successful response
          content:
            audio/mpeg:
              schema:
                type: string
                format: binary
            audio/wav:
              schema:
                type: string
                format: binary
      x-media-api: true
      x-availability: High
      x-throttling-group: Heavy
      x-app-permission: ReadCallRecording
  "/restapi/v2/accounts/{accountId}/extensions/{extensionId}/comm-handling/states":
    get:
      operationId: listCicStates
      summary: List Comm Handling States
      description: Returns a list of communication handling states.
      tags:
        - States
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
        - $ref: "#/components/parameters/Page"
        - $ref: "#/components/parameters/PerPage"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CommStatesResource"
      x-feature: ReadExtensionAnsweringRules
      x-availability: Limited
      x-throttling-group: Medium
      x-app-permission: ReadAccounts
  "/restapi/v2/accounts/{accountId}/extensions/{extensionId}/comm-handling/states/{stateId}":
    get:
      operationId: readCicState
      summary: Comm Handling State
      description: Returns a communication handling state.
      tags:
        - States
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
        - $ref: "#/components/parameters/CommUpdateStateId"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CommStateResource"
      x-feature: ReadExtensionAnsweringRules
      x-availability: Limited
      x-throttling-group: Medium
      x-app-permission: ReadAccounts
    patch:
      operationId: updateCicState
      summary: Update Comm Handling State
      description: Updates a communication handling state condition.
      tags:
        - States
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
        - $ref: "#/components/parameters/CommUpdateStateId"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CommStateUpdateRequest"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CommStateResource"
      x-feature: EditExtensionAnsweringRules
      x-availability: Limited
      x-throttling-group: Medium
      x-app-permission: EditExtensions
  "/restapi/v2/accounts/{accountId}/extensions/{extensionId}/comm-handling/voice/state-rules":
    get:
      operationId: listVoiceStateBasedRules
      summary: List State-based Rules
      description: |
        Returns a list of extension's voice state-based rules.

        *State-base rule* is a call handling rule, managing voice calls on the basis of the user's **state (status)**:
        *Forward all calls (FAC), Do not disturb (DND), Work Hours (WH), After Hours (AH), Agent*.

        **Please note:** State-based rules are applicable to the User extension types only: User, DigitalUser, FaxUser,
        VirtualUser.
      tags:
        - State-based Rules
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
        - $ref: "#/components/parameters/Page"
        - $ref: "#/components/parameters/PerPage"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CommStateBasedRulesResource"
      x-feature: ReadExtensionAnsweringRules
      x-availability: Limited
      x-throttling-group: Medium
      x-app-permission: ReadAccounts
  "/restapi/v2/accounts/{accountId}/extensions/{extensionId}/comm-handling/voice/state-rules/{stateId}":
    get:
      operationId: readVoiceStateBasedRule
      summary: Get State-based Rule
      description: |
        Returns the extension's voice state-based rule by ID specified in URL. Each state is assigned
        with the predefined ID.

        *State-base rule* is a call handling rule, managing voice calls on the basis of the user's **state (status)**:

        *Forward all calls (FAC), Do not disturb (DND), Work Hours (WH), After Hours (AH), Agent*.
      tags:
        - State-based Rules
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
        - $ref: "#/components/parameters/CommStateId"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CommStateBasedRuleResource"
      x-feature: ReadExtensionAnsweringRules
      x-availability: Limited
      x-throttling-group: Medium
      x-app-permission: ReadAccounts
    patch:
      operationId: updateVoiceStateBasedRule
      summary: Update State-based Rule
      description: |
        Updates the extension's voice state-based rule.

        **Please note:**  When updating any of objects: `enabled`, `displayName`, `dispatching`, `condition`, etc.
        all of object parameters should be passed (as in PUT method) - if a parameter is not specified,
        its value will be set back to default, if any, or deleted.
      tags:
        - State-based Rules
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
        - $ref: "#/components/parameters/CommStateId"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CommStateBasedRuleUpdateRequest"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CommStateBasedRuleResource"
      x-feature: EditExtensionAnsweringRules
      x-availability: Limited
      x-throttling-group: Medium
      x-app-permission: EditExtensions
  "/restapi/v2/accounts/{accountId}/extensions/{extensionId}/comm-handling/voice/interaction-rules":
    get:
      operationId: listVoiceInteractionRules
      summary: List Interaction Rules
      tags:
        - Interaction Rules
      description: |
        Returns a list of extension's interaction rules with the detailed information on each rule.

        *Interaction* rule is a call handling rule, managing voice call on the basis
        of the user's **contact** or a **phone number** which is calling and/or being called.

        **Please note:** Interaction rules are applicable to the User extension types only: User, DigitalUser,
        FaxUser, VirtualUser.
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
        - name: enabled
          in: query
          required: false
          description: Display only enabled rules
          schema:
            type: boolean
        - name: hasReference
          in: query
          required: false
          description: Display only rules with reference to state
          schema:
            type: boolean
        - $ref: "#/components/parameters/Page"
        - $ref: "#/components/parameters/PerPage"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CommInteractionRulesResource"
      x-feature: ReadExtensionAnsweringRules
      x-availability: Limited
      x-throttling-group: Medium
      x-app-permission: ReadAccounts
    post:
      operationId: createVoiceInteractionRule
      tags:
        - Interaction Rules
      description: |
        Creates the extension's interaction rule.

        *Interaction* rule is a call handling rule, managing voice call on the basis
        of the user's **contact** or a **phone number** which is calling and/or being called.

        **Please note:** Interaction rules are applicable to the User extension types only: User, DigitalUser,
        FaxUser, VirtualUser.
      summary: Create Interaction Rule
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CommInteractionRuleCreateRequest"
      responses:
        "201":
          description: Created
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CommInteractionRuleResource"
      x-feature: EditExtensionAnsweringRules
      x-availability: Limited
      x-throttling-group: Medium
      x-app-permission: EditExtensions
  "/restapi/v2/accounts/{accountId}/extensions/{extensionId}/comm-handling/voice/interaction-rules/{ruleId}":
    get:
      operationId: readVoiceInteractionRule
      tags:
        - Interaction Rules
      description: |
        Returns the extension's interaction rule by ID specified in URL.

        *Interaction* rule is a call handling rule, managing voice call on the basis
        of the user's **contact** or a **phone number** which is calling and/or being called.
      summary: Get Interaction Rule
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
        - $ref: "#/components/parameters/CommRuleId"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CommInteractionRuleResource"
      x-feature: ReadExtensionAnsweringRules
      x-availability: Limited
      x-throttling-group: Medium
      x-app-permission: ReadAccounts
    patch:
      operationId: updateVoiceInteractionRule
      tags:
        - Interaction Rules
      description: Updates the extension's interaction rule by ID specified in URL.
      summary: Update Interaction Rule
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
        - $ref: "#/components/parameters/CommRuleId"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CommInteractionRuleUpdateRequest"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CommInteractionRuleResource"
      x-feature: EditExtensionAnsweringRules
      x-availability: Limited
      x-throttling-group: Medium
      x-app-permission: EditExtensions
    delete:
      operationId: deleteVoiceInteractionRule
      tags:
        - Interaction Rules
      description: Deletes the extension's interaction rule by ID specified in URL.
      summary: Delete Interaction Rule
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
        - $ref: "#/components/parameters/CommRuleId"
      responses:
        "204":
          description: No content
      x-feature: EditExtensionAnsweringRules
      x-availability: Limited
      x-throttling-group: Medium
      x-app-permission: EditExtensions
  "/restapi/v2/accounts/{accountId}/extensions/{extensionId}/comm-handling/voice/forwarding-targets":
    get:
      operationId: readForwardingTargets
      tags:
        - Forwarding Targets
      summary: Get Forwarding Targets
      description: Returns the extension's forwarding targets.
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
        - name: excludeOwnTargets
          in: query
          required: false
          description: Filters the list of forwarding targets. Includes or excludes extension's own targets from it
          schema:
            type: string
            enum:
              - "true"
              - "false"
            example: "true"
        - $ref: "#/components/parameters/Page"
        - $ref: "#/components/parameters/PerPage"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CommForwardingTargetsResource"
      x-feature: ReadExtensionAnsweringRules
      x-availability: Limited
      x-throttling-group: Medium
      x-app-permission: ReadAccounts
    delete:
      operationId: deleteForwardingTargets
      tags:
        - Forwarding Targets
      summary: Delete Forwarding Targets
      description: Removes the specified forwarding targets from the extension's communication handling rules.
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CommRemoveForwardingTargetsRequest"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CommRemoveForwardingTargetsResponse"
      x-feature: EditExtensionAnsweringRules
      x-availability: Limited
      x-throttling-group: Medium
      x-app-permission: EditExtensions
  "/restapi/v2/accounts/{accountId}/extensions/{extensionId}/comm-handling/voice/forwarding-targets/devices/{deviceId}/extensions":
    get:
      operationId: listExtensionsUsingForwardingDeviceTarget
      tags:
        - Forwarding Targets
      summary: List Extensions Using Forwarding Device Target
      description: Returns a list of extensions which use the specified device as a forwarding target.
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
        - $ref: "#/components/parameters/CommDeviceId"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CommExtensionListResource"
      x-feature: ReadExtensionAnsweringRules
      x-availability: Limited
      x-throttling-group: Medium
      x-app-permission: ReadAccounts
  "/restapi/v1.0/account/{accountId}/directory/entries/search":
    post:
      tags:
        - Internal Contacts
      summary: Search Company Directory Entries
      description: Returns contact information on corporate users of federated accounts according to the specified filtering and ordering.
      operationId: searchDirectoryEntries
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/AccessibleSitesOnly"
        - name: accountId
          in: query
          deprecated: true
          description: A list of Account IDs. Deprecated, use the appropriate body field 'accountIds' instead.
          schema:
            type: array
            items:
              type: string
              example: "400131426008"
        - name: department
          in: query
          deprecated: true
          description: Department name. Deprecated, use the appropriate body field 'department' instead.
          schema:
            type: string
            example: North office
        - name: siteId
          in: query
          deprecated: true
          description: A list of Site IDs. Deprecated, use the appropriate body field 'siteIds' instead.
          schema:
            type: array
            items:
              type: string
              example: "872781797006"
        - name: extensionStatus
          in: query
          deprecated: true
          description: List of extension current statuses. Deprecated, use the appropriate body field 'extensionStatuses' instead.
          schema:
            type: array
            items:
              type: string
              example: Enabled
        - name: extensionType
          in: query
          deprecated: true
          description: List of extension types. Deprecated, use the appropriate body field 'extensionTypes' instead.
          schema:
            $ref: "#/components/schemas/SearchDirectoryExtensionTypes"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SearchDirectoryEntriesRequest"
        required: true
      responses:
        "200":
          description: Paged collection of all contacts information for a given account according to filtering and ordering. Records can be empty if no data found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DirectoryResource"
        "400":
          description: Current request cannot be processed due to error in its body and/or url
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ADGErrorResponse"
        "500":
          description: Some unexpected error during current request processing.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ADGErrorResponse"
        "503":
          description: Network error during request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ADGErrorResponse"
      x-throttling-group: Heavy
      x-app-permission: ReadAccounts
      x-user-permission: ReadExtensions
  "/restapi/v1.0/account/{accountId}/directory/entries/{entryId}":
    get:
      tags:
        - Internal Contacts
      summary: Get Corporate Directory Entry
      description: Returns contact information on a particular corporate user of a federated account.
      operationId: readDirectoryEntry
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/AccessibleSitesOnly"
        - name: entryId
          in: path
          description: Internal identifier of extension to read information for
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Contact information for given parameters. If value doesn't found then empty body will be returned
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ContactResource"
        "400":
          description: Current request cannot be processed due to error in its body and/or url
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ADGErrorResponse"
        "404":
          description: EntryId is not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ADGErrorResponse"
        "500":
          description: Some unexpected error during current request processing
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ADGErrorResponse"
        "503":
          description: Network error during request. One should check connection between ADG processing node and ADX data node
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ADGErrorResponse"
      x-throttling-group: Medium
      x-app-permission: ReadAccounts
  "/restapi/v1.0/account/{accountId}/directory/entries":
    get:
      tags:
        - Internal Contacts
      summary: Get Company Directory Entries
      description: "Returns contact information on corporate users of federated accounts. Please note: 1. `User`, `DigitalUser`, `VirtualUser` and `FaxUser` types are returned as `User` type. 2. `ApplicationExtension` type is not returned. 3. Only extensions in `Enabled`, `Disabled` and `NotActivated` state are returned."
      operationId: listDirectoryEntries
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/AccessibleSitesOnly"
        - name: showFederated
          in: query
          description: If `true` then contacts of all accounts in federation are returned. If `false` then only contacts of the current account are returned, and account section is eliminated in this case
          schema:
            type: boolean
            default: true
        - name: type
          in: query
          description: Type of an extension. Please note that legacy 'Department' extension type corresponds to 'Call Queue' extensions in modern RingCentral product terminology
          schema:
            $ref: "#/components/schemas/ADGSearchableExtensionTypesEnum"
        - name: typeGroup
          in: query
          description: Type of extension group
          schema:
            type: string
            enum:
              - User
              - NonUser
        - name: page
          in: query
          description: Page number
          schema:
            type: integer
            format: int32
            default: 1
        - name: perPage
          in: query
          description: |
            Records count to be returned per one page. It can be either integer or string with the specific keyword values:
            - `all` - all records are returned in one page
            - `max` - maximum count of records that can be returned in one page
          schema:
            oneOf:
              - type: integer
                format: int32
                default: 1000
                maximum: 2000
              - type: string
                enum:
                  - max
                  - all
        - name: siteId
          in: query
          description: Internal identifier of the business site to which extensions belong
          schema:
            type: string
        - $ref: "#/components/parameters/IfNoneMatch"
      responses:
        "200":
          description: Paged collection of all contacts information for a given account. Records can be empty if no data found.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DirectoryResource"
        "400":
          description: Current request cannot be processed due to error in its body and/or url.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ADGErrorResponse"
        "500":
          description: Some unexpected error during current request processing.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ADGErrorResponse"
        "503":
          description: Network error during request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ADGErrorResponse"
      x-throttling-group: Medium
      x-app-permission: ReadAccounts
  "/restapi/v1.0/account/{accountId}/directory/federation":
    get:
      tags:
        - Internal Contacts
      summary: Get Account Federation
      description: Returns information on a federation and associated accounts.
      operationId: readDirectoryFederation
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - name: types
          in: query
          description: Filter by federation types. Default is Regular
          schema:
            $ref: "#/components/schemas/FederationTypes"
        - name: RCExtensionId
          in: header
          description: RingCentral extension id
          schema:
            type: string
      responses:
        "200":
          description: List of found federations. Records array can be empty if no data found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/FederationResource"
        "400":
          description: Current request cannot be processed due to error in its body and/or url
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ADGErrorResponse"
        "404":
          description: Account is not federated.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ADGErrorResponse"
        "500":
          description: Some unexpected error during current request processing.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ADGErrorResponse"
        "503":
          description: Network error during request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ADGErrorResponse"
      x-feature: ReadCompanyInfo
      x-throttling-group: Medium
      x-app-permission: ReadAccounts
      x-user-permission: ReadCompanyInfo
  "/restapi/v1.0/account/{accountId}/emergency-locations":
    get:
      tags:
        - Automatic Location Updates
      summary: List Emergency Locations
      description: Returns emergency response locations for the current account.
      operationId: listEmergencyLocations
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/SiteIdQuery"
        - name: searchString
          in: query
          description: |
            Filters entries containing the specified substring in 'address'
            and 'name' fields. The character range is 0-64; not case-sensitive.
            If empty then the filter is ignored
          schema:
            type: string
            maxLength: 64
        - name: addressStatus
          in: query
          description: |
            Status of emergency address to filter results by
          schema:
            $ref: "#/components/schemas/EmergencyAddressStatus"
        - name: usageStatus
          in: query
          description: |
            Status of emergency location to filter results by
          schema:
            $ref: "#/components/schemas/EmergencyLocationUsageStatus"
        - name: domesticCountryId
          in: query
          description: |
            Domestic country ID to filter results by
          schema:
            type: string
        - name: orderBy
          in: query
          description: |
            Comma-separated list of fields to order results, prefixed by
            plus sign '+' (ascending order) or minus sign '-' (descending order)
          schema:
            type: string
            enum:
              - +name
              - +siteName
              - +address
              - +addressStatus
              - +usageStatus
              - -name
              - -siteName
              - -address
              - -addressStatus
              - -usageStatus
            default: +address
        - name: visibility
          in: query
          description: Visibility of emergency location to filter results by
          schema:
            type: string
            enum:
              - Public
            default: Public
        - name: perPage
          in: query
          description: |
            Indicates a page size (number of items). The values
            supported: `Max` or numeric value. If not specified,
            100 records are returned per one page
          schema:
            type: integer
            format: int32
            default: 100
        - name: page
          in: query
          description: |
            Indicates the page number to retrieve. Only positive number values
            are supported
          schema:
            type: integer
            format: int32
            default: 1
      responses:
        "200":
          description: Emergency locations list
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/EmergencyLocationsResource"
      x-feature: ReadCompanyInfo
      x-availability: High
      x-throttling-group: Light
      x-app-permission: ReadAccounts
      x-user-permission: ConfigureEmergencyMaps
    post:
      tags:
        - Automatic Location Updates
      summary: Add Emergency Location
      operationId: createEmergencyLocation
      description: Creates a new emergency response location for a company.
      parameters:
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        description: JSON body
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/EmergencyLocationRequestResource"
        required: true
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/EmergencyLocationResponseResource"
      x-feature: EditSoftPhoneAutoLocationUpdate OR EditHardPhoneAutoLocationUpdate
      x-availability: Limited
      x-throttling-group: Medium
      x-app-permission: EditAccounts
      x-user-permission: ConfigureEmergencyMaps
  "/restapi/v1.0/account/{accountId}/emergency-locations/{locationId}":
    get:
      tags:
        - Automatic Location Updates
      summary: Get Emergency Location
      description: Returns emergency response location by ID. Available for Admin users only.
      operationId: readEmergencyLocation
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/EmergencyLocationId"
        - name: syncEmergencyAddress
          in: query
          description: |
            If true, the emergency addresses will be synchronized with the
            external provider data
          schema:
            type: boolean
      responses:
        "200":
          description: Emergency location information
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CommonEmergencyLocationResource"
      x-feature: EditSoftPhoneAutoLocationUpdate OR EditHardPhoneAutoLocationUpdate OR ReadEmergencyLocations
      x-availability: Limited
      x-throttling-group: Light
      x-app-permission: EditAccounts
      x-user-permission: ConfigureEmergencyMaps
    put:
      tags:
        - Automatic Location Updates
      summary: Update Emergency Location
      description: Updates the specified emergency response location.
      operationId: updateEmergencyLocation
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/EmergencyLocationId"
      requestBody:
        description: JSON body
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/EmergencyLocationRequestResource"
        required: true
      responses:
        "200":
          description: Updated emergency location information
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/EmergencyLocationResponseResource"
      x-feature: EditSoftPhoneAutoLocationUpdate OR EditHardPhoneAutoLocationUpdate OR EditEmergencyLocations
      x-availability: Limited
      x-throttling-group: Heavy
      x-app-permission: EditAccounts
      x-user-permission: ConfigureEmergencyMaps
    delete:
      tags:
        - Automatic Location Updates
      operationId: deleteEmergencyLocation
      summary: Delete Emergency Location
      description: Deletes the specified emergency response location.
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/EmergencyLocationId"
        - name: validateOnly
          in: query
          description: |
            Flag indicating that validation of emergency location(s) is required
            before deletion
          required: false
          schema:
            type: boolean
        - name: newLocationId
          in: query
          description: |
            Internal identifier of an emergency response location
            that should be used instead of a deleted one.
          required: false
          schema:
            type: string
      responses:
        "200":
          description: Successful validation
        "204":
          description: No content
        "207":
          description: Multi-status
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GetLocationDeletionMultiResponse"
      x-feature: EditEmergencyLocations
      x-availability: Limited
      x-throttling-group: Heavy
      x-app-permission: EditAccounts
      x-user-permission: ConfigureEmergencyMaps
  "/restapi/v1.0/account/{accountId}/extension/{extensionId}/emergency-locations":
    get:
      tags:
        - Automatic Location Updates
      summary: List User Emergency Locations
      description: Returns a list of emergency response locations available for the particular extension.
      operationId: getExtensionEmergencyLocations
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
        - $ref: "#/components/parameters/SiteIdQuery"
        - name: searchString
          in: query
          description: |
            Filters entries by the specified substring (search by chassis
            ID, switch name or address) The characters range is 0-64 (if
            empty the filter is ignored)
          schema:
            type: string
        - name: domesticCountryId
          in: query
          description: |
            Domestic country ID to filter results by
          schema:
            type: string
        - name: orderBy
          in: query
          description: |
            Comma-separated list of fields to order results prefixed by '+'
            sign (ascending order) or '-' sign (descending order). The default
            sorting is by `name`
          schema:
            type: string
            default: +visibility
            enum:
              - +name
              - +siteName
              - +address
              - +addressStatus
              - +usageStatus
              - +visibility
              - -name
              - -siteName
              - -address
              - -addressStatus
              - -usageStatus
              - -visibility
        - name: perPage
          in: query
          description: |
            Indicates a page size (number of items). The values supported:
            `Max` or numeric value. If not specified, 100 records are returned
            per one page
          schema:
            format: int32
            type: integer
        - name: page
          in: query
          description: |
            Indicates a page number to retrieve. Only positive
            number values are supported
          schema:
            type: integer
            default: 1
            format: int32
        - name: visibility
          in: query
          description: |
            Visibility of emergency location to filter results by
          schema:
            type: string
            enum:
              - Public
            default: Public
      responses:
        "200":
          description: User emergency location list
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/EmergencyLocationsResource"
      x-availability: High
      x-throttling-group: Light
      x-app-permission: ReadAccounts
    post:
      tags:
        - Automatic Location Updates
      summary: Create User Emergency Location
      description: Creates a personal emergency response location for the current user.
      operationId: createExtensionEmergencyLocation
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateUserEmergencyLocationRequest"
        required: true
      responses:
        "200":
          description: Emergency location information
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/EmergencyLocationResponseResource"
      x-feature: EmergencyFramework or NewEmergencyCallingFramework
      x-availability: Limited
      x-throttling-group: Heavy
      x-app-permission: EditAccounts
      x-user-permission: EmergencyFramework
  "/restapi/v1.0/account/{accountId}/extension/{extensionId}/emergency-locations/{locationId}":
    put:
      tags:
        - Automatic Location Updates
      summary: Update User Emergency Location
      description: |
        Updates a personal emergency response location by the current user or admin.
      operationId: updateExtensionEmergencyLocation
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
        - $ref: "#/components/parameters/EmergencyLocationId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/EmergencyLocationRequestResource"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/EmergencyLocationResponseResource"
      x-feature: EmergencyFramework or NewEmergencyCallingFramework
      x-availability: Limited
      x-throttling-group: Light
      x-app-permission: EditAccounts
      x-user-permission: EmergencyFramework
    delete:
      tags:
        - Automatic Location Updates
      summary: Delete User Emergency Location
      description: |
        Deletes a personal emergency response location by ID by
        the current user or admin. Multiple personal emergency response
        locations can be deleted by single API call.
      operationId: deleteExtensionEmergencyLocation
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
        - $ref: "#/components/parameters/EmergencyLocationId"
        - name: validateOnly
          in: query
          description: |
            Flag indicating that only validation of Emergency Response Locations
            to be deleted is required
          required: false
          schema:
            type: boolean
      responses:
        "204":
          description: No content
      x-feature: EmergencyFramework or NewEmergencyCallingFramework
      x-availability: Limited
      x-throttling-group: Heavy
      x-app-permission: EditAccounts
      x-user-permission: EmergencyFramework
    get:
      tags:
        - Automatic Location Updates
      summary: Get User Emergency Location
      description: Returns a personal emergency response location for the current user.
      operationId: getExtensionEmergencyLocation
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
        - $ref: "#/components/parameters/EmergencyLocationId"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CommonEmergencyLocationResource"
      x-availability: High
      x-throttling-group: Light
      x-app-permission: ReadAccounts
  "/restapi/v1.0/account/{accountId}/emergency-address-auto-update/users":
    get:
      tags:
        - Automatic Location Updates
      summary: List Users
      description: |
        Returns a list of users with their status of Automatic Location
        Updates feature.
      operationId: listAutomaticLocationUpdatesUsers
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - name: type
          in: query
          description: Extension type. Multiple values are supported
          style: form
          explode: true
          schema:
            type: array
            items:
              type: string
              enum:
                - User
                - Limited
        - name: searchString
          in: query
          description: |
            Filters entries containing the specified substring in user name,
            extension or department. The characters range is 0-64; not case-sensitive.
            If empty then the filter is ignored
          schema:
            type: string
        - name: department
          in: query
          description: |
            Department name to filter the users. The value range is 0-64;
            not case-sensitive. If not specified then the parameter is ignored. Multiple
            values are supported
          style: form
          explode: true
          schema:
            type: array
            items:
              type: string
        - $ref: "#/components/parameters/SiteIdQuery"
        - name: featureEnabled
          in: query
          description: |
            Filters entries by their status of Automatic Location Updates
            feature
          schema:
            type: boolean
        - $ref: "#/components/parameters/OrderByInfo"
        - name: perPage
          in: query
          description: |
            Indicates a page size (number of items). The values supported:
            `Max` or numeric value. If not specified, 100 records are returned per one
            page
          schema:
            type: integer
            format: int32
        - name: page
          in: query
          description: |
            Indicates a page number to retrieve. Only positive number values
            are supported
          schema:
            type: integer
            format: int32
            default: 1
      responses:
        "200":
          description: User list
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AutomaticLocationUpdatesUserList"
      x-feature: EditSoftPhoneAutoLocationUpdate OR EditHardPhoneAutoLocationUpdate
      x-availability: High
      x-throttling-group: Medium
      x-app-permission: EditAccounts
      x-user-permission: ConfigureEmergencyMaps
  "/restapi/v1.0/account/{accountId}/emergency-address-auto-update/users/bulk-assign":
    post:
      tags:
        - Automatic Location Updates
      summary: Enable Automatic Location Updates for Users
      description: |
        Enables or disables Automatic Location Updates feature for multiple
        account users.
      operationId: assignMultipleAutomaticLocationUpdatesUsers
      parameters:
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/EmergencyAddressAutoUpdateUsersBulkAssignResource"
        required: false
      responses:
        "204":
          description: No content
      x-feature: EditSoftPhoneAutoLocationUpdate OR EditHardPhoneAutoLocationUpdate
      x-availability: Limited
      x-throttling-group: Heavy
      x-app-permission: EditAccounts
      x-user-permission: ConfigureEmergencyMaps
  "/restapi/v1.0/account/{accountId}/emergency-address-auto-update/wireless-points":
    get:
      tags:
        - Automatic Location Updates
      summary: List Wireless Points
      description: |
        Returns account wireless points configured and used for Automatic
        Location Updates feature.
      operationId: listWirelessPoints
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/SiteIdQuery"
        - name: searchString
          in: query
          description: |
            Filters entries by the specified substring (search by chassis
            ID, switch name or address) The characters range is 0-64 (if empty the filter
            is ignored)
          schema:
            type: string
        - $ref: "#/components/parameters/OrderByInfo"
        - name: perPage
          in: query
          description: |
            Indicates a page size (number of items). The values supported:
            `Max` or numeric value. If not specified, 100 records are returned per one
            page
          schema:
            type: integer
            format: int32
        - name: page
          in: query
          description: |
            Indicates the page number to retrieve. Only positive number values
            are supported
          schema:
            type: integer
            format: int32
            default: 1
      responses:
        "200":
          description: List of wireless points
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/WirelessPointsList"
      x-feature: EditSoftPhoneAutoLocationUpdate
      x-availability: High
      x-throttling-group: Medium
      x-app-permission: EditAccounts
      x-user-permission: ConfigureEmergencyMaps
    post:
      tags:
        - Automatic Location Updates
      summary: Create Wireless Point
      description: |
        Creates a new wireless point in network configuration with the
        emergency address assigned.
      operationId: createWirelessPoint
      parameters:
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateWirelessPoint"
        required: true
      responses:
        "200":
          description: Created wireless point
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/WirelessPointInfo"
      x-feature: EditSoftPhoneAutoLocationUpdate
      x-availability: Limited
      x-throttling-group: Heavy
      x-app-permission: EditAccounts
      x-user-permission: ConfigureEmergencyMaps
  "/restapi/v1.0/account/{accountId}/emergency-address-auto-update/wireless-points/{pointId}":
    get:
      tags:
        - Automatic Location Updates
      summary: Get Wireless Point
      description: |
        Returns the specified wireless access point of a corporate map
        with the emergency address assigned.
      operationId: readWirelessPoint
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - name: pointId
          in: path
          description: Internal identifier of a point
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Wireless point information
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/WirelessPointInfo"
      x-feature: EditSoftPhoneAutoLocationUpdate
      x-availability: High
      x-throttling-group: Medium
      x-app-permission: EditAccounts
      x-user-permission: ConfigureEmergencyMaps
    put:
      tags:
        - Automatic Location Updates
      summary: Update Wireless Point
      description: |
        Updates the specified wireless access point of a corporate map
        by ID.
      operationId: updateWirelessPoint
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - name: pointId
          in: path
          description: Internal identifier of a wireless point
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateWirelessPoint"
        required: true
      responses:
        "200":
          description: Updated wireless point
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/WirelessPointInfo"
      x-feature: EditSoftPhoneAutoLocationUpdate
      x-availability: Limited
      x-throttling-group: Heavy
      x-app-permission: EditAccounts
      x-user-permission: ConfigureEmergencyMaps
    delete:
      tags:
        - Automatic Location Updates
      summary: Delete Wireless Point
      description: Deletes wireless point(s) of a corporate map by ID(s).
      operationId: deleteWirelessPoint
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - name: pointId
          in: path
          required: true
          description: Internal identifier of a wireless point
          style: simple
          schema:
            type: array
            items:
              type: string
      responses:
        "204":
          description: No content
      x-feature: EditSoftPhoneAutoLocationUpdate
      x-availability: Limited
      x-throttling-group: Heavy
      x-app-permission: EditAccounts
      x-user-permission: ConfigureEmergencyMaps
  "/restapi/v1.0/account/{accountId}/emergency-address-auto-update/networks":
    get:
      tags:
        - Automatic Location Updates
      summary: Get Network Map
      description: |
        Returns a corporate network map with emergency addresses assigned
        to the current account.
      operationId: listNetworks
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/SiteIdQuery"
        - name: searchString
          in: query
          description: |
            Filters entries by the specified substring (search by chassis
            ID, switch name or address) The characters range is 0-64 (if empty the filter
            is ignored)
          schema:
            type: string
        - $ref: "#/components/parameters/OrderByInfo"
        - name: perPage
          in: query
          description: |
            Indicates a page size (number of items). The values supported:
            `Max` or a numeric value. If not specified, 100 records are returned per page
          schema:
            type: integer
            format: int32
        - name: page
          in: query
          description: |
            Indicates a page number to retrieve. Only positive number values
            are supported
          schema:
            type: integer
            format: int32
            default: 1
      responses:
        "200":
          description: Network map
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NetworksList"
      x-feature: EditSoftPhoneAutoLocationUpdate OR EditHardPhoneAutoLocationUpdate
      x-availability: High
      x-throttling-group: Heavy
      x-app-permission: EditAccounts
      x-user-permission: ConfigureEmergencyMaps
    post:
      tags:
        - Automatic Location Updates
      summary: Create Network
      description: |
        Creates a new network in a corporate ethernet map for assignment
        of emergency addresses to network access points.
      operationId: createNetwork
      parameters:
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateNetworkRequest"
        required: true
      responses:
        "200":
          description: Created network
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NetworkInfo"
      x-feature: EditSoftPhoneAutoLocationUpdate OR EditHardPhoneAutoLocationUpdate
      x-availability: Limited
      x-throttling-group: Heavy
      x-app-permission: EditAccounts
      x-user-permission: ConfigureEmergencyMaps
  "/restapi/v1.0/account/{accountId}/emergency-address-auto-update/networks/{networkId}":
    get:
      tags:
        - Automatic Location Updates
      summary: Get Network
      description: |
        Returns the specified network with emergency addresses assigned
        to the current account.
      operationId: readNetwork
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - name: networkId
          in: path
          required: true
          description: Internal identifier of a network
          schema:
            type: string
      responses:
        "200":
          description: Network information
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NetworkInfo"
      x-feature: EditSoftPhoneAutoLocationUpdate OR EditHardPhoneAutoLocationUpdate
      x-availability: High
      x-throttling-group: Medium
      x-app-permission: EditAccounts
      x-user-permission: ConfigureEmergencyMaps
    put:
      tags:
        - Automatic Location Updates
      summary: Update Network
      description: |
        Updates a network in a corporate ethernet map for assignment of emergency
        addresses to network access points.
      operationId: updateNetwork
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - name: networkId
          in: path
          required: true
          description: Internal identifier of a network
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateNetworkRequest"
        required: true
      responses:
        "200":
          description: Updated network information
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NetworkInfo"
      x-feature: EditSoftPhoneAutoLocationUpdate OR EditHardPhoneAutoLocationUpdate
      x-availability: Limited
      x-throttling-group: Heavy
      x-app-permission: EditAccounts
      x-user-permission: ConfigureEmergencyMaps
    delete:
      tags:
        - Automatic Location Updates
      summary: Delete Network
      description: |
        Deletes network(s) in a corporate ethernet map for Automatic Location
        Updates feature.
      operationId: deleteNetwork
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - name: networkId
          in: path
          required: true
          description: Internal identifier of a network
          style: simple
          schema:
            type: array
            items:
              type: string
      responses:
        "204":
          description: No content
      x-feature: EditSoftPhoneAutoLocationUpdate OR EditHardPhoneAutoLocationUpdate
      x-availability: Limited
      x-throttling-group: Heavy
      x-app-permission: EditAccounts
      x-user-permission: ConfigureEmergencyMaps
  "/restapi/v1.0/account/{accountId}/emergency-address-auto-update/devices":
    get:
      tags:
        - Automatic Location Updates
      summary: List Devices
      description: |
        Returns a list of common devices with their status of Automatic
        Location Updates feature.
      operationId: listDevicesAutomaticLocationUpdates
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/SiteIdQuery"
        - name: featureEnabled
          in: query
          description: |
            Filters entries by their status of Automatic Location Updates
            feature
          schema:
            type: boolean
        - name: modelId
          in: query
          description: |
            Internal identifier of a device model for filtering. Multiple
            values are supported
          style: form
          explode: true
          schema:
            type: array
            minItems: 0
            maxItems: 100
            items:
              type: string
              minLength: 1
              maxLength: 18
        - name: compatibleOnly
          in: query
          description: Filters devices which support HELD protocol
          schema:
            type: boolean
        - name: searchString
          in: query
          description: |
            Filters entries which have device name or model name containing
            the mentioned substring. The value should be split by spaces; the range
            is 0 - 64 characters, not case-sensitive. If empty the filter is ignored
          schema:
            type: string
        - $ref: "#/components/parameters/OrderByInfo"
        - name: perPage
          in: query
          description: |
            Indicates a page size (number of items). The values supported:
            `Max` or numeric value. If not specified, 100 records are returned per one
            page
          schema:
            type: integer
            format: int32
        - name: page
          in: query
          description: |
            Indicates a page number to retrieve. Only positive number values
            are supported
          schema:
            type: integer
            format: int32
            default: 1
      responses:
        "200":
          description: Device list with their status of Automatic Location Updates feature
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListDevicesAutomaticLocationUpdates"
      x-feature: EditSoftPhoneAutoLocationUpdate OR EditHardPhoneAutoLocationUpdate
      x-availability: High
      x-throttling-group: Medium
      x-app-permission: EditAccounts
      x-user-permission: ConfigureEmergencyMaps
  "/restapi/v1.0/account/{accountId}/emergency-address-auto-update/devices/bulk-assign":
    post:
      tags:
        - Automatic Location Updates
      summary: Enable Automatic Location Updates Feature
      description: |
        Enables or disables Automatic Location Updates feature for the
        specified common phones.
      operationId: assignMultipleDevicesAutomaticLocationUpdates
      parameters:
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AssignMultipleDevicesAutomaticLocationUpdates"
        required: false
      responses:
        "204":
          description: No content
      x-feature: EditSoftPhoneAutoLocationUpdate OR EditHardPhoneAutoLocationUpdate
      x-availability: Limited
      x-throttling-group: Heavy
      x-app-permission: EditAccounts
      x-user-permission: ConfigureEmergencyMaps
  "/restapi/v1.0/account/{accountId}/emergency-address-auto-update/switches":
    get:
      tags:
        - Automatic Location Updates
      summary: List Account Switches
      description: |
        Returns a corporate map of configured network switches with the assigned
        emergency addresses for the logged-in account.
      operationId: listAccountSwitches
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/SiteIdQuery"
        - name: searchString
          in: query
          description: |
            Filters entries by the specified substring (search by chassis
            ID, switch name or address) The characters range is 0-64 (if empty the filter
            is ignored)
          schema:
            type: string
        - $ref: "#/components/parameters/OrderByInfo"
        - name: perPage
          in: query
          description: |
            Indicates a page size (number of items). The values supported:
            `Max` or numeric value. If not specified, 100 records are returned per one
            page'
          schema:
            type: integer
            format: int32
        - name: page
          in: query
          description: |
            Indicates a page number to retrieve. Only positive number values
            are supported
          schema:
            type: integer
            format: int32
            default: 1
      responses:
        "200":
          description: Switches Map
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SwitchesList"
      x-feature: EditHardPhoneAutoLocationUpdate
      x-availability: High
      x-throttling-group: Heavy
      x-app-permission: EditAccounts
      x-user-permission: ConfigureEmergencyMaps
    post:
      tags:
        - Automatic Location Updates
      summary: Create Switch
      description: |
        Creates a new switch in corporate map based on chassis ID and used
        for Automatic Locations Update feature.
      operationId: createSwitch
      parameters:
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SwitchInfo"
        required: true
      responses:
        "200":
          description: Switch information
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SwitchInfo"
      x-feature: EditHardPhoneAutoLocationUpdate
      x-availability: Limited
      x-throttling-group: Heavy
      x-app-permission: EditAccounts
      x-user-permission: ConfigureEmergencyMaps
  "/restapi/v1.0/account/{accountId}/emergency-address-auto-update/switches/{switchId}":
    get:
      tags:
        - Automatic Location Updates
      summary: Get Switch
      description: Returns the specified switch with the assigned emergency address.
      operationId: readSwitch
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - name: switchId
          in: path
          description: Internal ID of a switch
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Switch information
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SwitchInfo"
      x-feature: EditHardPhoneAutoLocationUpdate
      x-availability: High
      x-throttling-group: Medium
      x-app-permission: EditAccounts
      x-user-permission: ConfigureEmergencyMaps
    put:
      tags:
        - Automatic Location Updates
      summary: Update Switch
      description: |
        Updates switch. Partial update is not supported, all switch parameters
        should be specified. If null value is received or parameter is missing, its
        value is removed.
      operationId: updateSwitch
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - name: switchId
          in: path
          description: Internal ID of a switch
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SwitchInfo"
        required: true
      responses:
        "200":
          description: Updated switch information
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SwitchInfo"
      x-feature: EditHardPhoneAutoLocationUpdate
      x-availability: Limited
      x-throttling-group: Heavy
      x-app-permission: EditAccounts
      x-user-permission: ConfigureEmergencyMaps
    delete:
      tags:
        - Automatic Location Updates
      summary: Delete Switch
      description: |
        Deletes wireless switch(es) in a network configuration for Automatic
        Location Updates feature.
      operationId: deleteSwitch
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - name: switchId
          in: path
          required: true
          description: Switch internal ID(s)
          style: simple
          schema:
            type: array
            items:
              type: string
      responses:
        "204":
          description: No content
      x-feature: EditHardPhoneAutoLocationUpdate
      x-availability: Limited
      x-throttling-group: Heavy
      x-app-permission: EditAccounts
      x-user-permission: ConfigureEmergencyMaps
  "/restapi/v1.0/account/{accountId}/emergency-address-auto-update/switches-bulk-create":
    post:
      tags:
        - Automatic Location Updates
      summary: Create Multiple Switches
      description: |
        Creates multiple switches in corporate map. The maximum number
        of switches per request is 10 000; limitation for account is 10 000.
      operationId: createMultipleSwitches
      parameters:
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateMultipleSwitchesRequest"
        required: true
      responses:
        "202":
          description: Multiple Switches Creation Task
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CreateMultipleSwitchesResponse"
      x-request-max-body-size: 100m
      x-throttling-group: Heavy
      x-feature: EditHardPhoneAutoLocationUpdate
      x-availability: Limited
      x-app-permission: EditAccounts
      x-user-permission: ConfigureEmergencyMaps
  "/restapi/v1.0/account/{accountId}/emergency-address-auto-update/switches-bulk-update":
    post:
      tags:
        - Automatic Location Updates
      summary: Update Multiple Switches
      description: |
        Updates multiple switches in corporate map. The maximum number
        of switches per request is 10 000; limitation for account is 10 000.
      operationId: updateMultipleSwitches
      parameters:
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateMultipleSwitchesRequest"
        required: true
      responses:
        "202":
          description: Multiple Switches Update Task
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UpdateMultipleSwitchesResponse"
      x-request-max-body-size: 100m
      x-throttling-group: Heavy
      x-feature: EditHardPhoneAutoLocationUpdate
      x-availability: Limited
      x-app-permission: EditAccounts
      x-user-permission: ConfigureEmergencyMaps
  "/restapi/v1.0/account/{accountId}/emergency-address-auto-update/wireless-points-bulk-create":
    post:
      tags:
        - Automatic Location Updates
      summary: Create Multiple Wireless Points
      description: |
        Creates multiple wireless points in a corporate map. The maximum
        number of wireless points per request is 10 000; limitation for account is
        70 000.
      operationId: createMultipleWirelessPoints
      parameters:
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateMultipleWirelessPointsRequest"
        required: true
      responses:
        "202":
          description: Multiple Wireless Points Creation Task
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CreateMultipleWirelessPointsResponse"
      x-request-max-body-size: 100m
      x-throttling-group: Heavy
      x-feature: EditSoftPhoneAutoLocationUpdate
      x-availability: Limited
      x-app-permission: EditAccounts
      x-user-permission: ConfigureEmergencyMaps
  "/restapi/v1.0/account/{accountId}/emergency-address-auto-update/wireless-points-bulk-update":
    post:
      tags:
        - Automatic Location Updates
      summary: Update Multiple Wireless Points
      description: |
        Updates wireless points in corporate map. The maximum number of
        wireless points per request is 10 000; limitation for account is 70 000.
      operationId: updateMultipleWirelessPoints
      parameters:
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateMultipleWirelessPointsRequest"
        required: true
      responses:
        "202":
          description: Multiple Wireless Points Update Task
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UpdateMultipleWirelessPointsResponse"
      x-request-max-body-size: 100m
      x-throttling-group: Heavy
      x-feature: EditSoftPhoneAutoLocationUpdate
      x-availability: Limited
      x-app-permission: EditAccounts
      x-user-permission: ConfigureEmergencyMaps
  "/restapi/v1.0/account/{accountId}/emergency-address-auto-update/wireless-points-bulk-validate":
    post:
      tags:
        - Automatic Location Updates
      summary: Validate Multiple Wireless Points
      description: |
        Validates wireless points before creation or update. The maximum
        number of wireless points per request is 10 000.
      operationId: validateMultipleWirelessPoints
      parameters:
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ValidateMultipleWirelessPointsRequest"
        required: true
      responses:
        "200":
          description: Validated wireless points information
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ValidateMultipleWirelessPointsResponse"
      x-request-max-body-size: 100m
      x-throttling-group: Heavy
      x-feature: EditSoftPhoneAutoLocationUpdate
      x-availability: High
      x-app-permission: EditAccounts
      x-user-permission: ConfigureEmergencyMaps
  "/restapi/v1.0/account/{accountId}/emergency-address-auto-update/switches-bulk-validate":
    post:
      tags:
        - Automatic Location Updates
      summary: Validate Multiple Switches
      description: |
        Validates switches before creation or update. The maximum number
        of switches per request is 10 000.
      operationId: validateMultipleSwitches
      parameters:
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ValidateMultipleSwitchesRequest"
        required: true
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ValidateMultipleSwitchesResponse"
      x-request-max-body-size: 100m
      x-throttling-group: Heavy
      x-feature: EditHardPhoneAutoLocationUpdate
      x-availability: High
      x-app-permission: EditAccounts
      x-user-permission: ConfigureEmergencyMaps
  "/restapi/v1.0/account/{accountId}/emergency-address-auto-update/tasks/{taskId}":
    get:
      tags:
        - Automatic Location Updates
      summary: Get Emergency Map Configuration Task
      description: |
        Returns results of the task created within the frame of Automatic
        Location Updates feature. Currently four task types are supported: 'Wireless
        Points Bulk Create', 'Wireless Points Bulk Update', 'Switches Bulk Create',
        'Switches Bulk Update'.
      operationId: readAutomaticLocationUpdatesTask
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - name: taskId
          in: path
          description: Internal ID of an address auto-update task
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Task information
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AutomaticLocationUpdatesTaskInfo"
      x-feature: EditSoftPhoneAutoLocationUpdate OR EditHardPhoneAutoLocationUpdate
      x-availability: High
      x-throttling-group: Light
      x-app-permission: EditAccounts
      x-user-permission: ConfigureEmergencyMaps
  /team-messaging/v1/data-export:
    get:
      tags:
        - Compliance Exports
      summary: List Data Export Tasks
      description: Returns the list of Glip data export tasks.
      operationId: listDataExportTasksNew
      parameters:
        - name: status
          in: query
          description: Status of the task(s) to be returned. Multiple values are supported
          schema:
            type: string
            enum:
              - Accepted
              - InProgress
              - Completed
              - Failed
              - Expired
        - name: page
          in: query
          description: Page number to be retrieved; value range is > 0
          schema:
            type: integer
            format: int32
            default: 1
        - name: perPage
          in: query
          description: Number of records to be returned per page; value range is 1 - 250
          schema:
            type: integer
            format: int32
            default: 30
      responses:
        "200":
          description: Data Export Task List
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DataExportTaskList"
      x-throttling-group: Medium
      x-app-permission: TeamMessaging
      x-user-permission: Glip
    post:
      tags:
        - Compliance Exports
      summary: Create Data Export Task
      description: Creates a task for Glip data export and returns a link at which the exported data will be available in future once the task is implemented. The exported data can be downloaded by calling Get Data Export Task method with the specified task ID. Simultaneously no more than 2 tasks per company can be created.
      operationId: createDataExportTaskNew
      requestBody:
        description: JSON body
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateDataExportTaskRequest"
        required: false
      responses:
        "202":
          description: The task is accepted
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DataExportTask"
      x-throttling-group: Heavy
      x-app-permission: TeamMessaging
      x-user-permission: Glip
  "/team-messaging/v1/data-export/{taskId}":
    get:
      tags:
        - Compliance Exports
      summary: Get Data Export Task
      description: Returns the links for downloading Glip data exported within the specified task. If the export task is still in progress, then only the task status will be returned. If the data is ready for downloading, then the list of URLs will be returned.
      operationId: readDataExportTaskNew
      parameters:
        - name: taskId
          in: path
          description: Internal identifier of a task to be retrieved
          required: true
          schema:
            type: string
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DataExportTask"
      x-throttling-group: Medium
      x-app-permission: TeamMessaging
      x-user-permission: Glip
  "/restapi/v1.0/account/{accountId}/extension/{extensionId}/unified-presence":
    get:
      tags:
        - Presence
      summary: Get Unified Presence
      description: Returns the unified presence status of the requested user(s). The set of parameters returned by this method differs whether you return the requester's presence or any other user presence.
      operationId: readUnifiedPresence
      parameters:
        - name: accountId
          in: path
          description: Internal identifier of a RingCentral account or tilde (~) to indicate the account logged-in within the current session
          required: true
          schema:
            type: string
            default: "~"
        - name: extensionId
          in: path
          description: Internal identifier of an extension or tilde (~) to indicate the extension assigned to the account logged-in within the current session
          required: true
          schema:
            type: string
            default: "~"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnifiedPresence"
        "207":
          description: Multi-Status
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnifiedPresenceList"
        "400":
          description: Some of the parameters are missing or have invalid format
        "404":
          description: Resource not found
      x-throttling-group: Medium
      x-app-permission: ReadPresence
      x-user-permission: ReadPresenceStatus
    patch:
      tags:
        - Presence
      summary: Update Unified Presence
      description: Updates the unified presence for the current user specified in path.
      operationId: updateUnifiedPresence
      parameters:
        - name: accountId
          in: path
          description: Internal identifier of a RingCentral account or tilde (~) to indicate the account logged-in within the current session
          required: true
          schema:
            type: string
            default: "~"
        - name: extensionId
          in: path
          description: Internal identifier of an extension or tilde (~) to indicate the extension assigned to the account logged-in within the current session
          required: true
          schema:
            type: string
            default: "~"
      requestBody:
        description: JSON body
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateUnifiedPresence"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnifiedPresence"
        "400":
          description: Some of parameters are missing or have invalid format
        "403":
          description: User is not allowed to do this action
        "404":
          description: Resource not found
      x-throttling-group: Medium
      x-app-permission: EditPresence
      x-user-permission: EditPresenceStatus
  /team-messaging/v1/chats:
    get:
      tags:
        - Chats
      summary: List Chats
      description: |
        Returns the list of chats where the user is a member and also public teams that can be joined.

        All records in response are sorted by creation time of a chat in ascending order.

        **Chat types**

        There are multiple types of chats, including:

        * **Personal** - each user is given a dedicated "personal chat" in which they are the only member.
        * **Direct** - a chat between two individuals.
        * **Group** - a chat between three or more named individuals. A "group" chat has no name.
        * **Team** - a chat related to a specific topic. Members can come and go freely from this chat type.
        * **Everyone** - a special chat containing every individual in a company.
      operationId: listGlipChatsNew
      parameters:
        - name: type
          in: query
          description: Type of chats to be fetched. By default, all type of chats will be fetched
          style: form
          explode: true
          schema:
            type: array
            items:
              type: string
              enum:
                - Personal
                - Direct
                - Group
                - Team
                - Everyone
        - name: recordCount
          in: query
          description: Number of chats to be fetched by one request. The maximum value is 250, by default - 30.
          schema:
            maximum: 250
            type: integer
            format: int32
            default: 30
        - name: pageToken
          in: query
          description: Pagination token.
          schema:
            type: string
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TMChatList"
      x-feature: TeamMessaging
      x-throttling-group: Medium
      x-app-permission: TeamMessaging
  "/team-messaging/v1/chats/{chatId}":
    get:
      tags:
        - Chats
      summary: Get Chat
      description: |
        Returns information about a chat by ID.

        **Note** 'Chat' is a general name for all types of threads including *Personal* (user's own me-chat), *Direct* (one on one chat), *Group* (chat of 3-15 participants without specific name), *Team* (chat of 2 and more participants, with a specific name), *Everyone* (company chat including all employees, with a specific name)."
      operationId: readGlipChatNew
      parameters:
        - name: chatId
          in: path
          description: Internal identifier of a chat. If tilde (~) is specified, then `/me` (Personal) chat will be returned
          required: true
          schema:
            type: string
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TMChatInfo"
        "404":
          description: Chat Not Found.
      x-feature: TeamMessaging
      x-throttling-group: Light
      x-app-permission: TeamMessaging
  /team-messaging/v1/conversations:
    get:
      tags:
        - Conversations
      summary: List Conversations
      description: Returns the list of conversations where the user is a member. All records in response are sorted by creation time of a conversation in ascending order. Conversation is a chat of the *Group* type.
      operationId: listGlipConversationsNew
      parameters:
        - name: recordCount
          in: query
          description: Number of conversations to be fetched by one request. The maximum value is 250, by default - 30
          schema:
            maximum: 250
            type: integer
            format: int32
            default: 30
        - name: pageToken
          in: query
          description: Pagination token.
          schema:
            type: string
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TMConversationList"
      x-feature: TeamMessaging
      x-throttling-group: Medium
      x-app-permission: TeamMessaging
    post:
      tags:
        - Conversations
      summary: Create/Open Conversation
      description: Creates a new conversation or opens the existing one. If the conversation already exists, then its ID will be returned in response. A conversation is an adhoc discussion between a particular set of users, not featuring any specific name or description; it is a chat of 'Group' type. If you add a person to the existing conversation (group), it creates a whole new conversation.
      operationId: createGlipConversationNew
      requestBody:
        description: JSON body
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateConversationRequest"
        required: true
      responses:
        "200":
          description: Conversation is opened
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TMConversationInfo"
        "201":
          description: Conversation is created
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TMConversationInfo"
        "400":
          description: Some of the parameters are missing or have invalid format
      x-feature: TeamMessaging
      x-throttling-group: Medium
      x-app-permission: TeamMessaging
  "/team-messaging/v1/conversations/{chatId}":
    get:
      tags:
        - Conversations
      summary: Get Conversation
      description: Returns information about the specified conversation, including the list of conversation participants. A conversation is an adhoc discussion between a particular set of users, not featuring any specific name or description; it is a chat of 'Group' type. If you add a person to the existing conversation, it creates a whole new conversation.
      operationId: readGlipConversationNew
      parameters:
        - $ref: "#/components/parameters/ChatId"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TMConversationInfo"
        "404":
          description: Conversation Not Found.
      x-feature: TeamMessaging
      x-throttling-group: Light
      x-app-permission: TeamMessaging
  /team-messaging/v1/teams:
    get:
      tags:
        - Teams
      summary: List Teams
      description: Returns the list of teams where the user is a member (both archived and active) combined with a list of public teams that can be joined by the current user. All records in response are sorted by creation time of a chat in ascending order. A team is a chat between 2 and more (unlimited number) participants assigned with specific name.
      operationId: listGlipTeamsNew
      parameters:
        - name: recordCount
          in: query
          description: Number of teams to be fetched by one request. The maximum value is 250, by default - 30
          schema:
            maximum: 250
            type: integer
            format: int32
            default: 30
        - name: pageToken
          in: query
          description: Pagination token.
          schema:
            type: string
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TMTeamList"
      x-feature: TeamMessaging
      x-throttling-group: Medium
      x-app-permission: TeamMessaging
    post:
      tags:
        - Teams
      summary: Create Team
      description: Creates a team, and adds a list of people to the team.
      operationId: createGlipTeamNew
      requestBody:
        description: JSON body
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/TMCreateTeamRequest"
        required: true
      responses:
        "201":
          description: Created
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TMTeamInfo"
        "400":
          description: One of body parameters has invalid value.
      x-feature: TeamMessaging
      x-throttling-group: Medium
      x-app-permission: TeamMessaging
  "/team-messaging/v1/teams/{chatId}":
    get:
      tags:
        - Teams
      summary: Get Team
      description: Returns information about the specified team.
      operationId: readGlipTeamNew
      parameters:
        - $ref: "#/components/parameters/ChatId"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TMTeamInfo"
        "404":
          description: Team Not Found.
      x-feature: TeamMessaging
      x-throttling-group: Light
      x-app-permission: TeamMessaging
    delete:
      tags:
        - Teams
      summary: Delete Team
      description: Deletes the specified team.
      operationId: deleteGlipTeamNew
      parameters:
        - $ref: "#/components/parameters/ChatId"
      responses:
        "204":
          description: No Content.
        "403":
          description: User is not Team Admin.
        "404":
          description: Team Not Found.
      x-feature: TeamMessaging
      x-throttling-group: Medium
      x-app-permission: TeamMessaging
    patch:
      tags:
        - Teams
      summary: Update Team
      description: Updates the name and description of the specified team.
      operationId: patchGlipTeamNew
      parameters:
        - $ref: "#/components/parameters/ChatId"
      requestBody:
        description: JSON body
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/TMUpdateTeamRequest"
        required: true
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TMTeamInfo"
        "400":
          description: One of body parameters has invalid value.
        "403":
          description: User is not Team Admin or Team is not active.
        "404":
          description: Team Not Found.
      x-feature: TeamMessaging
      x-throttling-group: Medium
      x-app-permission: TeamMessaging
  "/team-messaging/v1/teams/{chatId}/join":
    post:
      tags:
        - Teams
      summary: Join Team
      description: Adds the current user to the specified team.
      operationId: joinGlipTeamNew
      parameters:
        - $ref: "#/components/parameters/ChatId"
      responses:
        "204":
          description: No Content
        "205":
          description: Reset Content
        "403":
          description: Team status is not Active or Team is not public
        "404":
          description: Team Not Found.
      x-feature: TeamMessaging
      x-throttling-group: Medium
      x-app-permission: TeamMessaging
  "/team-messaging/v1/teams/{chatId}/leave":
    post:
      tags:
        - Teams
      summary: Leave Team
      description: Removes the current user from the specified team.
      operationId: leaveGlipTeamNew
      parameters:
        - $ref: "#/components/parameters/ChatId"
      responses:
        "204":
          description: No Content
        "205":
          description: Reset Content.
        "403":
          description: Team status is not Active.
        "404":
          description: Team Not Found.
      x-feature: TeamMessaging
      x-throttling-group: Medium
      x-app-permission: TeamMessaging
  "/team-messaging/v1/teams/{chatId}/add":
    post:
      tags:
        - Teams
      summary: Add Team Members
      description: Adds members to the specified team.
      operationId: addGlipTeamMembersNew
      parameters:
        - $ref: "#/components/parameters/ChatId"
      requestBody:
        description: JSON body
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/TMAddTeamMembersRequest"
        required: true
      responses:
        "204":
          description: No Content.
        "400":
          description: Some of the parameters are missing or have invalid format
        "403":
          description: User is not Team Admin.
        "404":
          description: Team Not Found.
      x-feature: TeamMessaging
      x-throttling-group: Medium
      x-app-permission: TeamMessaging
  "/team-messaging/v1/teams/{chatId}/remove":
    post:
      tags:
        - Teams
      summary: Remove Team Members
      description: Removes members from the specified team.
      operationId: removeGlipTeamMembersNew
      parameters:
        - $ref: "#/components/parameters/ChatId"
      requestBody:
        description: JSON body
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/TMRemoveTeamMembersRequest"
        required: true
      responses:
        "204":
          description: No Content.
        "400":
          description: Some of the parameters are missing or have invalid format
        "403":
          description: User is not Team Admin.
        "404":
          description: Team Not Found.
      x-feature: TeamMessaging
      x-throttling-group: Medium
      x-app-permission: TeamMessaging
  "/team-messaging/v1/teams/{chatId}/archive":
    post:
      tags:
        - Teams
      summary: Archive Team
      description: Changes the status of the specified team to 'Archived'.
      operationId: archiveGlipTeamNew
      parameters:
        - $ref: "#/components/parameters/ChatId"
      responses:
        "204":
          description: No Content
        "205":
          description: Reset Content
        "403":
          description: User is not Team Admin
        "404":
          description: Team Not Found
      x-feature: TeamMessaging
      x-throttling-group: Medium
      x-app-permission: TeamMessaging
  "/team-messaging/v1/teams/{chatId}/unarchive":
    post:
      tags:
        - Teams
      summary: Unarchive Team
      description: Changes the status of the specified team to 'Active'.
      operationId: unarchiveGlipTeamNew
      parameters:
        - $ref: "#/components/parameters/ChatId"
      responses:
        "204":
          description: No Content
        "205":
          description: Reset Content
        "403":
          description: User is not Team Admin
        "404":
          description: Team Not Found
      x-feature: TeamMessaging
      x-throttling-group: Medium
      x-app-permission: TeamMessaging
  /team-messaging/v1/everyone:
    get:
      tags:
        - Teams
      summary: Get Everyone Chat
      description: Returns information about "Everyone" chat (a company level chat which includes all employees).
      operationId: readGlipEveryoneNew
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/EveryoneTeamInfo"
        "404":
          description: Chat Not Found.
      x-feature: TeamMessaging
      x-throttling-group: Light
      x-app-permission: TeamMessaging
    patch:
      tags:
        - Teams
      summary: Update Everyone Chat
      description: Updates "Everyone" chat information.
      operationId: patchGlipEveryoneNew
      requestBody:
        description: JSON body
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateEveryoneTeamRequest"
        required: false
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/EveryoneTeamInfo"
        "404":
          description: Chat Not Found.
      x-feature: TeamMessaging
      x-throttling-group: Medium
      x-app-permission: TeamMessaging
  /team-messaging/v1/recent/chats:
    get:
      tags:
        - Chats
      summary: List Recent Chats
      description: Returns recent chats where the user is a member. All records in response are sorted by the `lastModifiedTime` in descending order (the latest changed chat is displayed first on page)
      operationId: listRecentChatsNew
      parameters:
        - name: type
          in: query
          description: Type of chats to be fetched. By default, all chat types are returned
          style: form
          explode: true
          schema:
            type: array
            items:
              type: string
              enum:
                - Everyone
                - Group
                - Personal
                - Direct
                - Team
        - name: recordCount
          in: query
          description: Max number of chats to be fetched by one request (Not more than 250).
          schema:
            maximum: 250
            type: integer
            format: int32
            default: 30
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TMChatListWithoutNavigation"
        "400":
          description: Some of the parameters are missing or have invalid format
      x-feature: TeamMessaging
      x-throttling-group: Light
      x-app-permission: TeamMessaging
  /team-messaging/v1/favorites:
    get:
      tags:
        - Chats
      summary: List Favorite Chats
      description: Returns a list of the current user's favorite chats.
      operationId: listFavoriteChatsNew
      parameters:
        - name: recordCount
          in: query
          description: Max number of chats to be fetched by one request (Not more than 250).
          schema:
            maximum: 250
            type: integer
            format: int32
            default: 30
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TMChatListWithoutNavigation"
        "400":
          description: Some of the parameters are missing or have invalid format
      x-feature: TeamMessaging
      x-throttling-group: Light
      x-app-permission: TeamMessaging
  "/team-messaging/v1/chats/{chatId}/favorite":
    post:
      tags:
        - Chats
      summary: Add Chat to Favorites
      description: Adds the specified chat to the users's list of favorite chats.
      operationId: favoriteGlipChatNew
      parameters:
        - $ref: "#/components/parameters/ChatId"
      responses:
        "204":
          description: No Content
        "400":
          description: Favorite chat list is limited to 250 unique chats
        "403":
          description: User is not member of chat
        "404":
          description: Chat not found
      x-feature: TeamMessaging
      x-throttling-group: Medium
      x-app-permission: TeamMessaging
  "/team-messaging/v1/chats/{chatId}/unfavorite":
    post:
      tags:
        - Chats
      summary: Remove Chat from Favorites
      description: Removes the specified chat from the users's list of favorite chats.
      operationId: unfavoriteGlipChatNew
      parameters:
        - $ref: "#/components/parameters/ChatId"
      responses:
        "204":
          description: No Content
        "404":
          description: Chat not found
      x-feature: TeamMessaging
      x-throttling-group: Medium
      x-app-permission: TeamMessaging
  "/team-messaging/v1/chats/{chatId}/posts/{postId}":
    get:
      tags:
        - Posts
      summary: Get Post
      description: Returns information about the specified post.
      operationId: readGlipPostNew
      parameters:
        - $ref: "#/components/parameters/ChatId"
        - $ref: "#/components/parameters/PostId"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TMPostInfo"
        "404":
          description: Post Not Found
      x-feature: TeamMessaging
      x-throttling-group: Light
      x-app-permission: TeamMessaging
    delete:
      tags:
        - Posts
      summary: Delete Post
      description: Deletes the specified post from the chat.
      operationId: deleteGlipPostNew
      parameters:
        - $ref: "#/components/parameters/ChatId"
        - $ref: "#/components/parameters/PostId"
      responses:
        "204":
          description: No Content.
        "403":
          description: Requestor has no permissions to do this action
        "404":
          description: Post Not Found
      x-feature: TeamMessaging
      x-throttling-group: Medium
      x-app-permission: TeamMessaging
    patch:
      tags:
        - Posts
      summary: Update Post
      description: Updates a specific post within a chat.
      operationId: patchGlipPostNew
      parameters:
        - $ref: "#/components/parameters/ChatId"
        - $ref: "#/components/parameters/PostId"
      requestBody:
        description: JSON body
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/TMUpdatePostRequest"
        required: true
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TMPostInfo"
        "400":
          description: One of body parameters has invalid value
        "403":
          description: Requestor has no permissions to do this action
        "404":
          description: Chat not found.
      x-feature: TeamMessaging
      x-throttling-group: Medium
      x-app-permission: TeamMessaging
  "/team-messaging/v1/chats/{chatId}/posts":
    get:
      tags:
        - Posts
      summary: List Posts
      description: Returns a list of posts from the specified chat.
      operationId: readGlipPostsNew
      parameters:
        - $ref: "#/components/parameters/ChatId"
        - name: recordCount
          in: query
          description: Max number of posts to be fetched by one request (not more than 250)
          schema:
            maximum: 250
            type: integer
            format: int32
            default: 30
        - name: pageToken
          in: query
          description: Pagination token.
          schema:
            type: string
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TMPostsList"
      x-feature: TeamMessaging
      x-throttling-group: Medium
      x-app-permission: TeamMessaging
    post:
      tags:
        - Posts
      summary: Create Post
      description: |
        Creates a post in the chat specified in path. Any mention can be added within the `text` attribute of
        the request body in .md format - `![:Type](id)`, where `type` is one of (Person, Team, File, Note,
        Task, Event, Link, Card) and `id` is a unique identifier of the mentioned object of the specified type.
        Attachments can also be added to a post by passing the type and ID of attachment(s) in request body.
      operationId: createGlipPostNew
      parameters:
        - $ref: "#/components/parameters/ChatId"
      requestBody:
        description: JSON body
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/TMCreatePostRequest"
        required: true
      responses:
        "201":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TMPostInfo"
        "400":
          description: One of body parameters has invalid value.
        "404":
          description: Resource for parameter [chatId] is not found.
      x-feature: TeamMessaging
      x-throttling-group: Medium
      x-app-permission: TeamMessaging
  "/team-messaging/v1/chats/{chatId}/threads/{threadId}/posts":
    get:
      tags:
        - Posts
      summary: List Thread Posts
      description: Returns a list of posts from the specified thread in a chat.
      operationId: readGlipThreadPostsNew
      parameters:
        - $ref: "#/components/parameters/ChatId"
        - $ref: "#/components/parameters/ThreadId"
        - name: recordCount
          in: query
          description: Max number of posts to be fetched by one request (not more than 250)
          schema:
            maximum: 250
            type: integer
            format: int32
            default: 30
        - name: pageToken
          in: query
          description: Pagination token.
          schema:
            type: string
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TMPostsList"
        "404":
          description: Chat or thread not found
      x-feature: TeamMessaging
      x-throttling-group: Medium
      x-app-permission: TeamMessaging
  /team-messaging/v1/files:
    post:
      tags:
        - Posts
      summary: Upload File
      description: Posts a file or multiple files.
      operationId: createGlipFileNew
      parameters:
        - name: groupId
          in: query
          description: |
            Internal identifier of a group to which the post with attachment
            will be added to
          schema:
            type: integer
            format: int64
        - name: name
          in: query
          description: Name of a file attached
          schema:
            type: string
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - body
              properties:
                body:
                  type: string
                  description: File(s) - binary or multipart/form-data - to upload
                  format: binary
        required: true
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TMAddFileResponse"
        "400":
          description: Some of the parameters are missing or have invalid format
        "415":
          description: Media type is not supported
      x-feature: TeamMessaging
      x-request-max-body-size: 30m
      x-throttling-group: Heavy
      x-app-permission: TeamMessaging
  "/team-messaging/v1/chats/{chatId}/adaptive-cards":
    post:
      tags:
        - Adaptive Cards
      summary: Create Adaptive Card
      description: Creates a new adaptive card in the chat specified in path.
      operationId: createGlipAdaptiveCardNew
      parameters:
        - $ref: "#/components/parameters/ChatId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AdaptiveCardRequest"
        required: true
      responses:
        "201":
          description: Created
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AdaptiveCardShortInfo"
        "400":
          description: Some of the parameters are missing or have invalid format
        "403":
          description: You do not have permissions to create adaptive card in the specified chat.
        "404":
          description: Specified chat ID does not exist.
      x-feature: TeamMessaging
      x-throttling-group: Medium
      x-app-permission: TeamMessaging
  "/team-messaging/v1/adaptive-cards/{cardId}":
    get:
      tags:
        - Adaptive Cards
      summary: Get Adaptive Card
      description: Returns adaptive card(s) with given id(s).
      operationId: getGlipAdaptiveCardNew
      parameters:
        - name: cardId
          in: path
          description: Internal identifier of an adaptive card, or comma separated list of adaptive cards IDs.
          required: true
          schema:
            type: array
            items:
              type: string
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AdaptiveCardInfo"
        "207":
          description: Multi-Status
        "400":
          description: Some of the parameters are missing or have invalid format
        "404":
          description: Adaptive Card not found.
      x-feature: TeamMessaging
      x-throttling-group: Medium
      x-app-permission: TeamMessaging
    put:
      tags:
        - Adaptive Cards
      summary: Update Adaptive Card
      description: Updates an adaptive card.
      operationId: updateGlipAdaptiveCardNew
      parameters:
        - name: cardId
          in: path
          description: Internal identifier of an adaptive card
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AdaptiveCardRequest"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AdaptiveCardShortInfo"
        "400":
          description: Some of the parameters are missing or have invalid format
        "403":
          description: You do not have permissions to update specified adaptive card.
        "404":
          description: Adaptive Card for update does not exist.
      x-feature: TeamMessaging
      x-throttling-group: Medium
      x-app-permission: TeamMessaging
    delete:
      tags:
        - Adaptive Cards
      summary: Delete Adaptive Card
      description: Deletes an adaptive card by ID.
      operationId: deleteGlipAdaptiveCardNew
      parameters:
        - name: cardId
          in: path
          description: Adaptive Card ID to be deleted.
          required: true
          schema:
            type: string
      responses:
        "204":
          description: No Content
        "400":
          description: Some of the parameters are missing or have invalid format
        "403":
          description: You do not have permissions to delete specified adaptive card.
        "404":
          description: Adaptive Card not found.
      x-feature: TeamMessaging
      x-throttling-group: Medium
      x-app-permission: TeamMessaging
  /team-messaging/v1/events:
    get:
      tags:
        - Calendar Events
      summary: List User Events
      description: Returns all calendar events created by the current user.
      operationId: readGlipEventsNew
      parameters:
        - name: recordCount
          in: query
          description: Number of groups to be fetched by one request. The maximum value is 250, by default - 30.
          schema:
            maximum: 250
            type: integer
            format: int32
            default: 30
        - name: pageToken
          in: query
          description: Token of a page to be returned
          schema:
            type: string
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TMEventList"
            multipart/mixed:
              schema:
                $ref: "#/components/schemas/TMEventList"
      x-feature: TeamMessaging
      x-throttling-group: Medium
      x-app-permission: TeamMessaging
    post:
      tags:
        - Calendar Events
      summary: Create Event
      description: Creates a new calendar event.
      operationId: createEventNew
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/TMCreateEventRequest"
        required: true
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TMEventInfo"
        "400":
          description: Some of the parameters are missing or have invalid format
      x-feature: TeamMessaging
      x-throttling-group: Medium
      x-app-permission: TeamMessaging
  "/team-messaging/v1/events/{eventId}":
    get:
      tags:
        - Calendar Events
      summary: Get Event
      description: Returns the specified calendar event(s) by ID(s).
      operationId: readEventNew
      parameters:
        - name: eventId
          in: path
          description: Event id or comma separated list of event ids.
          required: true
          style: simple
          explode: false
          schema:
            type: array
            items:
              type: string
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TMEventInfo"
            multipart/mixed:
              schema:
                $ref: "#/components/schemas/TMEventInfo"
        "400":
          description: Some of the parameters are missing or have invalid format
        "404":
          description: Event not found.
      x-feature: TeamMessaging
      x-throttling-group: Medium
      x-app-permission: TeamMessaging
    put:
      tags:
        - Calendar Events
      summary: Update Event
      description: Updates the specified calendar event.
      operationId: updateEventNew
      parameters:
        - name: eventId
          in: path
          description: Internal identifier of an event
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/TMCreateEventRequest"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TMEventInfo"
        "400":
          description: Some of the parameters are missing or have invalid format
        "404":
          description: Event to update not exists.
      x-feature: TeamMessaging
      x-throttling-group: Medium
      x-app-permission: TeamMessaging
    delete:
      tags:
        - Calendar Events
      summary: Delete Event
      description: Deletes the specified calendar event.
      operationId: deleteEventNew
      parameters:
        - name: eventId
          in: path
          description: Internal identifier of an event to be deleted
          required: true
          schema:
            type: string
      responses:
        "200":
          description: OK
        "400":
          description: Some of the parameters are missing or have invalid format
        "404":
          description: Event not found.
      x-feature: TeamMessaging
      x-throttling-group: Medium
      x-app-permission: TeamMessaging
  "/team-messaging/v1/groups/{groupId}/events":
    get:
      tags:
        - Calendar Events
      summary: List Group Events
      description: Returns a list of calendar events available for the current user within the specified group. Users can only see their personal tasks and public tasks.
      operationId: listGroupEventsNew
      parameters:
        - name: groupId
          in: path
          description: Internal identifier of a group
          required: true
          schema:
            type: string
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TMEventInfo"
        "404":
          description: Group with specified Id is not found.
      x-feature: TeamMessaging
      x-throttling-group: Medium
      x-app-permission: TeamMessaging
    post:
      tags:
        - Calendar Events
      summary: Create Event by Group ID
      description: Creates a new calendar event within the specified group.
      operationId: createEventByGroupIdNew
      parameters:
        - name: groupId
          in: path
          description: Internal identifier of a group
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/TMCreateEventRequest"
        required: true
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TMEventInfo"
        "400":
          description: Some of the parameters are missing or have invalid format
      x-feature: TeamMessaging
      x-throttling-group: Medium
      x-app-permission: TeamMessaging
  "/team-messaging/v1/chats/{chatId}/notes":
    get:
      tags:
        - Notes
      summary: List Notes
      description: Returns the list of chat notes.
      operationId: listChatNotesNew
      parameters:
        - $ref: "#/components/parameters/ChatId"
        - name: creationTimeTo
          in: query
          description: |
            The end datetime for resulting records in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)
            format including timezone, e.g. 2019-03-10T18:23:45. The default value is
            Now.
          schema:
            type: string
        - name: creationTimeFrom
          in: query
          description: |
            The start datetime for resulting records in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)
            format including timezone
          schema:
            type: string
        - name: creatorId
          in: query
          description: |
            Internal identifier of the user that created the note. Multiple
            values are supported
          schema:
            type: string
        - name: status
          in: query
          description: |
            Status of notes to be fetched; if not specified all notes are
            fetched by default.
          schema:
            type: string
            enum:
              - Active
              - Draft
        - name: pageToken
          in: query
          description: Pagination token
          schema:
            type: string
        - name: recordCount
          in: query
          description: Max number of notes to be fetched by one request; the value range is 1-250.
          schema:
            maximum: 250
            type: integer
            format: int32
            default: 30
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TMNoteList"
        "400":
          description: Some of the parameters are missing or have invalid format
        "403":
          description: You do not have permissions to get such kind of information.
        "404":
          description: Group Not Found.
      x-feature: TeamMessaging
      x-throttling-group: Heavy
      x-app-permission: TeamMessaging
    post:
      tags:
        - Notes
      summary: Create Note
      description: Creates a new note in the specified chat.
      operationId: createChatNoteNew
      parameters:
        - $ref: "#/components/parameters/ChatId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/TMCreateNoteRequest"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TMNoteInfo"
        "400":
          description: Some of the parameters are missing or have invalid format
        "403":
          description: You do not have permissions to create note in the specified group.
        "404":
          description: Group not found.
      x-feature: TeamMessaging
      x-throttling-group: Medium
      x-app-permission: TeamMessaging
  "/team-messaging/v1/notes/{noteId}":
    get:
      tags:
        - Notes
      summary: Get Note
      description: Returns the specified note(s). It is possible to fetch up to 50 notes per request.
      operationId: readUserNoteNew
      parameters:
        - name: noteId
          in: path
          description: Internal identifier of a note to be fetched
          required: true
          schema:
            type: string
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TMNoteWithBodyInfo"
        "404":
          description: When note is not found.
      x-feature: TeamMessaging
      x-throttling-group: Medium
      x-app-permission: TeamMessaging
    delete:
      tags:
        - Notes
      summary: Delete Note
      description: Deletes the specified note.
      operationId: deleteNoteNew
      parameters:
        - name: noteId
          in: path
          description: Internal identifier of a note to be deleted
          required: true
          schema:
            type: string
      responses:
        "204":
          description: No Content
        "400":
          description: Note is locked by another user
        "403":
          description: You have no permissions to delete note
        "404":
          description: Note is not found
      x-feature: TeamMessaging
      x-throttling-group: Medium
      x-app-permission: TeamMessaging
    patch:
      tags:
        - Notes
      summary: Update Note
      description: Edits a note. Notes can be edited by any user if posted to a chat. the user belongs to.
      operationId: patchNoteNew
      parameters:
        - name: noteId
          in: path
          description: Internal identifier of a note to be updated
          required: true
          schema:
            type: string
        - name: releaseLock
          in: query
          description: If true then note lock (if any) will be released upon request
          schema:
            type: boolean
            default: false
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/TMCreateNoteRequest"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TMNoteInfo"
        "400":
          description: Note is locked by another user
        "403":
          description: You have no permissions to update the note
        "404":
          description: Note is not found
      x-feature: TeamMessaging
      x-throttling-group: Medium
      x-app-permission: TeamMessaging
  "/team-messaging/v1/notes/{noteId}/lock":
    post:
      tags:
        - Notes
      summary: Lock Note
      description: Locks a note providing the user with the unique write access for 5 hours.
      operationId: lockNoteNew
      parameters:
        - name: noteId
          in: path
          description: Internal identifier of a note to be locked
          required: true
          schema:
            type: string
      responses:
        "204":
          description: No Content
        "400":
          description: Note is locked by another user
        "403":
          description: You have no permissions to lock the note
        "404":
          description: Note is not found
      x-feature: TeamMessaging
      x-throttling-group: Light
      x-app-permission: TeamMessaging
  "/team-messaging/v1/notes/{noteId}/unlock":
    post:
      tags:
        - Notes
      summary: Unlock Note
      description: Unlocks a note letting other users edit this note. Once the note is locked (by another user) it cannot be unlocked during 5 hours since the lock datetime.
      operationId: unlockNoteNew
      parameters:
        - name: noteId
          in: path
          description: Internal identifier of a note to be unlocked
          required: true
          schema:
            type: string
      responses:
        "204":
          description: No Content
        "400":
          description: Note is locked by another user
        "403":
          description: You have no permissions to unlock the note
        "404":
          description: Note is not found
      x-feature: TeamMessaging
      x-throttling-group: Light
      x-app-permission: TeamMessaging
  "/team-messaging/v1/notes/{noteId}/publish":
    post:
      tags:
        - Notes
      summary: Publish Note
      description: Publishes a note making it visible to other users.
      operationId: publishNoteNew
      parameters:
        - name: noteId
          in: path
          description: Internal identifier of a note to be published
          required: true
          schema:
            type: string
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TMNoteInfo"
        "400":
          description: User is not a creator of note
        "404":
          description: Note is not found
      x-feature: TeamMessaging
      x-throttling-group: Medium
      x-app-permission: TeamMessaging
  "/team-messaging/v1/chats/{chatId}/tasks":
    get:
      tags:
        - Tasks
      summary: List Chat Tasks
      description: Returns the list of tasks of the specified chat.
      operationId: listChatTasksNew
      parameters:
        - $ref: "#/components/parameters/ChatId"
        - name: creationTimeTo
          in: query
          description: |
            The end datetime for resulting records in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)
            format including timezone, e.g. 2019-03-10T18:23:45Z
          schema:
            type: string
            default: now
        - name: creationTimeFrom
          in: query
          description: |
            The start datetime for resulting records in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)
            format including timezone, e.g. 2016-02-23T00:00:00
          schema:
            type: string
        - name: creatorId
          in: query
          description: Internal identifier of a task creator
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
        - name: status
          in: query
          description: Task execution status
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
              enum:
                - Pending
                - InProgress
                - Completed
        - name: assignmentStatus
          in: query
          description: Task assignment status
          schema:
            type: string
            enum:
              - Unassigned
              - Assigned
        - name: assigneeId
          in: query
          description: Internal identifier of a task assignee
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
        - name: assigneeStatus
          in: query
          description: Task execution status by assignee(-s) specified in assigneeId
          schema:
            type: string
            enum:
              - Pending
              - Completed
        - name: pageToken
          in: query
          description: |
            Token of the current page. If token is omitted then the first
            page should be returned
          schema:
            type: string
        - name: recordCount
          in: query
          description: Number of records to be returned per screen
          schema:
            maximum: 250
            minimum: 1
            type: integer
            format: int32
            default: 30
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TMTaskList"
        "400":
          description: Invalid input parameter(-s)
        "403":
          description: Forbidden
        "404":
          description: Specified chat ID does not exist
      x-feature: TeamMessaging
      x-throttling-group: Heavy
      x-app-permission: TeamMessaging
    post:
      tags:
        - Tasks
      summary: Create Task
      description: Creates a task in the specified chat.
      operationId: createTaskNew
      parameters:
        - $ref: "#/components/parameters/ChatId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/TMCreateTaskRequest"
        required: true
      responses:
        "201":
          description: Task information
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TMTaskInfo"
        "400":
          description: Invalid input parameter(-s)
        "403":
          description: Forbidden
        "404":
          description: Specified chat ID does not exist
      x-feature: TeamMessaging
      x-throttling-group: Medium
      x-app-permission: TeamMessaging
  "/team-messaging/v1/tasks/{taskId}":
    get:
      tags:
        - Tasks
      summary: Get Task
      description: Returns information about the specified task(s) by ID(s).
      operationId: readTaskNew
      parameters:
        - name: taskId
          in: path
          description: Task identifier or comma separated list of task IDs
          required: true
          schema:
            type: string
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TMTaskInfo"
        "400":
          description: Invalid input parameter(-s)
        "403":
          description: Forbidden
        "404":
          description: Requested task ID does not exist
      x-feature: TeamMessaging
      x-throttling-group: Medium
      x-app-permission: TeamMessaging
    delete:
      tags:
        - Tasks
      summary: Delete Task
      description: Deletes the specified task.
      operationId: deleteTaskNew
      parameters:
        - name: taskId
          in: path
          description: Internal identifier of a task
          required: true
          schema:
            type: string
      responses:
        "204":
          description: No Content
        "403":
          description: Forbidden
        "404":
          description: Task with the specified ID does not exist
      x-feature: TeamMessaging
      x-throttling-group: Medium
      x-app-permission: TeamMessaging
    patch:
      tags:
        - Tasks
      summary: Update Task
      description: Updates the specified task by ID.
      operationId: patchTaskNew
      parameters:
        - name: taskId
          in: path
          description: Internal identifier of a task
          required: true
          schema:
            type: string
      requestBody:
        description: JSON body
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/TMUpdateTaskRequest"
        required: false
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TMTaskList"
        "400":
          description: Invalid input parameter(-s)
        "403":
          description: Forbidden
        "404":
          description: Task with the specified ID does not exist
      x-feature: TeamMessaging
      x-throttling-group: Medium
      x-app-permission: TeamMessaging
  "/team-messaging/v1/tasks/{taskId}/complete":
    post:
      tags:
        - Tasks
      summary: Complete Task
      description: Completes a task in the specified chat.
      operationId: completeTaskNew
      parameters:
        - name: taskId
          in: path
          description: Internal identifier of a task
          required: true
          schema:
            type: string
      requestBody:
        description: JSON body
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/TMCompleteTaskRequest"
        required: true
      responses:
        "204":
          description: No Content
        "400":
          description: Invalid input parameter(-s)
        "403":
          description: Forbidden
        "404":
          description: Requested task ID does not exist
      x-feature: TeamMessaging
      x-throttling-group: Medium
      x-app-permission: TeamMessaging
  "/team-messaging/v1/persons/{personId}":
    get:
      tags:
        - Profile
      summary: Get Person
      description: |
        Returns a user or multiple users by their ID(s).
        [Bulk requests](https://developers.ringcentral.com/guide/basics/batch-requests) are supported.
      operationId: readGlipPersonNew
      parameters:
        - name: personId
          in: path
          description: Internal identifier of a user to be returned, the maximum number of IDs is 30
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TMPersonInfo"
        "207":
          description: Mixed Result
        "403":
          description: You do not have permissions to get such kind of information
        "404":
          description: Person Not Found
      x-feature: TeamMessaging
      x-throttling-group: Light
      x-app-permission: TeamMessaging
  "/team-messaging/v1/companies/{companyId}":
    get:
      tags:
        - Profile
      summary: Get Company Info
      description: Returns information about one or more companies by their IDs.
      operationId: readTMCompanyInfoNew
      parameters:
        - name: companyId
          in: path
          description: |
            Internal identifier of an RC account/Glip company, or tilde (~) to indicate a company
            the current user belongs to.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TMCompanyInfo"
            multipart/mixed:
              schema:
                $ref: "#/components/schemas/TMCompanyInfo"
        "207":
          description: Mixed Result
        "403":
          description: You do not have permissions to get such kind of information
        "404":
          description: Company Not Found
      x-feature: TeamMessaging
      x-throttling-group: Light
      x-app-permission: TeamMessaging
  "/team-messaging/v1/groups/{groupId}/webhooks":
    get:
      tags:
        - Incoming Webhooks
      summary: List Webhooks in Group
      description: Returns webhooks which are available for the current user by group ID.
      operationId: listGlipGroupWebhooksNew
      parameters:
        - name: groupId
          in: path
          description: Internal identifier of a group
          required: true
          schema:
            type: string
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TMWebhookList"
        "404":
          description: Group with specified ID is not found.
      x-feature: TeamMessaging
      x-throttling-group: Medium
      x-app-permission: TeamMessaging
    post:
      tags:
        - Incoming Webhooks
      summary: Create Webhook in Group
      description: Creates a new webhook.
      operationId: createGlipGroupWebhookNew
      parameters:
        - name: groupId
          in: path
          description: Internal identifier of a group
          required: true
          schema:
            type: string
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TMWebhookInfo"
        "400":
          description: Some of the parameters are missing or have invalid format
      x-feature: TeamMessaging
      x-throttling-group: Medium
      x-app-permission: TeamMessaging
  /team-messaging/v1/webhooks:
    get:
      tags:
        - Incoming Webhooks
      summary: List Webhooks
      description: Returns the list of all webhooks associated with the current account.
      operationId: listGlipWebhooksNew
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TMWebhookList"
            multipart/mixed:
              schema:
                $ref: "#/components/schemas/TMWebhookList"
      x-feature: TeamMessaging
      x-throttling-group: Medium
      x-app-permission: TeamMessaging
  "/team-messaging/v1/webhooks/{webhookId}":
    get:
      tags:
        - Incoming Webhooks
      summary: Get Webhook
      description: Returns webhooks(s) with the specified id(s).
      operationId: readGlipWebhookNew
      parameters:
        - name: webhookId
          in: path
          description: Internal identifier of a webhook or comma separated list of webhooks IDs
          required: true
          style: simple
          explode: false
          schema:
            type: array
            items:
              type: string
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TMWebhookList"
            multipart/mixed:
              schema:
                $ref: "#/components/schemas/TMWebhookList"
        "400":
          description: Some of the parameters are missing or have invalid format
        "404":
          description: Webhooks not found.
      x-feature: TeamMessaging
      x-throttling-group: Medium
      x-app-permission: TeamMessaging
    delete:
      tags:
        - Incoming Webhooks
      summary: Delete Webhook
      description: Deletes a webhook by ID.
      operationId: deleteGlipWebhookNew
      parameters:
        - name: webhookId
          in: path
          description: Internal identifier of a webhook
          required: true
          schema:
            type: string
      responses:
        "200":
          description: The resource was deleted successfully.
        "400":
          description: Some of the parameters are missing or have invalid format
        "404":
          description: Webhook not found.
      x-feature: TeamMessaging
      x-throttling-group: Medium
      x-app-permission: TeamMessaging
  "/team-messaging/v1/webhooks/{webhookId}/activate":
    post:
      tags:
        - Incoming Webhooks
      summary: Activate Webhook
      description: Activates a webhook by ID.
      operationId: activateGlipWebhookNew
      parameters:
        - name: webhookId
          in: path
          description: Internal identifier of a webhook
          required: true
          schema:
            type: string
      responses:
        "200":
          description: OK
        "400":
          description: Some of the parameters are missing or have invalid format
        "404":
          description: Webhook not found.
      x-feature: TeamMessaging
      x-throttling-group: Medium
      x-app-permission: TeamMessaging
  "/team-messaging/v1/webhooks/{webhookId}/suspend":
    post:
      tags:
        - Incoming Webhooks
      summary: Suspend Webhook
      description: Suspends a webhook by ID.
      operationId: suspendGlipWebhookNew
      parameters:
        - name: webhookId
          in: path
          description: Internal identifier of a webhook
          required: true
          schema:
            type: string
      responses:
        "200":
          description: OK
        "400":
          description: Some of the parameters are missing or have invalid format
        "404":
          description: Webhook not found.
      x-feature: TeamMessaging
      x-throttling-group: Medium
      x-app-permission: TeamMessaging
  "/restapi/v1.0/account/{accountId}/extension/{extensionId}/fax":
    post:
      tags:
        - Fax
      summary: Create Fax Message
      description: |
        Creates and sends/re-sends a fax message. Re-send can be implemented
        if sending has failed. Fax attachment size (both single and total) is
        limited to 50Mb.
      operationId: createFaxMessage
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - attachment
                - to
              properties:
                attachment:
                  type: string
                  description: File to upload
                  format: binary
                faxResolution:
                  $ref: "#/components/schemas/FaxResolutionEnum"
                to:
                  type: array
                  description: Recipient's phone number(s)
                  items:
                    $ref: "#/components/schemas/FaxRequestTo"
                sendTime:
                  type: string
                  description: |
                    Timestamp to send a fax at. If not specified, current or the past,
                    a fax message is sent immediately
                  format: date-time
                isoCode:
                  $ref: "#/components/schemas/CountryIsoCode"
                coverIndex:
                  type: integer
                  description: |
                    Cover page identifier. If `coverIndex` is set to '0' (zero) a cover page
                    is not attached. For a list of available cover page identifiers (1-13)
                    please call the Fax Cover Pages method. If not specified, the default cover
                    page is attached (which is configured in 'Outbound Fax Settings')
                  format: int32
                coverPageText:
                  type: string
                  description: |
                    Cover page text, entered by a fax sender and printed
                    on a cover page. Maximum length is limited to 1024 symbols
                  maxLength: 1024
          application/json:
            schema:
              type: object
              required:
                - originalMessageId
              properties:
                originalMessageId:
                  type: string
                  description: Internal identifier of a fax message that is resent/forwarded
                to:
                  type: array
                  description: |
                    Phone number(s) of recipient(s) to which the fax message will be forwarded. 
                    If not specified then the fax message is resent to the original message recipient
                  items:
                    $ref: "#/components/schemas/FaxRequestTo"
                sendTime:
                  type: string
                  description: |
                    Timestamp to send a fax at. If not specified, current or the past,
                    a fax message is sent immediately
                  format: date-time
        required: true
      responses:
        "200":
          description: Fax message
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/FaxResponse"
      x-request-max-body-size: 55m
      x-throttling-group: Heavy
      x-feature: FaxSending
      x-availability: High
      x-app-permission: Faxes
      x-user-permission: OutboundFaxes
  /restapi/v1.0/dictionary/fax-cover-page:
    get:
      tags:
        - Fax
      summary: List Fax Cover Pages
      description: Returns fax cover pages available for the current extension.
      operationId: listFaxCoverPages
      parameters:
        - name: page
          in: query
          description: |
            Indicates a page number to retrieve. Only positive number values
            are accepted
          schema:
            type: integer
            format: int32
            default: 1
        - name: perPage
          in: query
          description: Indicates a page size (number of items)
          schema:
            type: integer
            format: int32
            default: 100
      responses:
        "200":
          description: List of fax cover pages
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListFaxCoverPagesResponse"
      x-availability: High
      x-throttling-group: Light
  "/restapi/v1.0/account/{accountId}/message-store-templates":
    post:
      tags:
        - SMS Templates
      summary: Create Company Message Template
      description: Creates a new text message template on a company level. Maximum number of company templates is 50.
      operationId: createCompanyMessageTemplate
      parameters:
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        description: JSON body
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/MessageTemplateRequest"
        required: true
      responses:
        "201":
          description: Created company text message template
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MessageTemplateResponse"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "404":
          $ref: "#/components/responses/NotFound"
      x-feature: EditCompanySmsTemplates
      x-availability: High
      x-throttling-group: Medium
      x-app-permission: EditAccounts
    get:
      tags:
        - SMS Templates
      summary: List Company Message Templates
      description: Returns a list of company text message templates.
      operationId: listCompanyMessageTemplates
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - name: siteIds
          in: query
          description: |
            Site ID(s) to filter company message templates, associated with particular sites
            By default the value is all - templates with all sites will be returned
          required: false
          schema:
            type: array
            items:
              type: string
      responses:
        "200":
          description: List of company text message templates
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MessageTemplatesListResponse"
        "404":
          $ref: "#/components/responses/NotFound"
      x-feature: ReadCompanySmsTemplates
      x-availability: High
      x-throttling-group: Light
      x-app-permission: ReadAccounts
  "/restapi/v1.0/account/{accountId}/message-store-templates/{templateId}":
    put:
      tags:
        - SMS Templates
      summary: Update Company Message Template
      description: Updates a company text message template.
      operationId: updateCompanyMessageTemplate
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/MessageTemplateId"
      requestBody:
        description: JSON body
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/MessageTemplateRequest"
        required: true
      responses:
        "200":
          description: Updated company text message template
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MessageTemplateResponse"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "404":
          $ref: "#/components/responses/NotFound"
      x-feature: EditCompanySmsTemplates
      x-availability: High
      x-throttling-group: Medium
      x-app-permission: EditAccounts
    get:
      tags:
        - SMS Templates
      summary: Get Company Message Template
      description: Returns a company text message template by ID.
      operationId: readCompanyMessageTemplate
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/MessageTemplateId"
      responses:
        "200":
          description: Company text message template
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MessageTemplateResponse"
        "404":
          $ref: "#/components/responses/NotFound"
      x-feature: ReadCompanySmsTemplates
      x-availability: High
      x-throttling-group: Light
      x-app-permission: ReadAccounts
    delete:
      tags:
        - SMS Templates
      summary: Delete Company Message Template
      description: Deletes a company text message template.
      operationId: deleteCompanyMessageTemplate
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/MessageTemplateId"
      responses:
        "204":
          description: No content
        "404":
          $ref: "#/components/responses/NotFound"
      x-feature: EditCompanySmsTemplates
      x-availability: High
      x-throttling-group: Medium
      x-app-permission: EditAccounts
  "/restapi/v1.0/account/{accountId}/extension/{extensionId}/message-store-templates":
    post:
      tags:
        - SMS Templates
      summary: Create User Message Template
      description: |
        Creates a user personal text message template.
        Maximum number of personal templates is 25 per user.
        Max length of the `body` property is 1000 symbols (2-byte UTF-16 encoded).
      operationId: createUserMessageTemplate
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
      requestBody:
        description: JSON body
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/MessageTemplateRequest"
        required: true
      responses:
        "201":
          description: Created personal text message template
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MessageTemplateResponse"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "404":
          $ref: "#/components/responses/NotFound"
      x-feature: SMSSending
      x-availability: High
      x-throttling-group: Medium
      x-app-permission: EditExtensions
    get:
      tags:
        - SMS Templates
      summary: List User Message Templates
      description: Returns a list of user's personal text message templates.
      operationId: listUserMessageTemplates
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
        - name: siteIds
          in: query
          description: |
            Site ID(s) to filter user message templates, associated with particular sites.
            By default the value is all - templates with all sites will be returned
          required: false
          schema:
            type: array
            items:
              type: string
        - name: scope
          in: query
          required: false
          description: Message templates scope. By default the value is all - both Personal and Company templates will be returned
          schema:
            $ref: "#/components/schemas/VisibilityType"
      responses:
        "200":
          description: List of user text message templates
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MessageTemplatesListResponse"
        "404":
          $ref: "#/components/responses/NotFound"
      x-feature: SMSSending
      x-availability: High
      x-throttling-group: Light
      x-app-permission: ReadAccounts
  "/restapi/v1.0/account/{accountId}/extension/{extensionId}/message-store-templates/{templateId}":
    put:
      tags:
        - SMS Templates
      summary: Update User Message Template
      description: Updates a user personal text message template.
      operationId: updateUserMessageTemplate
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
        - $ref: "#/components/parameters/MessageTemplateId"
      requestBody:
        description: JSON body
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/MessageTemplateRequest"
        required: true
      responses:
        "200":
          description: Updated user personal text message template
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MessageTemplateResponse"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "404":
          $ref: "#/components/responses/NotFound"
      x-feature: SMSSending
      x-availability: High
      x-throttling-group: Medium
      x-app-permission: EditExtensions
    get:
      tags:
        - SMS Templates
      summary: Get User Message Template
      description: Returns a user personal text message template by ID.
      operationId: readUserMessageTemplate
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
        - $ref: "#/components/parameters/MessageTemplateId"
      responses:
        "200":
          description: User personal text message template
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MessageTemplateResponse"
        "404":
          $ref: "#/components/responses/NotFound"
      x-feature: SMSSending
      x-availability: High
      x-throttling-group: Light
      x-app-permission: ReadAccounts
    delete:
      tags:
        - SMS Templates
      summary: Delete User Message Template
      description: Deletes a user personal text message template.
      operationId: deleteUserMessageTemplate
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
        - $ref: "#/components/parameters/MessageTemplateId"
      responses:
        "204":
          description: No content
        "404":
          $ref: "#/components/responses/NotFound"
      x-feature: SMSSending
      x-availability: High
      x-throttling-group: Medium
      x-app-permission: EditExtensions
  "/restapi/v1.0/account/{accountId}/extension/{extensionId}/sms":
    post:
      tags:
        - SMS
      summary: Send SMS
      description: |
        Creates and sends a new text message or multiple messages. You can send SMS
        messages simultaneously to different recipients up to 40 requests per minute;
        this limitation is relevant for all client applications. Sending and receiving
        SMS is available for Toll-Free Numbers within the USA. You can send up to
        10 attachments in a single MMS message; the size of all attachments linked
        is limited up to 1500000 bytes.
      operationId: createSMSMessage
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
      requestBody:
        description: JSON body
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateSMSMessage"
          multipart/form-data:
            schema:
              $ref: "#/components/schemas/CreateSMSMessage"
          multipart/mixed:
            schema:
              $ref: "#/components/schemas/CreateSMSMessage"
        required: true
      responses:
        "200":
          description: Message information
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GetSMSMessageInfoResponse"
      x-request-max-body-size: 10m
      x-throttling-group: Medium
      x-feature: SMSSending
      x-availability: High
      x-app-permission: SMS
      x-user-permission: OutboundSMS
  "/restapi/v1.0/account/{accountId}/extension/{extensionId}/mms":
    post:
      tags:
        - SMS
      summary: Send MMS
      description: |
        Creates and sends a new media message or multiple messages. Sending MMS
        messages simultaneously to different recipients is limited up to 50
        requests per minute; relevant for all client applications.
      operationId: createMMS
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
      requestBody:
        description: MMS envelope and content
        content:
          multipart/form-data:
            schema:
              $ref: "#/components/schemas/CreateMMSMessage"
          multipart/mixed:
            schema:
              $ref: "#/components/schemas/CreateMMSMessage"
        required: true
      responses:
        "200":
          description: MMS message (envelope and content)
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GetSMSMessageInfoResponse"
      x-request-max-body-size: 10m
      x-throttling-group: Medium
      x-feature: SMSSending
      x-availability: High
      x-app-permission: SMS
      x-user-permission: OutboundSMS
  "/restapi/v1.0/account/{accountId}/extension/{extensionId}/company-pager":
    post:
      tags:
        - Pager Messages
      summary: Create Internal Text Message
      description: Creates and sends an internal text message (company pager message).
      operationId: createInternalTextMessage
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
      requestBody:
        description: JSON body
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateInternalTextMessageRequest"
        required: true
      responses:
        "200":
          description: Created text message
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GetInternalTextMessageInfoResponse"
      x-feature: PagesSending
      x-availability: High
      x-throttling-group: Medium
      x-app-permission: InternalMessages
      x-user-permission: InternalSMS
  "/restapi/v1.0/account/{accountId}/extension/{extensionId}/message-store":
    get:
      tags:
        - Message Store
      summary: List Messages
      description: Returns a list of messages from an extension mailbox.
      operationId: listMessages
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
        - $ref: "#/components/parameters/OwnerInfo"
        - name: availability
          in: query
          description: |
            Specifies the availability status for resulting messages.
            Multiple values are accepted
          style: form
          explode: true
          schema:
            type: array
            items:
              $ref: "#/components/schemas/MessageAvailabilityEnum"
        - name: conversationId
          in: query
          description: Specifies a conversation identifier for the resulting messages
          schema:
            type: string
        - name: dateFrom
          in: query
          description: |
            Start date/time for resulting messages in ISO 8601 format
            including timezone, for example 2016-03-10T18:07:52.534Z. The default value
            is dateTo minus 24 hours
          schema:
            type: string
            format: date-time
        - name: dateTo
          in: query
          description: |
            End date/time for resulting messages in ISO 8601 format including
            timezone, for example 2016-03-10T18:07:52.534Z. The default value is current
            time
          schema:
            type: string
            format: date-time
        - name: direction
          in: query
          description: |
            Direction for resulting messages. If not specified, both
            inbound and outbound messages are returned. Multiple values are accepted
          style: form
          explode: true
          schema:
            type: array
            items:
              $ref: "#/components/schemas/MessageDirectionEnum"
        - name: distinctConversations
          in: query
          description: |
            If `true`, then the latest messages per every conversation ID
            are returned
          schema:
            type: boolean
        - name: messageType
          in: query
          description: |
            Type of resulting messages. If not specified, all messages
            without message type filtering are returned. Multiple values are accepted
          style: form
          explode: true
          schema:
            type: array
            items:
              $ref: "#/components/schemas/MessageTypeEnum"
        - name: readStatus
          in: query
          description: |
            Read status for resulting messages. Multiple values are
            accepted
          style: form
          explode: true
          schema:
            type: array
            items:
              $ref: "#/components/schemas/MessageReadStatusEnum"
        - name: page
          in: query
          description: |
            Indicates a page number to retrieve. Only positive number values
            are accepted
          schema:
            type: integer
            format: int32
            default: 1
        - name: perPage
          in: query
          description: Indicates a page size (number of items)
          schema:
            type: integer
            format: int32
            default: 100
        - name: phoneNumber
          in: query
          description: |
            Phone number. If specified, messages are returned for this
            particular phone number only
          schema:
            type: string
        - name: voicemailOwner
          in: query
          description: |
            Deprecated. Filters voicemail messages based on the owner extension. Supported if the 'SharedVoicemail'
            feature is enabled.
          schema:
            type: array
            items:
              type: string
        - name: ownerExtensionType
          in: query
          description: |
            Filters shared messages based on the owner extension type. Supported if "SharedVoicemail" or "CallQueueSmsRecipient"
            feature is enabled.
          schema:
            type: array
            items:
              $ref: "#/components/schemas/AllExtensionTypesEnum"
      responses:
        "200":
          description: Message list
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GetMessageList"
      x-throttling-group: Light
      x-feature: ReadMessages
      x-availability: High
      x-app-permission: ReadMessages
      x-user-permission: ReadMessages
      x-notifications:
        - $ref: "#/components/schemas/InboundMessageEvent"
        - $ref: "#/components/schemas/InstantMessageEvent"
        - $ref: "#/components/schemas/MessageEvent"
    delete:
      tags:
        - Message Store
      summary: Delete Conversation
      description: |
        Deletes conversation(s) by conversation ID(s).
        [Bulk request syntax](https://developers.ringcentral.com/guide/basics/batch-requests) is supported - maximum number
        of IDs passed as query/path parameters is 50. Alternative syntax is supported - the user's conversations can be deleted
        by passing multiple IDs in request body as an array of string. Maximum number of conversation IDs passed in request body
        is 100. In this case asterisk '*' is used in the path instead of IDs.
      operationId: deleteMessageByFilter
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
        - $ref: "#/components/parameters/OwnerInfo"
        - name: conversationId
          in: query
          description: ID(s) of a conversation to delete
          style: form
          explode: true
          schema:
            type: array
            items:
              type: string
        - name: dateTo
          in: query
          description: |
            Messages received earlier then the date specified will be deleted.
            The default value is current date/time
          schema:
            type: string
            format: date-time
        - name: type
          in: query
          description: Type of messages to be deleted
          schema:
            type: string
            default: All
            enum:
              - Fax
              - SMS
              - VoiceMail
              - Pager
              - Text
              - All
        - name: purge
          in: query
          description: |
            If the value is `true`, then the messages are purged immediately
            with all the attachments
          schema:
            type: boolean
            default: false
      responses:
        "204":
          description: No content
      x-feature: EditMessages
      x-availability: Limited
      x-throttling-group: Medium
      x-app-permission: EditMessages
      x-user-permission: EditMessages
  "/restapi/v1.0/account/{accountId}/extension/{extensionId}/message-store/{messageId}":
    parameters:
      - $ref: "#/components/parameters/AccountId"
      - $ref: "#/components/parameters/ExtensionId"
      - name: messageId
        in: path
        description: Internal identifier of a message (or multiple messages in case of bulk operation)
        required: true
        schema:
          type: array
          minItems: 1
          items:
            type: string
            example: "8930983240"
    get:
      tags:
        - Message Store
      summary: Get Message(s)
      description: |
        Returns an individual message record or multiple records by the given message ID(s).
        The length of inbound messages is unlimited. [Bulk syntax](https://developers.ringcentral.com/guide/basics/batch-requests)
        is supported.
      operationId: readMessage
      responses:
        "200":
          description: Successful response (single message)
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GetSingleMessageInfoResponse"
        "207":
          description: Successful response (multiple messages via bulk syntax)
          content:
            application/vnd.ringcentral.multipart+json:
              schema:
                $ref: "#/components/schemas/GetMessageMultiResponse"
            multipart/mixed:
              schema:
                type: string
      x-throttling-group: Light
      x-feature: ReadMessages
      x-availability: High
      x-app-permission: ReadMessages
      x-user-permission: ReadMessages
      x-notifications:
        - $ref: "#/components/schemas/VoicemailMessageEvent"
    put:
      tags:
        - Message Store
      summary: Update Message(s)
      description: |
        Updates message(s) by their ID(s). Currently, only the `readStatus`
        can be updated using this method.
        [Bulk syntax](https://developers.ringcentral.com/guide/basics/batch-requests) is supported,
        maximum number of IDs passed as query/path parameters is 50. Alternative bulk syntax is also
        supported - the user's messages can be updated by passing multiple IDs in request body as
        an array of string, maximum number of IDs passed in the body is 1000. In this case asterisk '*'
        is used in the path instead of IDs.
      operationId: updateMessage
      requestBody:
        description: Request body (different formats for regular and bulk syntax)
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateMessageRequest"
          application/vnd.ringcentral.multipart+json:
            schema:
              $ref: "#/components/schemas/UpdateMessageBulkRequest"
          multipart/mixed:
            schema:
              type: string
        required: true
      responses:
        "200":
          description: Successful response (single message)
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GetMessageInfoResponse"
        "207":
          description: Successful response (multiple messages via bulk syntax)
          content:
            application/vnd.ringcentral.multipart+json:
              schema:
                $ref: "#/components/schemas/GetMessageMultiResponse"
            multipart/mixed:
              schema:
                type: string
      x-feature: EditMessages
      x-availability: Limited
      x-throttling-group: Medium
      x-app-permission: EditMessages
      x-user-permission: EditMessages
    patch:
      tags:
        - Message Store
      summary: Patch Message(s)
      description: |
        Patches message(s) by ID(s). Currently, only updating the `readStatus` and
        restoring deleted messages are supported through this method.

        For changing status of a message send `readStatus` set to either 'Read' or 'Unread' in request.
        It is possible to restore a message and its attachments (if message status is 'Deleted') by sending
        `availability` attribute set to 'Alive' in request body. If a message is already in 'Purged' state
        then its attachments cannot be restored and the message itself is about to be physically deleted.

        Bulk syntax (both traditional and alternative one) is supported.
      operationId: patchMessage
      requestBody:
        description: Request body (different formats for regular and bulk syntax)
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PatchMessageRequest"
          application/vnd.ringcentral.multipart+json:
            schema:
              $ref: "#/components/schemas/PatchMessageBulkRequest"
          multipart/mixed:
            schema:
              type: string
        required: true
      responses:
        "200":
          description: Successful response (single message)
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GetMessageInfoResponse"
        "207":
          description: Successful response (multiple messages via bulk syntax)
          content:
            application/vnd.ringcentral.multipart+json:
              schema:
                $ref: "#/components/schemas/GetMessageMultiResponse"
            multipart/mixed:
              schema:
                type: string
      x-availability: Limited
      x-throttling-group: Medium
      x-app-permission: EditMessages
      x-user-permission: EditMessages
    delete:
      tags:
        - Message Store
      summary: Delete Message
      description: |
        Deletes message(s) by the given message ID(s). The first call of
        this method transfers the message to the 'Delete' status. The second call
        moves the deleted message to the 'Purged' status. 
        To immediately purge the message (skip the 'Deleted' status), 
        set the query parameter `purge` to `true`.

        **Please note: If you call this method without specifying any message IDs in the request, 
        all your messages will be deleted/purged entirely.**
      operationId: deleteMessage
      parameters:
        - name: purge
          in: query
          description: |
            If the value is `true`, then the message is purged immediately
            with all the attachments
          schema:
            type: boolean
            default: false
        - name: type
          in: query
          description: Type of messages to be deleted
          schema:
            type: string
            default: All
            enum:
              - Fax
              - SMS
              - VoiceMail
              - Pager
              - Text
              - All
      requestBody:
        required: false
        description: Request body (only supported with alternative bulk syntax when `messageId` is set to '*' in the path)
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/DeleteMessageBulkRequest"
      responses:
        "204":
          description: No content
      x-feature: EditMessages
      x-availability: Limited
      x-throttling-group: Medium
      x-app-permission: EditMessages
      x-user-permission: EditMessages
  "/restapi/v1.0/account/{accountId}/extension/{extensionId}/message-sync":
    get:
      tags:
        - Message Store
      summary: Sync Messages
      description: Synchronizes messages.
      operationId: syncMessages
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
        - $ref: "#/components/parameters/OwnerInfo"
        - name: conversationId
          in: query
          description: |
            Conversation identifier for the resulting messages. 
            Meaningful for SMS and Pager messages only
          schema:
            type: integer
            format: int64
        - name: dateFrom
          in: query
          description: |
            The start date/time for resulting messages in ISO 8601 format
            including timezone, for example 2016-03-10T18:07:52.534Z. The default value
            is dateTo minus 24 hours
          schema:
            type: string
            format: date-time
        - name: dateTo
          in: query
          description: |
            The end date/time for resulting messages in ISO 8601 format including
            timezone, for example 2016-03-10T18:07:52.534Z. The default value is current
            time
          schema:
            type: string
            format: date-time
        - name: direction
          in: query
          description: |
            Direction for the resulting messages. If not specified, both
            inbound and outbound messages are returned. Multiple values are accepted
          style: form
          explode: true
          schema:
            type: array
            items:
              $ref: "#/components/schemas/MessageDirectionEnum"
        - name: distinctConversations
          in: query
          description: |
            If `true`, then the latest messages per every conversation ID
            are returned
          schema:
            type: boolean
        - name: messageType
          in: query
          description: |
            Type for the resulting messages. If not specified, all types
            of messages are returned. Multiple values are accepted
          style: form
          explode: true
          schema:
            type: array
            items:
              $ref: "#/components/schemas/MessageTypeEnum"
        - name: recordCount
          in: query
          description: |
            Limits the number of records to be returned (works in combination
            with dateFrom and dateTo if specified)
          schema:
            type: integer
            format: int32
        - name: syncToken
          in: query
          description: A `syncToken` value from the previous sync response (for `ISync` mode only, mandatory)
          schema:
            type: string
        - name: syncType
          in: query
          description: Type of message synchronization
          schema:
            $ref: "#/components/schemas/SyncTypeEnum"
        - name: voicemailOwner
          in: query
          description: |
            Deprecated. Filters voicemail messages based on the owner extension. Supported if the 'SharedVoicemail'
            feature is enabled.
          schema:
            oneOf:
              - type: string
                default: Personal
                enum:
                  - Any
                  - Personal
                  - Shared
              - type: array
                items:
                  type: string
                  description: Internal identifier of an extension
        - name: ownerExtensionType
          in: query
          description: |
            Filters shared messages based on the owner extension type. Supported if "SharedVoicemail" or "CallQueueSmsRecipient"
            feature is enabled.
          schema:
            type: array
            items:
              $ref: "#/components/schemas/AllExtensionTypesEnum"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GetMessageSyncResponse"
      x-feature: ReadMessages
      x-availability: High
      x-throttling-group: Light
      x-app-permission: ReadMessages
      x-user-permission: ReadMessages
  "/restapi/v1.0/account/{accountId}/message-store-configuration":
    get:
      tags:
        - Message Store
      summary: Get Message Store Configuration
      description: Returns message store settings.
      operationId: readMessageStoreConfiguration
      parameters:
        - $ref: "#/components/parameters/AccountId"
      responses:
        "200":
          description: Message store configuration
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MessageStoreConfiguration"
      x-feature: AccountAdministration
      x-availability: Limited
      x-throttling-group: Light
      x-user-permission: AccountAdministration
      x-app-permission: EditAccounts
    put:
      tags:
        - Message Store
      summary: Update Message Store Configuration
      description: Updates message store settings.
      operationId: updateMessageStoreConfiguration
      parameters:
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        description: JSON body
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/MessageStoreConfiguration"
        required: true
      responses:
        "200":
          description: Updated message store configuration
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MessageStoreConfiguration"
      x-feature: AccountAdministration
      x-availability: Limited
      x-throttling-group: Light
      x-user-permission: AccountAdministration
      x-app-permission: EditAccounts
  "/restapi/v1.0/account/{accountId}/extension/{extensionId}/message-store/{messageId}/content/{attachmentId}":
    get:
      tags:
        - Message Store
      summary: Get Message Attachment Content
      description: |
        Returns media content of a message attachment.
        The content is typically an audio file (`audio/mpeg` or `audio/wav`) for voicemails,
        TIFF or PDF for faxes and image/audio/video for MMS.

        **This API must be called via media API entry point, e.g. https://media.ringcentral.com**
      operationId: readMessageContent
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
        - $ref: "#/components/parameters/MessageId"
        - $ref: "#/components/parameters/MessageAttachmentId"
        - $ref: "#/components/parameters/ContentDisposition"
        - $ref: "#/components/parameters/ContentDispositionFilename"
      responses:
        "200":
          description: Successful response
          content:
            audio/*:
              schema:
                type: string
                format: binary
            image/*:
              schema:
                type: string
                format: binary
            video/*:
              schema:
                type: string
                format: binary
            application/pdf:
              schema:
                type: string
                format: binary
        "404":
          $ref: "#/components/responses/NotFound"
      x-media-api: true
      x-availability: High
      x-throttling-group: Medium
      x-app-permission: ReadMessages
  "/restapi/v1.0/account/{accountId}/message-threads/messages":
    get:
      summary: List Messages
      description: |
        Returns a list of messages across one or more threads.
        All filters are applied as "AND" conditions.

        The records are sorted by `creationTime` in ascending order.
      operationId: mthListMessages
      tags:
        - Message Threads
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/MessageThreadStatusFilter"
        - $ref: "#/components/parameters/ThreadOwnerExtensionIdsFilter"
        - $ref: "#/components/parameters/MessageOrThreadAvailabilityFilter"
        - $ref: "#/components/parameters/ThreadMessageIdsFilter"
        - $ref: "#/components/parameters/ThreadIdsFilter"
        - $ref: "#/components/parameters/MessageThreadCreationTimeFrom"
        - $ref: "#/components/parameters/MessageThreadCreationTimeTo"
        - $ref: "#/components/parameters/PerPage"
        - $ref: "#/components/parameters/Page"
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ThreadMessageList"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
      x-request-max-body-size: 10m
      x-availability: High
      x-throttling-group: Medium
      x-app-permission: SMS
    post:
      summary: Create and Send New Message
      description: |
        Creates and sends a new message to one or more recipients.

        The message is automatically attached to the thread specified in the `threadId` parameter. If `threadId`
        is omitted, it is routed to the matching thread based on the `from` and `to` phone numbers;
        a new thread is created automatically when no matching thread exists.

        The endpoint accepts two request formats:
        - `application/json` - for text-only messages.
        - `multipart/form-data` - to send a message together with one or more binary attachments
          (for MMS / rich messages). Put the message fields in the `metadata` part and each file in
          an `attachments` part, as shown in the example below.

        Note: a suggested attachment filename is optional; when needed, provide it via the `filename`
        field in the `Content-Disposition` header.
      operationId: mthSendMessage
      tags:
        - Message Threads
      parameters:
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/NewThreadMessageRequest"
          multipart/form-data:
            schema:
              type: object
              required:
                - metadata
                - attachments
              properties:
                metadata:
                  $ref: "#/components/schemas/NewThreadMessageRequest"
                attachments:
                  type: array
                  minItems: 1
                  items:
                    $ref: "#/components/schemas/SmsBinaryAttachmentPart"
            encoding:
              metadata:
                contentType: application/json
                headers:
                  Content-Disposition:
                    schema:
                      type: string
                    example: form-data; name="metadata"
              attachments:
                contentType: binary/octet-stream
                headers:
                  Content-Disposition:
                    schema:
                      type: string
                    example: form-data; name="attachments"; filename="picture1.jpg"
      responses:
        "201":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ThreadMessageModel"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
      x-request-max-body-size: 10m
      x-availability: High
      x-throttling-group: Medium
      x-app-permission: SMS
    delete:
      summary: Delete Messages
      description: |
        Deletes thread message(s).
      operationId: mthDeleteMessages
      tags:
        - Message Threads
      parameters:
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ThreadMessagesDeleteRequest"
      responses:
        "204":
          description: Successful response
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
      x-request-max-body-size: 10m
      x-availability: High
      x-throttling-group: Medium
      x-app-permission: SMS
  "/restapi/v1.0/account/{accountId}/message-threads/notes":
    get:
      summary: List Notes
      description: |
        Returns a list of notes from one or more threads.
        All filters are applied as "AND" conditions.

        The records are sorted by `creationTime` in ascending order.
      operationId: mthListNotes
      tags:
        - Message Threads
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ThreadOwnerExtensionIdsFilter"
        - $ref: "#/components/parameters/MessageOrThreadAvailabilityFilter"
        - name: threadIds
          in: query
          description: List of thread IDs to filter the list of results
          required: false
          explode: true
          schema:
            type: array
            minItems: 1
            maxItems: 10
            uniqueItems: true
            items:
              type: string
        - name: noteIds
          in: query
          description: List of note IDs to filter the list of results
          required: false
          explode: true
          schema:
            type: array
            uniqueItems: true
            minItems: 1
            maxItems: 10
            items:
              type: string
        - $ref: "#/components/parameters/PerPage"
        - $ref: "#/components/parameters/Page"
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ThreadNoteList"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
      x-availability: High
      x-throttling-group: Medium
      x-app-permission: SMS
    post:
      summary: Create New Note
      description: |
        Creates a new note in the thread.

        The thread must be in `Open` status and the current user must be in the list of thread monitors
        for this operation to succeed.
      operationId: mthCreateNote
      tags:
        - Message Threads
      parameters:
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ThreadNoteCreateRequest"
      responses:
        "201":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ThreadNoteModel"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
      x-availability: High
      x-throttling-group: Medium
      x-app-permission: SMS
    delete:
      summary: Delete Notes
      description: |
        Deletes thread note(s).

        The corresponding threads must be in `Open` status and the calling user must be the notes' author
        for this operation to succeed.
      operationId: mthDeleteNotes
      tags:
        - Message Threads
      parameters:
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ThreadNotesDeleteRequest"
      responses:
        "204":
          description: Successful response
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
      x-availability: High
      x-throttling-group: Medium
      x-app-permission: SMS
  "/restapi/v1.0/account/{accountId}/message-threads/notes/{noteId}":
    patch:
      summary: Update Note
      description: |
        Updates the text of a note.

        The thread must be in `Open` status and the calling user must be the note's author
        for this operation to succeed.
      operationId: mthUpdateNote
      tags:
        - Message Threads
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - name: noteId
          in: path
          required: true
          description: |
            Internal identifier of a note
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ThreadNoteUpdateRequest"
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ThreadNoteModel"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
      x-availability: High
      x-throttling-group: Medium
      x-app-permission: SMS
  "/restapi/v1.0/account/{accountId}/message-threads/entries/sync":
    get:
      summary: Sync Thread Entries
      description: |
        Synchronizes the list of thread entries. The response may contain:
        - added or updated messages (full payload);
        - added or updated notes (full payload);
        - deleted message entries (limited attributes, `availability` is set to `Deleted`);
        - deleted note entries (limited attributes, `availability` is set to `Deleted`);
        - system entries (`action` describes the action performed).

        In `FSync` model:
        - only `Alive` messages and notes are returned;
        - only messages and notes from `Open` threads are returned (unless explicit `threadIds` are requested).

        The records are sorted by `lastModifiedTime` in descending order.
      operationId: mthSyncEntries
      tags:
        - Message Threads
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - name: scope
          in: query
          required: false
          description: |
            Scope of synchronization (`syncType=FSync` only):

            - `Accessible`: returns entries in threads monitored by the current user;
            - `Unassigned`: returns entries in accessible unassigned threads;
            - `AssignedToMe`: returns entries in threads that are assigned to the current user;
            - `AssignedToMeAndUnassigned`: returns entries in threads that are assigned to the current user or unassigned;
            - `Explicit`: returns entries in threads specified through the `threadIds` parameter.
          schema:
            type: string
            enum:
              - Accessible
              - Unassigned
              - AssignedToMe
              - AssignedToMeAndUnassigned
              - Explicit
            default: AssignedToMe
        - name: threadIds
          in: query
          required: false
          explode: true
          description: |
            List of thread IDs to synchronize (`Explicit` scope only)
          schema:
            type: array
            minItems: 1
            maxItems: 10
            uniqueItems: true
            items:
              type: string
        - $ref: "#/components/parameters/SyncType"
        - $ref: "#/components/parameters/SyncToken"
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ThreadEntriesSyncList"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
      x-availability: High
      x-throttling-group: Medium
      x-app-permission: SMS
  "/restapi/v1.0/account/{accountId}/message-threads/sync":
    get:
      summary: Sync Message Threads
      description: |
        Synchronizes the list of message threads.
        Returns the thread records that the current user can monitor
        (assigned to current user, assigned to other users or unassigned).

        In `FSync` mode, only `Open` and `Alive`threads are returned.
        The records are sorted by `lastModifiedTime` in descending order.
      operationId: mthSyncThreads
      tags:
        - Message Threads
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/SyncType"
        - $ref: "#/components/parameters/SyncToken"
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ThreadSyncList"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
      x-availability: High
      x-throttling-group: Medium
      x-app-permission: SMS
  "/restapi/v1.0/account/{accountId}/message-threads":
    get:
      summary: List Message Threads
      description: |
        Returns a paginated list of message threads for the specified account according to the specified criteria.

        Different filters are combined with logical "AND", different values for the same filter (if supported)
        are combined with logical "OR".

        Only threads that accessible for a current authorized user are returned.
        The records are sorted by `creationTime` in ascending order.
      operationId: mthListThreads
      tags:
        - Message Threads
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/MessageThreadStatusFilter"
        - $ref: "#/components/parameters/ThreadOwnerExtensionIdsFilter"
        - $ref: "#/components/parameters/MessageThreadCreationTimeFrom"
        - $ref: "#/components/parameters/MessageThreadCreationTimeTo"
        - name: ownerPhoneNumber
          in: query
          required: false
          description: |
            Owner party phone number in E.164 format.
          schema:
            $ref: "#/components/schemas/PhoneNumberE164"
        - name: guestPhoneNumber
          in: query
          required: false
          description: |
            Guest party phone number in E.164 format.
          schema:
            $ref: "#/components/schemas/PhoneNumberE164"
        - $ref: "#/components/parameters/MessageOrThreadAvailabilityFilter"
        - $ref: "#/components/parameters/PerPage"
        - $ref: "#/components/parameters/Page"
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MessageThreadList"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
      x-availability: High
      x-throttling-group: Medium
      x-app-permission: SMS
  "/restapi/v1.0/account/{accountId}/message-threads/{threadId}":
    get:
      summary: Get Message Thread
      description: |
        Returns a message thread by ID.

        API returns a 403 error if the current user does not have access to the given thread.
      operationId: mthGetThread
      tags:
        - Message Threads
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/MessageThreadId"
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MessageThread"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
      x-availability: High
      x-throttling-group: Medium
      x-app-permission: SMS
    delete:
      summary: Delete Message Thread
      description: |
        Deletes a message thread by IDs.

        Technically this operation just sets thread's `availability` to `Deleted`.
        API returns a 403 error if the current user does not have access to the given thread.

        Once the thread is deleted its `assignee` attribute is cleared automatically.
      operationId: mthDeleteThread
      tags:
        - Message Threads
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/MessageThreadId"
      responses:
        "204":
          description: Successful response
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
      x-availability: High
      x-throttling-group: Medium
      x-app-permission: SMS
  "/restapi/v1.0/account/{accountId}/message-threads/{threadId}/resolve":
    post:
      summary: Resolve Message Thread
      description: |
        Resolves a message thread (sets the status to `Resolved`).
        The current status of the thread must be `Open` for this operation to succeed.
        The authorized user must be in the list of thread monitors, otherwise the API returns a 403 error.

        Once the thread is resolved its `assignee` attribute is cleared automatically.
      operationId: mthResolveThread
      tags:
        - Message Threads
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/MessageThreadId"
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MessageThread"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
      x-availability: High
      x-throttling-group: Medium
      x-app-permission: SMS
  "/restapi/v1.0/account/{accountId}/message-threads/{threadId}/assign":
    post:
      summary: Assign Message Thread
      description: |
        Assigns, unassigns, or reassigns the thread.
        The authorized user must be in the list of thread monitors, otherwise the API returns a 403 error.
      operationId: mthAssignThread
      tags:
        - Message Threads
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/MessageThreadId"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AssignMessageThreadRequest"
            examples:
              AssignThread:
                description: Assign or reassign the thread
                value:
                  assignee:
                    extensionId: "1234567890"
              UnassignThread:
                description: Unassign the thread
                value:
                  assignee: null
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MessageThread"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
      x-availability: High
      x-throttling-group: Medium
      x-app-permission: SMS
  "/restapi/v1.0/account/{accountId}/message-threads/messages/{messageId}/content/{attachmentId}":
    get:
      tags:
        - Message Threads
      summary: Get Rich Message Attachment
      description: |
        Returns media content of a rich message attachment.

        See [Sending MMS](https://developers.ringcentral.com/guide/messaging/sms/sending-images) for the list of supported media types.

        **This API must be called via media API entry point, e.g. https://media.ringcentral.com**
      operationId: mthReadMessageContent
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - name: messageId
          in: path
          required: true
          description: Message ID
          schema:
            type: string
        - name: attachmentId
          in: path
          required: true
          description: Internal identifier of a message attachment
          schema:
            type: string
        - $ref: "#/components/parameters/ContentDisposition"
        - $ref: "#/components/parameters/ContentDispositionFilename"
      responses:
        "200":
          description: Successful response
          content:
            audio/*:
              schema:
                type: string
                format: binary
            image/*:
              schema:
                type: string
                format: binary
            video/*:
              schema:
                type: string
                format: binary
            application/pdf:
              schema:
                type: string
                format: binary
        "404":
          $ref: "#/components/responses/NotFound"
      x-media-api: true
      x-availability: High
      x-throttling-group: Medium
      x-app-permission: SMS
  /restapi:
    get:
      tags:
        - API Info
      summary: Get API Versions
      description: Returns current API version(s) and server info.
      operationId: readAPIVersions
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiVersionsList"
      x-availability: High
      x-throttling-group: NoThrottling
  "/restapi/{apiVersion}":
    get:
      tags:
        - API Info
      summary: Get Version Info
      description: Returns current API version info by apiVersion.
      operationId: readAPIVersion
      parameters:
        - name: apiVersion
          in: path
          description: API version to be requested, for example 'v1.0'
          required: true
          schema:
            type: string
      responses:
        "200":
          description: API Version
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiVersionInfo"
      x-availability: High
      x-throttling-group: NoThrottling
  "/restapi/v1.0/account/{accountId}/extension/{extensionId}/ring-out":
    post:
      tags:
        - RingOut
      summary: Make RingOut Call
      description: Makes a 2-legged RingOut call.
      operationId: createRingOutCall
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
      requestBody:
        description: JSON body
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/MakeRingOutRequest"
        required: true
      responses:
        "200":
          description: Ring out call information
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GetRingOutStatusResponse"
      x-availability: High
      x-throttling-group: Heavy
      x-app-permission: RingOut
  "/restapi/v1.0/account/{accountId}/extension/{extensionId}/ring-out/{ringoutId}":
    get:
      tags:
        - RingOut
      summary: Get RingOut Call Status
      description: Returns a status of a 2-legged RingOut call.
      operationId: readRingOutCallStatus
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
        - name: ringoutId
          in: path
          description: Internal identifier of a RingOut call
          required: true
          schema:
            type: string
      responses:
        "200":
          description: RingOut call status information
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GetRingOutStatusResponse"
      x-availability: High
      x-throttling-group: Light
      x-app-permission: RingOut
    delete:
      tags:
        - RingOut
      summary: Cancel RingOut Call
      description: Cancels a 2-legged RingOut call.
      operationId: deleteRingOutCall
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
        - name: ringoutId
          in: path
          description: Internal identifier of a RingOut call
          required: true
          schema:
            type: string
      responses:
        "204":
          description: No content
      x-availability: High
      x-throttling-group: Heavy
      x-app-permission: RingOut
  "/restapi/v1.0/account/{accountId}/ms-teams/direct-routing/users":
    get:
      tags:
        - MS Teams Direct Routing
      operationId: listTeamsUsers
      summary: List Direct Routing Users
      description: |
        Returns the list of Microsoft Teams Direct Routing users and their connection status with the integration,
        filtered by provided RingCentral extension IDs (up to 25 users at a time).

        Before using this API, the account-level setup for Direct Routing must be completed as described in
        [this guide](https://support.ringcentral.com/article-v2/Enabling-direct-routing-in-RingCentral-and-Microsoft-Teams.html?brand=RingCentral&product=RingEX&language=en_US).
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionIds"
      responses:
        "200":
          description: List of MS Teams Direct Routing User Mappings
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MsTeamsUserListResponse"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "429":
          $ref: "#/components/responses/TooManyRequests"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-feature: ReadTeamsDirectRouting
      x-throttling-group: Medium
      x-app-permission: ReadAccounts
    post:
      tags:
        - MS Teams Direct Routing
      operationId: connectTeamsUsers
      summary: Connect Direct Routing Users
      description: |
        Connects Microsoft Teams Direct Routing users in bulk asynchronously (up to 25 users at a time).

        Before using this API, the account-level setup for Direct Routing must be completed as described in
        [this guide](https://support.ringcentral.com/article-v2/Enabling-direct-routing-in-RingCentral-and-Microsoft-Teams.html?brand=RingCentral&product=RingEX&language=en_US).
      parameters:
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ConnectTeamsUsersRequest"
      responses:
        "202":
          description: OK. The MS Teams Direct Routing Users have been successfully created.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MsTeamsUserListResponse"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "429":
          $ref: "#/components/responses/TooManyRequests"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-feature: EditTeamsDirectRouting
      x-throttling-group: Medium
      x-app-permission: EditAccounts
    delete:
      tags:
        - MS Teams Direct Routing
      operationId: disconnectTeamsUsers
      summary: Disconnect Direct Routing Users
      description: |
        Disconnects Microsoft Teams Direct Routing users in bulk asynchronously  (up to 25 users at a time).

        Before using this API, the account-level setup for Direct Routing must be completed as described in
        [this guide](https://support.ringcentral.com/article-v2/Enabling-direct-routing-in-RingCentral-and-Microsoft-Teams.html?brand=RingCentral&product=RingEX&language=en_US).
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionIds"
      responses:
        "202":
          description: Accepted. The deletion request has been accepted and is being processed.
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "429":
          $ref: "#/components/responses/TooManyRequests"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-feature: EditTeamsDirectRouting
      x-throttling-group: Medium
      x-app-permission: EditAccounts
  "/restapi/v1.0/account/{accountId}/extension/{extensionId}/presence":
    get:
      tags:
        - Presence
      summary: Get User Presence Status
      description: |
        Returns the presence status of an extension or several extensions by their ID(s). The `presenceStatus` is returned as Offline
        (the parameters `telephonyStatus`, `message`, `userStatus` and `dndStatus` are not returned at all) for the following extension types:
        Department/Announcement Only/Take Messages Only (Voicemail)/Fax User/Paging Only Group/Shared Lines Group/IVR Menu/Application Extension/Park Location.
        If the user requests his/her own presence status, the response contains actual presence status even if the status publication is turned off.
        [Bulk request syntax](https://developers.ringcentral.com/guide/basics/batch-requests) is supported. For bulk requests the number of extensions
        in one request is limited to 30. If more extensions are included in the request, the error code 400 Bad Request is returned with the logical error
        code InvalidMultipartRequest and the corresponding message Extension Presence Info multipart request is limited to 30 extensions.
      operationId: readUserPresenceStatus
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
        - name: detailedTelephonyState
          in: query
          description: Specifies whether to return a detailed telephony state or not
          schema:
            type: boolean
        - name: sipData
          in: query
          description: Specifies whether to return SIP data or not
          schema:
            type: boolean
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PresenceInfoResponse"
      x-request-max-body-size: 100m
      x-throttling-group: Light
      x-feature: ReadPresenceStatus
      x-app-permission: ReadPresence
      x-user-permission: ReadPresenceStatus
      x-notifications:
        - $ref: "#/components/schemas/ExtensionPresenceEvent"
        - $ref: "#/components/schemas/DetailedExtensionPresenceEvent"
        - $ref: "#/components/schemas/DetailedExtensionPresenceWithSIPEvent"
    put:
      tags:
        - Presence
      summary: Update User Presence Status
      description: |
        Updates user-defined extension presence status, status message
        and DnD status by extension ID. Supported for regular User extensions only.
        The extension types listed do not support presence status: Department, Announcement
        Only, Take Messages Only (Voicemail), Fax User, Paging Only Group, Shared
        Lines Group, IVR Menu, Application Extension.
      operationId: updateUserPresenceStatus
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PresenceInfoRequest"
        required: false
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PresenceInfoResponse"
      x-request-max-body-size: 100m
      x-feature: EditPresenceStatus
      x-throttling-group: Medium
      x-app-permission: EditPresence
      x-notifications:
        - $ref: "#/components/schemas/IncomingCallEvent"
        - $ref: "#/components/schemas/MissedCallEvent"
  "/restapi/v1.0/account/{accountId}/presence":
    get:
      tags:
        - Presence
      summary: Get Account Presence
      description: |
        Returns the presence status of all extensions of an account.

        Note: for the extension types listed below, `presenceStatus` is always returned
        as `Offline`, and the `telephonyStatus`, `message`, `userStatus`, and `dndStatus`
        attributes are not returned at all:

        - Department
        - Announcement Only
        - Voicemail (Take Messages Only)
        - Fax User
        - Paging Only Group
        - Shared Lines Group
        - IVR Menu
        - Application Extension
      operationId: readAccountPresence
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - name: detailedTelephonyState
          in: query
          description: Whether to return detailed telephony state
          schema:
            type: boolean
        - name: sipData
          in: query
          description: Whether to return SIP data
          schema:
            type: boolean
        - name: page
          in: query
          description: Page number for account presence information
          schema:
            type: integer
            format: int32
        - name: perPage
          in: query
          description: Number for account presence information items per page
          schema:
            type: integer
            format: int32
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AccountPresenceInfo"
      x-request-max-body-size: 100m
      x-throttling-group: Heavy
      x-feature: ReadPresenceStatus
      x-app-permission: ReadPresence
      x-user-permission: ReadPresenceStatus
      x-notifications:
        - $ref: "#/components/schemas/AccountPresenceEvent"
  "/restapi/v1.0/account/{accountId}/call-queues/{groupId}/presence":
    get:
      tags:
        - Presence
      summary: Get Call Queue Presence
      description: Returns presence status of the call queue members.
      operationId: readCallQueuePresence
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - name: groupId
          in: path
          description: Internal identifier of a call queue extension
          required: true
          schema:
            type: string
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CallQueuePresence"
      x-request-max-body-size: 100m
      x-feature: ReadPresenceStatus
      x-throttling-group: Light
      x-app-permission: ReadPresence
    put:
      tags:
        - Presence
      summary: Update Call Queue Presence
      description: Updates presence status of the call queue members in the specified queue.
      operationId: updateCallQueuePresence
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - name: groupId
          in: path
          description: Internal identifier of a call queue extension
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CallQueueUpdatePresence"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CallQueuePresence"
      x-request-max-body-size: 100m
      x-feature: EditPresenceStatus
      x-throttling-group: Medium
      x-app-permission: EditPresence
      x-notifications:
        - $ref: "#/components/schemas/CallQueuePresenceEvent"
  "/restapi/v1.0/account/{accountId}/extension/{extensionId}/call-queue-presence":
    get:
      tags:
        - Presence
      summary: Get Agent’s Call Queue Presence
      description: Returns a list of agent's call queues with the agent presence status (per queue).
      operationId: readExtensionCallQueuePresence
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
        - name: editableMemberStatus
          in: query
          description: Filtering by the flag 'Allow members to change their Queue Status'. If 'true' only queues where user can change his availability status are returned
          schema:
            type: boolean
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ExtensionCallQueuePresenceList"
      x-request-max-body-size: 100m
      x-feature: ReadPresenceStatus
      x-throttling-group: Light
      x-app-permission: ReadPresence
    put:
      tags:
        - Presence
      summary: Update Call Queue Presence
      description: Updates availability of the agent for the call queues.
      operationId: updateExtensionCallQueuePresence
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ExtensionCallQueueUpdatePresenceList"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ExtensionCallQueuePresenceList"
      x-request-max-body-size: 100m
      x-feature: EditPresenceStatus
      x-throttling-group: Medium
      x-app-permission: EditPresence
      x-notifications:
        - $ref: "#/components/schemas/CallQueuePresenceEvent"
  /restapi/v1.0/subscription:
    get:
      tags:
        - Subscriptions
      summary: List Subscriptions
      description: |
        Returns a list of subscriptions created by the user for the current authorized client application.
      operationId: listSubscriptions
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SubscriptionListResource"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-request-max-body-size: 100m
      x-availability: High
      x-throttling-group: Light
    post:
      tags:
        - Subscriptions
      summary: Create Subscription
      description: |
        This API allows client applications to register a new subscription so that it
        can be notified of events when they occur on the platform.

        A subscription relates to a set of events that a client application would like
        to be informed of and the delivery channel by which they will be notified of
        those events. How subscriptions are established depends upon the notification
        channel the client application would like to use to receive the event
        notification. For example, to create a webhook a developer would create a
        subscription via a REST API call, while specifying a list of events or "event
        filters" to be notified of, a transport type of `WebHook`, and the address or
        URL to which they would like the webhook delivered.

        However, developers wishing to subscribe to a set of events via a WebSocket
        channel, would first connect to the WebSocket gateway, and then issue their
        subscription request over the WebSocket itself, as opposed to making a REST
        API call to this endpoint.

        While the protocol for establishing a subscription may vary depending upon
        the delivery channel for that subscription, the schemas used for representing
        a subscription are the same across all delivery modes.

        Subscriptions are currently limited to 30 subscriptions per user/extension (for particular application).

        RingCentral currently supports the following delivery modes for event subscriptions:

        * [WebHook](https://developers.ringcentral.com/guide/notifications/webhooks/quick-start) - to receive event notifications as an HTTP POST to a given URL
        * [WebSocket](https://developers.ringcentral.com/guide/notifications/websockets/quick-start) - to receive real-time events over a persistent WebSocket connection
      operationId: createSubscription
      requestBody:
        description: JSON body
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateSubscriptionRequest"
            examples:
              CreateSubscriptionRequestWebhook:
                $ref: "#/components/examples/CreateSubscriptionRequestWebhook"
              CreateSubscriptionReminderSet:
                $ref: "#/components/examples/CreateSubscriptionReminderSet"
        required: true
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SubscriptionInfo"
              examples:
                CreateSubscriptionResponseWebhook:
                  $ref: "#/components/examples/CreateSubscriptionResponseWebhook"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-request-max-body-size: 100m
      x-availability: High
      x-throttling-group: Medium
  "/restapi/v1.0/subscription/{subscriptionId}":
    get:
      tags:
        - Subscriptions
      summary: Get Subscription
      description: Returns the existing subscription by ID.
      operationId: readSubscription
      parameters:
        - $ref: "#/components/parameters/SubscriptionId"
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SubscriptionInfo"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-request-max-body-size: 100m
      x-availability: High
      x-throttling-group: Light
    put:
      tags:
        - Subscriptions
      summary: Update Subscription
      description: |
        Updates the existing subscription. The client application can extend or narrow
        the list of events for which it receives notifications within the current subscription.
        If event filters are specified, calling this method modifies them for the
        existing subscription. The method also allows one to set an expiration time for the
        subscription itself.

        If parameters other than `events` and `expiresIn` are specified in the request they will be ignored.
        If the request body is empty then the specified subscription will be renewed without any
        event filter modifications and using the default expiration time.

        If the request is sent with empty body, it just renews a subscription
        (so it is an equivalent of the `POST /restapi/v1.0/subscription/{subscriptionId}/renew`).

        Please note that `WebSocket` subscriptions cannot be updated via HTTP interface.
      operationId: updateSubscription
      parameters:
        - $ref: "#/components/parameters/SubscriptionId"
      requestBody:
        description: JSON body
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateSubscriptionRequest"
        required: false
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SubscriptionInfo"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-request-max-body-size: 100m
      x-availability: High
      x-throttling-group: Medium
    delete:
      tags:
        - Subscriptions
      summary: Cancel Subscription
      description: Cancels the existing subscription.
      operationId: deleteSubscription
      parameters:
        - $ref: "#/components/parameters/SubscriptionId"
      responses:
        "204":
          description: No Content
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-request-max-body-size: 100m
      x-availability: High
      x-throttling-group: Medium
  "/restapi/v1.0/subscription/{subscriptionId}/renew":
    post:
      tags:
        - Subscriptions
      summary: Renew Subscription
      description: |
        Renews the existing subscription (this request comes with empty body).

        Please note that `WebSocket` subscriptions are renewed automatically while websocket session is alive.
      operationId: renewSubscription
      parameters:
        - $ref: "#/components/parameters/SubscriptionId"
      responses:
        "200":
          description: Subscription renewed successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SubscriptionInfo"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-request-max-body-size: 100m
      x-availability: High
      x-throttling-group: Light
  /webinar/notifications/v1/subscriptions:
    get:
      tags:
        - Webinar Subscriptions
      summary: List Webinar Subscriptions
      description: Returns a list of webinar subscriptions created by the user for the current authorized client application.
      operationId: rcwN11sListSubscriptions
      responses:
        "200":
          description: List of Subscriptions
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SubscriptionListResource"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-request-max-body-size: 100m
      x-availability: High
      x-throttling-group: Light
    post:
      tags:
        - Webinar Subscriptions
      summary: Create Webinar Subscription
      description: Creates a new webinar subscription for the current authorized user / client application.
      operationId: rcwN11sCreateSubscription
      requestBody:
        description: JSON body
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateWebhookSubscriptionRequest"
        required: true
      responses:
        "201":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SubscriptionInfo"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-request-max-body-size: 100m
      x-availability: High
      x-throttling-group: Medium
  "/webinar/notifications/v1/subscriptions/{subscriptionId}":
    get:
      tags:
        - Webinar Subscriptions
      summary: Get Webinar Subscription
      description: Returns the webinar subscription by ID
      operationId: rcwN11sGetSubscription
      parameters:
        - $ref: "#/components/parameters/SubscriptionId"
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SubscriptionInfo"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-request-max-body-size: 100m
      x-availability: High
      x-throttling-group: Light
    put:
      tags:
        - Webinar Subscriptions
      summary: Update Webinar Subscription
      description: |
        Updates the existing subscription. The client application can extend/narrow
        the list of events for which it receives notifications within this subscription.
        If event filters are specified, calling this method modifies them for the
        existing subscription. The method also allows setting the subscription expiration time.
        If other than `events` and `expiresIn` parameters are passed in the request they will be ignored.
        If the request body is empty then the specified subscription will be just renewed without any
        event filter modifications and with default expiration time.
      operationId: rcwN11sUpdateSubscription
      parameters:
        - $ref: "#/components/parameters/SubscriptionId"
      requestBody:
        description: JSON body
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateSubscriptionRequest"
        required: true
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SubscriptionInfo"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-request-max-body-size: 100m
      x-availability: High
      x-throttling-group: Medium
    delete:
      tags:
        - Webinar Subscriptions
      summary: Cancel Webinar Subscription
      description: Cancels the existing webinar subscription.
      operationId: rcwN11sDeleteSubscription
      parameters:
        - $ref: "#/components/parameters/SubscriptionId"
      responses:
        "204":
          description: No Content
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-request-max-body-size: 100m
      x-availability: High
      x-throttling-group: Medium
  "/webinar/notifications/v1/subscriptions/{subscriptionId}/renew":
    post:
      tags:
        - Webinar Subscriptions
      summary: Renew Webinar Subscription
      description: Renews the existing webinar subscription.
      operationId: rcwN11sRenewSubscription
      parameters:
        - $ref: "#/components/parameters/SubscriptionId"
      responses:
        "200":
          description: Subscription renewed successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SubscriptionInfo"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-request-max-body-size: 100m
      x-availability: High
      x-throttling-group: Light
  /restapi/v2/number-parser/parse:
    post:
      tags:
        - Phone Numbers
      summary: Parse Phone Number(s) V2
      description: Parses, formats, and validates phone numbers provided as a list of strings.
      operationId: parsePhoneNumberV2
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ParsePhoneNumbersRequest"
            examples:
              Example 1:
                $ref: "#/components/examples/RequestExample1"
              Example 2:
                $ref: "#/components/examples/RequestExample2"
        required: true
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ParsePhoneNumberResponseV2"
              examples:
                Example 1:
                  $ref: "#/components/examples/ResponseExample1Success"
                Example 2:
                  $ref: "#/components/examples/ResponseExample2Success"
                Example 3:
                  $ref: "#/components/examples/ResponseExample3Success"
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ClientErrorsResponse"
              examples:
                CMN-100:
                  $ref: "#/components/examples/ResponseExampleCMN-100"
                CMN-101:
                  $ref: "#/components/examples/ResponseExampleCMN-101"
                CMN-103:
                  $ref: "#/components/examples/ResponseExampleCMN-103"
                CMN-151:
                  $ref: "#/components/examples/ResponseExampleCMN-151"
                CMN-409:
                  $ref: "#/components/examples/ResponseExampleCMN-409"
                CMN-411:
                  $ref: "#/components/examples/ResponseExampleCMN-411"
        "500":
          description: Service Internal Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ServerErrorsResponse"
              examples:
                NPC-001:
                  $ref: "#/components/examples/ResponseExampleNPC-001"
        "503":
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ServerErrorsResponse"
              examples:
                NPC-000:
                  $ref: "#/components/examples/ResponseExampleNPC-000"
      x-availability: High
      x-throttling-group: Light
  /restapi/v1.0/number-parser/parse:
    post:
      tags:
        - Phone Numbers
      summary: Parse Phone Number(s)
      description: |
        Returns one or more parsed and/or formatted phone numbers that are passed as strings.

        DEPRECATED: Use `POST /restapi/v2/number-parser/parse` instead.
      operationId: parsePhoneNumber
      deprecated: true
      parameters:
        - name: homeCountry
          in: query
          required: false
          description: |
            ISO 3166 alpha2 code of the home country to be used if it is impossible to determine country from the number itself.
            By default, this parameter is preset to the current user's home country or brand country if the user is undefined
          schema:
            $ref: "#/components/schemas/CountryIsoCode"
        - name: nationalAsPriority
          in: query
          required: false
          description: |
            The default value is `false`. If `true`, the numbers that are
            closer to the home country are given higher priority
          schema:
            type: boolean
            default: false
      requestBody:
        description: Phone number list to parse
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ParsePhoneNumberRequest"
        required: true
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ParsePhoneNumberResponse"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-availability: High
      x-throttling-group: Light
  "/rcvideo/v1/history/account/{accountId}/meetings":
    get:
      tags:
        - Meetings History
      summary: List Account Video Meetings
      description: |
        Returns the list of completed meetings owned by all users of the account.
      operationId: listAccountMeetings
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/PageToken"
        - $ref: "#/components/parameters/MeetingsPerPage"
        - $ref: "#/components/parameters/MeetingStartFrom"
        - $ref: "#/components/parameters/MeetingStartTo"
        - $ref: "#/components/parameters/MeetingOrderBy"
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AdminAccessMeetings"
        "403":
          $ref: "#/components/responses/RcvAccessForbidden"
        "404":
          $ref: "#/components/responses/RcvNotFound"
        "500":
          $ref: "#/components/responses/RcvInternalError"
      x-throttling-group: Light
      x-app-permission: Video
  "/rcvideo/v1/account/{accountId}/recordings":
    get:
      tags:
        - Meeting Recordings
      summary: List Account Recordings
      description: |
        Returns the list of meeting recordings owned by all users of the account.
      operationId: getAccountRecordings
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/PageToken"
        - $ref: "#/components/parameters/RcvPerPage"
      responses:
        "200":
          description: Ok
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CloudRecordings"
        "403":
          $ref: "#/components/responses/RcvAccessForbidden"
        "404":
          $ref: "#/components/responses/RcvNotFound"
        "500":
          $ref: "#/components/responses/RcvInternalError"
      x-throttling-group: Light
      x-app-permission: Video
  "/rcvideo/v1/account/{accountId}/extension/{extensionId}/recordings":
    get:
      tags:
        - Meeting Recordings
      summary: List User Recordings
      description: |
        Returns all recordings owned by a specific extension.
      operationId: getExtensionRecordings
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
        - $ref: "#/components/parameters/PageToken"
        - $ref: "#/components/parameters/RcvPerPage"
      responses:
        "200":
          description: Ok
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CloudRecordings"
        "403":
          $ref: "#/components/responses/RcvAccessForbidden"
        "404":
          $ref: "#/components/responses/RcvNotFound"
        "500":
          $ref: "#/components/responses/RcvInternalError"
      x-throttling-group: Light
      x-app-permission: Video
  /rcvideo/v1/history/meetings:
    get:
      tags:
        - Meetings History
      summary: List Video Meetings
      description: Returns the list of user meetings.
      operationId: listVideoMeetings
      parameters:
        - name: text
          in: query
          description: Search text
          schema:
            type: string
        - $ref: "#/components/parameters/PageToken"
        - $ref: "#/components/parameters/RcvPerPage"
        - name: type
          in: query
          description: |
            Specifies types meeting to be returned. Possible values:
              - <empty> (not passed) - return only the meetings where the requesting user is the participant OR host OR deputy OR watcher;
              - `All`- return `Alive` meetings where the requesting user is the host OR deputy OR watcher;
              - `My`- return `Alive` meetings where the requesting user is the host OR deputy;
              - `Shared` - return `Alive` meetings where the requesting user is the watcher AND not host;
              - `Deleted` - return `Deleted` meetings where the requesting user is the host OR deputy.
          schema:
            type: string
            enum:
              - All
              - My
              - Deleted
              - Shared
          deprecated: true
        - name: materials
          in: query
          description: |
            This parameter filters meetings by available materials. It accepts the following values:
              Recordings    - Returns meetings with a recording.
              Notes         - Returns meetings with notes.
              (omitted)     - Returns all meetings, regardless of material type.
            This parameter cannot be used with the 'type' query parameter.
          schema:
            type: string
            enum:
              - Recordings
              - Notes
        - name: startTime
          in: query
          description: Unix timestamp in milliseconds (inclusive) indicates the start time of meetings which should be included in response
          schema:
            type: integer
            format: int64
        - name: endTime
          in: query
          description: Unix timestamp in milliseconds (inclusive) indicates the end time of meetings which should be included in response
          schema:
            type: integer
            format: int64
      responses:
        "200":
          description: Returns meetings list with pagination
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MeetingPage"
        "400":
          $ref: "#/components/responses/RcvBadRequest"
        "500":
          $ref: "#/components/responses/RcvInternalError"
        "504":
          $ref: "#/components/responses/RcvTimeout"
      x-throttling-group: Light
      x-app-permission: Video
  "/rcvideo/v1/history/meetings/{meetingId}":
    get:
      tags:
        - Meetings History
      summary: Get Video Meeting
      description: Returns a user meeting by ID.
      operationId: getVideoMeeting
      parameters:
        - $ref: "#/components/parameters/RcvMeetingId"
      responses:
        "200":
          description: Return meeting
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Meeting"
        "400":
          $ref: "#/components/responses/RcvBadRequest"
        "403":
          $ref: "#/components/responses/RcvAccessForbidden"
        "500":
          $ref: "#/components/responses/RcvInternalError"
        "504":
          $ref: "#/components/responses/RcvTimeout"
      x-throttling-group: Light
      x-app-permission: Video
  "/rcvideo/v1/accounts/{accountId}/extensions/{extensionId}/delegators":
    get:
      tags:
        - Delegation Management
      summary: List Delegators
      description: Returns the list of users who can delegate bridge/meeting creation to the given user.
      operationId: rcvListDelegators
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DelegatorsListResult"
        "403":
          description: The calling user must be the owner of the extension to get delegators
        "500":
          description: Internal server error
      x-throttling-group: Medium
      x-app-permission: Video
  "/rcvideo/v2/account/{accountId}/extension/{extensionId}/bridges":
    post:
      tags:
        - Bridge Management
      summary: Create Bridge
      description: |
        Creates a new bridge for the user specified by `accountId` and `extensionId` identifiers. The request body
        should contain JSON object which describes properties of the new bridge.
        The bridge can be created by the owner, a delegate or any user who has the **Super Admin** privilege.
      operationId: createBridge
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
      requestBody:
        description: JSON object that describes properties of the new bridge
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateBridgeRequest"
        required: false
      responses:
        "201":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BridgeResponse"
        "406":
          description: Not acceptable
        "409":
          description: Conflicting settings
        "500":
          description: Internal server error
      x-throttling-group: Heavy
      x-websocket: true
      x-app-permission: Video
  "/rcvideo/v2/bridges/{bridgeId}":
    get:
      tags:
        - Bridge Management
      summary: Get Bridge
      description: Returns a bridge by `bridgeId` identifier.
      operationId: getBridge
      parameters:
        - $ref: "#/components/parameters/RcvBridgeId"
        - $ref: "#/components/parameters/RcvBridgePassword"
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BridgeResponse"
        "404":
          description: Not found
        "500":
          description: Internal server error
      x-throttling-group: Medium
      x-websocket: true
      x-app-permission: Video
    patch:
      tags:
        - Bridge Management
      summary: Update Bridge
      description: |
        Updates a bridge by `bridgeId` identifier. The request body should contain JSON object with updating properties.
        Update can only be done by the bridge owner, an owner's delegate or any user who has the **Super Admin** privilege.
      operationId: updateBridge
      parameters:
        - $ref: "#/components/parameters/RcvBridgeId"
      requestBody:
        description: JSON object with updating properties. Only specified properties will be updated.
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateBridgeRequest"
        required: true
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BridgeResponse"
        "403":
          description: Access denied
        "404":
          description: Not found
        "406":
          description: Not acceptable
        "409":
          description: Conflicting settings
        "500":
          description: Internal server error
      x-throttling-group: Medium
      x-websocket: true
      x-app-permission: Video
    delete:
      tags:
        - Bridge Management
      summary: Delete Bridge
      description: |
        Deletes a bridge by `bridgeId` identifier.
        Deletion can only be done by the bridge owner, an owner's delegate or any user who has the **Super Admin** privilege.
      operationId: deleteBridge
      parameters:
        - $ref: "#/components/parameters/RcvBridgeId"
      responses:
        "204":
          description: Successful response
        "403":
          description: Access denied
        "404":
          description: Not found
        "500":
          description: Internal server error
      x-throttling-group: Medium
      x-websocket: true
      x-app-permission: Video
  "/rcvideo/v2/bridges/pin/web/{pin}":
    get:
      tags:
        - Bridge Management
      summary: Find Bridge by Web PIN
      description: |
        Finds a bridge by short identifier (Web PIN). Also it can be used to find a default bridge by the alias
        (personal meeting name).
      operationId: getBridgeByWebPin
      parameters:
        - $ref: "#/components/parameters/RcvBridgePin"
        - $ref: "#/components/parameters/RcvBridgePassword"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BridgeResponse"
        "404":
          description: Not found
        "500":
          description: Internal server error
      x-throttling-group: Medium
      x-websocket: true
      x-app-permission: Video
  "/rcvideo/v2/bridges/pin/pstn/{pin}":
    get:
      tags:
        - Bridge Management
      summary: Find Bridge by PSTN PIN
      description: Finds a bridge by Host or Participant PSTN PIN.
      operationId: getBridgeByPstnPin
      parameters:
        - $ref: "#/components/parameters/RcvBridgePin"
        - $ref: "#/components/parameters/RcvBridgePassword"
        - name: phoneNumber
          in: query
          required: false
          description: |
            Phone number to find a phone group for PSTN PIN. If it is not specified, then the default phone group will be used.
          schema:
            type: string
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BridgeResponse"
        "404":
          description: Not found
        "500":
          description: Internal server error
      x-throttling-group: Medium
      x-websocket: true
      x-app-permission: Video
  "/rcvideo/v2/account/{accountId}/extension/{extensionId}/bridges/default":
    get:
      tags:
        - Bridge Management
      summary: Get User's Default Bridge
      description: |
        Returns a default bridge (PMI) for the user specified by `accountId`
        and `extensionId` identifiers.
      operationId: getDefaultBridge
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/ExtensionId"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BridgeResponse"
        "404":
          description: Not found
        "500":
          description: Internal server error
      x-throttling-group: Medium
      x-websocket: true
      x-app-permission: Video
  /webinar/configuration/v1/webinars:
    post:
      tags:
        - Webinars and Sessions
      summary: Create Webinar
      description: |
        Creates a new webinar.

        If "host" parameter is NOT passed then the current authorized user will become a Host.
        If "host" parameter is passed then the caller must be a company administrator and have "WebinarSettings" permission.
        "host.linkedUser.accountId" must be the same as authorized user's account ID.

        The webinar settings which are not mandated at account level or are unlocked can be
        specified. All other settings are defaulted according to account policy.
      operationId: rcwConfigCreateWebinar
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/WebinarCreationRequest"
      responses:
        "201":
          description: Successful response, new Webinar is created
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/WcsWebinarResource"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "500":
          $ref: "#/components/responses/InternalError"
      x-throttling-group: Heavy
      x-app-permission: EditWebinars
    get:
      tags:
        - Webinars and Sessions
      summary: List User's Webinars
      description: |
        Returns the list of Webinars hosted by a current authorized user sorted by 'scheduledStartTime' or 'creationTime' in the ascending order.
      operationId: rcwConfigListWebinars
      parameters:
        - $ref: "#/components/parameters/WcsCreationTimeFrom"
        - $ref: "#/components/parameters/PerPage"
        - $ref: "#/components/parameters/PageToken"
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/WebinarListResource"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "500":
          $ref: "#/components/responses/InternalError"
      x-throttling-group: Heavy
      x-app-permission: ReadWebinars
  "/webinar/configuration/v1/webinars/{webinarId}":
    parameters:
      - $ref: "#/components/parameters/RcwWebinarId"
    get:
      tags:
        - Webinars and Sessions
      summary: Get Webinar
      description: |
        Returns a Webinar information by ID.
        Some webinar settings are returned basing on webinar-level overrides, other - from default settings defined at account level.
      operationId: rcwConfigGetWebinar
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/WcsWebinarResource"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
      x-throttling-group: Heavy
      x-app-permission: ReadWebinars
    patch:
      tags:
        - Webinars and Sessions
      summary: Update Webinar
      description: |
        Updates a Webinar. The payload may contain just changed fields of a Webinar resource (it is a partial update):
        - host cannot be changed, and host user information cannot be updated;
        - only the settings which are not mandated at account level or are unlocked can be
        changed;
        - in order to reset a webinar password it should be passed as an empty string;
        - "registrationStatus" cannot be changed.
      operationId: rcwConfigUpdateWebinar
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/WebinarBaseModel"
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/WcsWebinarResource"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
      x-throttling-group: Heavy
      x-app-permission: EditWebinars
    delete:
      tags:
        - Webinars and Sessions
      summary: Delete Webinar
      description: |
        Deletes a Webinar by ID. All child objects (Sessions, Invitees) will be also deleted.
        It is disallowed to delete a Webinar which has at least one Session in 'Active' or 'Finished' state.
      operationId: rcwConfigDeleteWebinar
      responses:
        "204":
          description: The Webinar was successfully deleted
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
      x-throttling-group: Heavy
      x-app-permission: EditWebinars
  /webinar/configuration/v1/sessions:
    get:
      tags:
        - Webinars and Sessions
      summary: List Sessions across Multiple Webinars
      description: |
        Returns the list of Webinar Sessions hosted by a current authorized user sorted by
        'scheduledStartTime' or 'creationTime' (if 'scheduledStartTime' is not set) in the ascending order
      operationId: rcwConfigListAllSessions
      parameters:
        - name: nameFragment
          in: query
          description: Filter to return only webinar sessions containing particular substring within their names
          required: false
          explode: true
          schema:
            type: string
          example: All-hands
        - name: status
          in: query
          description: Filter to return only webinar sessions in certain status. Multiple values are supported.
          required: false
          explode: true
          schema:
            $ref: "#/components/schemas/WcsSessionStatusModel"
          example: Scheduled
        - $ref: "#/components/parameters/WcsEndTimeFrom"
        - $ref: "#/components/parameters/PerPage"
        - $ref: "#/components/parameters/PageToken"
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/WcsSessionGlobalListResource"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "500":
          $ref: "#/components/responses/InternalError"
      x-throttling-group: Heavy
      x-app-permission: ReadWebinars
  /webinar/configuration/v1/company/sessions:
    get:
      tags:
        - Webinars and Sessions
      summary: List Sessions across Multiple Webinars/Hosts
      description: |
        Returns the list of Webinar Sessions hosted by all company users or particular user(s) sorted by
        'scheduledStartTime' or 'creationTime' (if 'scheduledStartTime' is not set) in the ascending ordered.
        The user must have "WebinarSettings" permission granted otherwise the API returns HTTP 403.
      operationId: rcwConfigListAllCompanySessions
      parameters:
        - name: status
          in: query
          description: Filter to return only webinar sessions in certain status. Multiple values are supported.
          required: false
          explode: true
          schema:
            $ref: "#/components/schemas/WcsSessionStatusModel"
          example: Scheduled
        - $ref: "#/components/parameters/WcsEndTimeFrom"
        - $ref: "#/components/parameters/HostUserId"
        - $ref: "#/components/parameters/PerPage"
        - $ref: "#/components/parameters/PageToken"
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/WcsSessionGlobalListResource"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "500":
          $ref: "#/components/responses/InternalError"
      x-throttling-group: Heavy
      x-app-permission: ReadWebinars
  "/webinar/configuration/v1/webinars/{webinarId}/sessions":
    parameters:
      - $ref: "#/components/parameters/RcwWebinarId"
    post:
      tags:
        - Webinars and Sessions
      summary: Create Webinar Session
      description: Creates a new Session for a given Webinar
      operationId: rcwConfigCreateSession
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/WcsSessionWithLocaleCodeModel"
      responses:
        "201":
          description: Successful response, new Session is created
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/WcsSessionResource"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
      x-throttling-group: Heavy
      x-app-permission: EditWebinars
  "/webinar/configuration/v1/webinars/{webinarId}/sessions/{sessionId}":
    parameters:
      - $ref: "#/components/parameters/RcwWebinarId"
      - $ref: "#/components/parameters/RcwSessionId"
    patch:
      tags:
        - Webinars and Sessions
      summary: Update Webinar Session
      description: |
        Updates a Webinar Session. The payload may contain certain attributes from the Session resource
        (it is a partial update). Changing the 'status' field usually invokes certain workflow actions.
        Updating a Session in 'Active' or 'Finished' status is prohibited.
        Some status transitions (for example, to 'Active" or 'Finished') may be prohibited.
      operationId: rcwConfigUpdateSession
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/WcsSessionWithLocaleCodeModel"
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/WcsSessionResource"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
      x-throttling-group: Heavy
      x-app-permission: EditWebinars
    get:
      tags:
        - Webinars and Sessions
      summary: Get Webinar Session
      description: Returns a Webinar Session by ID.
      operationId: rcwConfigGetSession
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/WcsSessionResource"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
      x-throttling-group: Heavy
      x-app-permission: ReadWebinars
    delete:
      tags:
        - Webinars and Sessions
      summary: Delete Webinar Session
      description: |
        Deletes a Webinar Session. All child objects (Invitees) will be also deleted.
        It is disallowed to delete a Session which is in 'Active' or 'Finished' state
      operationId: rcwConfigDeleteSession
      responses:
        "204":
          description: The Session was successfully deleted
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
      x-throttling-group: Heavy
      x-app-permission: EditWebinars
  "/webinar/configuration/v1/webinars/{webinarId}/sessions/{sessionId}/invitees":
    parameters:
      - $ref: "#/components/parameters/RcwWebinarId"
      - $ref: "#/components/parameters/RcwSessionId"
    patch:
      tags:
        - Invitees
      summary: Bulk Add/Delete Session Invitees
      description: |
        Adds, updates and deletes Webinar Session invitees in bulk (co-hosts and panelists in phase 1
        and also invited attendees in subsequent phases).
        The payload may contain multiple added, updated or deleted invitees.
        For each added record 'role' and either 'firstName'/'lastName'/'email' (for non-authenticated users)
        or 'linkedUser.*' (for authenticated users) must be specified, but not both.
        For updated invitees 'id'  and 'role' must be specified, 'linkedUser' change is not supported.
        For deleted invitees only there ids should be specified.
        The response contains added/updated records (full) and deleted records (ids only).

        Deleting an invitee for a Session in 'Active' or 'Finished' status is prohibited.
      operationId: rcwConfigUpdateInvitees
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/BulkUpdateInviteesRequest"
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BulkUpdateInviteesResponse"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "409":
          $ref: "#/components/responses/Conflict"
        "500":
          $ref: "#/components/responses/InternalError"
      x-throttling-group: Heavy
      x-app-permission: EditWebinars
    get:
      tags:
        - Invitees
      summary: List Session Invitees
      description: |
        Returns the list of Invitees (co-hosts and panelists in phase 1
        and also invited attendees in subsequent phases) of a given Webinar Session.
        An implicit record created for a Webinar 'Host' is always returned.
      operationId: rcwConfigListInvitees
      parameters:
        - $ref: "#/components/parameters/PerPage"
        - $ref: "#/components/parameters/PageToken"
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/WcsInviteeListResource"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
      x-throttling-group: Heavy
      x-app-permission: ReadWebinars
  "/webinar/configuration/v1/webinars/{webinarId}/sessions/{sessionId}/invitees/{inviteeId}":
    parameters:
      - $ref: "#/components/parameters/RcwWebinarId"
      - $ref: "#/components/parameters/RcwSessionId"
      - $ref: "#/components/parameters/RcwInviteeId"
    get:
      tags:
        - Invitees
      summary: Get Session Invitee
      description: Returns a Session Invitee information by ID
      operationId: rcwConfigGetInvitee
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/InviteeResource"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
      x-throttling-group: Heavy
      x-app-permission: ReadWebinars
    put:
      tags:
        - Invitees
      summary: Update Session Invitee
      description: |
        Updates a Session Invitee. 'role' is required (it can be changed from 'Panelist' to 'CoHost' or vise versa).
        It is disallowed to update 'linkedUser': it should be done by deleting then adding an invitee.
        For non-authenticated users 'firstName'/'lastName'/'email' can be specified, but not both.
        Implicit record created for a Webinar 'Host' cannot be modified.
        Also it is disallowed to change any other role to 'Host'.
      operationId: rcwConfigUpdateInvitee
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateInviteeRequest"
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/InviteeResource"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
      x-throttling-group: Heavy
      x-app-permission: EditWebinars
    delete:
      tags:
        - Invitees
      summary: Delete Session Invitee
      description: |
        Deletes a Session Invitee. Implicit record created for a Webinar 'Host' cannot be deleted.
        Deleting an invitee for a Session in 'Active' or 'Finished' status is prohibited (HTTP 403).
      operationId: rcwConfigDeleteInvitee
      responses:
        "204":
          description: The Invitee was successfully deleted
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
      x-throttling-group: Heavy
      x-app-permission: EditWebinars
  "/webinar/history/v1/webinars/{webinarId}":
    parameters:
      - $ref: "#/components/parameters/RcwWebinarId"
    get:
      tags:
        - Historical Webinars
      summary: Get Historical Webinar
      description: Returns a historical webinar information by ID (host interface)
      operationId: rcwHistoryGetWebinar
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/HistoryWebinarResource"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
      x-throttling-group: Heavy
      x-app-permission: ReadWebinars
  /webinar/history/v1/sessions:
    get:
      tags:
        - Historical Webinars
      summary: List Historical Webinar Sessions across Multiple Webinars
      description: |
        Returns the list of historical Webinar Sessions hosted by a current authorized user
        sorted by 'endTime' in the descending order. Depending on a session status 'endTime' can
        represent actual end time or scheduled end time.
      operationId: rcwHistoryListAllSessions
      parameters:
        - name: nameFragment
          in: query
          description: Filter to return only webinar sessions containing particular substring within their names
          required: false
          explode: true
          schema:
            type: string
          example: All-hands
        - $ref: "#/components/parameters/SessionStatus"
        - $ref: "#/components/parameters/EndTimeFrom"
        - $ref: "#/components/parameters/EndTimeTo"
        - $ref: "#/components/parameters/PerPage"
        - $ref: "#/components/parameters/PageToken"
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SessionGlobalListResource"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "500":
          $ref: "#/components/responses/InternalError"
      x-throttling-group: Heavy
      x-app-permission: ReadWebinars
  /webinar/history/v1/company/sessions:
    get:
      tags:
        - Historical Webinars
      summary: List Historical Webinar Sessions across Multiple Webinars / Hosts
      description: |
        Returns the list of historical Webinar Sessions hosted by particular user(s) or all company users
        sorted by 'endTime' in the descending order. Depending on a session status 'endTime' can
        represent actual end time or scheduled end time.
        The user must have "WebinarSettings" permission granted otherwise the API returns HTTP 403.
      operationId: rcwHistoryListAllCompanySessions
      parameters:
        - $ref: "#/components/parameters/HostUserId"
        - $ref: "#/components/parameters/SessionStatus"
        - $ref: "#/components/parameters/EndTimeFrom"
        - $ref: "#/components/parameters/EndTimeTo"
        - $ref: "#/components/parameters/PerPage"
        - $ref: "#/components/parameters/PageToken"
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SessionGlobalListResource"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "500":
          $ref: "#/components/responses/InternalError"
      x-throttling-group: Heavy
      x-app-permission: ReadWebinars
  "/webinar/history/v1/webinars/{webinarId}/sessions/{sessionId}":
    parameters:
      - $ref: "#/components/parameters/RcwWebinarId"
      - $ref: "#/components/parameters/RcwSessionId"
    get:
      tags:
        - Historical Webinars
      summary: Get Historical Webinar Session
      description: Returns a historical webinar Session by ID. Access allowed to participants with original role as Host or CoHost.
      operationId: rcwHistoryGetSession
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/HistorySessionResource"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
      x-throttling-group: Heavy
      x-app-permission: ReadWebinars
  "/webinar/history/v1/webinars/{webinarId}/sessions/{sessionId}/invitees":
    get:
      tags:
        - Historical Webinars
      summary: List Session Invitees
      description: |
        Returns the list of Invitees (co-hosts and panelists) of a given Webinar Session (host interface).
        An implicit record created for a Webinar 'Host' is always returned.
      operationId: rcwHistoryListInvitees
      parameters:
        - $ref: "#/components/parameters/RcwWebinarId"
        - $ref: "#/components/parameters/RcwSessionId"
        - $ref: "#/components/parameters/RcwRole"
        - $ref: "#/components/parameters/OriginalRole"
        - $ref: "#/components/parameters/PerPage"
        - $ref: "#/components/parameters/PageToken"
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/InviteeListResource"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
      x-throttling-group: Heavy
      x-app-permission: ReadWebinars
  "/webinar/history/v1/webinars/{webinarId}/sessions/{sessionId}/participants":
    get:
      tags:
        - Historical Webinars
      summary: List Session Participants
      description: |
        Returns the list of participants of a given Webinar Session (host interface).
      operationId: rcwHistoryListParticipants
      parameters:
        - $ref: "#/components/parameters/RcwWebinarId"
        - $ref: "#/components/parameters/RcwSessionId"
        - $ref: "#/components/parameters/RcwRole"
        - $ref: "#/components/parameters/OriginalRole"
        - $ref: "#/components/parameters/PerPage"
        - $ref: "#/components/parameters/PageToken"
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ParticipantListResource"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
      x-throttling-group: Heavy
      x-app-permission: ReadWebinars
  "/webinar/history/v1/webinars/{webinarId}/sessions/{sessionId}/invitees/{inviteeId}":
    parameters:
      - $ref: "#/components/parameters/RcwWebinarId"
      - $ref: "#/components/parameters/RcwSessionId"
      - $ref: "#/components/parameters/RcwInviteeId"
    get:
      tags:
        - Historical Webinars
      summary: Get Session Invitee
      description: Returns a historical session invitee information by ID (host interface).
      operationId: rcwHistoryGetInvitee
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/InviteeModel"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
      x-throttling-group: Heavy
      x-app-permission: ReadWebinars
  "/webinar/history/v1/webinars/{webinarId}/sessions/{sessionId}/participants/self":
    parameters:
      - $ref: "#/components/parameters/RcwWebinarId"
      - $ref: "#/components/parameters/RcwSessionId"
    get:
      tags:
        - Historical Webinars
      summary: Get Participant Information
      description: |
        Returns the participant information specific to a webinar session. Accessible by any authenticated participant.
        For a non-authenticated participant, API returns error.
      operationId: rcwHistoryGetParticipantInfo
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ParticipantReducedModel"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
      x-throttling-group: Heavy
      x-app-permission: ReadWebinars
  /webinar/history/v1/recordings:
    get:
      tags:
        - Historical Recordings
      summary: List Webinar Recordings
      description: |
        Returns the list of webinar recordings for a given webinar host user
      operationId: rcwHistoryListRecordings
      parameters:
        - $ref: "#/components/parameters/CreationTimeFrom"
        - $ref: "#/components/parameters/CreationTimeTo"
        - $ref: "#/components/parameters/RecordingStatus"
        - $ref: "#/components/parameters/PerPage"
        - $ref: "#/components/parameters/PageToken"
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RecordingListResource"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "500":
          $ref: "#/components/responses/InternalError"
      x-throttling-group: Heavy
      x-app-permission: ReadWebinars
  "/webinar/history/v1/recordings/{recordingId}":
    get:
      tags:
        - Historical Recordings
      summary: Get Webinar Recording
      description: |
        Returns the webinar recording by ID (Webinar host's interface).
        This API also returns sharing link if sharing is enabled.
      operationId: rcwHistoryGetRecording
      parameters:
        - $ref: "#/components/parameters/RecordingId"
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RecordingItemExtendedModel"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
      x-throttling-group: Heavy
      x-app-permission: ReadWebinars
  "/webinar/history/v1/recordings/{recordingId}/download":
    get:
      tags:
        - Historical Recordings
      summary: Get Webinar Recording Download Resource
      description: |
        Returns the webinar recording download link (both Webinar host's and admin interface).

        If called by a webinar host, the API returns error (403) if recording downloading is prohibited by company settings.
        The admin user who has "WebinarSettings" permission should be able to download recording regardless of current company settings.
      operationId: rcwHistoryGetRecordingDownload
      parameters:
        - $ref: "#/components/parameters/RecordingMediaType"
        - $ref: "#/components/parameters/RecordingId"
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RecordingDownloadModel"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
      x-throttling-group: Heavy
      x-app-permission: ReadWebinars
  /webinar/history/v1/company/recordings:
    get:
      tags:
        - Historical Recordings
      summary: List Webinar Recordings (Admin)
      description: |
        Returns the list of webinar recordings (Administrator's interface).
        The user must have "WebinarSettings" permission granted otherwise the API returns HTTP 403.
      operationId: rcwHistoryAdminListRecordings
      parameters:
        - name: nameFragment
          in: query
          description: Filter to return only webinar recordings containing particular substring within their names
          required: false
          explode: true
          schema:
            type: string
          example: All-hands
        - $ref: "#/components/parameters/CreationTimeFrom"
        - $ref: "#/components/parameters/CreationTimeTo"
        - $ref: "#/components/parameters/RecordingStatus"
        - $ref: "#/components/parameters/HostUserId"
        - $ref: "#/components/parameters/PerPage"
        - $ref: "#/components/parameters/PageToken"
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RecordingAdminListResource"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "500":
          $ref: "#/components/responses/InternalError"
      x-throttling-group: Heavy
      x-app-permission: ReadWebinars
  "/webinar/history/v1/company/recordings/{recordingId}":
    get:
      tags:
        - Historical Recordings
      summary: Get Webinar Recording (Admin)
      description: |
        Returns the webinar recording by ID (Administrator's interface).

        The user must have "WebinarSettings" permission granted otherwise the API returns HTTP 403.
      operationId: rcwHistoryAdminGetRecording
      parameters:
        - $ref: "#/components/parameters/RecordingId"
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RecordingAdminExtendedItemModel"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
      x-throttling-group: Heavy
      x-app-permission: ReadWebinars
  "/webinar/registration/v1/sessions/{sessionId}/registrants/{registrantId}":
    get:
      tags:
        - Registrants
      summary: Get Registrant
      description: |
        Returns a Registrant by ID.

        A caller must be an authorized user: either a host of the webinar or an IT Admin:
        a user from host's account with "WebinarSettings" permission.
      operationId: rcwRegGetRegistrant
      parameters:
        - $ref: "#/components/parameters/RcwSessionId"
        - $ref: "#/components/parameters/RegistrantId"
        - $ref: "#/components/parameters/IncludeQuestionnaire"
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RegistrantModelWithQuestionnaire"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
      x-throttling-group: Heavy
      x-app-permission: ReadWebinars
    delete:
      tags:
        - Registrants
      summary: Delete Registrant
      description: |
        Deletes a Registrant by ID.

        Session must not be in finished state (otherwise it should return HTTP 403).

        A caller must be an authorized user: either a host of the webinar or an IT Admin:
        a user from host's account with "WebinarSettings" permission.
      operationId: rcwRegDeleteRegistrant
      parameters:
        - $ref: "#/components/parameters/RcwSessionId"
        - $ref: "#/components/parameters/RegistrantId"
      responses:
        "204":
          description: The Registrant was successfully deleted
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
      x-throttling-group: Heavy
      x-app-permission: EditWebinars
  "/webinar/registration/v1/sessions/{sessionId}/registrants":
    get:
      tags:
        - Registrants
      summary: List Session Registrants
      description: |
        Returns the list of Registrants ordered by "id" ascending.

        A caller must be an authorized user: either a host of the webinar or an IT Admin:
        a user from host's account with "WebinarSettings" permission.
      operationId: rcwRegListRegistrants
      parameters:
        - $ref: "#/components/parameters/RcwSessionId"
        - $ref: "#/components/parameters/PerPage"
        - $ref: "#/components/parameters/PageToken"
        - $ref: "#/components/parameters/IncludeQuestionnaire"
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RegistrantListResource"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
      x-throttling-group: Heavy
      x-app-permission: ReadWebinars
    post:
      tags:
        - Registrants
      summary: Create Registrant
      description: |
        Creates a new Registrant for a given session.

        Registration MUST be open for the session for this call to succeed (otherwise it should return HTTP 403).

        A caller must be an authorized user: either a host of the webinar or an IT Admin:
        a user from host's account with "WebinarSettings" permission.
      operationId: rcwRegCreateRegistrant
      parameters:
        - $ref: "#/components/parameters/RcwSessionId"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/RegistrantBaseModelWithQuestionnaire"
      responses:
        "201":
          description: Successful response, new Registrant is created
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RegistrantModelResponsePostWithQuestionnaire"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "409":
          $ref: "#/components/responses/Conflict"
        "500":
          $ref: "#/components/responses/InternalError"
      x-throttling-group: Heavy
      x-app-permission: EditWebinars
  "/webinar/registration/v1/sessions/{sessionId}":
    get:
      tags:
        - Registration Management
      summary: Get Registration Session Info
      description: |
        Returns a registration Session information by ID.

        A caller must be an authorized user: either a host of the webinar or an IT Admin:
        a user from host's account with "WebinarSettings" permission.
      operationId: rcwRegGetSession
      parameters:
        - $ref: "#/components/parameters/RcwSessionId"
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RegSessionModel"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
      x-throttling-group: Heavy
      x-app-permission: ReadWebinars
    patch:
      tags:
        - Registration Management
      summary: Update Registration Session
      description: |
        Updates a Session by ID.

        This is a PARTIAL update (PATCH), client may call it providing only attributes which are to be changed.

        A caller must be an authorized user: either a host of the webinar or an IT Admin:
        a user from host's account with "WebinarSettings" permission.

        If a session record with given ID doesn't exist on Registration Service side the API should return HTTP 404.
      operationId: rcwRegUpdateSession
      parameters:
        - $ref: "#/components/parameters/RcwSessionId"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/RegSessionModel"
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RegSessionModel"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
      x-throttling-group: Heavy
      x-app-permission: EditWebinars
  "/ai/ringsense/v1/public/accounts/{accountId}/domains/{domain}/records/{sourceRecordId}/insights":
    get:
      tags:
        - AI Conversation Expert
      summary: Get Recording Insights
      description: Returns the insights of a call recording
      operationId: getRecordingInsights
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/RecordingDomain"
        - $ref: "#/components/parameters/SourceRecordId"
        - $ref: "#/components/parameters/RecordingInsightTypes"
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RecordingInsights"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
      x-request-max-body-size: 10m
      x-availability: High
      x-throttling-group: Light
      x-app-permission: RingSense
  "/ai/ringsense/v1/public/accounts/{accountId}/domains/{domain}/sessions/{sourceSessionId}/insights":
    get:
      tags:
        - AI Conversation Expert
      summary: Get Session Insights
      description: Returns the insights of all call recordings in a session
      operationId: getSessionInsights
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/RecordingDomain"
        - $ref: "#/components/parameters/SourceSessionId"
        - $ref: "#/components/parameters/RecordingInsightTypes"
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SessionsInsightsResource"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
      x-request-max-body-size: 10m
      x-availability: High
      x-throttling-group: Light
      x-app-permission: RingSense
  "/restapi/v1.0/account/{accountId}/a2p-sms/batches":
    post:
      tags:
        - High Volume SMS
      summary: Send A2P SMS
      description: |
        Allows to send high volume of A2P (Application-to-Person) SMS messages
        (in message batches). Only phone number with the `A2PSmsSender` feature can
        be used as a sender.
      operationId: createA2PSMS
      parameters:
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        description: SMS batch payload
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/MessageBatchCreateRequest"
      responses:
        "201":
          description: Message batch created
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MessageBatchResponse"
        "400":
          description: Validation Failed, Invalid Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ASGErrorResponse"
              examples:
                CMN-101:
                  value:
                    errorCode: CMN-101
                    message: Parameter [${parameterName}] value is invalid.
                CMN-104:
                  value:
                    errorCode: CMN-104
                    message: Cannot parse request
                CMN-110:
                  value:
                    errorCode: CMN-110
                    message: Header ${parameterName} should be specified
                CMN-407:
                  value:
                    errorCode: CMN-407
                    message: Parameter in header is invalid
        "401":
          description: Unauthorized error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ASGErrorResponse"
        "500":
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ASGErrorResponse"
              example:
                errorCode: CMN-203
                message: Internal Server Error
      x-feature: SMSSending
      x-request-max-body-size: 50m
      x-throttling-group: Light
      x-availability: High
      x-app-permission: A2PSMS
    get:
      tags:
        - High Volume SMS
      summary: List A2P SMS Batches
      description: |
        Returns the list of A2P batches sent from the current account.
        The list can be filtered by message batch ID and/or from phone number.
      operationId: listA2PBatches
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/SmsDateFrom"
        - $ref: "#/components/parameters/SmsDateTo"
        - name: from
          in: query
          required: false
          description: Phone number in E.164 format from which the messages are going to be sent
          schema:
            type: string
          example: "15551234455"
        - name: status
          in: query
          required: false
          style: form
          explode: true
          description: A list of batch statuses to filter the results
          schema:
            type: array
            items:
              type: string
              enum:
                - Queued
                - Processing
                - Sent
                - Completed
          example:
            - Queued
            - Processing
        - name: pageToken
          in: query
          required: false
          description: The page token of the page to be retrieved
          schema:
            type: string
          example: pgt1
        - name: perPage
          in: query
          required: false
          description: The number of records to be returned per page
          schema:
            type: integer
            format: int64
          example: 1
      responses:
        "200":
          description: |
            The list of batches sent by the account and filtered by the criteria specified in the query parameters
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BatchListResponse"
        "400":
          description: Invalid Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ASGErrorResponse"
              examples:
                CMN-101:
                  value:
                    errorCode: CMN-101
                    message: Parameter [${parameterName}] value is invalid.
                CMN-110:
                  value:
                    errorCode: CMN-110
                    message: Header ${parameterName} should be specified
                CMN-407:
                  value:
                    errorCode: CMN-407
                    message: Parameter in header is invalid
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ASGErrorResponse"
        "404":
          description: No resource found for the account.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ASGErrorResponse"
              example:
                errorCode: CMN-102
                message: Resource for parameter [${parameterName}] is not found.
        "500":
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ASGErrorResponse"
              example:
                errorCode: CMN-203
                message: Internal Server Error
      x-feature: SMSSending
      x-request-max-body-size: 50m
      x-throttling-group: Light
      x-availability: High
      x-app-permission: A2PSMS
  "/restapi/v1.0/account/{accountId}/a2p-sms/batches/{batchId}":
    get:
      tags:
        - High Volume SMS
      summary: Get A2P SMS Batch
      description: Returns information on a message batch.
      operationId: readA2PBatch
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/BatchId"
      responses:
        "200":
          description: Message batch information
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MessageBatchResponse"
        "400":
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ASGErrorResponse"
              examples:
                CMN-101:
                  value:
                    errorCode: CMN-101
                    message: Parameter [${parameterName}] value is invalid.
                CMN-110:
                  value:
                    errorCode: CMN-110
                    message: Header ${parameterName} should be specified
                CMN-407:
                  value:
                    errorCode: CMN-407
                    message: Parameter in header is invalid
        "401":
          description: Unauthorized error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ASGErrorResponse"
        "404":
          description: The batch is not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ASGErrorResponse"
              example:
                errorCode: CMN-102
                message: Resource for parameter [${parameterName}] is not found.
        "500":
          description: Service is unavailable
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ASGErrorResponse"
              example:
                errorCode: CMN-203
                message: Internal Server Error
      x-feature: SMSSending
      x-throttling-group: Light
      x-availability: High
      x-app-permission: A2PSMS
  "/restapi/v1.0/account/{accountId}/a2p-sms/messages":
    get:
      tags:
        - High Volume SMS
      summary: List A2P SMS Messages
      description: Returns the list of outbound/inbound A2P messages sent from/to A2P phone numbers of the current account. The list can be filtered by message batch ID and/or phone number.
      operationId: listA2PSMS
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/QueryBatchId"
        - $ref: "#/components/parameters/SmsDirection"
        - $ref: "#/components/parameters/SmsDateFrom"
        - $ref: "#/components/parameters/SmsDateTo"
        - name: view
          in: query
          required: false
          description: Indicates if the response has to be detailed, includes text in the response if detailed
          schema:
            type: string
            default: Simple
            enum:
              - Simple
              - Detailed
        - name: phoneNumber
          in: query
          required: false
          style: form
          explode: true
          description: List of phone numbers (specified in 'to' or 'from' fields of a message) to filter the results. Maximum number of phone numbers allowed to be specified as filters is 15
          schema:
            type: array
            items:
              type: string
          example:
            - "15551234455"
            - "15551235577"
        - name: pageToken
          in: query
          required: false
          description: The page token of the page to be retrieved.
          schema:
            type: string
          example: pgt1
        - name: perPage
          in: query
          required: false
          description: The number of messages to be returned per request
          schema:
            type: integer
            format: int32
            default: 1000
          example: 1
      responses:
        "200":
          description: |
            The list of messages sent by the account and filtered by the criteria specified in the query parameters
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MessageListResponse"
        "400":
          description: Invalid Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ASGErrorResponse"
              examples:
                CMN-101:
                  value:
                    errorCode: CMN-101
                    message: Parameter [${parameterName}] value is invalid.
                CMN-110:
                  value:
                    errorCode: CMN-110
                    message: Header ${parameterName} should be specified
                CMN-407:
                  value:
                    errorCode: CMN-407
                    message: Parameter in header is invalid
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ASGErrorResponse"
        "404":
          description: No resource found for the account.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ASGErrorResponse"
              example:
                errorCode: CMN-102
                message: Resource for parameter [${parameterName}] is not found.
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ASGErrorResponse"
              example:
                errorCode: CMN-203
                message: Internal Server Error
      x-feature: SMSSending
      x-throttling-group: Light
      x-availability: High
      x-app-permission: A2PSMS
  "/restapi/v1.0/account/{accountId}/a2p-sms/messages/{messageId}":
    get:
      tags:
        - High Volume SMS
      summary: Get A2P SMS
      description: Returns the details of an A2P SMS message by ID.
      operationId: readA2PSMS
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - name: messageId
          in: path
          description: Internal identifier of a message to be retrieved
          required: true
          schema:
            type: string
          example: "1234"
      responses:
        "200":
          description: The message is found and returned
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MessageDetailsResponse"
        "400":
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ASGErrorResponse"
              examples:
                CMN-101:
                  value:
                    errorCode: CMN-101
                    message: Parameter [${parameterName}] value is invalid.
                CMN-110:
                  value:
                    errorCode: CMN-110
                    message: Header ${parameterName} should be specified
                CMN-407:
                  value:
                    errorCode: CMN-407
                    message: Parameter in header is invalid
        "401":
          description: Unauthorized error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ASGErrorResponse"
        "404":
          description: The message is not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ASGErrorResponse"
              example:
                errorCode: CMN-102
                message: Resource for parameter [${parameterName}] is not found.
        "500":
          description: Service is not available
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ASGErrorResponse"
              example:
                errorCode: CMN-203
                message: Internal Server Error
      x-feature: SMSSending
      x-throttling-group: Light
      x-availability: High
      x-app-permission: A2PSMS
  "/restapi/v1.0/account/{accountId}/a2p-sms/statuses":
    get:
      tags:
        - High Volume SMS
      summary: List A2P SMS Statuses
      description: Retrieves a set of message counts by message status and error codes filtered by dates, batchId and message direction.
      operationId: aggregateA2PSMSStatuses
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/QueryBatchId"
        - $ref: "#/components/parameters/SmsDirection"
        - $ref: "#/components/parameters/SmsDateFrom"
        - $ref: "#/components/parameters/SmsDateTo"
        - name: phoneNumber
          in: query
          required: false
          style: form
          explode: true
          description: List of phone numbers (specified in 'to' or 'from' fields of a message) to filter the results. Maximum number of phone numbers allowed to be specified as filters is 15
          schema:
            type: array
            items:
              type: string
          example:
            - "15551234455"
            - "15551235577"
      responses:
        "200":
          description: The statuses of the messages sent by the account filtered by criteria specified in the query
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MessageStatusesResponse"
        "400":
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ASGErrorResponse"
              examples:
                CMN-110:
                  value:
                    errorCode: CMN-110
                    message: Header ${parameterName} should be specified
                CMN-407:
                  value:
                    errorCode: CMN-407
                    message: Parameter in header is invalid
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ASGErrorResponse"
        "404":
          description: No resource found for the account
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ASGErrorResponse"
              example:
                errorCode: CMN-102
                message: Resource for parameter [${parameterName}] is not found.
        "500":
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ASGErrorResponse"
              example:
                errorCode: CMN-203
                message: Internal Server Error
      x-feature: SMSSending
      x-throttling-group: Light
      x-availability: High
      x-app-permission: A2PSMS
  "/restapi/v1.0/account/{accountId}/a2p-sms/opt-outs":
    get:
      tags:
        - SMS Consents
      summary: List Opted-out Numbers
      description: |
        Returns the list of numbers opted out from the account. The list
        can be filtered by `to`/`from` phone number query parameters. Specifying `text/csv`
        in the `Accept` header lets download the data in the CSV format.

        **DEPRECATED: Use `GET /restapi/v2/accounts/{accountId}/sms/consents` instead**
      deprecated: true
      operationId: readA2PSMSOptOuts
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - name: from
          in: query
          required: false
          description: |
            The sender's phone number in [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I) format for filtering messages.
            The asterisk value "*" means any number in `from` field
          schema:
            type: string
          example: "15551234455"
        - name: to
          in: query
          required: false
          description: |
            The receiver's phone number (`to` field) in [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I) format for filtering messages
          example: "15551237755"
          schema:
            type: string
        - name: status
          in: query
          required: false
          description: The status (opted out, opted in, or both) to be used as the filter
          schema:
            type: string
            default: optout
            enum:
              - optout
              - optin
              - all
          example: optout
        - name: pageToken
          in: query
          required: false
          description: The page token of the page to be retrieved
          schema:
            type: string
          example: pgt1
        - name: perPage
          in: query
          required: false
          description: The number of records to be returned for the page
          schema:
            type: integer
            format: int32
            default: 1000
          example: 5
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OptOutListResponse"
            text/csv:
              schema:
                $ref: "#/components/schemas/OptOutListResponse"
        "400":
          description: Invalid Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ASGErrorResponse"
              examples:
                CMN-101:
                  value:
                    errorCode: CMN-101
                    message: Parameter [${parameterName}] value is invalid.
                CMN-110:
                  value:
                    errorCode: CMN-110
                    message: Header ${parameterName} should be specified
                CMN-407:
                  value:
                    errorCode: CMN-407
                    message: Parameter in header is invalid
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ASGErrorResponse"
        "404":
          description: No resource found for the account
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ASGErrorResponse"
              example:
                errorCode: CMN-102
                message: Resource for parameter [${parameterName}] is not found.
        "500":
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ASGErrorResponse"
              example:
                errorCode: CMN-203
                message: Internal Server Error
      x-feature: SMSSending
      x-throttling-group: Light
      x-availability: High
      x-app-permission: A2PSMS
  "/restapi/v1.0/account/{accountId}/a2p-sms/opt-outs/bulk-assign":
    post:
      tags:
        - SMS Consents
      operationId: addA2PSMSOptOuts
      description: |
        Adds multiple opt-outs and/or opt-ins for the specified sender number and a set of recipient numbers.

        Request body consists of `from` field and `optOuts` and `optIns` lists.
        Both `optOuts` and `optIns` can be empty but not simultaneously - at least one of the lists must be entered.

        **DEPRECATED: Use `PATCH /restapi/v2/accounts/{accountId}/sms/consents` instead**
      deprecated: true
      summary: Add SMS Opt-In/Opt-Out Numbers
      parameters:
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/OptOutBulkAssignRequest"
      responses:
        "200":
          description: The results of adding opt-outs and opt-ins.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OptOutBulkAssignResponse"
        "400":
          description: Invalid Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ASGErrorResponse"
              examples:
                CMN-101:
                  value:
                    errorCode: CMN-101
                    message: Parameter [from] value is invalid.
                CMN-104:
                  value:
                    errorCode: CMN-104
                    message: Cannot parse request
        "500":
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ASGErrorResponse"
              example:
                errorCode: CMN-203
                message: Internal Server Error
      x-feature: SMSSending
      x-throttling-group: Light
      x-availability: High
      x-app-permission: A2PSMS
  "/restapi/v2/accounts/{accountId}/sms/consents":
    get:
      tags:
        - SMS Consents
      summary: List SMS Consent Records
      description: |
        Returns a list of account-level SMS consent records for opted-out and/or opted-in phone numbers.

        DEPRECATED: Use `POST /restapi/v2/accounts/{accountId}/sms/consents/search` instead
      deprecated: true
      operationId: listSmsConsentRecords
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/PageToken"
        - $ref: "#/components/parameters/PerPage"
        - name: from
          in: query
          required: false
          style: form
          explode: true
          description: The internal party's phone number(s) used to filter records
          schema:
            type: array
            minItems: 1
            uniqueItems: true
            items:
              $ref: "#/components/schemas/PhoneNumberE164"
        - name: to
          in: query
          required: false
          style: form
          explode: true
          description: The external party's phone number(s) used to filter records
          schema:
            type: array
            minItems: 1
            uniqueItems: true
            items:
              $ref: "#/components/schemas/PhoneNumberE164"
        - name: optStatus
          in: query
          required: false
          style: form
          explode: true
          description: The opt-out/opt-in status to filter records by. If omitted, `OptOut` records are returned
          schema:
            type: array
            uniqueItems: true
            items:
              $ref: "#/components/schemas/SmsOptStatusEnum"
            default:
              - OptOut
        - name: coverage
          in: query
          required: false
          style: form
          explode: true
          description: The coverage (scope) to filter records by
          schema:
            type: array
            uniqueItems: true
            items:
              $ref: "#/components/schemas/SmsConsentCoverageEnum"
        - name: campaignType
          in: query
          required: false
          style: form
          explode: true
          description: The campaign type to filter records by
          schema:
            type: array
            uniqueItems: true
            items:
              $ref: "#/components/schemas/SmsCampaignTypeEnum"
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OptRecordList"
          headers:
            ETag:
              $ref: "#/components/headers/ETag"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "502":
          $ref: "#/components/responses/BadGateway"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-feature: SMSSending
      x-throttling-group: Light
      x-availability: High
      x-app-permission: SMS
    patch:
      tags:
        - SMS Consents
      summary: Add/Update SMS Consent Records
      description: |
        Adds or updates SMS consent records.
      operationId: editSmsConsentRecords
      parameters:
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateOptRecordList"
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OptRecordsModificationSummary"
          headers:
            ETag:
              $ref: "#/components/headers/ETag"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "502":
          $ref: "#/components/responses/BadGateway"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-feature: SMSSending
      x-throttling-group: Light
      x-availability: High
      x-app-permission: SMS
  "/restapi/v2/accounts/{accountId}/sms/consents/export":
    get:
      tags:
        - SMS Consents
      summary: Export SMS Consent Records
      description: |
        Returns a list of account-level SMS consent records for opted-out and/or opted-in phone numbers in CSV format.
        The following columns will be included in the resulted CSV file:

        | Column name           | Data type | Description                                                      |
        |-----------------------|-----------|------------------------------------------------------------------|
        | External Party Number | string    | Sender's number in E.164 format                                  |
        | Internal Party Number | string    | Recipient's number in E.164 format                               |
        | Consent Status        | string    | Consent status, either "OptOut" or "OptIn"                       |
        | Source                | string    | Source of the consent record                                     |
        | Coverage              | string    | Coverage of this consent record (Account is returned as Company) |
        | Campaign Type         | string    | Campaign type for this consent record                            |
        | Notes                 | string    | Notes and comments regarding this consent record                 |
        | Last Modified Time    | string    | Last Modified Time in ISO 8601 format                            |
      operationId: exportSmsConsentRecords
      parameters:
        - $ref: "#/components/parameters/AccountId"
      responses:
        "200":
          description: Successful response
          content:
            text/csv:
              schema:
                type: string
          headers:
            ETag:
              $ref: "#/components/headers/ETag"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "502":
          $ref: "#/components/responses/BadGateway"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-feature: SMSSending
      x-throttling-group: Light
      x-availability: High
      x-app-permission: SMS
  "/restapi/v2/accounts/{accountId}/sms/consents/search":
    post:
      tags:
        - SMS Consents
      summary: Search SMS Consent Records
      description: |
        Returns the list of account-level SMS consent records according to the search criteria.
      operationId: searchSmsConsentRecords
      parameters:
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SearchSmsConsentRecordsRequest"
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OptRecordList"
          headers:
            ETag:
              $ref: "#/components/headers/ETag"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "502":
          $ref: "#/components/responses/BadGateway"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-feature: SMSSending
      x-throttling-group: Light
      x-availability: High
      x-app-permission: SMS
  "/restapi/v2/accounts/{accountId}/sms/consents/history":
    get:
      tags:
        - SMS Consents
      summary: List SMS Consent History Records
      description: |
        Returns the history of SMS consent records for opted-out and/or opted-in phone numbers.
      operationId: listSmsConsentHistoryRecords
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/PageToken"
        - $ref: "#/components/parameters/PerPage"
        - name: to
          in: query
          required: false
          style: form
          explode: true
          description: The external party's phone number(s)
          schema:
            type: array
            minItems: 0
            maxItems: 20
            uniqueItems: true
            items:
              $ref: "#/components/schemas/PhoneNumberE164"
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ConsentHistoryRecordList"
          headers:
            ETag:
              $ref: "#/components/headers/ETag"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
        "502":
          $ref: "#/components/responses/BadGateway"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-feature: SMSSending
      x-throttling-group: Light
      x-availability: High
      x-app-permission: SMS
  "/restapi/v1.0/account/{accountId}/telephony/call-out":
    post:
      tags:
        - Call Control
      summary: Make CallOut
      description: |-
        Creates a new CallOut telephony session: an outbound call from the caller described in `from`
        to the destination in `to`. The caller may be identified with `from.deviceId` or with
        `from.extensionId` (internal extension / mailbox id); use one or the other, not both.
        When using `from.deviceId`, only Softphone and Hardphone device instance ids are supported;
        WebRTC/Mobile clients do not expose usable device ids for this API today.
      operationId: createCallOutCallSession
      parameters:
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        description: JSON body
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/MakeCallOutRequest"
        required: true
      responses:
        "201":
          description: Created
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CallSession"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "415":
          $ref: "#/components/responses/UnsupportedMediaType"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-throttling-group: Heavy
      x-app-permission: CallControl
  "/restapi/v1.0/account/{accountId}/telephony/conference":
    post:
      tags:
        - Call Control
      summary: Start Conference Call Session
      description: Initiates a conference call session.
      operationId: createConferenceCallSession
      parameters:
        - $ref: "#/components/parameters/AccountId"
      responses:
        "201":
          description: Created
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CallSession"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "415":
          $ref: "#/components/responses/UnsupportedMediaType"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-throttling-group: Heavy
      x-app-permission: CallControl
  "/restapi/v1.0/account/{accountId}/telephony/sessions/{telephonySessionId}":
    get:
      tags:
        - Call Control
      summary: Get Call Session Status
      description: Returns the status of a call session by ID.
      operationId: readCallSessionStatus
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/TelephonySessionId"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CallSessionObject"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "415":
          $ref: "#/components/responses/UnsupportedMediaType"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-throttling-group: Light
      x-app-permission: CallControl
      x-notifications:
        - $ref: "#/components/schemas/AccountTelephonySessionsEvent"
        - $ref: "#/components/schemas/ExtensionTelephonySessionsEvent"
    delete:
      tags:
        - Call Control
      summary: End Call Session
      description: Drops a call session.
      operationId: deleteCallSession
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/TelephonySessionId"
      responses:
        "204":
          description: No Content
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "415":
          $ref: "#/components/responses/UnsupportedMediaType"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-throttling-group: Light
      x-app-permission: CallControl
  "/restapi/v1.0/account/{accountId}/telephony/sessions/{telephonySessionId}/parties/{partyId}/hold":
    post:
      tags:
        - Call Control
      summary: Hold Call Party
      description: Puts the party to stand-alone mode and starts to play Hold Music according to configuration & state to peers. There is a known limitation for Hold API - hold via REST API doesn't work with hold placed via RingCentral apps or HardPhone. It means that if you muted participant via Call Control API and RingCentral Desktop app, then you need to un-hold both endpoints to remove Hold Music and bring media back.
      operationId: holdCallParty
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/TelephonySessionId"
        - $ref: "#/components/parameters/TelephonySessionPartyId"
      requestBody:
        description: JSON body
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/HoldCallPartyRequest"
        required: false
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CallParty"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "409":
          $ref: "#/components/responses/Conflict"
        "415":
          $ref: "#/components/responses/UnsupportedMediaType"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-throttling-group: Light
      x-app-permission: CallControl
  "/restapi/v1.0/account/{accountId}/telephony/sessions/{telephonySessionId}/parties/{partyId}/unhold":
    post:
      tags:
        - Call Control
      summary: Un-hold Call Party
      description: Brings a party back into a call and stops to play Hold Music. There is a known limitation for Hold API - hold via REST API doesn't work with hold placed via RingCentral apps or HardPhone. It means that if you muted participant via Call Control API and RingCentral Desktop app, then you need to un-hold both endpoints to remove Hold Music and bring media back.
      operationId: unholdCallParty
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/TelephonySessionId"
        - $ref: "#/components/parameters/TelephonySessionPartyId"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CallParty"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "409":
          $ref: "#/components/responses/Conflict"
        "415":
          $ref: "#/components/responses/UnsupportedMediaType"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-throttling-group: Light
      x-app-permission: CallControl
  "/restapi/v1.0/account/{accountId}/telephony/sessions/{telephonySessionId}/parties/{partyId}/reject":
    post:
      tags:
        - Call Control
      summary: Reject Call Party
      description: Rejects an inbound call in a "Setup" or "Proceeding" state
      operationId: rejectParty
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/TelephonySessionId"
        - $ref: "#/components/parameters/TelephonySessionPartyId"
      responses:
        "204":
          description: No Content
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "409":
          $ref: "#/components/responses/Conflict"
        "415":
          $ref: "#/components/responses/UnsupportedMediaType"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-throttling-group: Light
      x-app-permission: CallControl
  "/restapi/v1.0/account/{accountId}/telephony/sessions/{telephonySessionId}/parties/{partyId}/ignore":
    post:
      tags:
        - Call Control
      summary: Ignore Call in Queue
      description: Ignores a call to a call queue agent in `Setup` or `Proceeding` state.
      operationId: ignoreCallInQueue
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/TelephonySessionId"
        - $ref: "#/components/parameters/TelephonySessionPartyId"
      requestBody:
        description: JSON body
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/IgnoreRequestBody"
        required: true
      responses:
        "204":
          description: No Content
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "415":
          $ref: "#/components/responses/UnsupportedMediaType"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-throttling-group: Light
      x-app-permission: CallControl
  "/restapi/v1.0/account/{accountId}/telephony/sessions/{telephonySessionId}/parties/{partyId}/transfer":
    post:
      tags:
        - Call Control
      summary: Transfer Call Party
      description: Transfers an answered call to the specified call party. Applicable for a call session in "Answered" or "Hold" state.
      operationId: transferCallParty
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/TelephonySessionId"
        - $ref: "#/components/parameters/TelephonySessionPartyId"
      requestBody:
        description: Specifies a call party to which the call will be transferred. Only a single call party is allowed.
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/TransferTarget"
        required: true
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CallParty"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "409":
          $ref: "#/components/responses/Conflict"
        "415":
          $ref: "#/components/responses/UnsupportedMediaType"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-throttling-group: Light
      x-app-permission: CallControl
  "/restapi/v1.0/account/{accountId}/telephony/sessions/{telephonySessionId}/parties/{partyId}/bridge":
    post:
      tags:
        - Call Control
      summary: Bridge Call Party
      description: |
        Allows the user to connect multiple call session participants over a conference call bridge.
        The current active call session ID and party ID of the user within this session should be specified
        in path; the bridged call session ID and party ID of the user within that session should be specified
        in request body. Thus, the user connects participants of two sessions into the one conference call
        using his/her own party IDs from both sessions."
      operationId: bridgeCallParty
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/TelephonySessionId"
        - $ref: "#/components/parameters/TelephonySessionPartyId"
      requestBody:
        description: Defines target call session and call party to be bridged
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/BridgeTargetRequest"
        required: true
      responses:
        "200":
          description: Bridged Call Info
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CallParty"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "409":
          $ref: "#/components/responses/Conflict"
        "415":
          $ref: "#/components/responses/UnsupportedMediaType"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-throttling-group: Light
      x-app-permission: CallControl
  "/restapi/v1.0/account/{accountId}/telephony/sessions/{telephonySessionId}/parties/{partyId}/answer":
    post:
      tags:
        - Call Control
      summary: Answer Call Party
      description: Answers a call on a certain device by passing the corresponding device ID in request body. Supported for call forwarding, call transfer, call flip and call queues.
      operationId: answerCallParty
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/TelephonySessionId"
        - $ref: "#/components/parameters/TelephonySessionPartyId"
      requestBody:
        description: Distributes a non-answered call to the defined target. Only a single target is allowed
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AnswerTarget"
        required: true
      responses:
        "200":
          description: Call Session Information
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CallParty"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "409":
          $ref: "#/components/responses/Conflict"
        "415":
          $ref: "#/components/responses/UnsupportedMediaType"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-throttling-group: Light
      x-app-permission: CallControl
  "/restapi/v1.0/account/{accountId}/telephony/sessions/{telephonySessionId}/parties/{partyId}/pickup":
    post:
      tags:
        - Call Control
      summary: Pickup Call
      description: Picks up a call parked to the specified Park Location group.
      operationId: pickupCallParty
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/TelephonySessionId"
        - $ref: "#/components/parameters/TelephonySessionPartyId"
      requestBody:
        description: Distributes a non-answered call to the defined target. Only a single target is allowed
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PickupTarget"
        required: true
      responses:
        "201":
          description: Created
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CallParty"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "409":
          $ref: "#/components/responses/Conflict"
        "415":
          $ref: "#/components/responses/UnsupportedMediaType"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-throttling-group: Light
      x-app-permission: CallControl
  "/restapi/v1.0/account/{accountId}/telephony/sessions/{telephonySessionId}/parties/{partyId}/forward":
    post:
      tags:
        - Call Control
      summary: Forward Call Party
      description: Forwards a non-answered incoming call to the specified call party. Applicable for a call session in "Setup" or "Proceeding" state.
      operationId: forwardCallParty
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/TelephonySessionId"
        - $ref: "#/components/parameters/TelephonySessionPartyId"
      requestBody:
        description: Specifies a call party to which the call will be forwarded. Only a single call party is allowed.
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ForwardTarget"
        required: true
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ForwardCallPartyResponse"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "409":
          $ref: "#/components/responses/Conflict"
        "415":
          $ref: "#/components/responses/UnsupportedMediaType"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-throttling-group: Light
      x-app-permission: CallControl
  "/restapi/v1.0/account/{accountId}/telephony/sessions/{telephonySessionId}/parties/{partyId}/reply":
    post:
      tags:
        - Call Control
      summary: Reply with Text
      description: Replies with text/pattern without picking up a call.
      operationId: replyParty
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/TelephonySessionId"
        - $ref: "#/components/parameters/TelephonySessionPartyId"
      requestBody:
        description: JSON body
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CallPartyReply"
        required: true
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ReplyParty"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "409":
          $ref: "#/components/responses/Conflict"
        "415":
          $ref: "#/components/responses/UnsupportedMediaType"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-throttling-group: Light
      x-app-permission: CallControl
  "/restapi/v1.0/account/{accountId}/telephony/sessions/{telephonySessionId}/parties/{partyId}/flip":
    post:
      tags:
        - Call Control
      summary: Call Flip on Party
      description: Performs call flip procedure by holding opposite party and calling to the specified target
      operationId: callFlipParty
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/TelephonySessionId"
        - $ref: "#/components/parameters/TelephonySessionPartyId"
      requestBody:
        description: JSON body
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CallPartyFlip"
        required: true
      responses:
        "200":
          description: Success
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "409":
          $ref: "#/components/responses/Conflict"
        "415":
          $ref: "#/components/responses/UnsupportedMediaType"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-throttling-group: Light
      x-app-permission: CallControl
  "/restapi/v1.0/account/{accountId}/telephony/sessions/{telephonySessionId}/parties/{partyId}/park":
    post:
      tags:
        - Call Control
      summary: Call Park
      description: Parks a call to a virtual location from where it can further be retrieved by any user from any phone of the system. The call session and call party identifiers should be specified in path. Currently, the users can park only their own incoming calls. Up to 50 calls can be parked simultaneously. Park location starts with asterisk (*) and ranges 801-899.
      operationId: callParkParty
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/TelephonySessionId"
        - $ref: "#/components/parameters/TelephonySessionPartyId"
      responses:
        "201":
          description: Created
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CallParty"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "409":
          $ref: "#/components/responses/Conflict"
        "415":
          $ref: "#/components/responses/UnsupportedMediaType"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-throttling-group: Light
      x-app-permission: CallControl
  "/restapi/v1.0/account/{accountId}/telephony/sessions/{telephonySessionId}/parties/bring-in":
    post:
      tags:
        - Call Control
      summary: Bring-In Call Party
      description: |
        Adds a new party to the call session by bringing in an established
        SIP call connection. The maximum number of parties to bring in is 10; only
        1 call party can be added per request. Currently, the method is supported for
        sessions of the `Conference` origin only.
      operationId: createCallPartyWithBringIn
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/TelephonySessionId"
      requestBody:
        description: JSON body
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AddPartyRequest"
        required: true
      responses:
        "201":
          description: Created
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CallParty"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "409":
          $ref: "#/components/responses/Conflict"
        "415":
          $ref: "#/components/responses/UnsupportedMediaType"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-throttling-group: Light
      x-app-permission: CallControl
  "/restapi/v1.0/account/{accountId}/telephony/sessions/{telephonySessionId}/parties/{partyId}":
    get:
      tags:
        - Call Control
      summary: Get Call Party Status
      description: Returns a call party status by ID.
      operationId: readCallPartyStatus
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/TelephonySessionId"
        - $ref: "#/components/parameters/TelephonySessionPartyId"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CallParty"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "415":
          $ref: "#/components/responses/UnsupportedMediaType"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-throttling-group: Light
      x-app-permission: CallControl
    delete:
      tags:
        - Call Control
      summary: Delete Call Party
      description: Deletes a party from a call session by ID. A party can be deleted only if supervised or parked. It is possible to delete only one conference participant per request.
      operationId: deleteCallParty
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/TelephonySessionId"
        - $ref: "#/components/parameters/TelephonySessionPartyId"
      requestBody:
        description: JSON body
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/DeletePartyRequest"
        required: false
      responses:
        "204":
          description: No Content
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "415":
          $ref: "#/components/responses/UnsupportedMediaType"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-throttling-group: Light
      x-app-permission: CallControl
    patch:
      tags:
        - Call Control
      summary: Update Call Party
      description: Modifies a call party by ID. There is a known limitation for Mute scenario - mute via REST API doesn't work with mute placed via RingCentral apps or HardPhone. It means that if you muted participant via Call Control API and RingCentral Desktop app you need to unmute both endpoints to bring the media back.
      operationId: updateCallParty
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/TelephonySessionId"
        - $ref: "#/components/parameters/TelephonySessionPartyId"
      requestBody:
        description: JSON body
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PartyUpdateRequest"
        required: true
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CallParty"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "409":
          $ref: "#/components/responses/Conflict"
        "415":
          $ref: "#/components/responses/UnsupportedMediaType"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-throttling-group: Light
      x-app-permission: CallControl
  "/restapi/v1.0/account/{accountId}/telephony/sessions/{telephonySessionId}/parties/{partyId}/recordings":
    post:
      tags:
        - Call Control
      summary: Create Recording
      description: |
        Starts a new call recording for a call party.
        *Please note* this API does not allow conference calls to be recorded.
      operationId: startCallRecording
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/TelephonySessionId"
        - $ref: "#/components/parameters/TelephonySessionPartyId"
      responses:
        "201":
          description: Created
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CallRecording"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "409":
          $ref: "#/components/responses/Conflict"
        "415":
          $ref: "#/components/responses/UnsupportedMediaType"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-throttling-group: Light
      x-app-permission: CallControl
  "/restapi/v1.0/account/{accountId}/telephony/sessions/{telephonySessionId}/parties/{partyId}/recordings/{recordingId}":
    patch:
      tags:
        - Call Control
      summary: Pause/Resume Recording
      description: Pause/resume recording
      operationId: pauseResumeCallRecording
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/TelephonySessionId"
        - $ref: "#/components/parameters/TelephonySessionPartyId"
        - name: recordingId
          in: path
          description: Internal identifier of a recording
          required: true
          schema:
            type: string
      requestBody:
        description: JSON body
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CallRecordingUpdate"
        required: true
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CallRecording"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "409":
          $ref: "#/components/responses/Conflict"
        "415":
          $ref: "#/components/responses/UnsupportedMediaType"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-throttling-group: Light
      x-app-permission: CallControl
  "/restapi/v1.0/account/{accountId}/telephony/sessions/{telephonySessionId}/supervise":
    post:
      tags:
        - Call Control
      summary: Supervise Call Session
      description: Allows monitoring a call session in 'Listen' mode. Input parameters should contain internal identifiers of a monitored user and a supervisor's device. Call session should be specified in path. Please note that this method supports single channel audio flow, which means that audio of both call participants is mixed and delivered to the supervisor in single audio channel. Currently this method is supported for Softphone/Hardphone only, since device IDs for WebRTC/Mobile apps cannot be obtained.
      operationId: superviseCallSession
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/TelephonySessionId"
      requestBody:
        description: JSON body
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SuperviseCallSessionRequest"
        required: true
      responses:
        "201":
          description: Created
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SuperviseCallSessionResponse"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "415":
          $ref: "#/components/responses/UnsupportedMediaType"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-throttling-group: Light
      x-app-permission: CallControl
  "/restapi/v1.0/account/{accountId}/telephony/sessions/{telephonySessionId}/parties/{partyId}/supervise":
    post:
      tags:
        - Call Control
      summary: Supervise Call Party
      description: |
        Allows to monitor a call party in 'Listen' mode. Input parameters
        are extension number of a monitored user and internal identifier of a supervisor's
        device. Call session and party identifiers should be specified in path. Please
        note that for this method dual channel audio flow is supported, which means
        that you need to make one more request for monitoring the second participant
        of a call. And as a result of each monitoring request the client receives
        SIP invite with the following header `p-rc-api-monitoring-ids` containing
        IDs of the monitored party and session. The flow is supported for calls with
        no more than 2 participants. Currently, this method is supported for Softphone/Hardphone devices
        only, since device IDs for WebRTC/Mobile apps cannot be obtained.
      operationId: superviseCallParty
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/TelephonySessionId"
        - $ref: "#/components/parameters/TelephonySessionPartyId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PartySuperviseRequest"
        required: true
      responses:
        "201":
          description: Created
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PartySuperviseResponse"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "409":
          $ref: "#/components/responses/Conflict"
        "415":
          $ref: "#/components/responses/UnsupportedMediaType"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-throttling-group: Light
      x-app-permission: CallControl
  "/restapi/v1.0/account/{accountId}/message-store-report":
    post:
      tags:
        - Message Exports
      summary: Create Message Store Report
      description: |
        Creates a task to collect all account messages within the specified
        time interval. Maximum number of simultaneous tasks per account is 2.
      operationId: createMessageStoreReport
      parameters:
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateMessageStoreReportRequest"
        required: true
      responses:
        "202":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MessageStoreReport"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-feature: EditUsers
      x-throttling-group: Heavy
      x-user-permission: Users
      x-app-permission: ReadMessages
  "/restapi/v1.0/account/{accountId}/message-store-report/{taskId}":
    get:
      tags:
        - Message Exports
      summary: Get Message Store Report Task
      description: Returns the current status of a task on report creation.
      operationId: readMessageStoreReportTask
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/PicTaskId"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MessageStoreReport"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-feature: EditUsers
      x-throttling-group: Heavy
      x-user-permission: Users
      x-app-permission: ReadMessages
  "/restapi/v1.0/account/{accountId}/message-store-report/{taskId}/archive":
    get:
      tags:
        - Message Exports
      summary: Get Message Store Report Archive
      description: Returns the created report with message data not including attachments.
      operationId: readMessageStoreReportArchive
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/PicTaskId"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MessageStoreReportArchive"
        "500":
          $ref: "#/components/responses/InternalError"
        "503":
          $ref: "#/components/responses/ServiceNotAvailable"
      x-feature: EditUsers
      x-throttling-group: Heavy
      x-user-permission: Users
      x-app-permission: ReadMessages
components:
  securitySchemes:
    OAuth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://platform.ringcentral.com/restapi/oauth/authorize
          tokenUrl: https://platform.ringcentral.com/restapi/oauth/token
          refreshUrl: https://platform.ringcentral.com/restapi/oauth/token
          scopes: {}
  responses:
    Forbidden:
      description: |
        General response with **HTTP 403 "Forbidden"** status.<br>
        Reasons: the requested operation is forbidden because of certain resource state, lack of permissions, feature unavailability, etc.
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/ApiErrorResponseModel"
    InvalidRequest:
      description: |
        General response with **HTTP 400 "Bad request"** status.<br>
        Reasons: unparsable request, path, query or body parameters are invalid.
        The error description may contain reference to particular parameter(s) which haven't passed the validation.
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/ParameterizedErrorResponseModel"
    ServiceNotAvailable:
      description: |
        General response with **HTTP 503 "Service not available"** status.<br>
        Reasons: server cannot process the request because of being overloaded, misconfiguration or other issues.
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/ApiErrorResponseModel"
    InternalError:
      description: |
        General response with **HTTP 500 "Internal Server Error"** status.<br>
        Reasons: general server-side error.
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/ApiErrorResponseModel"
    NotFound:
      description: |
        General response with **HTTP 404 "Not found"** status.<br>
        Reasons: the entity with given ID (typically specified in a path parameter), is not found or inaccessible
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/ApiErrorResponseModel"
    Conflict:
      description: |
        General response with **HTTP 409 "Conflict"** status.<br>
        Reasons: the requested modification operation causes a conflict (for example, unique constraint violation).
        The error definition may contain reference to particular parameter(s) which caused the conflict.
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/ParameterizedErrorResponseModel"
    RcvNotFound:
      description: Resource not found
    RcvInternalError:
      description: Error processing data
    RcvAccessForbidden:
      description: Access forbidden
    RcvTimeout:
      description: Data processing timeout
    RcvBadRequest:
      description: Bad request format
    OauthInvalidRequest:
      description: |
        The response with **HTTP 400 "Bad request"** status used in some OAuth / OpenID Connect endpoints.
      content:
        application/json:
          schema:
            allOf:
              - type: object
                properties:
                  error:
                    type: string
                    description: Standard OAuth error code as defined by [RFC-6749](The OAuth 2.0 Authorization Framework)
                    enum:
                      - invalid_request
                      - invalid_client
                      - invalid_grant
                      - unauthorized_client
                      - unsupported_grant_type
                      - invalid_scope
                      - invalid_request_uri
                      - unsupported_response_type
                      - request_not_supported
                      - request_uri_not_supported
                      - expired_token
                      - insufficient_scope
                      - access_denied
              - $ref: "#/components/schemas/ParameterizedErrorResponseModel"
    TooManyRequests:
      description: |
        General response with **HTTP 429 "Too many requests"** status.<br>
        Reasons: certain rate limit is exceeded.
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/ApiErrorResponseModel"
    BadGateway:
      description: |
        General response with **HTTP 502 "Bad Gateway"** status.<br>
        Reasons: server cannot process the request, API Gateway should use fallback route
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/ApiErrorResponseModel"
    UnsupportedMediaType:
      description: |
        General response with **HTTP 415 "Unsupported Media Type"** status.<br>
        Reasons: the request content type is not supported for the target operation.
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/ApiErrorResponseModel"
    Unauthorized:
      description: |
        General response with **HTTP 401 "Unauthorized"** status.<br>
        Reasons: user authentication failed.
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/ParameterizedErrorResponseModel"
    ScimNotFound:
      description: Not found
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/ScimErrorResponse"
        application/scim+json:
          schema:
            $ref: "#/components/schemas/ScimErrorResponse"
    ScimTooManyRequests:
      description: Too many requests
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/ScimErrorResponse"
        application/scim+json:
          schema:
            $ref: "#/components/schemas/ScimErrorResponse"
    ScimForbidden:
      description: Permissions denied
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/ScimErrorResponse"
        application/scim+json:
          schema:
            $ref: "#/components/schemas/ScimErrorResponse"
    ScimUnauthorized:
      description: Authorization failure
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/ScimErrorResponse"
        application/scim+json:
          schema:
            $ref: "#/components/schemas/ScimErrorResponse"
    ScimBadRequest:
      description: Bad request
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/ScimErrorResponse"
        application/scim+json:
          schema:
            $ref: "#/components/schemas/ScimErrorResponse"
    ScimInternalError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/ScimErrorResponse"
        application/scim+json:
          schema:
            $ref: "#/components/schemas/ScimErrorResponse"
    ScimConflict:
      description: Duplicate email
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/ScimErrorResponse"
        application/scim+json:
          schema:
            $ref: "#/components/schemas/ScimErrorResponse"
  schemas:
    SubscriptionListResource:
      type: object
      required:
        - uri
        - records
      properties:
        uri:
          type: string
          format: uri
          description: Canonical URI of a resource
        records:
          type: array
          minItems: 0
          maxItems: 30
          items:
            $ref: "#/components/schemas/SubscriptionInfo"
    MobileDeliveryMode:
      allOf:
        - $ref: "#/components/schemas/MobileDeliveryModeRequest"
        - type: object
          required:
            - encryption
          properties:
            encryption:
              type: boolean
              description: Specifies if notification messages will be encrypted or not.
              enum:
                - false
              readOnly: true
    MobileDeliveryModeRequest:
      title: Mobile Delivery Mode
      type: object
      required:
        - transportType
        - certificateName
        - registrationId
      properties:
        transportType:
          type: string
          description: The transport type for this subscription
          enum:
            - RC/APNS
            - RC/GCM
        certificateName:
          type: string
          description: Certificate name for mobile notification transports
        registrationId:
          type: string
          description: Device instance ID for mobile notification transports
          example: 38b062ae-85f8-4dcc-8734-04d3f7393d42
    ParameterizedErrorResponseModel:
      type: object
      description: Standard error response which may include parameterized errors
      required:
        - errors
      properties:
        errors:
          type: array
          description: The array of errors (there will be just one in the most of the cases)
          minItems: 1
          items:
            $ref: "#/components/schemas/ApiErrorWithParameter"
    ApiErrorResponseModel:
      type: object
      description: Standard error response model which is returned in case of any unsuccessful operation
      required:
        - errors
      properties:
        errors:
          type: array
          description: The array of errors (there will be just one in the most of the cases)
          minItems: 1
          items:
            $ref: "#/components/schemas/ApiError"
    WebhookDeliveryModeRequest:
      title: Webhook Delivery Mode
      type: object
      required:
        - transportType
        - address
      properties:
        transportType:
          type: string
          description: The transport type for this subscription, or the channel by which an app should be notified of an event
          enum:
            - WebHook
        address:
          type: string
          format: uri
          description: |
            The URL to which notifications should be delivered. This is only applicable for the `WebHook` transport type, for which it is a required field.
          example: https://acme.com/myservice/webhook
        verificationToken:
          type: string
          description: An optional validation token used to verify the authenticity of the incoming webhook. Applicable only for the `WebHook` transport type.
          writeOnly: true
    ApiError:
      type: object
      description: Generalized API error structure suitable for any error type
      required:
        - errorCode
        - message
      properties:
        errorCode:
          type: string
          description: Logical error code (typically, 3 letters followed with number, dash separated)
          example: XXX-123
        message:
          type: string
          description: User-friendly error message
          example: Something went wrong
      additionalProperties: true
    WebSocketDeliveryMode:
      title: Websocket Delivery Mode
      type: object
      required:
        - transportType
      properties:
        transportType:
          type: string
          description: The transport type for this subscription
          enum:
            - WebSocket
    DisabledFilterInfo:
      type: object
      required:
        - filter
        - reason
      properties:
        filter:
          type: string
          description: Event filter that is disabled for the user
        reason:
          type: string
          description: Reason why the filter is disabled for the user
        message:
          type: string
          description: Error message
    AnyPublicDeliveryMode:
      x-docs-level-fragment: Public
      title: Notification Delivery Modes
      description: Notification delivery transport information
      anyOf:
        - $ref: "#/components/schemas/WebhookDeliveryMode"
        - $ref: "#/components/schemas/WebSocketDeliveryMode"
      discriminator:
        propertyName: transportType
        mapping:
          WebHook: "#/components/schemas/WebhookDeliveryMode"
          WebSocket: "#/components/schemas/WebSocketDeliveryMode"
    PubNubDeliveryMode:
      deprecated: true
      allOf:
        - $ref: "#/components/schemas/PubNubDeliveryModeRequest"
        - type: object
          required:
            - address
            - subscriberKey
            - secretKey
            - encryption
          properties:
            address:
              type: string
              description: |
                PubNub channel name
              example: 54770517599294_6dda849e
              readOnly: true
            subscriberKey:
              type: string
              description: |
                (Only for a `PubNub` transport)
                PubNub credential required to subscribe to the channel
              readOnly: true
            secretKey:
              type: string
              description: |
                (Only for a `PubNub` transport)
                PubNub credential required to subscribe to the channel
              readOnly: true
            encryptionAlgorithm:
              type: string
              description: |
                (Only for a `PubNub` transport, returned only if `encryption` is `true`)
                Encryption algorithm used
              enum:
                - AES
              readOnly: true
            encryptionKey:
              type: string
              description: |
                (Only for a `PubNub` transport, returned only if `encryption` is `true`)
                Cryptographic key to decrypt PubNub notification messages
              readOnly: true
    PubNubDeliveryModeRequest:
      title: PubNub Delivery Mode
      deprecated: true
      type: object
      required:
        - transportType
      properties:
        transportType:
          type: string
          description: The transport type for this subscription
          enum:
            - PubNub
        encryption:
          type: boolean
          description: |
            Optional. Specifies if notification messages will be encrypted
            or not. Please note that for some event filters (e.g. presence) encryption is mandatory and
            `false` value provided by caller will be ignored.
          default: false
    UpdateSubscriptionRequest:
      type: object
      required:
        - eventFilters
      properties:
        eventFilters:
          type: array
          description: The list of event filters corresponding to events the user is subscribed to
          minItems: 1
          items:
            type: string
            minLength: 1
        expiresIn:
          type: integer
          format: int32
          minimum: 1
          example: 1200
          description: |
            Subscription lifetime in seconds. The maximum subscription lifetime depends upon the specified `transportType`:

            | Transport type      | Maximum permitted lifetime     |
            | ------------------- | ------------------------------ |
            | `WebHook`           | 315360000 seconds (10 years)   |
            | `RC/APNS`, `RC/GSM` | 7776000 seconds (90 days)      |
            | `WebSocket`         | n/a (the parameter is ignored) |
    CreateWebhookSubscriptionRequest:
      allOf:
        - $ref: "#/components/schemas/UpdateSubscriptionRequest"
        - type: object
          required:
            - deliveryMode
          properties:
            deliveryMode:
              $ref: "#/components/schemas/WebhookDeliveryModeRequest"
    SubscriptionInfo:
      required:
        - id
        - uri
        - eventFilters
        - deliveryMode
        - creationTime
        - expirationTime
        - status
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Canonical URI of a subscription resource
          readOnly: true
        id:
          type: string
          description: Internal identifier of a subscription
          readOnly: true
          example: 95fecfc9-9cdc-4e94-a78a-89fd65889d37
        eventFilters:
          type: array
          description: The list of event filter names corresponding to events the user is subscribed to
          minItems: 0
          items:
            type: string
            minLength: 1
        disabledFilters:
          type: array
          minItems: 0
          description: |
            The list of event filter names corresponding to events the user is not subscribed to due to
            certain limitations
          items:
            $ref: "#/components/schemas/DisabledFilterInfo"
          readOnly: true
        expirationTime:
          type: string
          format: date-time
          description: |
            Subscription expiration time in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)
            format including timezone, for example *2016-03-10T18:07:52.534Z*
          readOnly: true
        expiresIn:
          type: integer
          format: int32
          minimum: 1
          description: Subscription lifetime in seconds
        status:
          type: string
          description: Subscription status
          enum:
            - Active
            - Blacklisted
          readOnly: true
        creationTime:
          type: string
          description: |
            Subscription creation time in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)
            format including timezone, for example *2016-03-10T18:07:52.534*
          format: date-time
          readOnly: true
        deliveryMode:
          $ref: "#/components/schemas/NotificationDeliveryMode"
        blacklistedData:
          type: object
          description: Returned if a WebHook subscription is blacklisted
          readOnly: true
          properties:
            blacklistedAt:
              type: string
              format: date-time
              description: |
                Time of adding subscription to a black list in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)
                format including timezone, for example *2016-03-10T18:07:52.534Z*
            reason:
              type: string
              description: Reason of adding subscription to a black list
    WebhookDeliveryMode:
      title: Webhook Delivery Mode
      type: object
      required:
        - transportType
        - address
        - encryption
      properties:
        transportType:
          type: string
          description: The transport type for this subscription, or the channel by which an app should be notified of an event
          enum:
            - WebHook
        address:
          type: string
          format: uri
          description: |
            The URL to which notifications should be delivered. This is only applicable for the `WebHook` transport type, for which it is a required field.
          example: https://acme.com/myservice/webhook
        encryption:
          type: boolean
          description: Specifies if notification messages will be encrypted or not.
          enum:
            - false
          readOnly: true
    NotificationDeliveryMode:
      anyOf:
        - $ref: "#/components/schemas/AnyPublicDeliveryMode"
    InternalDeliveryMode:
      type: object
      required:
        - transportType
        - configName
      properties:
        transportType:
          type: string
          description: The transport type for this subscription
          enum:
            - Internal
        configName:
          type: string
          description: |
            (Only for an `Internal` transport)
            The name of internal channel (defined in the backend service configuration) to deliver notifications through.
          example: my-server-channel
    ApiErrorWithParameter:
      description: |
        The error model with additional attributes which can be used for HTTP 400/409
        This is a deprecated model: "ApiError" model can be used instead with arbitrary additional parameters
      allOf:
        - $ref: "#/components/schemas/ApiError"
        - type: object
          properties:
            parameterName:
              type: string
              description: The name of the API parameter/attribute which caused the error
            parameterValue:
              type: string
              description: The value of the API parameter/attribute which caused the error
    RcwLinkedUserModel:
      type: object
      description: The internal IDs of RC-authenticated users.
      properties:
        linkedUser:
          $ref: "#/components/schemas/RcwDomainUserModel"
    RcwImmutableResourceIdModel:
      type: object
      properties:
        id:
          type: string
          description: Internal object ID
          minLength: 1
          maxLength: 20
          example: "78654321"
          readOnly: true
    RcwDomainUserModel:
      allOf:
        - $ref: "#/components/schemas/RcwUserModel"
        - type: object
          required:
            - domain
          properties:
            domain:
              type: string
              description: Identity domain
              enum:
                - pbx
                - ilm
              default: pbx
    RcwBaseContactModel:
      type: object
      properties:
        firstName:
          type: string
          description: First (given) name
          maxLength: 64
          example: John
        lastName:
          type: string
          description: Last (family) name
          maxLength: 64
          example: Doe
    RcwResourceBaseModel:
      allOf:
        - $ref: "#/components/schemas/RcwImmutableResourceIdModel"
        - type: object
          required:
            - creationTime
            - lastModifiedTime
          properties:
            creationTime:
              type: string
              description: Object creation time
              format: date-time
              readOnly: true
            lastModifiedTime:
              type: string
              description: Object last modification time
              format: date-time
              readOnly: true
    HistoryWebinarResource:
      allOf:
        - $ref: "#/components/schemas/RcwResourceBaseModel"
        - $ref: "#/components/schemas/WebinarTitleModel"
        - type: object
          properties:
            settings:
              $ref: "#/components/schemas/WebinarSettingsModel"
        - $ref: "#/components/schemas/WebinarHostModel"
    RcwUserModel:
      type: object
      required:
        - userId
        - accountId
      properties:
        userId:
          type: string
          maxLength: 256
          description: User ID
        accountId:
          type: string
          maxLength: 256
          description: Account ID
    WebinarTitleModel:
      type: object
      required:
        - title
      properties:
        title:
          type: string
          description: Webinar title
          maxLength: 512
          minLength: 1
          example: All-Hands Webinar
        description:
          type: string
          description: User-friendly description of the Webinar
          maxLength: 4096
          minLength: 0
          example: Quarterly All-hands event to present recent news about our company to employees
          default: ""
    HostModel:
      allOf:
        - $ref: "#/components/schemas/RcwBaseContactModel"
        - $ref: "#/components/schemas/RcwLinkedUserModel"
    WebinarSettingsModel:
      type: object
      description: Various settings which define behavior of this Webinar's Sessions
      properties:
        recordingEnabled:
          type: boolean
          description: Indicates if recording is enabled (if false all other recording settings cannot be enabled)
          default: true
        autoRecord:
          type: boolean
          description: Indicates if recording should start automatically when a Webinar goes live
          default: true
        recordingSharingEnabled:
          type: boolean
          description: Indicates if recording can be shared
          readOnly: true
          default: true
        recordingDownloadEnabled:
          type: boolean
          description: Indicates if recording can be downloaded
          readOnly: true
          default: true
        recordingDeletionEnabled:
          deprecated: true
          type: boolean
          description: |
            DEPRECATED AND REPLACED BY 'pastSessionDeletionEnabled' setting.
            Indicates if recording can be deleted (this setting is read-only at webinar/session level)
          readOnly: true
          default: false
        pastSessionDeletionEnabled:
          type: boolean
          description: |
            Indicates if deletion of past session along with its artifacts is enabled for host.
            This setting is read-only at webinar level
          readOnly: true
          default: false
        panelistWaitingRoom:
          type: boolean
          description: Indicates if Panelists should be places to waiting room after joining
          default: false
        panelistVideoEnabled:
          type: boolean
          description: Indicates if Panelists' video should be 'on' by default
          default: true
        panelistScreenSharingEnabled:
          type: boolean
          description: Indicates if Panelists' screen sharing should be 'on' by default
          default: true
        panelistMuteControlEnabled:
          type: boolean
          description: Indicates if Panelists can mute/unmute themselves by default
          default: true
        panelistAuthentication:
          type: string
          description: Indicates if Panelists have to be authenticated users
          enum:
            - Guest
            - AuthenticatedUser
            - AuthenticatedCoworker
          default: AuthenticatedCoworker
        attendeeAuthentication:
          type: string
          description: Indicates if attendees have to be authenticated users
          enum:
            - Guest
            - AuthenticatedUser
            - AuthenticatedCoworker
          default: AuthenticatedCoworker
        artifactsAccessAuthentication:
          type: string
          description: |
            Indicates who can access webinar artifacts. Applies to recordings at present.
            Applicable to other artifacts such as Q&A, Polls in the future.
          enum:
            - Guest
            - AuthenticatedUser
            - AuthenticatedCoworker
          default: AuthenticatedUser
        pstnEnabled:
          type: boolean
          description: Indicates if dial-in PSTN audio option is enabled by default
          default: false
        password:
          type: string
          description: Webinar password
        qnaEnabled:
          type: boolean
          description: Indicates if Q&A is enabled for the webinar (if false all other Q&A settings cannot be enabled)
          default: true
        qnaAnonymousEnabled:
          type: boolean
          description: Indicates if anonymous Q&A is enabled for the webinar
          default: true
        moderatedQnaEnabled:
          type: boolean
          description: Indicate if the moderated Q&A enabled for webinar
          default: true
        pollsEnabled:
          type: boolean
          description: Indicates if polls are enabled for the webinar (if false all other polls settings cannot be enabled)
          default: true
        pollsAnonymousEnabled:
          type: boolean
          description: Indicates if anonymous poll answers are enabled for the webinar
          default: true
        registrationEnabled:
          type: boolean
          description: Indicates if a registration is enabled for the webinar (if false all other registration settings are ignored)
          default: false
        postWebinarRedirectUri:
          type: string
          format: uri
          description: URI to redirect users after the webinar
          example: https://www.acme.com/thankyou
        externalLivestreamEnabled:
          type: boolean
          description: Indicates if livestreaming to external streaming provider is enabled
          readOnly: true
          default: true
    WebinarHostModel:
      type: object
      required:
        - host
      properties:
        host:
          $ref: "#/components/schemas/HostModel"
    RcwSessionRuntimeStatusModel:
      type: string
      description: |
        Session runtime status (for 'Active' Sessions only).
        Please note that 'Idle' status shouldn't be returned in the API
        (but can be delivered in an event)
      enum:
        - Idle
        - Practice
        - GoingLive
        - Live
        - Break
        - Debrief
      example: Live
    RecordingStatusModel:
      type: string
      description: Recording status
      enum:
        - Processing
        - Available
        - Failed
        - Purged
      example: Available
    RecordingSharedLinkExpiryModel:
      type: string
      nullable: true
      format: date-time
      description: Time after which recording shared link cannot be accessed by recipients.
      example: 2023-10-01T10:05:00.000Z
    RecordingSharingModel:
      type: object
      required:
        - recordingSharedUri
      properties:
        recordingSharedUri:
          type: string
          format: uri
          readOnly: true
          description: Shared URI of the recording. If a password was required to join a webinar, the URI should contain the password encoded
          example: https://v.ringcentral.com/w/a/recording/de7yd8ew7yfsdfjh899843rgj?pw=a1b2c3d4
    RcwSessionStatusModel:
      type: string
      description: Webinar session status
      enum:
        - Scheduled
        - Active
        - Finished
      example: Finished
    HistorySessionMinimalModel:
      type: object
      properties:
        startTime:
          type: string
          description: |
            Session start time. If a session hasn't been started this fields should be set to "scheduledStartTime"
          format: date-time
        endTime:
          type: string
          description: |
            Session end time. If a session hasn't been finished this fields should be set to ("startTime"+"scheduledDuration")
          format: date-time
        duration:
          type: integer
          format: int32
          description: Session duration in seconds rounded up (returned if 'startTime' and 'endTime' are not empty)
          example: 3600
        title:
          type: string
          description: Session title. If blank - derived from webinar title.
          maxLength: 512
          example: Live Broadcasting US
        description:
          type: string
          maxLength: 4096
          description: User-friendly description of the Session. If blank - derived from webinar title.
          example: Live session for US-based participants
    SessionLivestreamMinimalModel:
      type: object
      readOnly: true
      required:
        - livestreamId
        - livestreamStatus
        - serviceProvider
      properties:
        livestreamId:
          type: string
          description: Identifier of the livestream
          example: 40740e06-4eec-4458-a86e-8578e192274q
        serviceProvider:
          type: string
          description: Name of the livestreaming service provider
          example: YouTube
        livestreamStatus:
          $ref: "#/components/schemas/RcwLivestreamStatusModel"
        previousLivestreamStatus:
          $ref: "#/components/schemas/RcwLivestreamStatusModel"
        livestreamStartTime:
          type: string
          description: Time at which the session started to publish media to livestream service provider.
          format: date-time
        error:
          $ref: "#/components/schemas/ApiError"
      example:
        livestreamId: 40740e06-4eec-4458-a86e-8578e192274q
        livestreamStatus: Error
        previousLivestreamStatus: Initialized
        serviceProvider: YouTube
        error:
          errorCode: WLA-123
          message: Authorization invalid
    HistorySessionResource:
      allOf:
        - $ref: "#/components/schemas/RcwResourceBaseModel"
        - $ref: "#/components/schemas/HistorySessionBaseModel"
        - $ref: "#/components/schemas/SessionGeneratedModel"
        - $ref: "#/components/schemas/SessionRecordingExtendedModel"
        - $ref: "#/components/schemas/SessionLivestreamListModel"
    RecordingExtendedModel:
      allOf:
        - $ref: "#/components/schemas/RcwResourceBaseModel"
        - $ref: "#/components/schemas/RecordingBaseModel"
        - $ref: "#/components/schemas/RecordingSharingModel"
    SessionLivestreamListModel:
      type: object
      readOnly: true
      properties:
        livestreams:
          type: array
          minItems: 0
          description: The list of livestreams configured for the session
          items:
            $ref: "#/components/schemas/SessionLivestreamMinimalModel"
    RcwLivestreamStatusModel:
      type: string
      description: Livestream status
      enum:
        - Initialized
        - Authorized
        - Configured
        - PublishSetup
        - Publishing
        - Error
        - Paused
        - Break
        - Deleted
        - Completed
      example: Configured
    SessionGeneratedModel:
      type: object
      properties:
        videoBridgeId:
          type: string
          description: The RCV bridge id
          example: "839874770"
    HistorySessionBaseModel:
      allOf:
        - $ref: "#/components/schemas/HistorySessionMinimalModel"
        - type: object
          properties:
            scheduledStartTime:
              type: string
              description: Session scheduled start time.
              format: date-time
            scheduledDuration:
              type: integer
              format: int32
              description: The scheduled duration of the Session in seconds.
              example: 1800
            timeZone:
              type: string
              description: IANA-compatible time zone name (see https://www.iana.org/time-zones).
              example: America/New_York
            localeCode:
              type: string
              description: Session locale code. Can't be blank or null.
              example: en-US
              default: en-US
            panelJoinTimeOffset:
              type: integer
              format: int32
              description: |
                The time offset (positive, in seconds) indicating how much in advance
                (comparing to "scheduledStartTime") panel members should join for the pre-webinar team sync
              minimum: 0
              default: 0
              example: 900
            broadcastingStartTime:
              type: string
              description: The time when broadcasting started.
              format: date-time
            broadcastingEndTime:
              type: string
              description: The time when broadcasting ended.
              format: date-time
            status:
              $ref: "#/components/schemas/RcwSessionStatusModel"
            runtimeStatus:
              $ref: "#/components/schemas/RcwSessionRuntimeStatusModel"
            participantCount:
              type: integer
              format: int32
              description: The number of participants (of all roles) who joined the webinar
              example: 150
            attendeeCount:
              type: integer
              format: int32
              description: The number of attendees who joined the webinar
              example: 145
            uniqueParticipantCount:
              type: integer
              format: int32
              description: Unique number of participants (of all roles) who joined the webinar
              example: 140
            uniqueAttendeeCount:
              type: integer
              format: int32
              description: Unique number of attendees who joined the webinar
              example: 135
    SessionRecordingExtendedModel:
      type: object
      properties:
        recording:
          $ref: "#/components/schemas/RecordingExtendedModel"
    RecordingSharedStatusModel:
      type: boolean
      description: |
        Indicates if Host or Admin has shared a recording.
        Can be set to true only then recording status is 'Available'.
      example: true
    RecordingBaseModel:
      type: object
      required:
        - status
      properties:
        status:
          $ref: "#/components/schemas/RecordingStatusModel"
        failureReason:
          $ref: "#/components/schemas/ApiError"
        duration:
          type: integer
          format: int32
          readOnly: true
          minimum: 1
          description: Recording duration in seconds
          example: 3600
        shared:
          $ref: "#/components/schemas/RecordingSharedStatusModel"
        sharedUriExpirationTime:
          $ref: "#/components/schemas/RecordingSharedLinkExpiryModel"
    OriginalRoleModel:
      type: object
      description: Role assigned to participant when invite was sent or during join time (if an invite was not sent)
      required:
        - originalRole
      properties:
        originalRole:
          $ref: "#/components/schemas/RcwRoleEnum"
    RcwPagingModel:
      allOf:
        - $ref: "#/components/schemas/RcwPagingForwardModel"
        - type: object
          properties:
            previousPageToken:
              type: string
              description: Previous page token (absent for the first page of the result set)
    ParticipantListResource:
      type: object
      required:
        - records
        - paging
      properties:
        records:
          type: array
          minItems: 0
          items:
            $ref: "#/components/schemas/ParticipantExtendedModel"
        paging:
          $ref: "#/components/schemas/RcwPagingModel"
    RcwRoleAttributeModel:
      type: object
      description: The attribute declaration to indicate webinar session participant/invitee role
      required:
        - role
      properties:
        role:
          $ref: "#/components/schemas/RcwRoleEnum"
    ParticipantBaseModel:
      readOnly: true
      allOf:
        - $ref: "#/components/schemas/ParticipantReducedModel"
        - type: object
          properties:
            email:
              $ref: "#/components/schemas/RcwEmailModel"
            qnaBlocked:
              type: boolean
              description: |
                Boolean to indicate if the participant was blocked from Q&A
              example: true
    ParticipantReducedModel:
      readOnly: true
      allOf:
        - $ref: "#/components/schemas/RcwResourceIdModel"
        - $ref: "#/components/schemas/RcwBaseContactModel"
        - $ref: "#/components/schemas/RcwRoleAttributeModel"
        - $ref: "#/components/schemas/OriginalRoleModel"
        - $ref: "#/components/schemas/RcwLinkedUserModel"
        - $ref: "#/components/schemas/RcwAvatarOwnerModel"
        - $ref: "#/components/schemas/ParticipantTypeModel"
    RcwPagingForwardModel:
      type: object
      required:
        - pageToken
        - perPage
      properties:
        perPage:
          type: integer
          format: int32
          minimum: 1
          maximum: 1000
          description: Number of items per page
          example: 100
        pageToken:
          type: string
          description: Current page token
        nextPageToken:
          type: string
          description: Next page token (absent for the last page of the result set)
        previousPageToken:
          type: string
          description: |
            Previous page token (absent for the first page of the result set)
            May be omitted if the result set does not support backward navigation.
    RcwAvatarOwnerModel:
      type: object
      properties:
        avatarToken:
          type: string
          description: A token to access avatar image from CDN. Available only for authenticated panel members and attendees
          example: wedyugwied8wud98u90i329silqdjalidj
          readOnly: true
    RcwEmailModel:
      type: string
      format: email
      minLength: 1
      maxLength: 256
      example: john.doe@example.com
      description: User's contact email
    ParticipantTypeModel:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          description: The type of the participant specified in invite or determined at join time
          enum:
            - User
            - Room
          default: User
    RcwRoleEnum:
      type: string
      description: |
        The role of the webinar session participant/invitee.
        See also: [Understanding Webinar Roles](https://support.ringcentral.com/webinar/getting-started/understanding-ringcentral-webinar-roles.html)
      enum:
        - Panelist
        - CoHost
        - Host
        - Attendee
      example: Panelist
    RcwResourceIdModel:
      type: object
      properties:
        id:
          type: string
          description: Internal object ID
          minLength: 1
          maxLength: 20
          example: "78654321"
    ParticipantExtendedModel:
      allOf:
        - $ref: "#/components/schemas/ParticipantBaseModel"
        - type: object
          properties:
            joinTime:
              type: string
              format: date-time
              description: The time (earliest) when this participant joined the session
            leaveTime:
              type: string
              format: date-time
              description: The time (latest) when this participant left the session
            wasEjected:
              type: boolean
              description: Indicates if this participant was ejected from the webinar
            inviteeId:
              type: string
              description: For invited participants - Invitee ID (matches Configuration API Invitee IDs)
            registrantId:
              type: string
              description: Registrant ID
              example: "12345678"
            uniqueUserHash:
              type: string
              description: The hash string which is unique for each unique user
              example: qzR4wNbddziRil7i033ELlb3KXrJDsw8mOyj970J+so=
    InviteeListResource:
      type: object
      required:
        - records
        - paging
      properties:
        records:
          type: array
          minItems: 0
          items:
            $ref: "#/components/schemas/InviteeModel"
        paging:
          $ref: "#/components/schemas/RcwPagingModel"
    InviteeModel:
      allOf:
        - $ref: "#/components/schemas/ParticipantBaseModel"
        - type: object
          required:
            - sendInvite
            - joined
          properties:
            sendInvite:
              type: boolean
              description: |
                Indicates if invite/cancellation emails was sent to this invitee.
              example: true
            joined:
              type: boolean
              description: Indicates that this invitee joined the session
              example: true
    RecordingAdminModel:
      allOf:
        - $ref: "#/components/schemas/RecordingItemModel"
        - type: object
          properties:
            session:
              $ref: "#/components/schemas/SessionRefAdminModel"
    RecordingModel:
      allOf:
        - $ref: "#/components/schemas/RcwResourceBaseModel"
        - $ref: "#/components/schemas/RecordingBaseModel"
    RecordingAdminListResource:
      type: object
      required:
        - records
        - paging
      properties:
        records:
          type: array
          minItems: 0
          items:
            $ref: "#/components/schemas/RecordingAdminModel"
        paging:
          $ref: "#/components/schemas/RcwPagingModel"
    WebinarRefModel:
      allOf:
        - $ref: "#/components/schemas/RcwResourceIdModel"
        - $ref: "#/components/schemas/WebinarTitleModel"
        - $ref: "#/components/schemas/WebinarHostModel"
    RecordingItemModel:
      allOf:
        - $ref: "#/components/schemas/RecordingModel"
        - type: object
          properties:
            session:
              $ref: "#/components/schemas/SessionRefModel"
    SessionRefAdminModel:
      allOf:
        - $ref: "#/components/schemas/RcwResourceIdModel"
        - $ref: "#/components/schemas/HistorySessionMinimalModel"
        - type: object
          properties:
            webinar:
              $ref: "#/components/schemas/WebinarRefModel"
    SessionRefModel:
      allOf:
        - $ref: "#/components/schemas/RcwResourceIdModel"
        - $ref: "#/components/schemas/HistorySessionMinimalModel"
        - type: object
          properties:
            webinar:
              $ref: "#/components/schemas/WebinarRefModel"
    RecordingAdminExtendedItemModel:
      allOf:
        - $ref: "#/components/schemas/RecordingItemExtendedModel"
        - type: object
          properties:
            session:
              $ref: "#/components/schemas/SessionRefAdminModel"
    RecordingItemExtendedModel:
      allOf:
        - $ref: "#/components/schemas/RecordingExtendedModel"
        - type: object
          properties:
            session:
              $ref: "#/components/schemas/SessionRefModel"
    SessionGlobalListResource:
      type: object
      required:
        - records
        - paging
      properties:
        records:
          type: array
          minItems: 0
          items:
            $ref: "#/components/schemas/SessionGlobalResource"
        paging:
          $ref: "#/components/schemas/RcwPagingModel"
    SessionGlobalResource:
      allOf:
        - $ref: "#/components/schemas/RcwResourceBaseModel"
        - type: object
          required:
            - webinar
          properties:
            webinar:
              $ref: "#/components/schemas/WebinarRefModel"
        - $ref: "#/components/schemas/HistorySessionBaseModel"
        - $ref: "#/components/schemas/SessionGeneratedModel"
        - $ref: "#/components/schemas/SessionRecordingModel"
        - $ref: "#/components/schemas/SessionLivestreamListModel"
    SessionRecordingModel:
      type: object
      properties:
        recording:
          $ref: "#/components/schemas/RecordingModel"
    RecordingListResource:
      type: object
      required:
        - records
        - paging
      properties:
        records:
          type: array
          minItems: 0
          items:
            $ref: "#/components/schemas/RecordingItemModel"
        paging:
          $ref: "#/components/schemas/RcwPagingModel"
    RecordingDownloadModel:
      type: object
      required:
        - downloadUri
        - downloadContentType
        - downloadSize
      properties:
        downloadUri:
          type: string
          format: uri
          description: Download URI (available only for webinar host or admin)
        downloadContentType:
          type: string
          description: MIME type of the file to download.
          enum:
            - video/mp4
            - audio/m4a
          default: video/mp4
        downloadSize:
          type: integer
          format: int64
          description: Download file size in bytes
          example: 20821092300
    RecordingMediaType:
      type: string
      description: Recording file media type. 'Video' implies multiplexed audio and video. 'Audio' refers to audio only.
      enum:
        - Video
        - Audio
      example: Video
      default: Video
    RegSessionModel:
      type: object
      required:
        - id
        - registrationStatus
        - registrantCount
        - hasRealRegistrants
      properties:
        id:
          type: string
          readOnly: true
          description: ID of the session
          example: "123456789"
        registrationStatus:
          type: string
          enum:
            - Open
            - Closed
          description: Status of the registration
          example: Open
        registrationPageUri:
          type: string
          format: uri
          description: The URI of the registration landing page
          readOnly: true
          example: https://abcde12345.webinar.ringcentral.com/register
        brandingDescriptorUri:
          type: string
          format: uri
          description: The URI of the branding descriptor
          readOnly: true
          example: https://abcde12345.webinar.ringcentral.com/branding
        registrantCount:
          type: integer
          format: int32
          description: The current number of registrants
          readOnly: true
          example: 10
        postWebinarRegistrantCount:
          type: integer
          format: int32
          description: The current number of post webinar registrants
          readOnly: true
          example: 10
        hasRealRegistrants:
          type: boolean
          description: Indicates that there are non-test registrants
          readOnly: true
          example: true
        icalendarSequence:
          type: integer
          format: int32
          minimum: 0
          readOnly: true
          description: Sequence number for iCalendar email attachments
        settings:
          type: object
          properties:
            autoCloseLimit:
              type: integer
              description: The maximum number of registrants which forces closing the registration (0 means "off").
              format: int32
              minimum: 0
              default: 0
            suppressEmails:
              type: boolean
              description: Indicates that emails to registrants should be suppressed (should be supported by external party)
              default: false
            registrationDigestEnabled:
              type: boolean
              description: Indicates that registration digest should be sent to host.
              default: true
            preventMultipleDeviceJoins:
              type: boolean
              description: Indicates that registrants are allowed to join from multiple devices.
              default: false
            workEmailRequired:
              type: boolean
              description: Indicates that work email address is required for registration.
              default: false
            viewRecording:
              type: boolean
              description: Indicates that recording will be included in emails.
            onDemandDuration:
              type: string
              description: Duration of on-demand webinar. The default value can only be used if the session is on demand.
              enum:
                - OneMonth
                - TwoMonths
                - ThreeMonths
                - SixMonths
                - OneYear
              default: SixMonths
            recordingExist:
              type: boolean
              description: Indicates that recording exists for the session.
              readOnly: true
              nullable: true
            autoOpenPostWebinarRegistration:
              type: boolean
              description: Indicates that post webinar registration will be opened automatically when webinar ends.
            postWebinarRegistrationClosingTime:
              type: string
              description: The time after which the post webinar will be closed automatically.
              format: date-time
              readOnly: true
              nullable: true
    RegistrantModelResponsePostWithQuestionnaire:
      allOf:
        - $ref: "#/components/schemas/RegistrantModelWithQuestionnaire"
        - type: object
          properties:
            icalendarSequence:
              type: integer
              format: int32
              minimum: 0
              readOnly: true
              description: Sequence number for iCalendar email attachments
    RegQuestionBaseModel:
      type: object
      required:
        - questionId
      properties:
        questionId:
          type: string
          description: ID of the custom question
          example: "123456789"
    FixedAnswerModel:
      allOf:
        - $ref: "#/components/schemas/RegQuestionBaseModel"
        - type: object
          required:
            - answerIds
          properties:
            answerIds:
              type: array
              description: The list of answer IDs
              minItems: 1
              items:
                type: string
    VariableAnswerModel:
      allOf:
        - $ref: "#/components/schemas/RegQuestionBaseModel"
        - type: object
          required:
            - answerText
          properties:
            answerText:
              type: string
              description: Answer text
    RegistrantMinimalModel:
      allOf:
        - $ref: "#/components/schemas/RcwBaseContactModel"
        - type: object
          required:
            - firstName
            - lastName
            - email
          properties:
            email:
              $ref: "#/components/schemas/RcwEmailModel"
            joinUri:
              type: string
              format: uri
              readOnly: true
              maxLength: 256
              minLength: 5
              description: The personalized URI for this registrant to join the Webinar
              example: https://v.ringcentral.com/w/a/join/iuyef77fsj473wn10ashjfk34
            cancellationUri:
              type: string
              format: uri
              readOnly: true
              maxLength: 256
              minLength: 5
              description: The personalized URI for this registrant to cancel the registration
              example: https://abcde12345.webinar.ringcentral.com/register?jlt=iuyef77fsj473wn10ashjfk34&action=cancel
            registeredPostWebinar:
              type: boolean
              description: Indicates if the registrant was registered to on-demand webinar
              readOnly: true
              nullable: false
    RegistrantBaseModelWithQuestionnaire:
      allOf:
        - $ref: "#/components/schemas/RegistrantBaseModel"
        - type: object
          properties:
            questionnaire:
              type: array
              description: Answers on custom registration questions
              minItems: 0
              items:
                $ref: "#/components/schemas/RegAnswerModel"
    RegistrantBaseModel:
      allOf:
        - $ref: "#/components/schemas/RegistrantMinimalModel"
        - type: object
          properties:
            visitorId:
              type: string
              description: Visitor ID passed from registration page
            externalId:
              type: string
              description: ID of a registrant passed from external system
            registrationTime:
              type: string
              description: Registration time (can be earlier than "creationTime" due to indirect persistence)
              format: date-time
              readOnly: true
            ipAddress:
              type: string
              format: ipv4
              description: IP address of the registrant's user agent
            source:
              type: string
              description: Registration channel source (coming from registration URI)
            participantId:
              type: string
              description: ID of session participant (from Runtime Service - if this registrant attended the webinar)
    RegistrantListResource:
      type: object
      required:
        - records
        - paging
      properties:
        records:
          type: array
          minItems: 0
          items:
            $ref: "#/components/schemas/RegistrantModelWithQuestionnaire"
        paging:
          $ref: "#/components/schemas/RcwPagingForwardModel"
    RegistrantModelWithQuestionnaire:
      allOf:
        - $ref: "#/components/schemas/RcwResourceBaseModel"
        - $ref: "#/components/schemas/RegistrantBaseModelWithQuestionnaire"
    RegAnswerModel:
      anyOf:
        - $ref: "#/components/schemas/FixedAnswerModel"
        - $ref: "#/components/schemas/VariableAnswerModel"
    WebinarCreationRequest:
      allOf:
        - $ref: "#/components/schemas/WebinarBaseModel"
        - required:
            - title
        - type: object
          properties:
            host:
              $ref: "#/components/schemas/RcwLinkedUserModel"
    WebinarBaseModel:
      allOf:
        - $ref: "#/components/schemas/WebinarInfoModel"
        - type: object
          properties:
            settings:
              $ref: "#/components/schemas/WcsWebinarSettingsModel"
    WcsWebinarResource:
      allOf:
        - $ref: "#/components/schemas/RcwResourceBaseModel"
        - $ref: "#/components/schemas/WebinarBaseModel"
        - $ref: "#/components/schemas/WebinarGeneratedModel"
    WcsWebinarSettingsModel:
      type: object
      description: Various settings which define behavior of this Webinar's Sessions
      properties:
        recordingEnabled:
          type: boolean
          description: Indicates if recording is enabled (if false all other recording settings cannot be enabled)
          default: true
          readOnly: true
        autoRecord:
          type: boolean
          description: Indicates if recording should start automatically when a Webinar goes live
          default: false
        recordingSharingEnabled:
          type: boolean
          description: Indicates if recording can be shared (this setting is read-only at webinar level)
          readOnly: true
          default: true
        recordingDownloadEnabled:
          type: boolean
          description: Indicates if recording can be downloaded (this setting is read-only at webinar level)
          readOnly: true
          default: true
        recordingDeletionEnabled:
          deprecated: true
          type: boolean
          description: |
            DEPRECATED AND REPLACED BY 'pastSessionDeletionEnabled' setting.
            Indicates if recording can be deleted (this setting is read-only at webinar level)
          readOnly: true
          default: false
        pastSessionDeletionEnabled:
          type: boolean
          description: |
            Indicates if deletion of past session along with its artifacts is enabled for Host.
            This setting is read-only at webinar level
          readOnly: true
          default: false
        panelistWaitingRoom:
          type: boolean
          description: Indicates if Panelists should be places to waiting room after joining
          default: false
        panelistVideoEnabled:
          type: boolean
          description: Indicates if Panelists' video should be 'on' by default
          default: true
        panelistScreenSharingEnabled:
          type: boolean
          description: Indicates if Panelists' screen sharing should be 'on' by default
          default: true
        panelistMuteControlEnabled:
          type: boolean
          description: Indicates if Panelists can mute/unmute themselves by default
          default: true
        panelistAuthentication:
          type: string
          description: Indicates if Panelists have to be authenticated users
          enum:
            - Guest
            - AuthenticatedUser
            - AuthenticatedCoworker
          default: Guest
        attendeeAuthentication:
          type: string
          description: Indicates if attendees have to be authenticated users
          enum:
            - Guest
            - AuthenticatedUser
            - AuthenticatedCoworker
          default: Guest
        artifactsAccessAuthentication:
          type: string
          description: |
            Indicates who can access webinar artifacts. Applies to recordings at present.
            Applicable to other artifacts such as Q&A, Polls in the future.
          enum:
            - Guest
            - AuthenticatedUser
            - AuthenticatedCoworker
          default: AuthenticatedUser
        pstnEnabled:
          type: boolean
          description: Indicates if dial-in PSTN audio option is enabled for Panelists
          default: false
        password:
          type: string
          maxLength: 64
          description: |
            Webinar password. If company-level "passwordEnabled" is true and "password" is null / omitted,
            the backend generates the password
        qnaEnabled:
          type: boolean
          description: Indicates if Q&A is enabled for the webinar (if false all other Q&A settings cannot be enabled)
          default: true
        qnaAnonymousEnabled:
          type: boolean
          description: Indicates if anonymous Q&A is enabled for the webinar
          default: true
        pollsEnabled:
          type: boolean
          description: Indicates if polls are enabled for the webinar (if false all other polls settings cannot be enabled)
          readOnly: true
          default: true
        pollsAnonymousEnabled:
          type: boolean
          description: Indicates if anonymous poll answers are enabled for the webinar
          readOnly: true
          default: true
        registrationEnabled:
          type: boolean
          description: Indicates if a registration is enabled for the webinar (if false all other registration settings are ignored)
          default: false
        postWebinarRedirectUri:
          type: string
          format: uri
          description: URI to redirect users after the webinar
          example: https://www.acme.com/thankyou
        externalLivestreamEnabled:
          type: boolean
          description: Indicates if livestreaming to external streaming provider is enabled
          readOnly: true
          default: true
        moderatedQnaEnabled:
          type: boolean
          description: Indicate if the moderated Q&A enabled for webinar
          default: false
    WcsHostModel:
      type: object
      required:
        - entitled
      properties:
        entitled:
          type: boolean
          description: Describes host's license, 'true' - license is active
      allOf:
        - $ref: "#/components/schemas/RcwUserModel"
        - $ref: "#/components/schemas/RcwLinkedUserModel"
    WebinarListResource:
      type: object
      required:
        - records
        - paging
      properties:
        records:
          type: array
          minItems: 0
          items:
            $ref: "#/components/schemas/WcsWebinarResource"
        paging:
          $ref: "#/components/schemas/RcwPagingModel"
    WebinarInfoModel:
      type: object
      properties:
        title:
          type: string
          description: Webinar title
          minLength: 1
          maxLength: 512
          example: All-Hands Webinar
        description:
          type: string
          description: User-friendly description of the Webinar
          minLength: 0
          maxLength: 4096
          example: Quarterly All-hands event to present recent news about our company to employees
    WebinarGeneratedModel:
      type: object
      required:
        - host
      properties:
        host:
          $ref: "#/components/schemas/WcsHostModel"
    WcsSessionStatusModel:
      type: string
      description: Session status (for the purposes of Configuration service)
      enum:
        - Scheduled
        - Active
        - Finished
      example: Scheduled
    WcsSessionBaseModel:
      type: object
      required:
        - scheduledStartTime
        - scheduledDuration
        - timeZone
      properties:
        scheduledStartTime:
          type: string
          description: Session scheduled start time.
          format: date-time
        scheduledDuration:
          type: integer
          format: int32
          minimum: 30
          maximum: 43200
          description: The duration of the Session in seconds.
          example: 1800
        timeZone:
          type: string
          description: IANA-compatible time zone name (see https://www.iana.org/time-zones).
          maxLength: 64
          minLength: 3
          example: America/New_York
        localizedTimeZoneDescription:
          type: string
          description: Localized time zone description.
          example: Eastern Time (America/New_York)
        panelJoinTimeOffset:
          type: integer
          format: int32
          description: |
            The time offset (positive, in seconds) indicating how much in advance
            (comparing to "scheduledStartTime") panel members should join for the pre-webinar team sync
          minimum: 0
          default: 0
          example: 900
        title:
          type: string
          description: Session title. Can be left blank - then Webinar title should be used for presentation.
          maxLength: 512
          minLength: 0
          example: Live Broadcasting US
        description:
          type: string
          description: User-friendly description of the Session. Can be left blank - then Webinar title should be used for presentation.
          maxLength: 4096
          minLength: 0
          example: Live session for US-based participants
        status:
          $ref: "#/components/schemas/WcsSessionStatusModel"
        hostJoinUri:
          type: string
          format: uri
          readOnly: true
          maxLength: 256
          minLength: 5
          description: The URI to join the webinar as a host
          example: https://v.ringcentral.com/w/join/de7yd8ew7yfsdfjh899843rgj
    WcsSessionGeneratedModel:
      type: object
      properties:
        videoBridgeId:
          type: string
          description: The RCV bridge id
          readOnly: true
          example: "839874770"
        videoBridgePassword:
          type: string
          format: password
          readOnly: true
          description: The RCV bridge password. Returned only if requested by Host/Co-host/Panelist and a password for the bridge is set.
          example: abc123
        videoBridgePstnPassword:
          type: string
          format: password
          readOnly: true
          description: The RCV bridge PSTN password. Returned only if requested by Host/Co-host/Panelist and a PSTN password for the bridge is set.
          example: abc123
        attendeeJoinUri:
          type: string
          format: uri
          readOnly: true
          maxLength: 256
          minLength: 5
          description: The URI for attendees to join the Webinar (if it is a public webinar)
          example: https://v.ringcentral.com/w/a/join/iuyef77fsj473wn10ashjfk34
        hasUnsentInvites:
          type: boolean
          readOnly: true
          description: Calculated attribute indicating if there are any unsent/deferred invites to session participants
    WcsSessionResource:
      allOf:
        - $ref: "#/components/schemas/RcwResourceBaseModel"
        - $ref: "#/components/schemas/WcsSessionWithLocaleCodeModel"
        - $ref: "#/components/schemas/WcsSessionGeneratedModel"
    WcsSessionWithLocaleCodeModel:
      allOf:
        - $ref: "#/components/schemas/WcsSessionBaseModel"
        - type: object
          properties:
            localeCode:
              type: string
              description: Session locale code. Can't be blank or null
              maxLength: 8
              minLength: 2
              example: en-US
    BulkUpdateInviteesRequest:
      type: object
      properties:
        addedInvitees:
          type: array
          items:
            $ref: "#/components/schemas/AddInviteeRequest"
        updatedInvitees:
          type: array
          items:
            allOf:
              - $ref: "#/components/schemas/RcwResourceIdModel"
              - $ref: "#/components/schemas/UpdateInviteeRequest"
        deletedInvitees:
          type: array
          items:
            $ref: "#/components/schemas/RcwResourceIdModel"
    InviteeSettingsModel:
      type: object
      properties:
        type:
          $ref: "#/components/schemas/RcwInviteeTypeEnum"
        sendInvite:
          type: boolean
          description: |
            Indicates if invite/cancellation emails have to be sent to this invitee.
            For "Host" it cannot be set to false.
            If it is true it can't be changed back to false.
          default: true
    InviteeResource:
      allOf:
        - $ref: "#/components/schemas/InviteeBaseModel"
        - $ref: "#/components/schemas/InviteeGeneratedModel"
    BulkUpdateInviteesResponse:
      type: object
      properties:
        addedInvitees:
          type: array
          items:
            $ref: "#/components/schemas/InviteeResource"
        updatedInvitees:
          type: array
          items:
            $ref: "#/components/schemas/InviteeResource"
        deletedInvitees:
          type: array
          items:
            $ref: "#/components/schemas/RcwResourceIdModel"
    RcwInviteeTypeEnum:
      type: string
      description: The type of the webinar invitee
      enum:
        - User
        - Room
      default: User
    AddInviteeRequest:
      allOf:
        - $ref: "#/components/schemas/InviteeContactModel"
        - $ref: "#/components/schemas/RcwLinkedUserModel"
        - $ref: "#/components/schemas/RcwRoleAttributeModel"
        - $ref: "#/components/schemas/InviteeSettingsModel"
    InviteeGeneratedModel:
      type: object
      properties:
        joinUri:
          type: string
          format: uri
          description: Personalized join link for the Invitee
          maxLength: 256
          minLength: 5
          readOnly: true
          example: https://v.ringcentral.com/w/join/de7yd8ew7yfsdfjh899843rgj
        phoneParticipantCode:
          type: string
          maxLength: 12
          minLength: 1
          description: Phone (PSTN) participant code
    UpdateInviteeRequest:
      allOf:
        - $ref: "#/components/schemas/InviteeContactModel"
        - $ref: "#/components/schemas/RcwRoleAttributeModel"
        - $ref: "#/components/schemas/InviteeSettingsModel"
    InviteeContactModel:
      allOf:
        - $ref: "#/components/schemas/RcwBaseContactModel"
        - type: object
          properties:
            email:
              $ref: "#/components/schemas/RcwEmailModel"
            jobTitle:
              type: string
              description: Job title
              maxLength: 64
              example: Product Manager
    InviteeBaseModel:
      allOf:
        - $ref: "#/components/schemas/RcwResourceBaseModel"
        - $ref: "#/components/schemas/InviteeContactModel"
        - $ref: "#/components/schemas/RcwLinkedUserModel"
        - $ref: "#/components/schemas/RcwRoleAttributeModel"
        - $ref: "#/components/schemas/InviteeSettingsModel"
    WcsInviteeListResource:
      type: object
      required:
        - records
        - paging
      properties:
        records:
          type: array
          minItems: 0
          items:
            $ref: "#/components/schemas/InviteeResource"
        paging:
          $ref: "#/components/schemas/RcwPagingModel"
    WcsSessionGlobalListResource:
      type: object
      required:
        - records
        - paging
      properties:
        records:
          type: array
          minItems: 0
          items:
            $ref: "#/components/schemas/SessionGlobalListEntry"
        paging:
          $ref: "#/components/schemas/RcwPagingModel"
    WcsWebinarRefModel:
      allOf:
        - $ref: "#/components/schemas/RcwResourceIdModel"
        - $ref: "#/components/schemas/WebinarInfoModel"
        - required:
            - title
        - type: object
          properties:
            host:
              $ref: "#/components/schemas/RcwLinkedUserModel"
    SessionGlobalListEntry:
      allOf:
        - $ref: "#/components/schemas/RcwResourceBaseModel"
        - type: object
          required:
            - webinar
          properties:
            webinar:
              $ref: "#/components/schemas/WcsWebinarRefModel"
        - $ref: "#/components/schemas/WcsSessionWithLocaleCodeModel"
    OpenIdDiscovery:
      type: object
      description: |
        The OpenID Connect configuration document as defined by the
        [OpenID Connect Discovery 1.0](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata) specification
      required:
        - issuer
        - authorization_endpoint
        - token_endpoint
        - revocation_endpoint
        - userinfo_endpoint
        - jwks_uri
        - scopes_supported
        - token_endpoint_auth_methods_supported
        - response_types_supported
        - subject_types_supported
        - userinfo_signing_alg_values_supported
        - id_token_signing_alg_values_supported
        - code_challenge_methods_supported
      properties:
        issuer:
          type: string
          description: |
            An identifier of the ID token's issuer. This value is identical to the `iss` Claim value in ID Tokens
          format: uri
          example: https://platform.ringcentral.com
        authorization_endpoint:
          type: string
          format: uri
          description: |
            URL of the OAuth 2.0 authorization endpoint
          example: https://platform.ringcentral.com/restapi/oauth/authorize
        token_endpoint:
          type: string
          format: uri
          description: URL of the OAuth 2.0 token endpoint
          example: https://platform.ringcentral.com/restapi/oauth/token
        revocation_endpoint:
          type: string
          format: uri
          description: URL of the OAuth 2.0 revocation endpoint as defined by [RFC-7009](https://datatracker.ietf.org/doc/html/rfc7009)
          example: https://platform.ringcentral.com/restapi/oauth/revoke
        userinfo_endpoint:
          type: string
          format: uri
          description: |
            URL of the user info endpoint as defined by
            [OpenID Connect Core 1.0](https://openid.net/specs/openid-connect-core-1_0.html#UserInfo) specification
          example: https://platform.ringcentral.com/restapi/oauth/userinfo
        jwks_uri:
          type: string
          format: uri
          description: |
            URL of JSON Web Key Set document that contains public key(s) to be used by the Relying Party
            to validate ID Token signatures
          example: https://platform.ringcentral.com/restapi/oauth/jwks
        scopes_supported:
          type: array
          description: The list of the OAuth 2.0 scope values that this server supports
          items:
            type: string
            enum:
              - openid
              - email
              - profile
          example:
            - openid
            - email
            - profile
        token_endpoint_auth_methods_supported:
          type: array
          items:
            type: string
            enum:
              - client_secret_basic
              - client_secret_jwt
              - private_key_jwt
          description: The list of Client Authentication methods supported by the Token Endpoint
          example:
            - client_secret_basic
        response_types_supported:
          type: array
          items:
            type: string
            enum:
              - code
          description: The list of the OAuth 2.0 `response_type` values supported by the provider
          example:
            - code
        subject_types_supported:
          type: array
          items:
            type: string
            enum:
              - public
          description: The list of the Subject Identifier types supported by the provider (only `public` is currently supported)
          example:
            - public
        userinfo_signing_alg_values_supported:
          type: array
          items:
            type: string
            enum:
              - none
          description: |
            The list of the JWS signing algorithms (`alg` values) supported by the UserInfo Endpoint  to encode the Claims in a JWT
          example:
            - none
        id_token_signing_alg_values_supported:
          type: array
          items:
            type: string
            enum:
              - RS256
              - HS256
          description: |
            The list of the JWS signing algorithms (`alg` values) supported by the provider for the ID Token
            to encode the Claims in a JWT
          example:
            - RS256
            - HS256
        display_values_supported:
          type: array
          description: The list of the `display` parameter values (in OAuth 2.0 Authorization Endpoint) supported by the provider
          items:
            $ref: "#/components/schemas/DisplayModesEnum"
        claims_supported:
          type: array
          items:
            type: string
            enum:
              - sub
              - iss
              - auth_time
              - aud
              - exp
              - iat
              - jti
              - nonce
              - account_id
              - email
              - email_verified
              - given_name
              - family_name
          description: The list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for
          example:
            - sub
            - iss
            - auth_time
            - exp
        ui_locales_supported:
          type: array
          items:
            type: string
          description: |
            Language codes supported for the user interface, represented as language tags defined in
            [RFC-5646](https://datatracker.ietf.org/doc/html/rfc5646)
          example:
            - en
            - en-US
            - en-GB
            - fr-CA
        code_challenge_methods_supported:
          type: array
          items:
            type: string
            enum:
              - plain
              - S256
          description: The list of the PKCE challenge methods supported by the provider
          example:
            - plain
            - S256
        claims_parameter_supported:
          type: boolean
          description: Boolean value specifying whether the provide supports use of the `claims` parameter
          example: false
        request_parameter_supported:
          type: boolean
          description: Boolean value specifying whether the provide supports use of the `request` parameter
          example: false
        request_uri_parameter_supported:
          type: boolean
          description: Boolean value specifying whether the provide supports use of the `request` parameter
          example: false
    DisplayModesEnum:
      type: string
      description: |
        Specifies how the Authorization Server displays the authentication and consent user interface pages to the End-User.
      enum:
        - page
        - popup
        - touch
        - mobile
      default: page
    BridgePinsWithAliases:
      type: object
      properties:
        pstn:
          $ref: "#/components/schemas/BridgePstnPins"
        web:
          $ref: "#/components/schemas/WebPin"
        aliases:
          type: array
          description: |
            List of bridge aliases. An alias is a unique personal meeting name that can be specified for the default bridge.
            It can be used to join to a meeting in the same way as the short identifier.
          example:
            - joseph1990
            - qa_team_2_lead
          items:
            type: string
    User:
      required:
        - accountId
        - extensionId
      type: object
      properties:
        accountId:
          type: string
          description: User account identifier
          example: "664287016"
        extensionId:
          type: string
          description: User extension identifier
          example: "664307016"
    RecordingsPreferences:
      type: object
      description: Recordings preferences
      properties:
        everyoneCanControl:
          $ref: "#/components/schemas/EveryoneCanControl"
        autoShared:
          $ref: "#/components/schemas/AutoShared"
    BridgeResponseSecurityPassword:
      type: object
      properties:
        plainText:
          type: string
          description: |
            Meeting password.
            This field will be returned only if the request was done by bridge owner, his delegate or any user who has
            the Super Admin privilege.
          example: Wq123ygs15
        pstn:
          type: string
          description: |
            Meeting password for PSTN users.
            This field will be returned only if the request was done by bridge owner, his delegate or any user who has
            the Super Admin privilege.
          example: "7492486829"
        joinQuery:
          type: string
          description: |
            Meeting password hash.
            This field will be returned only if the request was done by bridge owner, his delegate or any user who has
            the Super Admin privilege.
          example: 99e4f8e6a241fc71279449a9c8f46eef
    AutoShared:
      type: object
      description: Controls whether recording can be auto shared
      properties:
        enabled:
          type: boolean
          description: Controls whether preference is enabled
          example: true
        locked:
          type: boolean
          description: Describes whether preference is locked on Service Web
          example: false
    BridgePstnPins:
      type: object
      properties:
        host:
          type: string
          description: Host PSTN PIN. If it is not specified while creation, then a PIN will be generated.
          example: "432331057631"
        participant:
          type: string
          description: Participant PSTN PIN. If it is not specified while creation, then a PIN will be generated.
          example: "013409241367"
    BridgePins:
      type: object
      properties:
        pstn:
          $ref: "#/components/schemas/BridgePstnPins"
        web:
          $ref: "#/components/schemas/WebPin"
    BridgeRequestSecurity:
      type: object
      properties:
        passwordProtected:
          type: boolean
          description: |
            Specifies if a meeting is password protected.

            By default, `Instant` and `Scheduled` bridges are not password protected. For default (PMI) bridge, password
            protection will be turned on and the password will be generated if it is not specified while creation.

            While creation to set password protection you should set this field to true and specify a password in the
            `password` field. If you want to change password or set password protection for an unprotected bridge,
            you should set this field to true and specify a password in the `password` field in the update operation.

            To make protected bridge as unprotected you should set this field to false in the update operation.
          example: true
        password:
          type: string
          description: |
            Specifies a password if bridge meetings should be password protected (passwordProtected field is true).
            Besides that, if the field is specified in the request but `passwordProtected` field is missing then
            it means that `passwordProtected` field is set to true.
          example: Wq123ygs15
        noGuests:
          type: boolean
          description: If true, only authenticated users can join to a meeting.
          default: false
        sameAccount:
          type: boolean
          description: If true, only users have the same account can join to a meeting.
          default: false
        e2ee:
          type: boolean
          description: If true, end to end encryption will be enabled for a meeting.
          default: false
    BridgeResponse:
      type: object
      properties:
        id:
          type: string
          description: Unique bridge identifier
          example: iad41-c04-ndb256065cf14ae6a1832389d9c2e
        name:
          type: string
          description: Custom name of a bridge
          example: Weekly Meeting with Joseph
        type:
          $ref: "#/components/schemas/RcvBridgeTypeEnum"
        host:
          $ref: "#/components/schemas/User"
        pins:
          $ref: "#/components/schemas/BridgePinsWithAliases"
        security:
          $ref: "#/components/schemas/BridgeResponseSecurity"
        preferences:
          $ref: "#/components/schemas/BridgePreferences"
        discovery:
          $ref: "#/components/schemas/BridgeDiscovery"
    RcvBridgeTypeEnum:
      type: string
      description: |
        Type of a bridge. It specifies the bridge life cycle.
        1) `Instant` - The bridge will be used for a meeting only once immediately after creation. Then it will be deleted.
        2) `Scheduled` - The bridge will be used for one or more scheduled meetings. If the bridge is not used for a long
        time after the last meeting, then it will be deleted.
        3) `PMI` - The bridge will contain Personal Meeting Identifier owned by a user. It is the default user bridge.
        Each user may have only one default (PMI) bridge. Such bridge will be deleted only in case the user is deleted
        from the system.
      enum:
        - Instant
        - Scheduled
        - PMI
      example: Instant
    BridgeResponseSecurity:
      type: object
      properties:
        passwordProtected:
          type: boolean
          description: Specifies if a meeting is password protected.
        password:
          $ref: "#/components/schemas/BridgeResponseSecurityPassword"
        noGuests:
          type: boolean
          description: If true, only authenticated users can join to a meeting.
          example: false
        sameAccount:
          type: boolean
          description: If true, only users have the same account can join to a meeting.
          example: false
        e2ee:
          type: boolean
          description: If true, end to end encryption will be enabled for a meeting.
          default: false
    CreateBridgeRequest:
      type: object
      properties:
        name:
          type: string
          description: Custom name of a bridge
          example: Weekly Meeting with Joseph
        type:
          $ref: "#/components/schemas/RcvBridgeTypeEnum"
        pins:
          $ref: "#/components/schemas/BridgePins"
        security:
          $ref: "#/components/schemas/BridgeRequestSecurity"
        preferences:
          $ref: "#/components/schemas/BridgePreferences"
    BridgeDiscovery:
      type: object
      properties:
        web:
          type: string
          description: |
            URI that can be used to join to the meeting.
            It contains password parameter only if the request was done by bridge owner, his delegate or any user who has
            the Super Admin privilege.
          example: https://v.ringcentral.com/join/018209241352?pw=99e4f8e6a241fc71279449a9c8f46eef
    WebPin:
      type: string
      description: |
        Bridge short identifier (Web PIN). The digital unique code which is used to join to a meeting. If it is not specified
        while creation, then a code will be generated. If it is a default bridge, then this code is
        Personal Meeting Identifier (PMI).

        NOTE: Changing this PIN via update method is deprecated. So to change Web PIN use the method:
        _*[PATCH] /rcvideo/v2/bridges/{bridgeId}/pin/web*_
      example: "018209241352"
    BridgeJoinPstnPreferences:
      type: object
      properties:
        promptAnnouncement:
          type: boolean
          description: Specifies whether to play 'Announce yourself' prompt
          default: true
        promptParticipants:
          type: boolean
          description: Specifies whether to play 'There are X participants' prompt
          default: true
    EveryoneCanControl:
      type: object
      description: Controls whether participants can start and pause recording
      properties:
        enabled:
          type: boolean
          description: Controls whether preference is enabled
          example: true
        locked:
          type: boolean
          description: Describes whether preference is locked on Service Web
          example: false
    BridgePreferences:
      type: object
      properties:
        join:
          $ref: "#/components/schemas/BridgeJoinPreferences"
        playTones:
          type: string
          description: |
            Specifies enter and exit tones mode.
            1) `On` - Enter and exit tones switched on.
            2) `Off` - Enter and exit tones switched off.
            3) `ExitOnly` - Only exit tones switched on.
            4) `EnterOnly` - Only enter tones switched on.
          default: Off
          enum:
            - On
            - Off
            - ExitOnly
            - EnterOnly
        musicOnHold:
          type: boolean
          description: Specifies whether to play music on hold when alone
          default: true
        joinBeforeHost:
          type: boolean
          description: |
            Specifies if participants can join to a meeting before host.
            Default value depends on the bridge type:
            - default bridge (PMI) -> false
            - other types -> true
          example: true
        screenSharing:
          type: boolean
          description: Specifies if screen sharing is allowed
          default: true
        recordingsMode:
          type: string
          enum:
            - Auto
            - ForceAuto
            - User
          example: User
          description: Controls whether recordings are enabled automatically or by user decision
        transcriptionsMode:
          type: string
          enum:
            - Auto
            - ForceAuto
            - User
          example: User
          description: Controls whether transcriptions are enabled automatically or by user decision
        recordings:
          $ref: "#/components/schemas/RecordingsPreferences"
        allowEveryoneTranscribeMeetings:
          type: boolean
          default: true
          description: Controls whether participants can start and pause transcription
    BridgeJoinPreferences:
      type: object
      properties:
        audioMuted:
          type: boolean
          description: Specifies if audio is muted for meeting participants (in the preset after joining)
          default: false
        videoMuted:
          type: boolean
          description: Specifies if video is muted for meeting participants (in the preset after joining)
          default: false
        waitingRoomRequired:
          type: string
          description: |
            Specifies rules for the waiting room before the host starts the meeting.
            1) `Nobody` - No waiting room. Participants are not waiting for meeting start.
            2) `Everybody` - All participants are waiting for meeting start.
            3) `GuestsOnly` - Only unauthenticated participants (guests) are waiting for meeting start.
            4) `OtherAccount` - Only participants who have other account are waiting for meeting start.

            Default value depends on the bridge type:
            - PMI -> OtherAccount
            - Instant, Scheduled -> Nobody
          example: Nobody
          enum:
            - Nobody
            - Everybody
            - GuestsOnly
            - OtherAccount
        pstn:
          $ref: "#/components/schemas/BridgeJoinPstnPreferences"
    UpdateBridgeRequest:
      type: object
      properties:
        name:
          type: string
          description: Custom name of a bridge
          example: Weekly Meeting with Joseph
        pins:
          $ref: "#/components/schemas/BridgePinsWithoutPstn"
        security:
          $ref: "#/components/schemas/BridgeRequestSecurity"
        preferences:
          $ref: "#/components/schemas/BridgePreferences"
    BridgePinsWithoutPstn:
      type: object
      properties:
        web:
          $ref: "#/components/schemas/WebPin"
    Host:
      type: object
      properties:
        accountId:
          type: string
          description: Account id
        extensionId:
          type: string
          description: Extension id
        displayName:
          type: string
          description: Display name
      description: Meeting host
    BasicPaging:
      required:
        - currentPageToken
      type: object
      properties:
        currentPageToken:
          type: string
          description: Current offset token
        nextPageToken:
          type: string
          description: Next page offset token
      description: Paging information
    CloudRecordings:
      required:
        - paging
        - recordings
      type: object
      properties:
        recordings:
          type: array
          description: Recordings array
          items:
            $ref: "#/components/schemas/CloudRecording"
        paging:
          $ref: "#/components/schemas/BasicPaging"
      description: Recordings page
    MeetingDuration:
      type: integer
      format: int32
      example: 36
      description: Meeting duration in seconds
    CloudRecording:
      allOf:
        - $ref: "#/components/schemas/BasicMeeting"
        - type: object
          required:
            - id
            - shortId
            - displayName
            - startTime
            - hostInfo
            - mediaLink
            - url
          properties:
            duration:
              $ref: "#/components/schemas/MeetingDuration"
            hostInfo:
              $ref: "#/components/schemas/Host"
            mediaLink:
              type: string
              description: Link to the recording file. Not used anymore by Web team
            url:
              type: string
              description: Encrypted link to the recording file
            expiresIn:
              type: string
              description: Date after which recording will be deleted
    BasicMeeting:
      type: object
      required:
        - id
        - shortId
        - displayName
        - startTime
        - hostInfo
      description: Meeting information
      properties:
        id:
          type: string
          description: Meeting id
        shortId:
          type: string
          description: Short bridge id
        bridgeId:
          type: string
          description: Bridge id
        startTime:
          type: string
          format: date-time
          description: Start time ISO 8601
        displayName:
          type: string
          description: Meeting name
        hostInfo:
          $ref: "#/components/schemas/Host"
    Delegate:
      required:
        - extensionId
      type: object
      properties:
        id:
          type: string
          description: Delegate id (equal as extension id of delegate)
          readOnly: true
        name:
          type: string
          description: Delegate name
          readOnly: true
        accountId:
          type: string
          description: Delegate account id
        extensionId:
          type: string
          description: Delegate extension id
    DelegatorsListResult:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: "#/components/schemas/Delegate"
    AdminAccessMeeting:
      allOf:
        - $ref: "#/components/schemas/BasicMeeting"
        - type: object
          required:
            - bridgeId
            - duration
            - participants
          properties:
            duration:
              $ref: "#/components/schemas/MeetingDuration"
            participants:
              description: List of the participants in the meeting
              type: array
              items:
                $ref: "#/components/schemas/BasicParticipant"
            chatContentUri:
              description: Public chat txt file for the meeting
              type: string
    Paging:
      allOf:
        - $ref: "#/components/schemas/BasicPaging"
        - type: object
          required:
            - perPage
          properties:
            perPage:
              type: integer
              format: int32
              description: Number of records returned
    BasicParticipant:
      type: object
      required:
        - id
      properties:
        id:
          type: string
        accountId:
          type: string
        extensionId:
          type: string
        displayName:
          type: string
        callerId:
          description: Non empty if user joined by phone
          type: string
      description: Basic participant information
    AdminAccessMeetings:
      type: object
      required:
        - meetings
        - paging
      description: Meetings page
      properties:
        meetings:
          type: array
          description: Meetings array
          items:
            $ref: "#/components/schemas/AdminAccessMeeting"
        paging:
          $ref: "#/components/schemas/Paging"
    Recording:
      required:
        - id
        - availabilityStatus
      type: object
      properties:
        id:
          type: string
          description: Recording id
        startTime:
          type: integer
          format: int64
          description: Recording start time
        url:
          type: string
          description: Secure Link to the recording file
        metadata:
          $ref: "#/components/schemas/JsValue"
        status:
          type: string
          description: Recording processing status
          enum:
            - Processing
            - Processed
            - Error
            - Corrupted
            - InProgress
            - Purged
            - Failed
        availabilityStatus:
          type: string
          description: Availability status
          enum:
            - Alive
            - Deleted
            - Purged
            - NotAvailable
        longSummary:
          type: string
          description: During meeting AI team analyze code and after meeting finished generates text summary about this meeting
        shortSummary:
          type: string
          description: During meeting AI team analyze code and after meeting finished generates text summary about this meeting
        keywords:
          type: array
          description: During meeting AI team analyze code and after meeting finished generates key words used in meeting
          items:
            type: string
      description: Recording information
    JsValue:
      type: object
      properties: {}
    Participant:
      allOf:
        - $ref: "#/components/schemas/BasicParticipant"
        - type: object
          required:
            - type
          properties:
            type:
              type: string
              description: Participant type
            correlationId:
              description: Pass-thru parameter in join url
              type: string
      description: Full participant information
    Meeting:
      allOf:
        - $ref: "#/components/schemas/BasicMeeting"
        - type: object
          required:
            - bridgeId
            - rights
            - participants
            - status
            - type
            - recordings
          properties:
            duration:
              $ref: "#/components/schemas/MeetingDuration"
            type:
              type: string
              description: Meeting type
              enum:
                - Meeting
                - Call
            status:
              type: string
              description: Meeting status
              enum:
                - InProgress
                - Done
            rights:
              description: Describe access rights which has participants to meeting
              type: array
              items:
                type: string
                enum:
                  - delete
                  - download
                  - share
            longSummary:
              description: During meeting AI team analyze code and after meeting finished generates text summary about this meeting
              type: string
              deprecated: true
            shortSummary:
              description: During meeting AI team analyze code and after meeting finished generates text summary about this meeting
              type: string
              deprecated: true
            keywords:
              description: During meeting AI team analyze code and after meeting finished generates key words used in meeting
              type: array
              deprecated: true
              items:
                type: string
            participants:
              type: array
              description: List of the participants in the meeting
              items:
                $ref: "#/components/schemas/Participant"
            recordings:
              type: array
              description: Recording information
              items:
                $ref: "#/components/schemas/Recording"
            transcriptions:
              type: array
              description: A list of transcriptions references
              items:
                $ref: "#/components/schemas/Transcriptions"
            notes:
              type: array
              description: A list of meeting notes documents references
              items:
                $ref: "#/components/schemas/MeetingNotes"
            summary:
              type: string
              description: Meeting summary generated from transcriptions if AI processing was enabled for the meeting
            chatUrl:
              type: string
              description: Chat location
      description: Meeting information
    Transcriptions:
      description: |
        This objects denotes availability of transcription of certain type as post meeting artefact. The trancript's
        content can be accessed via via POST '/rcvideo/v1/history/meetings/{meetingId}/access-materials'
        or POST '/rcvideo/v1/history/links' APIs
      required:
        - id
        - type
      type: object
      properties:
        id:
          type: string
        type:
          type: string
          enum:
            - LiveTranscription
    NotesProcessingStatus:
      type: string
      description: Generated notes processing status `Processing` - meeting is finished and generated notes haven't been processed yet `Processed` -  generated notes successfully processed `Failed` - generated notes processing finished with error `Purged` - generated notes were removed
      enum:
        - Processing
        - Processed
        - Purged
        - Failed
    MeetingNotes:
      description: |
        This objects denotes availability of AI generated meeting notes of certain type as post meeting artefact. 
        The note's content can be accessed via POST '/rcvideo/v1/history/meetings/{meetingId}/access-materials'
        or POST '/rcvideo/v1/history/links' APIs
      required:
        - id
        - type
        - status
      type: object
      properties:
        id:
          type: string
        type:
          type: string
          enum:
            - GeneratedNotes
        status:
          $ref: "#/components/schemas/NotesProcessingStatus"
    MeetingPage:
      required:
        - meetings
        - paging
      type: object
      properties:
        meetings:
          type: array
          description: Meetings array
          items:
            $ref: "#/components/schemas/Meeting"
        paging:
          $ref: "#/components/schemas/BasicPaging"
      description: Meetings page
    ApiVersionInfo:
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Canonical URI of API version
        versionString:
          type: string
          description: Version of the RingCentral REST API
        releaseDate:
          type: string
          format: date-time
          description: Release date of this version
        uriString:
          type: string
          description: URI part determining the current version
      example:
        uri: https://platform.ringcentral.com/restapi/v1.0
        versionString: 1.0.34
        releaseDate: 2018-02-09T00:00:00.000Z
        uriString: v1.0
    ApiVersionsList:
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Canonical URI of the API version
        apiVersions:
          type: array
          description: "Full API version information: uri, number, release date"
          items:
            $ref: "#/components/schemas/ApiVersionInfo"
        serverVersion:
          type: string
          description: Server version
        serverRevision:
          type: string
          description: Server revision
      example:
        uri: https://platform.ringcentral.com/restapi
        apiVersions:
          - uri: https://platform.ringcentral.com/restapi/v1.0
            versionString: 1.0.34
            releaseDate: 2018-02-09T00:00:00.000Z
            uriString: v1.0
        serverVersion: 10.0.4.7854
        serverRevision: 32f2a96b769c
    GetTokenRequest:
      anyOf:
        - $ref: "#/components/schemas/PublicGetTokenRequest"
    TokenInfo:
      type: object
      required:
        - access_token
        - expires_in
        - scope
        - token_type
        - session_id
      properties:
        access_token:
          type: string
          description: OAuth access token to pass to subsequent API requests
          example: U1BCMDFUMDRKV1MwMXxzLFSvXdw5PHMsVLEn_MrtcyxUsw
        expires_in:
          type: integer
          format: int32
          description: Access token TTL (time-to-live) in seconds
          example: 7199
        refresh_token:
          type: string
          description: |
            OAuth refresh token (if issued)
          example: U1BCMDFUMDRKV1MwMXxzLFL4ec6A0XMsUv9wLriecyxS_w
        refresh_token_expires_in:
          type: integer
          format: int32
          description: Refresh token TTL (time-to-live) in seconds
          example: 604799
        scope:
          type: string
          description: |
            The list of space-separated application permissions (OAuth scopes)
          example: AccountInfo CallLog ExtensionInfo Messages SMS
        token_type:
          type: string
          description: Type of the token. The only supported value is `bearer`. (This value has to be used along with the access token in the `Authorization` header of subsequent API requests)
          enum:
            - bearer
          example: bearer
        owner_id:
          type: string
          description: Token owner's identifier. Contains RingCentral user (extension) ID
          example: "256440016"
        endpoint_id:
          type: string
          description: |
            Client application instance identifier that matches the value provided by the client,
            or generated by the server (if a client has not provided this value)
          example: 8zXq6oaLT7WvwWITlGiA1A
        id_token:
          type: string
          description: |
            OpenID Connect ID token (if OpenID Connect flow was activated during authorization)
        session_expires_in:
          type: integer
          format: int32
          description: |
            Remaining time in seconds until session expiration due to absolute timeout.
            Returned only if absolute session timeout is enforced
        session_expiration_time:
          type: string
          format: date-time
          description: |
            Absolute value of session expiration time in ISO date formatted string.
            Returned only if absolute session timeout is enforced
          example: 2023-04-01T12:00:01Z
        session_id:
          type: string
          description: OAuth session ID
        session_idle_timeout:
          type: integer
          format: int32
          description: |
            Nominal value of session idle timeout in seconds.
            Returned only if idle session timeout is enforced
    ClientCredentialsBase:
      type: object
      description: |
        Token endpoint request parameters used in the "Client Credentials" authorization flow
        with the `client_credentials` grant type
      required:
        - grant_type
      properties:
        grant_type:
          type: string
          description: Grant type
          enum:
            - client_credentials
    ClientIdModel:
      type: object
      properties:
        client_id:
          type: string
          description: |
            The registered identifier of a client application.
            Used to identify a client ONLY if the client authentication is not required and
            corresponding credentials are not provided with this request
          example: AZwEVwGEcfGet2PCouA7K6
    ClientAuthJwtModel:
      type: object
      properties:
        client_assertion_type:
          type: string
          enum:
            - urn:ietf:params:oauth:client-assertion-type:jwt-bearer
          description: |
            Client assertion type for the `client_secret_jwt` or `private_key_jwt` client authentication types,
            as defined by [RFC-7523](https://datatracker.ietf.org/doc/html/rfc7523#section-2.2).
            This parameter is mandatory if the client authentication is required and a client decided to use one of these authentication types
        client_assertion:
          type: string
          description: |
            Client assertion (JWT) for the `client_secret_jwt` or `private_key_jwt` client authentication types,
            as defined by [RFC-7523](https://datatracker.ietf.org/doc/html/rfc7523#section-2.2).
            This parameter is mandatory if the client authentication is required and a client decided to use one of these authentication types
    ClientCredentialsByAccount:
      title: Client Credentials by Account
      allOf:
        - $ref: "#/components/schemas/ClientCredentialsBase"
        - type: object
          required:
            - account_id
          properties:
            account_id:
              type: string
              description: RingCentral internal account ID
    PublicGetTokenRequest:
      x-docs-level-fragment: Public
      title: Get Token Request
      allOf:
        - $ref: "#/components/schemas/ClientIdModel"
        - $ref: "#/components/schemas/ClientAuthJwtModel"
        - $ref: "#/components/schemas/BaseTokenRequest"
        - anyOf:
            - $ref: "#/components/schemas/AuthCodeTokenRequest"
            - $ref: "#/components/schemas/JwtTokenRequest"
            - $ref: "#/components/schemas/RefreshTokenRequest"
          discriminator:
            propertyName: grant_type
            mapping:
              authorization_code: "#/components/schemas/AuthCodeTokenRequest"
              urn:ietf:params:oauth:grant-type:jwt-bearer: "#/components/schemas/JwtTokenRequest"
              refresh_token: "#/components/schemas/RefreshTokenRequest"
    AuthCodeTokenRequest:
      title: Authorization Code
      type: object
      description: |
        Token endpoint request parameters used in the "Authorization Code" and "Authorization code with PKCE" flows
        with the `authorization_code` grant type
      required:
        - grant_type
        - code
      properties:
        grant_type:
          type: string
          description: Grant type
          enum:
            - authorization_code
        code:
          type: string
          description: For `authorization_code` grant type only. User's authorization code
        redirect_uri:
          type: string
          format: uri
          description: |
            For `authorization_code` grant type only. This is a callback URI which determines where the response
            is sent. The value of this parameter must exactly match one of
            the URIs you have provided for your app upon registration
        code_verifier:
          type: string
          description: |
            For `authorization_code` grant type only.
            The code verifier as defined by  the PKCE specification -
            [RFC-7636 "Proof Key for Code Exchange by OAuth Public Clients"](https://datatracker.ietf.org/doc/html/rfc7636)
    ClientCredentialsByBrand:
      title: Client Credentials by Brand
      allOf:
        - $ref: "#/components/schemas/ClientCredentialsBase"
        - type: object
          required:
            - brand_id
          properties:
            brand_id:
              type: string
              description: RingCentral Brand identifier
    ClientCredentialsByPartnerAccount:
      title: Client Credentials by Partner Account
      allOf:
        - $ref: "#/components/schemas/ClientCredentialsBase"
        - type: object
          required:
            - brand_id
            - partner_account_id
          properties:
            brand_id:
              type: string
              description: RingCentral Brand identifier
            partner_account_id:
              type: string
              description: The ID of the account on RingCentral partner's side
    JwtTokenRequest:
      title: JWT-Bearer
      type: object
      description: |
        Token endpoint request parameters used in the "Personal JWT", "JWT Bearer" and "Partner JWT" authorization flows
        with the `urn:ietf:params:oauth:grant-type:jwt-bearer` and `partner_jwt` grant types
      required:
        - grant_type
        - assertion
      properties:
        grant_type:
          type: string
          description: Grant type
          enum:
            - urn:ietf:params:oauth:grant-type:jwt-bearer
            - partner_jwt
        assertion:
          type: string
          description: |
            For `urn:ietf:params:oauth:grant-type:jwt-bearer` or `partner_jwt` grant types only.
            Authorization grant assertion (JWT)
            as defined by [RFC-7523](https://datatracker.ietf.org/doc/html/rfc7523#section-2.1).
    BaseTokenRequest:
      type: object
      properties:
        scope:
          type: string
          description: |
            The list of application permissions (OAuth scopes) requested.
            By default, it includes all permissions configured on
            the client application registration
        endpoint_id:
          type: string
          description: |
            The unique identifier of a client application instance. If not
            specified, the derived or auto-generated value will be used
        access_token_ttl:
          maximum: 3600
          minimum: 600
          type: integer
          description: Access token lifetime in seconds
          format: int32
          default: 3600
        refresh_token_ttl:
          maximum: 2592000
          type: integer
          description: Refresh token lifetime in seconds
          format: int32
          default: 604800
    RefreshTokenRequest:
      title: Refresh Token
      type: object
      description: |
        Token endpoint request parameters used in the "Refresh Token" flow
        with the `refresh_token` grant type
      required:
        - grant_type
        - refresh_token
      properties:
        grant_type:
          type: string
          description: Grant type
          enum:
            - refresh_token
        refresh_token:
          type: string
          description: |
            For `refresh_token` grant type only. Previously issued refresh token.
    UserInfoResource:
      type: object
      required:
        - sub
      properties:
        sub:
          type: string
          description: |
            Subject - the End-User internal identifier. Contains RingCentral user (extension) ID
          example: "987654321"
        email:
          type: string
          format: email
          description: |
            End-User's preferred e-mail address
          example: john.doe@acme.com
        email_verified:
          type: boolean
          description: |
            Indicates if the End-User's e-mail address has been verified
        account_id:
          type: string
          description: |
            The End-User's company account identifier. Contains RingCentral account ID
        family_name:
          type: string
          description: The last name of the End-User
        given_name:
          type: string
          description: The first name of the End-User
    AuthorizeRequest:
      type: object
      required:
        - client_id
        - response_type
      properties:
        response_type:
          type: string
          description: |
            Determines authorization flow type. The only supported value is `code` which corresponds to OAuth 2.0 "Authorization Code Flow"
          enum:
            - code
        redirect_uri:
          type: string
          format: uri
          description: |
            This is the URI where the Authorization Server redirects the User Agent to at the end of the authorization flow.
            The value of this parameter must exactly match one of the URIs registered for this client application.
            This parameter is required if there are more than one redirect URIs registered for the app.
        client_id:
          type: string
          description: The registered identifier of a client application
          example: AZwEVwGEcfGet2PCouA7K6
        state:
          type: string
          description: |
            An opaque value used by the client to maintain state between the request and callback.
            The authorization server includes this value when redirecting the User Agent back
            to the client. Using this parameter is strongly recommended to prevent cross-site request forgery attacks.
        scope:
          type: string
          description: The list of requested OAuth scopes (space separated)
        display:
          $ref: "#/components/schemas/DisplayModesEnum"
        prompt:
          type: string
          description: |
            Space-delimited, case-sensitive list of ASCII string values that specifies whether the Authorization Server prompts the End-User for
            re-authentication and consent. The defined values are:

            - `login` - RingCentral native login form;
            - `sso` - Single Sign-On login form;
            - `consent` - form to show the requested scope and prompt user for consent;
            - `none` - indicates that non-interactive authorization is requested
              (the flow will succeed only if the user has been already authenticated within the same browser session).
              Cannot be combined with any other prompt option.
          default: login sso
        ui_locales:
          type: string
          description: |
            End-User's preferred languages and scripts for the user interface, represented as a space-separated list of
            [RFC-5646](https://datatracker.ietf.org/doc/html/rfc5646) language tag values, ordered by preference.
          example: en-US
        code_challenge:
          type: string
          description: |
            The code challenge value as defined by the PKCE specification -
            [RFC-7636 "Proof Key for Code Exchange by OAuth Public Clients"](https://datatracker.ietf.org/doc/html/rfc7636)
        code_challenge_method:
          $ref: "#/components/schemas/CodeChallengeMethodEnum"
        nonce:
          type: string
          description: |
            String value used to associate a Client session with an ID Token, and to mitigate replay attacks.
            The value is passed through unmodified from the Authentication Request to the ID Token.
            (This parameter is defined in OpenID Connect 1.0 specification)
        login_hint:
          type: string
          description: Hint to the Authorization Server about the login identifier the End-User might use to log in.
        brand_id:
          type: string
          description: |
            RingCentral Brand identifier. If it is not provided in the request,
            server will try to determine brand from the client application profile.
          example: "1210"
    CodeChallengeMethodEnum:
      type: string
      description: |
        The code challenge method as defined by the PKCE specification -
        [RFC-7636 "Proof Key for Code Exchange by OAuth Public Clients"](https://datatracker.ietf.org/doc/html/rfc7636).
        This parameter is mandatory when the `code_challenge` is provided
      enum:
        - plain
        - S256
      default: plain
    RevokeTokenRequest:
      allOf:
        - type: object
          properties:
            token:
              type: string
              description: |
                Access or refresh token to be revoked (along with the entire OAuth session).
                Required, unless it is passed via the `token` query parameter
        - $ref: "#/components/schemas/ClientIdModel"
        - $ref: "#/components/schemas/ClientAuthJwtModel"
    WsTokenResponse:
      type: object
      required:
        - ws_access_token
        - expires_in
      properties:
        ws_access_token:
          type: string
          description: The websocket access token to be used when connecting to the Websocket Gateway.
        uri:
          type: string
          format: uri
          description: The URI of RingCentral Websocket Gateway.
        expires_in:
          type: integer
          format: int32
          description: Websocket access token TTL (time-to-live) in seconds
    JWKeySet:
      type: object
      required:
        - keys
      properties:
        keys:
          type: array
          minItems: 1
          items:
            $ref: "#/components/schemas/JWKey"
    JWKey:
      type: object
      description: |
        Public key definition in JWK format
        (see [RFC-7517](https://www.rfc-editor.org/rfc/rfc7517.html#section-4))
      required:
        - kty
        - alg
        - use
        - kid
        - n
        - e
      properties:
        kty:
          type: string
          description: |
            Identifies the cryptographic algorithm family used with the key
          example: RSA
        alg:
          type: string
          description: |
            Identifies the algorithm intended for use with the key
          example: RS256
        use:
          type: string
          description: |
            Identifies the intended use of the public key. This parameter is employed to indicate whether
            a public key is used for encrypting data or verifying the signature on data.
          enum:
            - sig
            - enc
          example: sig
        kid:
          type: string
          description: |
            An ID of the specific key within this keyset.
            It is used to match the `kid` parameter in JOSE header of JWT.
        n:
          type: string
          description: |
            The "n" (modulus) parameter contains the modulus value for the RSA public key.
            It is represented as a Base64urlUInt-encoded value. (User with "RSA" key type)
        e:
          type: string
          description: |
            The "e" (exponent) parameter contains the exponent value for the RSA
            public key.  It is represented as a Base64urlUInt-encoded value. (User with "RSA" key type)
    PostalAddress:
      type: object
      description: Postal address/location
      required:
        - street
        - city
        - zip
        - country
      properties:
        street:
          type: string
          description: Street address
          maxLength: 256
          example: 20 Davis Dr
        street2:
          type: string
          description: Street address (2nd line)
          maxLength: 256
        city:
          type: string
          description: City name
          maxLength: 64
          example: Belmont
        state:
          description: State or province information in the target country
          maxLength: 64
          type: string
          example: CA
        zip:
          description: Postal code in the target country
          type: string
          maxLength: 10
          example: "94002"
        country:
          description: |
            ISO-3166-1 2-letter country code (alpha2). 
            For available countries, see GET /dictionary/country
          type: string
          maxLength: 2
          minLength: 2
          example: US
    BasicContactInfoWithPhone:
      allOf:
        - $ref: "#/components/schemas/BasicContactInfo"
        - type: object
          properties:
            contactPhone:
              $ref: "#/components/schemas/PhoneNumberE164"
    ServiceInfoUBrand:
      type: object
      properties:
        id:
          type: string
          description: Sub-brand unique ID
          example: "111.222"
        name:
          type: string
          description: Name of a brand
      description: Account sub-brand information
    AccountInfo:
      type: object
      required:
        - id
        - status
        - serviceInfo
      properties:
        id:
          description: Internal identifier of RingCentral account
          type: string
          example: "8000012345"
        externalAccountId:
          description: |
            External account ID. Used as a primary key to link accounts between
            RingCentral and partner systems.
          type: string
          maxLength: 30
          example: acme-us-12345
        mainNumber:
          $ref: "#/components/schemas/PhoneNumberE164"
        status:
          $ref: "#/components/schemas/AccountStatusEnumFull"
        billingActive:
          type: boolean
          description: Indicates if the billing is active.
        companyName:
          description: Company name
          type: string
          maxLength: 64
          example: Acme Inc.
        companyAddress:
          $ref: "#/components/schemas/PostalAddress"
        serviceInfo:
          $ref: "#/components/schemas/ServiceInfoV2"
        contactInfo:
          $ref: "#/components/schemas/SystemUserContactInfo"
        opportunityId:
          type: string
          description: Opportunity identifier (typically created by SalesForce)
          example: 0061800000DwZzJAAV
    AccountStatusEnumFull:
      type: string
      description: Status of an account
      enum:
        - Initial
        - Unconfirmed
        - Confirmed
        - Disabled
    ServiceInfoPlanV2:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a service plan
        name:
          type: string
          description: Name of a service plan
      description: Information on account service plan
    BasicContactInfo:
      description: Personal contact information
      type: object
      properties:
        firstName:
          description: Given name
          type: string
          maxLength: 64
          example: John
        lastName:
          description: Family name
          type: string
          maxLength: 64
          example: Smith
        email:
          description: Contact email
          type: string
          format: email
          maxLength: 64
          example: john.smith@acme.com
    ServiceInfoV2:
      description: Service Plan information (billing package, brand, etc.)
      type: object
      required:
        - package
      properties:
        package:
          $ref: "#/components/schemas/ServiceInfoPackage"
        partnerPackage:
          $ref: "#/components/schemas/ServiceInfoPackage"
        brand:
          $ref: "#/components/schemas/ServiceInfoBrand"
        contractedCountry:
          $ref: "#/components/schemas/ServiceInfoContractedCountryId"
        uBrand:
          $ref: "#/components/schemas/ServiceInfoUBrand"
        servicePlan:
          $ref: "#/components/schemas/ServiceInfoPlanV2"
    ServiceInfoContractedCountryId:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a country
    ServiceInfoBrand:
      description: Internal RC "brand" information
      type: object
      readOnly: true
      required:
        - id
        - name
      properties:
        id:
          type: string
          description: RingCentral brand ID
          readOnly: true
          example: "6699"
        name:
          type: string
          description: RingCentral brand name
          readOnly: true
          example: Partner 1
    SystemUserContactInfo:
      description: Primary system user contact information
      allOf:
        - $ref: "#/components/schemas/BasicContactInfoWithPhone"
        - type: object
          required:
            - id
            - firstName
            - lastName
            - email
            - contactPhone
            - extensionNumber
          properties:
            id:
              type: string
              description: Internal identifier of System user extension
            extensionNumber:
              $ref: "#/components/schemas/ExtensionNumber"
    ServiceInfoPackage:
      description: Billing package information
      type: object
      required:
        - id
        - version
      properties:
        id:
          type: string
          description: Billing package ID
          example: "555"
        version:
          type: string
          description: Billing package version
          pattern: ^[0-9]+$
          example: "1"
    PhoneNumberE164:
      title: E.164 Phone Number
      type: string
      pattern: ^\+[1-9]\d{1,14}$
      description: Phone number in e.164 format (with '+' prefix)
      maxLength: 18
      example: "+16501234567"
    ExtensionNumber:
      description: |
        Short number of an extension.
        Actual max length depends on system length limit for extension.
      type: string
      pattern: ^\d{3,8}$
      minLength: 1
      maxLength: 8
      example: "205"
    AddDeviceToInventoryResponse:
      type: object
      required:
        - devices
        - site
      properties:
        devices:
          type: array
          items:
            type: object
            required:
              - id
            properties:
              id:
                type: string
                description: Internal identifier of a created device
        site:
          $ref: "#/components/schemas/SiteBasicInfo"
    SiteBasicInfo:
      type: object
      required:
        - id
        - name
      properties:
        id:
          type: string
          description: Site extension identifier or "main-site" for the main site
        name:
          type: string
          description: Site name
    DeleteDeviceFromInventoryResponse:
      type: object
      required:
        - records
      properties:
        records:
          type: array
          items:
            type: object
            properties:
              bulkItemSuccessful:
                type: boolean
                description: Specifies if a device is successfully deleted
              deviceId:
                type: string
                description: Internal identifier of a device
              bulkItemErrors:
                type: array
                description: |
                  The list of errors occurred during processing of particular item of bulk operation.
                  Returned only if `bulkItemSuccessful` is false
                minItems: 1
                items:
                  $ref: "#/components/schemas/ApiError"
    AddDeviceToInventoryRequest:
      type: object
      required:
        - type
        - quantity
      properties:
        type:
          type: string
          description: |
            Device type. Use `OtherPhone` to indicate BYOD (customer provided) device
          enum:
            - OtherPhone
        quantity:
          type: integer
          minimum: 1
          maximum: 50
          format: int32
          description: Quantity of devices (total quantity should not exceed 50)
        site:
          type: object
          properties:
            id:
              type: string
              description: Site extension identifier or "main-site" for the main site
    DeleteDeviceFromInventoryRequest:
      type: object
      required:
        - records
      properties:
        records:
          type: array
          description: List of internal identifiers of the devices that should be deleted
          items:
            type: object
            properties:
              deviceId:
                type: string
                description: Internal identifier of a device that should be deleted
    SmsConsentCoverageEnum:
      type: string
      description: Coverage (scope) for the consent record
      enum:
        - PhoneNumber
        - Account
        - CampaignType
    SmsOptFailureRecord:
      allOf:
        - $ref: "#/components/schemas/UpdateSmsOptRecord"
        - type: object
          required:
            - error
          properties:
            error:
              $ref: "#/components/schemas/ApiError"
    PhoneNumberSenderConsentRecord:
      type: object
      title: Phone Number Consent
      required:
        - from
      properties:
        from:
          allOf:
            - description: The internal party's phone number
            - $ref: "#/components/schemas/PhoneNumberE164"
    SmsOptRecord:
      title: Explicit SMS Consent
      allOf:
        - $ref: "#/components/schemas/UpdateSmsOptRecord"
        - type: object
          required:
            - lastModifiedTime
          properties:
            lastModifiedTime:
              type: string
              format: date-time
              description: The time when the record was last updated
    SmsOptStatusEnum:
      type: string
      description: |
        Consent status of a recipient's phone number:
        - `OptOut` - The number is opted out of receiving SMS.
        - `OptIn` - The number is opted in to receiving SMS (if it was previously opted out).
      enum:
        - OptOut
        - OptIn
      example: OptOut
    UpdateSmsOptRecord:
      allOf:
        - $ref: "#/components/schemas/MinimalSmsOptRecord"
        - type: object
          required:
            - source
          properties:
            source:
              $ref: "#/components/schemas/SmsOptSourceEnum"
    UpdateOptRecordList:
      type: object
      description: A list of records for updating SMS consents
      required:
        - records
      properties:
        records:
          type: array
          minItems: 1
          maxItems: 1000
          items:
            $ref: "#/components/schemas/UpdateSmsOptRecord"
    NonEnumeratedPagingModel:
      type: object
      required:
        - perPage
      additionalProperties: false
      properties:
        perPage:
          type: integer
          format: int32
          minimum: 1
          maximum: 1000
          description: |
            Current page size, describes how many items are in each page.
            Matches "perPage" parameter from the request.
          example: 50
        pageToken:
          type: string
          description: |
            Current page token. May be omitted if result is empty (because non-existent page
            was specified or perPage=0 was requested)
        nextPageToken:
          type: string
          description: A page token to be used to fetch the next page of the result set. May be omitted if the current page is the last one.
        previousPageToken:
          type: string
          description: |
            A page token to be used to fetch the previous page of the result set.
            May be omitted if the current page is the first one or if the result set does not support backward navigation.
        firstPageToken:
          type: string
          description: A page token to be used to fetch the first page of the result set.
    MinimalSmsOptRecord:
      allOf:
        - type: object
          required:
            - optStatus
            - to
          properties:
            to:
              $ref: "#/components/schemas/PhoneNumberE164"
            optStatus:
              $ref: "#/components/schemas/SmsOptStatusEnum"
        - oneOf:
            - $ref: "#/components/schemas/PhoneNumberSenderConsentRecord"
          discriminator:
            propertyName: coverage
            mapping:
              CampaignType: "#/components/schemas/CampaignTypeConsentRecord"
              PhoneNumber: "#/components/schemas/PhoneNumberSenderConsentRecord"
              Account: "#/components/schemas/PhoneNumberSenderConsentRecord"
              VirtualSender: "#/components/schemas/VirtualSenderConsentRecord"
    OptRecordsModificationSummary:
      type: object
      properties:
        failedRecords:
          type: array
          minItems: 1
          items:
            $ref: "#/components/schemas/SmsOptFailureRecord"
    OptRecordList:
      type: object
      description: A list of SMS consent records
      required:
        - records
        - paging
      properties:
        records:
          type: array
          minItems: 0
          items:
            $ref: "#/components/schemas/SmsOptRecord"
        paging:
          $ref: "#/components/schemas/NonEnumeratedPagingModel"
    SmsOptSourceEnum:
      type: string
      description: The source of the consent record
      enum:
        - Recipient
        - Api
        - Upstream
        - Carrier
    SmsCampaignTypeEnum:
      type: string
      description: Type of SMS campaign
      enum:
        - Conversational
        - Informational
        - Promotional
    SmsOptHistoryRecord:
      title: Explicit SMS Consent
      allOf:
        - $ref: "#/components/schemas/UpdateSmsOptRecord"
        - type: object
          required:
            - createdAt
          properties:
            createdAt:
              type: string
              format: date-time
              description: The time when this history record was created
    ConsentHistoryRecordList:
      type: object
      description: A list of SMS consent records
      required:
        - records
        - paging
      properties:
        records:
          type: array
          minItems: 0
          items:
            $ref: "#/components/schemas/SmsOptHistoryRecord"
        paging:
          $ref: "#/components/schemas/NonEnumeratedPagingModel"
    SearchSmsConsentRecordsRequest:
      type: object
      properties:
        from:
          type: array
          description: |
            The internal party's phone number(s) used to filter records
            (if requested `coverage` is `PhoneNumber` or `Account`)
          minItems: 1
          maxItems: 20
          uniqueItems: true
          items:
            $ref: "#/components/schemas/PhoneNumberE164"
        to:
          type: array
          description: The external party's phone number(s) used to filter records
          minItems: 1
          maxItems: 20
          uniqueItems: true
          items:
            $ref: "#/components/schemas/PhoneNumberE164"
        optStatus:
          $ref: "#/components/schemas/SmsOptStatusEnum"
        coverage:
          type: array
          description: The coverage(s) used to filter records
          minItems: 1
          uniqueItems: true
          items:
            $ref: "#/components/schemas/SmsConsentCoverageEnum"
        campaignType:
          type: array
          description: |
            The campaign type(s) used to filter records
            (if requested `coverage` is `CampaignType`)
          minItems: 1
          uniqueItems: true
          items:
            $ref: "#/components/schemas/SmsCampaignTypeEnum"
        pageToken:
          type: string
          description: |
            The token indicating the particular page of the result set to be retrieved.
            If omitted the first page will be returned.
        perPage:
          type: integer
          format: int32
          minimum: 1
          maximum: 1000
          default: 100
          description: |
            The number of items per page. If provided value in the request
            is greater than a maximum, the maximum value is applied
    DeletePhoneNumbersResponse:
      type: object
      required:
        - records
      properties:
        records:
          type: array
          minItems: 1
          items:
            $ref: "#/components/schemas/DeletePhoneNumbersResponseItem"
    EnumeratedPagingModel:
      type: object
      required:
        - perPage
      additionalProperties: false
      properties:
        perPage:
          type: integer
          format: int32
          minimum: 1
          maximum: 1000
          description: |
            Current page size, describes how many items are in each page.
            Matches "perPage" parameter from the request.
          example: 50
        page:
          type: integer
          format: int32
          minimum: 1
          maximum: 1000
          description: |
            The current page number. 1-indexed, so the first page is 1
            by default. May be omitted if result is empty (because non-existent page
            was specified or perPage=0 was requested)
          example: 5
        pageStart:
          type: integer
          format: int32
          minimum: 0
          description: |
            The zero-based number of the first element on the current page.
            Omitted if the page is omitted or result is empty
          example: 0
        pageEnd:
          type: integer
          format: int32
          minimum: 0
          description: |
            The zero-based index of the last element on the current page.
            Omitted if the page is omitted or result is empty
          example: 5
        totalPages:
          type: integer
          format: int32
          minimum: 0
          description: |
            The total number of pages in a dataset. May be omitted for
            some resources due to performance reasons
          example: 25
        totalElements:
          type: integer
          format: int32
          minimum: 0
          description: |
            The total number of elements in a dataset. May be omitted for
            some resource due to performance reasons
          example: 25
    AccountPhoneNumberList:
      type: object
      required:
        - records
        - paging
      properties:
        records:
          type: array
          description: List of account phone numbers
          items:
            $ref: "#/components/schemas/AccountPhoneNumberInfo"
        paging:
          $ref: "#/components/schemas/EnumeratedPagingModel"
    PhoneNumberTollType:
      description: Indicates if a number is toll or toll-free
      type: string
      enum:
        - Toll
        - TollFree
      example: Toll
    PhoneNumberStatus:
      type: string
      description: |
        Status of a phone number. If the value is `Normal`, the phone
        number is ready to be used. Otherwise, it is an external number not yet
        ported to RingCentral
      enum:
        - Normal
        - Pending
        - PortedIn
        - Temporary
        - Unknown
    DeletePhoneNumbersRequest:
      type: object
      required:
        - records
      properties:
        records:
          type: array
          description: List of phone numbers or phone IDs to be deleted
          minItems: 1
          items:
            $ref: "#/components/schemas/DeletePhoneNumbersRequestItem"
    DeletePhoneNumbersResponseItem:
      allOf:
        - $ref: "#/components/schemas/BulkItemResultModel"
        - type: object
          properties:
            id:
              $ref: "#/components/schemas/PhoneNumberId"
            phoneNumber:
              $ref: "#/components/schemas/PhoneNumberE164"
    PhoneNumberActivationStatus:
      type: string
      description: Phone number activation status. Determine whether phone number migration is completed on the partner side.
      enum:
        - Active
        - Inactive
    PhoneNumberType:
      type: string
      description: Type of a phone number
      nullable: true
      enum:
        - VoiceFax
        - VoiceOnly
        - FaxOnly
    DeletePhoneNumbersRequestItem:
      type: object
      description: The indication of a number to be deleted - either `id` or `phoneNumber` must be specified.
      properties:
        id:
          $ref: "#/components/schemas/PhoneNumberId"
        phoneNumber:
          $ref: "#/components/schemas/PhoneNumberE164"
    ExtensionStatusEnumFull:
      type: string
      description: Extension status
      enum:
        - Enabled
        - Disabled
        - Frozen
        - NotActivated
        - Unassigned
    ContactCenterProvider:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of the provider
        name:
          type: string
          description: Provider's name
      description: |
        CCRN (Contact Center Routing Number) provider. If not specified
        then the default value 'InContact/North America' is used, its ID is '1'
    AccountPhoneNumberInfo:
      type: object
      required:
        - id
        - tollType
        - usageType
        - status
        - phoneNumber
      properties:
        activationStatus:
          $ref: "#/components/schemas/PhoneNumberActivationStatus"
        id:
          $ref: "#/components/schemas/PhoneNumberId"
        phoneNumber:
          $ref: "#/components/schemas/PhoneNumberE164"
        type:
          $ref: "#/components/schemas/PhoneNumberType"
        tollType:
          $ref: "#/components/schemas/PhoneNumberTollType"
        usageType:
          $ref: "#/components/schemas/PhoneNumberUsageTypeV2"
        byocNumber:
          type: boolean
        mobileNumber:
          type: boolean
        hotDeskNumber:
          type: boolean
          description: |
            Indicates whether the phone number belongs to a Hot Desk device if applicable.
        contactCenterProvider:
          $ref: "#/components/schemas/ContactCenterProvider"
        status:
          $ref: "#/components/schemas/PhoneNumberStatus"
        callerIdName:
          type: string
          description: Caller ID Name
        label:
          type: string
          description: Custom user-defined name of a phone number, if any
        primary:
          type: boolean
          description: |
            Indicates if a phone number is primary, i.e. displayed as 'main number' and called by default
        extension:
          type: object
          description: Reference to the extension this number is assigned to. Omitted for company numbers
          required:
            - id
          properties:
            id:
              type: string
              description: Unique identifier of extension
              example: "1234567"
            extensionNumber:
              $ref: "#/components/schemas/ExtensionNumber"
        providerId:
          type: string
          description: Internal identifier of a phone provider
    BulkItemResultModel:
      type: object
      required:
        - bulkItemSuccessful
      properties:
        bulkItemSuccessful:
          type: boolean
          description: |
            Indicates if this item was processed successfully during bulk operation.
            If false, `bulkItemErrors` attribute contains the list of errors
          example: true
        bulkItemErrors:
          type: array
          description: |
            The list of errors occurred during processing of particular item of bulk operation.
            Returned only if `bulkItemSuccessful` is false
          minItems: 1
          items:
            $ref: "#/components/schemas/ApiError"
    PhoneNumberId:
      type: string
      pattern: ^[1-9]\d{1,14}$
      description: Internal unique identifier of a phone number
      maxLength: 18
      example: "1162820004"
    PhoneNumberUsageTypeV2:
      type: string
      description: Usage type of a phone number
      enum:
        - MainCompanyNumber
        - DirectNumber
        - Inventory
        - InventoryPartnerBusinessMobileNumber
        - InventoryFmcBusinessMobileNumber
        - PartnerBusinessMobileNumber
        - AdditionalCompanyNumber
        - CompanyNumber
        - PhoneLine
        - CompanyFaxNumber
        - ForwardedNumber
        - ForwardedCompanyNumber
        - ContactCenterNumber
        - ConferencingNumber
        - MeetingsNumber
        - NumberStorage
        - BusinessMobileNumber
        - FmcBusinessMobileNumber
        - ELIN
        - InventoryMobileNumber
    AssignPhoneNumberRequest:
      type: object
      required:
        - usageType
      properties:
        type:
          $ref: "#/components/schemas/PhoneNumberType"
        usageType:
          type: string
          description: Target usage type of phone number (only listed values are supported)
          enum:
            - MainCompanyNumber
            - CompanyNumber
            - DirectNumber
            - ContactCenterNumber
        extension:
          type: object
          required:
            - id
          properties:
            id:
              type: string
              description: Internal identifier of an extension
        costCenterId:
          type: string
        contactCenterProvider:
          $ref: "#/components/schemas/ContactCenterProvider"
    ReplacePhoneNumberRequest:
      type: object
      properties:
        targetPhoneNumberId:
          $ref: "#/components/schemas/PhoneNumberId"
    AddPhoneNumberRequestItem:
      type: object
      required:
        - phoneNumber
        - usageType
      properties:
        phoneNumber:
          type: string
          description: |
            Phone number in e.164 format (with '+' prefix).
            Wildcards are supported to pass large sets (for example 100 numbers);
            only one phone number record must be passed in request in that case, for example '+1650123456*'
        usageType:
          type: string
          description: |
            Usage type of phone number. Currently, we support the following values: `Inventory`,
            `InventoryPartnerBusinessMobileNumber`, `InventoryFmcBusinessMobileNumber`, `PartnerBusinessMobileNumber`, `InventoryMobileNumber`.
            Later we may support some other values like `ForwardedNumber`, etc.
          default: Inventory
          enum:
            - Inventory
            - InventoryPartnerBusinessMobileNumber
            - InventoryFmcBusinessMobileNumber
            - PartnerBusinessMobileNumber
            - InventoryMobileNumber
        activationStatus:
          $ref: "#/components/schemas/PhoneNumberActivationStatus"
        providerId:
          type: string
          description: Internal identifier of a phone provider
    AddPhoneNumbersResponse:
      type: object
      required:
        - records
      properties:
        records:
          type: array
          minItems: 1
          description: List of account phone numbers
          items:
            $ref: "#/components/schemas/AddPhoneNumbersResponseItem"
    AddPhoneNumbersRequest:
      type: object
      required:
        - records
      properties:
        records:
          type: array
          minItems: 1
          description: List of account phone numbers
          items:
            $ref: "#/components/schemas/AddPhoneNumberRequestItem"
    AddPhoneNumbersResponseItem:
      allOf:
        - $ref: "#/components/schemas/BulkItemResultModel"
        - type: object
          required:
            - phoneNumber
          properties:
            id:
              $ref: "#/components/schemas/PhoneNumberId"
            phoneNumber:
              $ref: "#/components/schemas/PhoneNumberE164"
            activationStatus:
              $ref: "#/components/schemas/PhoneNumberActivationStatus"
    AddPhoneNumbersTask:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a task
        creationTime:
          type: string
          format: date-time
          description: Task creation time in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format
        status:
          type: string
          description: Task status
          example: Accepted
    CostCenterBase:
      type: object
      properties:
        id:
          type: integer
          format: int64
          description: Internal identifier of a cost center
          readOnly: true
          example: 981086004
        name:
          type: string
          description: Cost Center name
          maxLength: 64
          example: My Cost Center
        billingCode:
          type: string
          description: Billing code associated with a cost center
          maxLength: 24
          example: BC 101
    CostCenterItem:
      allOf:
        - $ref: "#/components/schemas/CostCenterBase"
        - type: object
          required:
            - taxLocation
          properties:
            taxLocation:
              $ref: "#/components/schemas/TaxLocation"
            parentId:
              type: integer
              format: int64
              description: Internal identifier of a parent cost center
              example: 45878
    CostCenterList:
      type: object
      required:
        - records
      properties:
        records:
          type: array
          minItems: 0
          items:
            $ref: "#/components/schemas/CostCenterItem"
    TaxLocation:
      type: object
      required:
        - id
        - name
        - type
        - address
      properties:
        id:
          type: integer
          format: int64
          description: Internal identifier of a tax location
          readOnly: true
          example: 981086004
        name:
          type: string
          description: Tax location name
          example: Tax_Location
        type:
          description: Type of the location object. Only 'TaxLocation' is currently supported for POST method
          type: string
          enum:
            - BillingAddress
            - TaxLocation
            - Site
          example: TaxLocation
        externalLocationId:
          type: string
          description: Unique identifier of a tax location in the partner's system
          maxLength: 30
          example: "4587834894962936"
        effectiveDate:
          type: string
          format: date-time
          example: 2022-06-05T10:11:12Z
          description: |
            Effective date in the ISO 8601 (`YYYY-MM-DDThh:mm:ssTZD`) format, including date, time, and timezone
        address:
          $ref: "#/components/schemas/PostalAddress"
    RemoveLineResponse:
      type: object
      required:
        - id
        - type
        - name
      properties:
        id:
          type: string
          description: Internal identifier of a source device
        type:
          type: string
          description: Device type
          default: HardPhone
          enum:
            - HardPhone
            - SoftPhone
            - OtherPhone
            - MobileDevice
            - BLA
            - Paging
            - WebPhone
            - WebRTC
            - ZoomMobile
            - ZoomPhone
            - Room
            - Unknown
        name:
          type: string
          description: The display name of a source device
          example: My Device N1
        serial:
          type: string
          description: Serial number of a device (HardPhone)
          example: ff:ff:ff:ff:ff:ff
    RemoveLineRequest:
      type: object
      required:
        - keepAssetsInInventory
      properties:
        keepAssetsInInventory:
          type: boolean
          default: true
          description: |
            The flag that controls what to do with the number and device:

            - if the value of `keepAssetsInInventory` is `true`, the given device is moved to unassigned devices
            and the number is moved to the number inventory;
            - if the value of `keepAssetsInInventory` is `false`, the given device and number is removed from the account;
            - if the parameter `keepAssetsInInventory` is not set (empty body) or the value of the parameter is empty,
            default value `true` is set.
    BulkAddDevicesItem:
      allOf:
        - type: object
          required:
            - extension
          properties:
            costCenterId:
              type: string
              description: Internal identifier of a cost center
              example: "224149"
            extension:
              $ref: "#/components/schemas/BulkOperationExtensionReference"
        - $ref: "#/components/schemas/DeviceDefinition"
    PhoneNumberDefinitionDirectNumberWithReservationId:
      type: object
      description: Direct number assignment in case the number pool is not supported
      required:
        - phoneNumber
      properties:
        phoneNumber:
          $ref: "#/components/schemas/PhoneNumberE164"
        reservationId:
          type: string
          description: Phone number reservation ID. If provided, phoneNumber is also required
    BulkAddDevicesRequest:
      type: object
      required:
        - records
      properties:
        records:
          type: array
          minItems: 1
          items:
            $ref: "#/components/schemas/BulkAddDevicesItem"
    PhoneNumberDefinitionPreferredAreaCode:
      type: object
      description: Used as selection hint when a "toll" number is selected from the number pool
      required:
        - preferredAreaCode
      properties:
        preferredAreaCode:
          description: Preferred area code to use if the numbers are available
          type: string
          pattern: ^[1-9]\d{1,3}$
          example: "650"
        tollType:
          $ref: "#/components/schemas/PhoneNumberTollType"
        type:
          $ref: "#/components/schemas/PhoneNumberType"
    PhoneNumberDefinitionDirectNumberType:
      type: object
      description: Assign a specific phone number
      required:
        - phoneNumber
      properties:
        phoneNumber:
          type: string
          description: Phone number in e164 format
        type:
          $ref: "#/components/schemas/PhoneNumberType"
    BulkAddDevicesSuccessItem:
      type: object
      required:
        - successful
        - id
        - extension
        - phoneNumber
      properties:
        successful:
          type: boolean
          description: Indicates if the provisioning operation was successful for this item, always `true` in this model
          example: true
        id:
          description: Internal identifier of the created device
          type: string
          example: "787878"
        extension:
          $ref: "#/components/schemas/BulkOperationExtensionReference"
        phoneNumber:
          $ref: "#/components/schemas/PhoneNumberE164"
    BulkAddDevicesErrorItem:
      type: object
      required:
        - successful
        - errors
      properties:
        successful:
          type: boolean
          description: Indicates if the provisioning operation was successful for this item, always `false` in this model
          example: false
        errors:
          type: array
          minItems: 1
          items:
            $ref: "#/components/schemas/ApiErrorWithParameter"
    DeviceDefinition:
      type: object
      required:
        - type
        - emergency
        - phoneInfo
      properties:
        type:
          type: string
          description: Device type. Only "OtherPhone" and "WebRTC" device types are supported at the moment
          enum:
            - OtherPhone
            - WebRTC
        emergency:
          oneOf:
            - type: object
              required:
                - location
              properties:
                location:
                  type: object
                  required:
                    - id
                  properties:
                    id:
                      type: string
                      description: Emergency location ID
            - type: object
              deprecated: true
              properties:
                address:
                  $ref: "#/components/schemas/PostalAddress"
        phoneInfo:
          oneOf:
            - $ref: "#/components/schemas/PhoneNumberDefinitionTollType"
            - $ref: "#/components/schemas/PhoneNumberDefinitionPreferredAreaCode"
            - $ref: "#/components/schemas/PhoneNumberDefinitionDirectNumberWithReservationId"
            - $ref: "#/components/schemas/PhoneNumberDefinitionNumberId"
            - $ref: "#/components/schemas/PhoneNumberDefinitionDirectNumberType"
        contactCenterPhoneLine:
          type: boolean
          description: The option that indicates whether Contact Center Phone Line should be created or not
          default: false
    BulkAddDevicesResponse:
      type: object
      required:
        - results
      properties:
        results:
          type: array
          items:
            oneOf:
              - $ref: "#/components/schemas/BulkAddDevicesSuccessItem"
              - $ref: "#/components/schemas/BulkAddDevicesErrorItem"
    PhoneNumberDefinitionTollType:
      type: object
      description: Filtering criteria when a number is selected from the number pool
      required:
        - tollType
      properties:
        tollType:
          $ref: "#/components/schemas/PhoneNumberTollType"
        type:
          $ref: "#/components/schemas/PhoneNumberType"
    PhoneNumberDefinitionNumberId:
      type: object
      description: Assign a number by ID
      required:
        - phoneNumberId
      properties:
        phoneNumberId:
          type: string
          description: Phone number identifier
    BulkOperationExtensionReference:
      type: object
      description: Information about an extension this device is assigned to
      required:
        - id
      properties:
        id:
          type: string
          description: Internal identifier of a RingCentral extension
          example: "12345"
    ExtensionFormattingLocaleInfoRequest:
      type: object
      properties:
        id:
          type: string
          description: Internal Identifier of a formatting language
    BatchProvisionErrorItem:
      type: object
      required:
        - successful
        - errors
      properties:
        successful:
          type: boolean
          description: Indicates if the provisioning operation was successful for this item, always `false` in this model
          example: false
        errors:
          type: array
          minItems: 1
          items:
            $ref: "#/components/schemas/ApiErrorWithParameter"
    ExtensionCountryInfoRequest:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a country
    BatchProvisionUsersRequestItem:
      description: Describes request for user extension provisioning
      type: object
      required:
        - status
        - contact
      properties:
        extensionNumber:
          $ref: "#/components/schemas/ExtensionNumber"
        status:
          description: Extension status. Only "Enabled" can be specified
          type: string
          enum:
            - Enabled
          default: Enabled
        contact:
          description: User's contact information
          required:
            - firstName
            - lastName
            - email
          allOf:
            - $ref: "#/components/schemas/BasicContactInfo"
            - type: object
              properties:
                mobileNumber:
                  $ref: "#/components/schemas/PhoneNumberE164"
                emailAsLoginName:
                  description: |
                    Indicates that contact email is enabled as login name for this user.
                    Please note that email must be unique in this case.
                  type: boolean
                  default: true
                transition:
                  $ref: "#/components/schemas/TransitionInfo"
        costCenter:
          type: object
          required:
            - id
          properties:
            id:
              type: string
              description: Internal identifier of the Cost Center
              example: "224149"
        roles:
          type: array
          maxItems: 1
          items:
            type: object
            required:
              - id
            properties:
              id:
                type: string
                description: Internal identifier of a role to be assigned
                example: "1"
        devices:
          type: array
          maxItems: 1
          items:
            type: object
            required:
              - deviceInfo
            properties:
              deviceInfo:
                $ref: "#/components/schemas/DeviceDefinition"
    TransitionInfo:
      type: object
      properties:
        sendWelcomeEmail:
          type: boolean
          description: |
            Specifies if a welcome/activation email is sent to the new users
            (with the extension status transition from 'Unassigned' to 'NotActivated/Disabled')
          default: true
        regionalSettings:
          $ref: "#/components/schemas/ExtensionRegionalSettingRequest"
    ExtensionTimezoneInfoRequest:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a timezone
    TimeFormatEnum:
      type: string
      description: Time format (12-hours or 24-hours).
      enum:
        - 12h
        - 24h
      default: 12h
    ExtensionRegionalSettingRequest:
      type: object
      description: |
        Regional data (timezone, home country, language) of an extension.
        The default is Company (Auto-Receptionist) settings
      properties:
        homeCountry:
          $ref: "#/components/schemas/ExtensionCountryInfoRequest"
        timezone:
          $ref: "#/components/schemas/ExtensionTimezoneInfoRequest"
        language:
          $ref: "#/components/schemas/ExtensionLanguageInfoRequest"
        greetingLanguage:
          $ref: "#/components/schemas/ExtensionGreetingLanguageInfoRequest"
        formattingLocale:
          $ref: "#/components/schemas/ExtensionFormattingLocaleInfoRequest"
        currency:
          $ref: "#/components/schemas/ExtensionCurrencyInfoRequest"
        timeFormat:
          $ref: "#/components/schemas/TimeFormatEnum"
    ExtensionCurrencyInfoRequest:
      type: object
      properties:
        id:
          type: string
          description: Internal Identifier of a currency
    BatchProvisionUsersRequest:
      description: Describes request for user extension provisioning
      type: object
      required:
        - records
      properties:
        records:
          type: array
          maxItems: 10
          minItems: 1
          items:
            $ref: "#/components/schemas/BatchProvisionUsersRequestItem"
    ExtensionGreetingLanguageInfoRequest:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a greeting language
    BatchProvisionUsersResponse:
      type: object
      required:
        - results
      properties:
        results:
          type: array
          items:
            anyOf:
              - $ref: "#/components/schemas/BatchProvisionUsersSuccessItem"
              - $ref: "#/components/schemas/BatchProvisionErrorItem"
    ExtensionLanguageInfoRequest:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a language
    BatchProvisionUsersSuccessItem:
      type: object
      required:
        - successful
        - extension
      properties:
        successful:
          type: boolean
          description: Indicates if the provisioning operation was successful for this item, always `true` in this model
          example: true
        extension:
          type: object
          required:
            - devices
            - id
          properties:
            id:
              type: string
              description: The internal identifier of RingCentral extension created
              example: "12345"
            devices:
              type: array
              items:
                type: object
                required:
                  - id
                  - phoneNumber
                properties:
                  id:
                    type: string
                    description: The internal identifier of device created
                    example: "12345"
                  phoneNumber:
                    $ref: "#/components/schemas/PhoneNumberE164"
    BulkDeleteUsersRequest:
      type: object
      required:
        - records
      properties:
        keepAssetsInInventory:
          type: boolean
          description: |
            Indicates that the freed users' assets (phone numbers and devices) should be moved
            to account inventory rather than deleted. If set to `true`, the phone numbers and devices
            assigned to deleted extensions will be kept in the account's inventory. If set to `false`,
            these assets will be deleted from the account and returned to either the partner's phone
            numbers or RingCentral's phone number pool
          default: true
        records:
          type: array
          minItems: 1
          maxItems: 50
          items:
            $ref: "#/components/schemas/BulkOperationExtensionReference"
    BulkDeleteUsersResponse:
      type: object
      required:
        - records
      properties:
        records:
          type: array
          items:
            allOf:
              - type: object
                properties:
                  id:
                    type: string
                    description: Internal identifier of an extension
                    example: "1162820004"
              - $ref: "#/components/schemas/BulkItemResultModel"
    CommDateTimeWithoutTimezone:
      type: string
      description: Date-time in ISO8601 format. If date has TZ, TZ will be omitted. EX 2024-03-20T14:23+04:00 to 2024-03-20 14:23. The TZ from the user settings will be applied while call routing
      pattern: ^((([0-9]{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01]))T(([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?))(Z|\+-:[0-5][0-9])?)$
    CommStateConditionsResource:
      title: State Conditions
      type: array
      maxItems: 1
      items:
        oneOf:
          - $ref: "#/components/schemas/CommStateScheduleConditionResource"
          - $ref: "#/components/schemas/CommStateRefConditionResource"
        discriminator:
          propertyName: type
          mapping:
            Schedule: "#/components/schemas/CommStateScheduleConditionResource"
            State: "#/components/schemas/CommStateRefConditionResource"
    CommStatesResource:
      required:
        - records
        - paging
      type: object
      properties:
        records:
          type: array
          items:
            $ref: "#/components/schemas/CommStateResource"
        paging:
          $ref: "#/components/schemas/EnumeratedPagingModel"
    CommRangeTriggerResource:
      title: Range Trigger
      required:
        - ranges
      allOf:
        - $ref: "#/components/schemas/CommTriggerResource"
        - type: object
          properties:
            ranges:
              type: array
              minItems: 1
              items:
                $ref: "#/components/schemas/CommRangeResource"
            triggerType:
              type: string
              description: Trigger type
              enum:
                - Range
              example: Range
    CommStateConditionTypeResource:
      title: State Condition Type
      type: string
      description: State condition type
      enum:
        - Schedule
        - State
    CommWeeklyRangeResource:
      title: Weekly Range
      type: object
      required:
        - startTime
        - endTime
      properties:
        startTime:
          type: string
          format: time
          description: Start time in format hh:mm:ss
        endTime:
          type: string
          format: time
          description: End time in format hh:mm:ss
    CommDailyTriggerResource:
      title: Daily Trigger
      required:
        - startTime
        - endTime
      allOf:
        - $ref: "#/components/schemas/CommTriggerResource"
        - type: object
          properties:
            startTime:
              type: string
              format: time
              description: Start time in format hh:mm:ss
            endTime:
              type: string
              format: time
              description: End time in format hh:mm:ss
            triggerType:
              type: string
              enum:
                - Daily
              example: Daily
    CommTriggerTypeResource:
      type: string
      description: Trigger type
      enum:
        - Daily
        - Weekly
        - Range
    CommWeeklyItemsResource:
      type: object
      properties:
        monday:
          $ref: "#/components/schemas/CommWeeklyRangesResource"
        tuesday:
          $ref: "#/components/schemas/CommWeeklyRangesResource"
        wednesday:
          $ref: "#/components/schemas/CommWeeklyRangesResource"
        thursday:
          $ref: "#/components/schemas/CommWeeklyRangesResource"
        friday:
          $ref: "#/components/schemas/CommWeeklyRangesResource"
        saturday:
          $ref: "#/components/schemas/CommWeeklyRangesResource"
        sunday:
          $ref: "#/components/schemas/CommWeeklyRangesResource"
    CommStateReferenceConditionsResource:
      title: State Reference Conditions
      type: array
      maxItems: 1
      items:
        $ref: "#/components/schemas/CommStateScheduleConditionResource"
    CommTriggerResource:
      title: Trigger
      required:
        - triggerType
      type: object
      properties:
        triggerType:
          $ref: "#/components/schemas/CommTriggerTypeResource"
      discriminator:
        propertyName: triggerType
        mapping:
          Daily: "#/components/schemas/CommDailyTriggerResource"
          Weekly: "#/components/schemas/CommWeeklyTriggerResource"
          Range: "#/components/schemas/CommRangeTriggerResource"
    CommStateRefConditionResource:
      title: State Condition
      allOf:
        - $ref: "#/components/schemas/CommStateConditionResource"
        - type: object
          properties:
            type:
              type: string
              enum:
                - State
            state:
              $ref: "#/components/schemas/CommStateReferenceResource"
    CommStateDisplayNameResource:
      type: string
      description: Predefined name of a state-based rule (similar to the name of a state)
      enum:
        - After Hours
        - Work Hours
        - Do not disturb
        - Forward all calls
        - Agent
        - Busy
    CommStateScheduleConditionResource:
      title: State Schedule Condition
      required:
        - schedule
      allOf:
        - $ref: "#/components/schemas/CommStateConditionResource"
        - type: object
          properties:
            type:
              type: string
              enum:
                - Schedule
            schedule:
              $ref: "#/components/schemas/CommStateScheduleResource"
    CommStateReferenceResource:
      title: State Reference
      required:
        - id
        - displayName
        - conditions
      type: object
      properties:
        id:
          $ref: "#/components/schemas/CommStateIdResource"
        displayName:
          $ref: "#/components/schemas/CommStateDisplayNameResource"
        conditions:
          $ref: "#/components/schemas/CommStateReferenceConditionsResource"
    CommRangeResource:
      title: Range
      required:
        - startDateTime
        - endDateTime
      type: object
      properties:
        startDateTime:
          type: string
          allOf:
            - $ref: "#/components/schemas/CommDateTimeWithoutTimezone"
            - description: Start date-time
        endDateTime:
          type: string
          allOf:
            - $ref: "#/components/schemas/CommDateTimeWithoutTimezone"
            - description: End date-time
    CommStateScheduleResource:
      title: State Schedule
      required:
        - triggers
      type: object
      properties:
        triggers:
          type: array
          minItems: 1
          items:
            oneOf:
              - $ref: "#/components/schemas/CommDailyTriggerResource"
              - $ref: "#/components/schemas/CommWeeklyTriggerResource"
              - $ref: "#/components/schemas/CommRangeTriggerResource"
            discriminator:
              propertyName: triggerType
              mapping:
                Daily: "#/components/schemas/CommDailyTriggerResource"
                Weekly: "#/components/schemas/CommWeeklyTriggerResource"
                Range: "#/components/schemas/CommRangeTriggerResource"
    CommStateResource:
      required:
        - id
        - displayName
        - enabled
        - conditions
      type: object
      properties:
        id:
          $ref: "#/components/schemas/CommStateIdResource"
        enabled:
          type: boolean
          description: Specifies if a state is enabled or not. *Work Hours* and *After Hours* states cannot be disabled
        displayName:
          $ref: "#/components/schemas/CommStateDisplayNameResource"
        conditions:
          $ref: "#/components/schemas/CommStateConditionsResource"
    CommStateIdResource:
      title: State ID
      type: string
      description: Id/Type of a state the rule is based on
      enum:
        - after-hours
        - work-hours
        - dnd
        - forward-all-calls
        - agent
        - busy
    CommWeeklyRangesResource:
      type: array
      minItems: 0
      maxItems: 20
      items:
        $ref: "#/components/schemas/CommWeeklyRangeResource"
    CommWeeklyTriggerResource:
      title: Weekly Trigger
      required:
        - ranges
      allOf:
        - $ref: "#/components/schemas/CommTriggerResource"
        - type: object
          properties:
            ranges:
              $ref: "#/components/schemas/CommWeeklyItemsResource"
            triggerType:
              type: string
              description: Trigger type
              enum:
                - Weekly
              example: Weekly
    CommStateConditionResource:
      title: State Condition
      type: object
      required:
        - type
      properties:
        type:
          $ref: "#/components/schemas/CommStateConditionTypeResource"
      discriminator:
        propertyName: type
        mapping:
          Schedule: "#/components/schemas/CommStateScheduleConditionResource"
          State: "#/components/schemas/CommStateRefConditionResource"
    CommStateConditionsRequest:
      title: State Conditions
      type: array
      minItems: 1
      maxItems: 1
      items:
        oneOf:
          - $ref: "#/components/schemas/CommStateScheduleConditionRequest"
          - $ref: "#/components/schemas/CommStateRefConditionRequest"
        discriminator:
          propertyName: type
          mapping:
            Schedule: "#/components/schemas/CommStateScheduleConditionRequest"
            State: "#/components/schemas/CommStateRefConditionRequest"
    CommWeeklyTriggerRequest:
      title: Weekly Trigger
      required:
        - ranges
      allOf:
        - $ref: "#/components/schemas/CommTriggerRequest"
        - type: object
          properties:
            ranges:
              $ref: "#/components/schemas/CommWeeklyItemsResource"
            triggerType:
              type: string
              description: Trigger type
              enum:
                - Weekly
              example: Weekly
    CommStateScheduleConditionRequest:
      title: State Schedule Condition
      required:
        - schedule
      allOf:
        - $ref: "#/components/schemas/CommStateConditionRequest"
        - type: object
          properties:
            type:
              type: string
              enum:
                - Schedule
            schedule:
              $ref: "#/components/schemas/CommStateScheduleRequest"
    CommRangeRequest:
      title: Range
      required:
        - endDateTime
      type: object
      properties:
        startDateTime:
          type: string
          allOf:
            - $ref: "#/components/schemas/CommDateTimeWithoutTimezone"
            - description: Start date-time
        endDateTime:
          type: string
          allOf:
            - $ref: "#/components/schemas/CommDateTimeWithoutTimezone"
            - description: End date-time
    CommStateScheduleRequest:
      title: State Schedule
      required:
        - triggers
      type: object
      properties:
        triggers:
          type: array
          minItems: 1
          items:
            oneOf:
              - $ref: "#/components/schemas/CommDailyTriggerRequest"
              - $ref: "#/components/schemas/CommWeeklyTriggerRequest"
              - $ref: "#/components/schemas/CommRangeTriggerRequest"
            discriminator:
              propertyName: triggerType
              mapping:
                Daily: "#/components/schemas/CommDailyTriggerRequest"
                Weekly: "#/components/schemas/CommWeeklyTriggerRequest"
                Range: "#/components/schemas/CommRangeTriggerRequest"
    CommStateConditionRequest:
      title: State Condition
      required:
        - type
      type: object
      properties:
        type:
          $ref: "#/components/schemas/CommStateConditionTypeResource"
      discriminator:
        propertyName: type
        mapping:
          Schedule: "#/components/schemas/CommStateScheduleConditionRequest"
          State: "#/components/schemas/CommStateRefConditionRequest"
    CommReferenceStateResource:
      type: object
      required:
        - id
      properties:
        id:
          $ref: "#/components/schemas/CommReferenceStateIdResource"
    CommTriggerRequest:
      title: Trigger
      required:
        - triggerType
      type: object
      properties:
        triggerType:
          $ref: "#/components/schemas/CommTriggerTypeRequest"
      discriminator:
        propertyName: triggerType
        mapping:
          Daily: "#/components/schemas/CommDailyTriggerRequest"
          Weekly: "#/components/schemas/CommWeeklyTriggerRequest"
          Range: "#/components/schemas/CommRangeTriggerRequest"
    CommTriggerTypeRequest:
      type: string
      description: Trigger type
      enum:
        - Daily
        - Weekly
        - Range
    CommRangeTriggerRequest:
      title: Range Trigger
      required:
        - ranges
      allOf:
        - $ref: "#/components/schemas/CommTriggerRequest"
        - type: object
          properties:
            ranges:
              type: array
              minItems: 1
              items:
                $ref: "#/components/schemas/CommRangeRequest"
            triggerType:
              type: string
              description: Trigger type
              enum:
                - Range
              example: Range
    CommDailyTriggerRequest:
      title: Daily Trigger
      required:
        - startTime
        - endTime
      allOf:
        - $ref: "#/components/schemas/CommTriggerRequest"
        - type: object
          properties:
            startTime:
              type: string
              format: time
              description: Start time in format hh:mm:ss
            endTime:
              type: string
              format: time
              description: End time in format hh:mm:ss
            triggerType:
              type: string
              enum:
                - Daily
              example: Daily
    CommReferenceStateIdResource:
      type: string
      description: Id/Type of a state the rule is based on
      enum:
        - work-hours
        - after-hours
    CommStateRefConditionRequest:
      title: State Condition
      required:
        - state
      allOf:
        - $ref: "#/components/schemas/CommStateConditionRequest"
        - type: object
          properties:
            type:
              type: string
              enum:
                - State
            state:
              $ref: "#/components/schemas/CommReferenceStateResource"
    CommStateUpdateRequest:
      type: object
      properties:
        enabled:
          type: boolean
          description: Specifies if a state is enabled or not. *Work Hours* and *After Hours* states cannot be disabled
        conditions:
          $ref: "#/components/schemas/CommStateConditionsRequest"
    CommIntegrationType:
      type: string
      description: Integration type
      enum:
        - MsTeamsDirectRouting
        - FmcLite
    CommAllDesktopTargetResource:
      title: Ring Target - All Desktop
      required:
        - name
      type: object
      description: All Desktop Ring target
      properties:
        extension:
          $ref: "#/components/schemas/CommReferencedExtensionResource"
        name:
          type: string
        type:
          type: string
          enum:
            - AllDesktopRingTarget
          example: AllDesktopRingTarget
    CommCloudConnectorTargetResource:
      title: Ring Target - Cloud Connector
      required:
        - destination
      type: object
      description: Ring target
      properties:
        destination:
          $ref: "#/components/schemas/CommCloudDestination"
        type:
          type: string
          description: Type of a ring target
          enum:
            - CloudConnectorRingTarget
          example: CloudConnectorRingTarget
    CommDeviceRingTargetResource:
      title: Ring Target - Device
      required:
        - name
      allOf:
        - $ref: "#/components/schemas/CommRingTargetResource"
        - $ref: "#/components/schemas/CommDeviceTargetResource"
    CommReferencedExtensionResource:
      required:
        - id
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of an extension
          example: "4321432156"
    CommRingAlwaysRingTargetResource:
      title: Ring Target - Ring Always
      required:
        - type
      type: object
      properties:
        name:
          type: string
        type:
          $ref: "#/components/schemas/CommRingAlwaysRingTargetTypeResource"
      discriminator:
        propertyName: type
        mapping:
          AllDesktopRingTarget: "#/components/schemas/CommAllDesktopRingAlwaysRingTargetResource"
          AllMobileRingTarget: "#/components/schemas/CommAllMobileRingAlwaysRingTargetResource"
    CommAllMobileRingAlwaysRingTargetResource:
      title: Ring Target - All Mobile Ring Always
      allOf:
        - $ref: "#/components/schemas/CommRingAlwaysRingTargetResource"
        - $ref: "#/components/schemas/CommAllMobileTargetResource"
    CommVoiceMailTerminatingTargetResource:
      title: VoiceMail Terminating Target
      required:
        - prompt
      allOf:
        - $ref: "#/components/schemas/CommTerminatingTargetResource"
        - type: object
          properties:
            extension:
              $ref: "#/components/schemas/CommReferencedExtensionResource"
            prompt:
              $ref: "#/components/schemas/CommTerminatingPromptResource"
            type:
              type: string
              description: Terminating target type
              enum:
                - VoiceMailTerminatingTarget
              example: VoiceMailTerminatingTarget
    CommGreetingResource:
      title: Greeting
      required:
        - effectiveGreetingType
        - preset
      type: object
      properties:
        effectiveGreetingType:
          $ref: "#/components/schemas/CommGreetingSourceTypeResource"
        preset:
          $ref: "#/components/schemas/CommGreetingIdResource"
        custom:
          $ref: "#/components/schemas/CommGreetingIdResource"
    CommPlayConnectingMessageActionResource:
      title: Play Connecting Message
      required:
        - enabled
        - greeting
      allOf:
        - $ref: "#/components/schemas/CommActionResource"
        - type: object
          properties:
            type:
              type: string
              example: PlayConnectingMessageAction
              enum:
                - PlayConnectingMessageAction
            greeting:
              $ref: "#/components/schemas/CommGreetingResource"
            enabled:
              type: boolean
              description: Specifies if an action is enabled
    CommIntegrationRingTargetResource:
      title: Ring Target - Integration
      required:
        - name
      allOf:
        - $ref: "#/components/schemas/CommRingTargetResource"
        - $ref: "#/components/schemas/CommIntegrationTargetResource"
    CommCloudConnectorRingTargetResource:
      title: Ring Target - Coworker
      description: Extension of a coworker to be ringed
      allOf:
        - $ref: "#/components/schemas/CommCloudConnectorTargetResource"
        - $ref: "#/components/schemas/CommRingTargetResource"
    CommTerminatingTargetResource:
      title: Terminating Target
      required:
        - name
        - type
      type: object
      properties:
        name:
          type: string
        type:
          $ref: "#/components/schemas/CommTerminatingTargetTypeResource"
      discriminator:
        propertyName: type
        mapping:
          ExtensionTerminatingTarget: "#/components/schemas/CommExtensionTerminatingTargetResource"
          PhoneNumberTerminatingTarget: "#/components/schemas/CommPhoneNumberTerminatingTargetResource"
          PlayAnnouncementTerminatingTarget: "#/components/schemas/CommPlayAnnouncementTerminatingTargetResource"
          VoiceMailTerminatingTarget: "#/components/schemas/CommVoiceMailTerminatingTargetResource"
          CloudConnectorTerminatingTarget: "#/components/schemas/CommCloudConnectorTerminatingTargetResource"
    CommActionResource:
      title: Action Resource
      required:
        - type
      type: object
      description: Action information
      properties:
        type:
          $ref: "#/components/schemas/CommActionTypeResource"
      discriminator:
        propertyName: type
        mapping:
          PlayConnectingMessageAction: "#/components/schemas/CommPlayConnectingMessageActionResource"
          PlayConnectingPromptAction: "#/components/schemas/CommPlayConnectingPromptActionResource"
          PlayWelcomePromptAction: "#/components/schemas/CommPlayWelcomePromptActionResource"
          ScreeningAction: "#/components/schemas/CommScreeningActionResource"
          RingGroupAction: "#/components/schemas/CommRingGroupActionResource"
          RingAlwaysGroupAction: "#/components/schemas/CommRingAlwaysGroupActionResource"
          TerminatingAction: "#/components/schemas/CommTerminatingActionResource"
    CommFmcPhoneNumberTargetResource:
      title: Ring Target - Fmc Full Phone Number
      required:
        - destination
      type: object
      properties:
        destination:
          $ref: "#/components/schemas/CommPhoneNumberResource"
        type:
          type: string
          description: Ring target type
          enum:
            - FmcPhoneNumberRingTarget
          example: FmcPhoneNumberRingTarget
    CommIntegrationTargetResource:
      title: Integration Target
      required:
        - integration
      type: object
      properties:
        integration:
          $ref: "#/components/schemas/CommIntegrationResource"
        type:
          type: string
          description: Ring target type
          enum:
            - IntegrationRingTarget
          example: IntegrationRingTarget
    CommGreetingIdResource:
      required:
        - id
      type: object
      properties:
        id:
          type: string
          example: "66319"
          description: Internal identifier of a greeting
    CommRingTargetTypeResource:
      type: string
      description: Ring target type
      enum:
        - AllDesktopRingTarget
        - AllMobileRingTarget
        - CoworkerRingTarget
        - DeviceRingTarget
        - HotdeskRingTarget
        - ImsPhoneNumberRingTarget
        - FmcPhoneNumberRingTarget
        - IntegrationRingTarget
        - PhoneNumberRingTarget
        - CloudConnectorRingTarget
    CommStateBasedRulesResource:
      required:
        - records
        - paging
      type: object
      description: State-based rule information
      properties:
        records:
          type: array
          items:
            $ref: "#/components/schemas/CommStateBasedRuleResource"
        paging:
          $ref: "#/components/schemas/EnumeratedPagingModel"
    CommTerminatingActionResource:
      title: Terminating Action
      required:
        - targets
      allOf:
        - $ref: "#/components/schemas/CommActionResource"
        - type: object
          properties:
            targets:
              type: array
              minItems: 1
              description: Action information
              items:
                oneOf:
                  - $ref: "#/components/schemas/CommVoiceMailTerminatingTargetResource"
                  - $ref: "#/components/schemas/CommPlayAnnouncementTerminatingTargetResource"
                  - $ref: "#/components/schemas/CommPhoneNumberTerminatingTargetResource"
                  - $ref: "#/components/schemas/CommExtensionTerminatingTargetResource"
                  - $ref: "#/components/schemas/CommCloudConnectorTerminatingTargetResource"
                discriminator:
                  propertyName: type
                  mapping:
                    ExtensionTerminatingTarget: "#/components/schemas/CommExtensionTerminatingTargetResource"
                    PhoneNumberTerminatingTarget: "#/components/schemas/CommPhoneNumberTerminatingTargetResource"
                    PlayAnnouncementTerminatingTarget: "#/components/schemas/CommPlayAnnouncementTerminatingTargetResource"
                    VoiceMailTerminatingTarget: "#/components/schemas/CommVoiceMailTerminatingTargetResource"
                    CloudConnectorTerminatingTarget: "#/components/schemas/CommCloudConnectorTerminatingTargetResource"
            ringingTargetType:
              $ref: "#/components/schemas/CommTerminatingTargetTypeResource"
            terminatingTargetType:
              $ref: "#/components/schemas/CommTerminatingTargetTypeResource"
            type:
              type: string
              description: Action type
              enum:
                - TerminatingAction
              example: TerminatingAction
    CommGreetingSourceTypeResource:
      type: string
      description: Greeting type
      enum:
        - Custom
        - Preset
    CommIntegrationResource:
      required:
        - type
      type: object
      properties:
        phoneNumber:
          $ref: "#/components/schemas/CommPhoneNumberString"
        type:
          $ref: "#/components/schemas/CommIntegrationType"
    CommRingTargetResource:
      title: Ring Target
      required:
        - type
      type: object
      properties:
        name:
          type: string
        type:
          $ref: "#/components/schemas/CommRingTargetTypeResource"
      discriminator:
        propertyName: type
        mapping:
          AllDesktopRingTarget: "#/components/schemas/CommAllDesktopRingTargetResource"
          AllMobileRingTarget: "#/components/schemas/CommAllMobileRingTargetResource"
          CoworkerRingTarget: "#/components/schemas/CommCoworkerRingTargetResource"
          DeviceRingTarget: "#/components/schemas/CommDeviceRingTargetResource"
          HotdeskRingTarget: "#/components/schemas/CommHotdeskRingTargetResource"
          ImsPhoneNumberRingTarget: "#/components/schemas/CommImsPhoneNumberRingTargetResource"
          FmcPhoneNumberRingTarget: "#/components/schemas/CommFmcPhoneNumberRingTargetResource"
          IntegrationRingTarget: "#/components/schemas/CommIntegrationRingTargetResource"
          PhoneNumberRingTarget: "#/components/schemas/CommPhoneNumberRingTargetResource"
          CloudConnectorRingTarget: "#/components/schemas/CommCloudConnectorRingTargetResource"
    CommScreeningActionResource:
      title: Screening Action
      required:
        - screening
        - screeningResult
      allOf:
        - $ref: "#/components/schemas/CommActionResource"
        - type: object
          properties:
            screening:
              $ref: "#/components/schemas/CommScreeningTypeResource"
            enabled:
              type: boolean
              description: Specifies if an action is enabled
            screeningResult:
              $ref: "#/components/schemas/CommScreeningResultTypeResource"
            type:
              type: string
              description: Action type
              example: ScreeningAction
              enum:
                - ScreeningAction
    CommCloudConnectorTerminatingTargetResource:
      title: Terminating Target - Cloud Connector
      required:
        - destination
        - dispatchingType
      allOf:
        - $ref: "#/components/schemas/CommTerminatingTargetResource"
        - type: object
          properties:
            destination:
              $ref: "#/components/schemas/CommCloudDestination"
            type:
              type: string
              enum:
                - CloudConnectorTerminatingTarget
              example: CloudConnectorTerminatingTarget
            dispatchingType:
              $ref: "#/components/schemas/CommTerminatingTargetDispatchingTypeResource"
    CommImsPhoneNumberTargetResource:
      title: Ring Target - IMS Phone Number
      required:
        - destination
      type: object
      properties:
        destination:
          $ref: "#/components/schemas/CommPhoneNumberResource"
        type:
          type: string
          description: Ring target type
          enum:
            - ImsPhoneNumberRingTarget
          example: ImsPhoneNumberRingTarget
    CommStateBasedRuleResource:
      required:
        - id
        - dispatching
        - displayName
        - state
      type: object
      description: State-based rule information
      properties:
        id:
          $ref: "#/components/schemas/CommStateIdResource"
        displayName:
          $ref: "#/components/schemas/CommStateDisplayNameResource"
        dispatching:
          $ref: "#/components/schemas/CommStateDispatchingResource"
        dispatchingRef:
          $ref: "#/components/schemas/CommStateDispatchingRefResource"
        state:
          $ref: "#/components/schemas/CommStateResource"
    CommPlayWelcomePromptActionResource:
      title: Play Welcome Prompt
      required:
        - greeting
        - enabled
      allOf:
        - $ref: "#/components/schemas/CommActionResource"
        - type: object
          properties:
            type:
              type: string
              example: PlayWelcomePromptAction
              enum:
                - PlayWelcomePromptAction
            greeting:
              $ref: "#/components/schemas/CommGreetingResource"
            enabled:
              type: boolean
              description: Specifies if an action is enabled
    CommPhoneNumberResource:
      required:
        - phoneNumber
      type: object
      properties:
        phoneNumber:
          $ref: "#/components/schemas/CommPhoneNumberString"
    CommRingAlwaysGroupActionResource:
      title: Ring Always Group Action
      required:
        - enabled
        - targets
      allOf:
        - $ref: "#/components/schemas/CommActionResource"
        - type: object
          properties:
            enabled:
              type: boolean
              description: Specifies if an action is enabled
            targets:
              type: array
              minItems: 1
              maxItems: 2
              items:
                oneOf:
                  - $ref: "#/components/schemas/CommAllDesktopRingAlwaysRingTargetResource"
                  - $ref: "#/components/schemas/CommAllMobileRingAlwaysRingTargetResource"
                discriminator:
                  propertyName: type
                  mapping:
                    AllDesktopRingTarget: "#/components/schemas/CommAllDesktopRingAlwaysRingTargetResource"
                    AllMobileRingTarget: "#/components/schemas/CommAllMobileRingAlwaysRingTargetResource"
            type:
              type: string
              enum:
                - RingAlwaysGroupAction
              example: RingAlwaysGroupAction
    CommDispatchingTypeResource:
      type: string
      description: Call dispatching type
      enum:
        - RingAtOnce
        - RingInOrder
        - Custom
        - Terminate
    CommCoworkerRingTargetResource:
      title: Ring Target - Coworker
      description: Extension of a coworker to be ringed
      allOf:
        - $ref: "#/components/schemas/CommCoworkerTargetResource"
        - $ref: "#/components/schemas/CommRingTargetResource"
    CommTerminatingTargetDispatchingTypeResource:
      title: Dispatching Type - Terminating Target
      type: string
      enum:
        - Ringing
        - Terminating
    CommDeviceTargetResource:
      title: Device Target
      required:
        - device
      type: object
      properties:
        device:
          $ref: "#/components/schemas/CommDeviceResource"
        extension:
          $ref: "#/components/schemas/CommReferencedExtensionResource"
        type:
          type: string
          description: Ring target type
          enum:
            - DeviceRingTarget
          example: DeviceRingTarget
    CommPlayAnnouncementTerminatingTargetResource:
      title: Play Announcement Terminating Target
      required:
        - prompt
        - dispatchingType
      allOf:
        - $ref: "#/components/schemas/CommTerminatingTargetResource"
        - type: object
          properties:
            prompt:
              $ref: "#/components/schemas/CommTerminatingPromptResource"
            type:
              type: string
              description: Terminating target type
              enum:
                - PlayAnnouncementTerminatingTarget
              example: PlayAnnouncementTerminatingTarget
            dispatchingType:
              $ref: "#/components/schemas/CommTerminatingTargetDispatchingTypeResource"
    CommStateDispatchingRefResource:
      title: State Dispatching
      required:
        - ruleId
      type: object
      properties:
        ruleId:
          $ref: "#/components/schemas/CommStateIdResource"
        dispatching:
          $ref: "#/components/schemas/CommStateDispatchingResource"
    CommAllMobileTargetResource:
      title: Ring Target - All Mobile
      required:
        - name
      type: object
      description: All Mobile Ring target
      properties:
        extension:
          $ref: "#/components/schemas/CommReferencedExtensionResource"
        name:
          type: string
        type:
          type: string
          enum:
            - AllMobileRingTarget
          example: AllMobileRingTarget
    CommCoworkerTargetResource:
      title: Ring Target - Coworker
      required:
        - extension
      type: object
      description: Ring target
      properties:
        extension:
          $ref: "#/components/schemas/CommReferencedExtensionResource"
        type:
          type: string
          description: Type of a ring target
          enum:
            - CoworkerRingTarget
          example: CoworkerRingTarget
    CommExtensionTerminatingTargetResource:
      title: Terminating Target - Extension
      required:
        - extension
        - dispatchingType
      allOf:
        - $ref: "#/components/schemas/CommTerminatingTargetResource"
        - type: object
          properties:
            extension:
              $ref: "#/components/schemas/CommReferencedExtensionResource"
            type:
              type: string
              enum:
                - ExtensionTerminatingTarget
              example: ExtensionTerminatingTarget
            dispatchingType:
              $ref: "#/components/schemas/CommTerminatingTargetDispatchingTypeResource"
    CommAllDesktopRingTargetResource:
      title: Ring Target - All Desktop
      allOf:
        - $ref: "#/components/schemas/CommRingTargetResource"
        - $ref: "#/components/schemas/CommAllDesktopTargetResource"
    CommScreeningTypeResource:
      type: string
      description: Screening type
      enum:
        - NoCallerId
        - UnknownCallerId
        - Always
    CommTerminatingPromptResource:
      title: Terminating Prompt
      required:
        - greeting
      type: object
      properties:
        greeting:
          $ref: "#/components/schemas/CommGreetingResource"
    CommPhoneNumberTargetResource:
      title: Phone Number Target
      required:
        - destination
      type: object
      properties:
        destination:
          $ref: "#/components/schemas/CommPhoneNumberResource"
        type:
          type: string
          description: Ring target type
          enum:
            - PhoneNumberRingTarget
          example: PhoneNumberRingTarget
    CommAllDesktopRingAlwaysRingTargetResource:
      title: Ring Target - All Desktop Ring Always
      allOf:
        - $ref: "#/components/schemas/CommRingAlwaysRingTargetResource"
        - $ref: "#/components/schemas/CommAllDesktopTargetResource"
    CommStateDispatchingResource:
      title: State Dispatching
      required:
        - actions
        - type
      type: object
      properties:
        actions:
          description: Action information
          type: array
          minItems: 1
          items:
            oneOf:
              - $ref: "#/components/schemas/CommPlayConnectingMessageActionResource"
              - $ref: "#/components/schemas/CommPlayConnectingPromptActionResource"
              - $ref: "#/components/schemas/CommPlayWelcomePromptActionResource"
              - $ref: "#/components/schemas/CommScreeningActionResource"
              - $ref: "#/components/schemas/CommRingGroupActionResource"
              - $ref: "#/components/schemas/CommRingAlwaysGroupActionResource"
              - $ref: "#/components/schemas/CommTerminatingActionResource"
            discriminator:
              propertyName: type
              mapping:
                PlayConnectingMessageAction: "#/components/schemas/CommPlayConnectingMessageActionResource"
                PlayConnectingPromptAction: "#/components/schemas/CommPlayConnectingPromptActionResource"
                PlayWelcomePromptAction: "#/components/schemas/CommPlayWelcomePromptActionResource"
                ScreeningAction: "#/components/schemas/CommScreeningActionResource"
                RingGroupAction: "#/components/schemas/CommRingGroupActionResource"
                RingAlwaysGroupAction: "#/components/schemas/CommRingAlwaysGroupActionResource"
                TerminatingAction: "#/components/schemas/CommTerminatingActionResource"
        type:
          $ref: "#/components/schemas/CommDispatchingTypeResource"
    CommActionTypeResource:
      type: string
      enum:
        - PlayConnectingMessageAction
        - PlayConnectingPromptAction
        - PlayWelcomePromptAction
        - ScreeningAction
        - RingGroupAction
        - RingAlwaysGroupAction
        - TerminatingAction
    CommCloudDestination:
      required:
        - integrationId
      type: object
      properties:
        integrationId:
          type: string
          example: "1111111"
        extensionNumber:
          type: string
          example: "88888"
        phoneNumber:
          type: string
          example: "+16509994313"
    CommRingAlwaysRingTargetTypeResource:
      type: string
      description: |
        Ring target type. Applicable for all desktop and mobile applications.
        Ensures applications ring all the time during a call
      enum:
        - AllDesktopRingTarget
        - AllMobileRingTarget
    CommPlayConnectingPromptActionResource:
      title: Play Connecting Prompt
      required:
        - enabled
        - greeting
      allOf:
        - $ref: "#/components/schemas/CommActionResource"
        - type: object
          properties:
            type:
              type: string
              example: PlayConnectingPromptAction
              enum:
                - PlayConnectingPromptAction
            greeting:
              $ref: "#/components/schemas/CommGreetingResource"
            enabled:
              type: boolean
              description: Specifies if an action is enabled
    CommFmcPhoneNumberRingTargetResource:
      title: Ring Target - Fmc Full Phone Number
      allOf:
        - $ref: "#/components/schemas/CommRingTargetResource"
        - $ref: "#/components/schemas/CommFmcPhoneNumberTargetResource"
    CommPhoneNumberTerminatingTargetResource:
      title: Phone Number Terminating Target
      required:
        - destination
        - dispatchingType
      allOf:
        - $ref: "#/components/schemas/CommTerminatingTargetResource"
        - type: object
          properties:
            destination:
              $ref: "#/components/schemas/CommPhoneNumberResource"
            type:
              type: string
              description: Terminating target type
              enum:
                - PhoneNumberTerminatingTarget
              example: PhoneNumberTerminatingTarget
            dispatchingType:
              $ref: "#/components/schemas/CommTerminatingTargetDispatchingTypeResource"
    CommTerminatingTargetTypeResource:
      title: Terminating Target Type
      type: string
      description: Terminating target type
      enum:
        - ExtensionTerminatingTarget
        - PhoneNumberTerminatingTarget
        - PlayAnnouncementTerminatingTarget
        - VoiceMailTerminatingTarget
        - CloudConnectorTerminatingTarget
    CommScreeningResultTypeResource:
      type: string
      enum:
        - AskToAnswer
        - PlayCallerNameOnly
    CommImsPhoneNumberRingTargetResource:
      title: Ring Target - IMS Phone Number
      allOf:
        - $ref: "#/components/schemas/CommRingTargetResource"
        - $ref: "#/components/schemas/CommImsPhoneNumberTargetResource"
    CommPhoneNumberString:
      type: string
      description: Phone number in [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I) format
    CommRingGroupActionResource:
      title: Ring Group Action
      description: Ring targets included in a group will ring simultaneously. Any ring target can be added to a group
      required:
        - duration
        - enabled
        - targets
      allOf:
        - $ref: "#/components/schemas/CommActionResource"
        - type: object
          properties:
            enabled:
              type: boolean
              description: Specifies if an action is enabled
            targets:
              type: array
              minItems: 1
              description: Target information
              items:
                oneOf:
                  - $ref: "#/components/schemas/CommAllDesktopRingTargetResource"
                  - $ref: "#/components/schemas/CommAllMobileRingTargetResource"
                  - $ref: "#/components/schemas/CommCoworkerRingTargetResource"
                  - $ref: "#/components/schemas/CommDeviceRingTargetResource"
                  - $ref: "#/components/schemas/CommHotdeskRingTargetResource"
                  - $ref: "#/components/schemas/CommImsPhoneNumberRingTargetResource"
                  - $ref: "#/components/schemas/CommFmcPhoneNumberRingTargetResource"
                  - $ref: "#/components/schemas/CommIntegrationRingTargetResource"
                  - $ref: "#/components/schemas/CommPhoneNumberRingTargetResource"
                  - $ref: "#/components/schemas/CommCloudConnectorRingTargetResource"
                discriminator:
                  propertyName: type
                  mapping:
                    AllDesktopRingTarget: "#/components/schemas/CommAllDesktopRingTargetResource"
                    AllMobileRingTarget: "#/components/schemas/CommAllMobileRingTargetResource"
                    CoworkerRingTarget: "#/components/schemas/CommCoworkerRingTargetResource"
                    DeviceRingTarget: "#/components/schemas/CommDeviceRingTargetResource"
                    HotdeskRingTarget: "#/components/schemas/CommHotdeskRingTargetResource"
                    ImsPhoneNumberRingTarget: "#/components/schemas/CommImsPhoneNumberRingTargetResource"
                    FmcPhoneNumberRingTarget: "#/components/schemas/CommFmcPhoneNumberRingTargetResource"
                    IntegrationRingTarget: "#/components/schemas/CommIntegrationRingTargetResource"
                    PhoneNumberRingTarget: "#/components/schemas/CommPhoneNumberRingTargetResource"
                    CloudConnectorRingTarget: "#/components/schemas/CommCloudConnectorRingTargetResource"
            customStartOffset:
              type: integer
              format: int32
              example: 5
              default: 0
              description: Custom start time in seconds. Applicable for 'Custom' dispatching type
            duration:
              type: integer
              format: int32
              example: 5
              description: Duration of calling in seconds
            type:
              type: string
              description: Action type
              enum:
                - RingGroupAction
              example: RingGroupAction
    CommAllMobileRingTargetResource:
      title: Ring Target - All Mobile
      allOf:
        - $ref: "#/components/schemas/CommRingTargetResource"
        - $ref: "#/components/schemas/CommAllMobileTargetResource"
    CommDeviceResource:
      required:
        - id
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a device
          example: "5423543"
        name:
          type: string
          description: Device name
          example: HP2
        phoneNumber:
          $ref: "#/components/schemas/CommPhoneNumberString"
    CommHotdeskRingTargetResource:
      title: Hotdesk Ring Target
      required:
        - name
        - device
      allOf:
        - $ref: "#/components/schemas/CommRingTargetResource"
        - type: object
          properties:
            device:
              $ref: "#/components/schemas/CommDeviceResource"
            type:
              type: string
              description: Ring target type
              enum:
                - HotdeskRingTarget
              example: HotdeskRingTarget
    CommPhoneNumberRingTargetResource:
      title: Ring Target - Phone Number
      allOf:
        - $ref: "#/components/schemas/CommRingTargetResource"
        - $ref: "#/components/schemas/CommPhoneNumberTargetResource"
    CommScreeningActionRequest:
      title: Screening Action
      required:
        - screening
        - enabled
      allOf:
        - $ref: "#/components/schemas/CommActionRequest"
        - type: object
          properties:
            screening:
              $ref: "#/components/schemas/CommScreeningTypeResource"
            enabled:
              type: boolean
              description: Specifies if an action is enabled
            screeningResult:
              $ref: "#/components/schemas/CommScreeningResultTypeResource"
            type:
              type: string
              description: Action type
              enum:
                - ScreeningAction
              example: ScreeningAction
    CommRingTargetRequest:
      title: Ring Target
      required:
        - type
      type: object
      properties:
        type:
          $ref: "#/components/schemas/CommRingTargetTypeResource"
      discriminator:
        propertyName: type
        mapping:
          AllDesktopRingTarget: "#/components/schemas/CommAllDesktopRingTargetRequest"
          AllMobileRingTarget: "#/components/schemas/CommAllMobileRingTargetRequest"
          CoworkerRingTarget: "#/components/schemas/CommCoworkerRingTargetRequest"
          DeviceRingTarget: "#/components/schemas/CommDeviceRingTargetRequest"
          HotdeskRingTarget: "#/components/schemas/CommHotdeskRingTargetRequest"
          ImsPhoneNumberRingTarget: "#/components/schemas/CommImsPhoneNumberRingTargetRequest"
          FmcPhoneNumberRingTarget: "#/components/schemas/CommFmcPhoneNumberRingTargetRequest"
          IntegrationRingTarget: "#/components/schemas/CommIntegrationRingTargetRequest"
          PhoneNumberRingTarget: "#/components/schemas/CommPhoneNumberRingTargetRequest"
          CloudConnectorRingTarget: "#/components/schemas/CommCloudConnectorRingTargetRequest"
    CommPlayConnectingPromptActionRequest:
      title: Play Connecting Prompt
      required:
        - enabled
        - greeting
      allOf:
        - $ref: "#/components/schemas/CommActionRequest"
        - type: object
          properties:
            type:
              type: string
              enum:
                - PlayConnectingPromptAction
              example: PlayConnectingPromptAction
            greeting:
              $ref: "#/components/schemas/CommGreetingResource"
            enabled:
              type: boolean
              description: Specifies if an action is enabled
    CommHotdeskRingTargetRequest:
      title: Hotdesk Ring Target
      allOf:
        - $ref: "#/components/schemas/CommRingTargetRequest"
        - type: object
          properties:
            type:
              type: string
              description: Ring target type
              enum:
                - HotdeskRingTarget
              example: HotdeskRingTarget
    CommPhoneNumberTerminatingTargetRequest:
      title: Phone Number Terminating Target
      required:
        - destination
        - dispatchingType
      allOf:
        - $ref: "#/components/schemas/CommTerminatingTargetRequest"
        - type: object
          properties:
            name:
              type: string
              description: Phone number name
            destination:
              $ref: "#/components/schemas/CommPhoneNumberResource"
            type:
              type: string
              description: Terminating target type
              enum:
                - PhoneNumberTerminatingTarget
              example: PhoneNumberTerminatingTarget
            dispatchingType:
              $ref: "#/components/schemas/CommTerminatingTargetDispatchingTypeResource"
    CommIntegrationTargetRequest:
      title: Integration Target
      required:
        - integration
      type: object
      properties:
        integration:
          $ref: "#/components/schemas/CommIntegrationRequest"
        type:
          type: string
          description: Ring target type
          enum:
            - IntegrationRingTarget
          example: IntegrationRingTarget
    CommDispatchingRequest:
      title: State Dispatching
      required:
        - actions
        - type
      type: object
      properties:
        callTypes:
          $ref: "#/components/schemas/CommCallTypesResource"
        actions:
          type: array
          minItems: 1
          description: Action information
          items:
            oneOf:
              - $ref: "#/components/schemas/CommPlayConnectingMessageActionRequest"
              - $ref: "#/components/schemas/CommPlayConnectingPromptActionRequest"
              - $ref: "#/components/schemas/CommPlayWelcomePromptActionRequest"
              - $ref: "#/components/schemas/CommScreeningActionRequest"
              - $ref: "#/components/schemas/CommRingGroupActionRequest"
              - $ref: "#/components/schemas/CommRingAlwaysGroupActionRequest"
              - $ref: "#/components/schemas/CommTerminatingActionRequest"
            discriminator:
              propertyName: type
              mapping:
                PlayConnectingMessageAction: "#/components/schemas/CommPlayConnectingMessageActionRequest"
                PlayConnectingPromptAction: "#/components/schemas/CommPlayConnectingPromptActionRequest"
                PlayWelcomePromptAction: "#/components/schemas/CommPlayWelcomePromptActionRequest"
                ScreeningAction: "#/components/schemas/CommScreeningActionRequest"
                RingGroupAction: "#/components/schemas/CommRingGroupActionRequest"
                RingAlwaysGroupAction: "#/components/schemas/CommRingAlwaysGroupActionRequest"
                TerminatingAction: "#/components/schemas/CommTerminatingActionRequest"
        type:
          $ref: "#/components/schemas/CommDispatchingTypeResource"
    CommCloudConnectorTerminatingTargetRequest:
      title: Terminating Target - Cloud Connector
      required:
        - destination
        - dispatchingType
        - name
      allOf:
        - $ref: "#/components/schemas/CommTerminatingTargetRequest"
        - type: object
          properties:
            destination:
              $ref: "#/components/schemas/CommCloudDestination"
            type:
              type: string
              enum:
                - CloudConnectorTerminatingTarget
              example: CloudConnectorTerminatingTarget
            dispatchingType:
              $ref: "#/components/schemas/CommTerminatingTargetDispatchingTypeResource"
            name:
              type: string
              description: The customised target name
    CommRingGroupActionRequest:
      title: Ring Group Action
      description: Ring targets included in a group will ring simultaneously. Any ring target can be added to a group
      required:
        - duration
        - enabled
        - targets
      allOf:
        - $ref: "#/components/schemas/CommActionRequest"
        - type: object
          properties:
            enabled:
              type: boolean
              description: Specifies if an action is enabled
            targets:
              type: array
              minItems: 1
              items:
                oneOf:
                  - $ref: "#/components/schemas/CommAllDesktopRingTargetRequest"
                  - $ref: "#/components/schemas/CommAllMobileRingTargetRequest"
                  - $ref: "#/components/schemas/CommCoworkerRingTargetRequest"
                  - $ref: "#/components/schemas/CommDeviceRingTargetRequest"
                  - $ref: "#/components/schemas/CommHotdeskRingTargetRequest"
                  - $ref: "#/components/schemas/CommImsPhoneNumberRingTargetRequest"
                  - $ref: "#/components/schemas/CommFmcPhoneNumberRingTargetRequest"
                  - $ref: "#/components/schemas/CommIntegrationRingTargetRequest"
                  - $ref: "#/components/schemas/CommPhoneNumberRingTargetRequest"
                  - $ref: "#/components/schemas/CommCloudConnectorRingTargetRequest"
                discriminator:
                  propertyName: type
                  mapping:
                    AllDesktopRingTarget: "#/components/schemas/CommAllDesktopRingTargetRequest"
                    AllMobileRingTarget: "#/components/schemas/CommAllMobileRingTargetRequest"
                    CoworkerRingTarget: "#/components/schemas/CommCoworkerRingTargetRequest"
                    DeviceRingTarget: "#/components/schemas/CommDeviceRingTargetRequest"
                    HotdeskRingTarget: "#/components/schemas/CommHotdeskRingTargetRequest"
                    ImsPhoneNumberRingTarget: "#/components/schemas/CommImsPhoneNumberRingTargetRequest"
                    FmcPhoneNumberRingTarget: "#/components/schemas/CommFmcPhoneNumberRingTargetRequest"
                    IntegrationRingTarget: "#/components/schemas/CommIntegrationRingTargetRequest"
                    PhoneNumberRingTarget: "#/components/schemas/CommPhoneNumberRingTargetRequest"
                    CloudConnectorRingTarget: "#/components/schemas/CommCloudConnectorRingTargetRequest"
            customStartOffset:
              type: integer
              format: int32
              example: 5
              default: 0
              description: Custom start time. Applicable for 'Custom' dispatching type
            duration:
              type: integer
              format: int32
              example: 5
              description: Duration of calling
            type:
              type: string
              description: Action type
              enum:
                - RingGroupAction
              example: RingGroupAction
    CommAllDesktopTargetRequest:
      title: Ring Target - All Desktop
      type: object
      description: All Desktop Ring target
      properties:
        extension:
          $ref: "#/components/schemas/CommReferencedExtensionResource"
        type:
          type: string
          enum:
            - AllDesktopRingTarget
          example: AllDesktopRingTarget
    CommTerminatingActionRequest:
      title: Terminating Action
      required:
        - targets
      allOf:
        - $ref: "#/components/schemas/CommActionRequest"
        - type: object
          properties:
            targets:
              type: array
              minItems: 1
              description: Action information
              items:
                oneOf:
                  - $ref: "#/components/schemas/CommVoiceMailTerminatingTargetRequest"
                  - $ref: "#/components/schemas/CommPlayAnnouncementTerminatingTargetRequest"
                  - $ref: "#/components/schemas/CommPhoneNumberTerminatingTargetRequest"
                  - $ref: "#/components/schemas/CommExtensionTerminatingTargetRequest"
                  - $ref: "#/components/schemas/CommCloudConnectorTerminatingTargetRequest"
                discriminator:
                  propertyName: type
                  mapping:
                    ExtensionTerminatingTarget: "#/components/schemas/CommExtensionTerminatingTargetRequest"
                    PhoneNumberTerminatingTarget: "#/components/schemas/CommPhoneNumberTerminatingTargetRequest"
                    PlayAnnouncementTerminatingTarget: "#/components/schemas/CommPlayAnnouncementTerminatingTargetRequest"
                    VoiceMailTerminatingTarget: "#/components/schemas/CommVoiceMailTerminatingTargetRequest"
                    CloudConnectorTerminatingTarget: "#/components/schemas/CommCloudConnectorTerminatingTargetRequest"
            ringingTargetType:
              type: string
              example: VoiceMailTerminatingTarget
            terminatingTargetType:
              type: string
              example: VoiceMailTerminatingTarget
            type:
              type: string
              description: Action type
              enum:
                - TerminatingAction
              example: TerminatingAction
    CommPhoneNumberRingTargetRequest:
      title: Ring Target - Phone Number
      allOf:
        - $ref: "#/components/schemas/CommRingTargetRequest"
        - $ref: "#/components/schemas/CommPhoneNumberTargetResource"
        - type: object
          properties:
            name:
              type: string
    CommDeviceRingTargetRequest:
      title: Ring Target - Device
      allOf:
        - $ref: "#/components/schemas/CommRingTargetRequest"
        - $ref: "#/components/schemas/CommDeviceTargetRequest"
    CommVoiceMailTerminatingTargetRequest:
      title: VoiceMail Terminating Target
      required:
        - prompt
      allOf:
        - $ref: "#/components/schemas/CommTerminatingTargetRequest"
        - type: object
          properties:
            extension:
              $ref: "#/components/schemas/CommReferencedExtensionResource"
            prompt:
              $ref: "#/components/schemas/CommTerminatingPromptResource"
            type:
              type: string
              description: Terminating target type
              enum:
                - VoiceMailTerminatingTarget
              example: VoiceMailTerminatingTarget
    CommFmcPhoneNumberRingTargetRequest:
      title: Ring Target - Fmc Full Phone Number
      allOf:
        - $ref: "#/components/schemas/CommRingTargetRequest"
        - $ref: "#/components/schemas/CommFmcPhoneNumberTargetResource"
    CommDeviceRequest:
      required:
        - id
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a device
          example: "5423543"
    CommPlayConnectingMessageActionRequest:
      title: Play Connecting Message
      required:
        - enabled
        - greeting
      allOf:
        - $ref: "#/components/schemas/CommActionRequest"
        - type: object
          properties:
            type:
              type: string
              enum:
                - PlayConnectingMessageAction
              example: PlayConnectingMessageAction
            greeting:
              $ref: "#/components/schemas/CommGreetingResource"
            enabled:
              type: boolean
              description: Specifies if an action is enabled
    CommStateBasedRuleUpdateRequest:
      description: State-based rule update request
      type: object
      properties:
        dispatching:
          $ref: "#/components/schemas/CommDispatchingRequest"
    CommIntegrationRequest:
      required:
        - type
      type: object
      properties:
        type:
          $ref: "#/components/schemas/CommIntegrationType"
    CommTerminatingTargetRequest:
      title: Terminating Target
      required:
        - type
      type: object
      properties:
        type:
          $ref: "#/components/schemas/CommTerminatingTargetTypeResource"
      discriminator:
        propertyName: type
        mapping:
          ExtensionTerminatingTarget: "#/components/schemas/CommExtensionTerminatingTargetRequest"
          PhoneNumberTerminatingTarget: "#/components/schemas/CommPhoneNumberTerminatingTargetRequest"
          PlayAnnouncementTerminatingTarget: "#/components/schemas/CommPlayAnnouncementTerminatingTargetRequest"
          VoiceMailTerminatingTarget: "#/components/schemas/CommVoiceMailTerminatingTargetRequest"
          CloudConnectorTerminatingTarget: "#/components/schemas/CommCloudConnectorTerminatingTargetRequest"
    CommCallTypesResource:
      required:
        - queueCallsIncluded
      type: object
      properties:
        queueCallsIncluded:
          type: boolean
    CommAllDesktopRingTargetRequest:
      title: Ring Target - All Desktop
      allOf:
        - $ref: "#/components/schemas/CommRingTargetRequest"
        - $ref: "#/components/schemas/CommAllDesktopTargetRequest"
    CommAllMobileTargetRequest:
      title: Ring Target - All Mobile
      type: object
      description: All Mobile Ring target
      properties:
        extension:
          $ref: "#/components/schemas/CommReferencedExtensionResource"
        type:
          type: string
          enum:
            - AllMobileRingTarget
          example: AllMobileRingTarget
    CommAllMobileRingTargetRequest:
      title: Ring Target - All Mobile
      allOf:
        - $ref: "#/components/schemas/CommRingTargetRequest"
        - $ref: "#/components/schemas/CommAllMobileTargetRequest"
    CommRingAlwaysGroupActionRequest:
      title: Ring Always Group Action
      required:
        - enabled
        - targets
      allOf:
        - $ref: "#/components/schemas/CommActionRequest"
        - type: object
          properties:
            enabled:
              type: boolean
              description: Specifies if an action is enabled
            targets:
              type: array
              minItems: 1
              maxItems: 2
              description: Target information
              items:
                oneOf:
                  - $ref: "#/components/schemas/CommAllDesktopRingTargetRequest"
                  - $ref: "#/components/schemas/CommAllMobileRingTargetRequest"
                discriminator:
                  propertyName: type
                  mapping:
                    AllDesktopRingTarget: "#/components/schemas/CommAllDesktopRingTargetRequest"
                    AllMobileRingTarget: "#/components/schemas/CommAllMobileRingTargetRequest"
            type:
              type: string
              enum:
                - RingAlwaysGroupAction
              example: RingAlwaysGroupAction
    CommPlayAnnouncementTerminatingTargetRequest:
      title: Play Announcement Terminating Target
      required:
        - prompt
        - dispatchingType
      allOf:
        - $ref: "#/components/schemas/CommTerminatingTargetRequest"
        - type: object
          properties:
            prompt:
              $ref: "#/components/schemas/CommTerminatingPromptResource"
            type:
              type: string
              description: Terminating target type
              enum:
                - PlayAnnouncementTerminatingTarget
              example: PlayAnnouncementTerminatingTarget
            dispatchingType:
              $ref: "#/components/schemas/CommTerminatingTargetDispatchingTypeResource"
    CommDeviceTargetRequest:
      title: Device Target
      required:
        - device
      type: object
      properties:
        device:
          $ref: "#/components/schemas/CommDeviceRequest"
        extension:
          $ref: "#/components/schemas/CommReferencedExtensionResource"
        type:
          type: string
          description: Ring target type
          enum:
            - DeviceRingTarget
          example: DeviceRingTarget
    CommExtensionTerminatingTargetRequest:
      title: Terminating Target - Extension
      required:
        - extension
        - dispatchingType
      allOf:
        - $ref: "#/components/schemas/CommTerminatingTargetRequest"
        - type: object
          properties:
            extension:
              $ref: "#/components/schemas/CommReferencedExtensionResource"
            type:
              type: string
              enum:
                - ExtensionTerminatingTarget
              example: ExtensionTerminatingTarget
            dispatchingType:
              $ref: "#/components/schemas/CommTerminatingTargetDispatchingTypeResource"
    CommCoworkerRingTargetRequest:
      title: Ring Target - Coworker
      description: Extension of a coworker to be ringed
      allOf:
        - $ref: "#/components/schemas/CommRingTargetRequest"
        - $ref: "#/components/schemas/CommCoworkerTargetResource"
    CommCloudConnectorRingTargetRequest:
      title: Ring Target - Coworker
      description: Extension of a coworker to be ringed
      allOf:
        - $ref: "#/components/schemas/CommRingTargetRequest"
        - $ref: "#/components/schemas/CommCloudConnectorTargetRequest"
    CommActionTypeRequest:
      type: string
      enum:
        - PlayConnectingMessageAction
        - PlayConnectingPromptAction
        - PlayWelcomePromptAction
        - ScreeningAction
        - RingGroupAction
        - RingAlwaysGroupAction
        - TerminatingAction
    CommPlayWelcomePromptActionRequest:
      title: Play Welcome Prompt
      required:
        - enabled
        - greeting
      allOf:
        - $ref: "#/components/schemas/CommActionRequest"
        - type: object
          properties:
            type:
              type: string
              description: Prompt action type
              enum:
                - PlayWelcomePromptAction
              example: PlayWelcomePromptAction
            greeting:
              $ref: "#/components/schemas/CommGreetingResource"
            enabled:
              type: boolean
              description: Specifies if an action is enabled
    CommActionRequest:
      title: Action Resource
      required:
        - type
      type: object
      description: Action information
      properties:
        type:
          $ref: "#/components/schemas/CommActionTypeRequest"
      discriminator:
        propertyName: type
        mapping:
          PlayConnectingMessageAction: "#/components/schemas/CommPlayConnectingMessageActionRequest"
          PlayConnectingPromptAction: "#/components/schemas/CommPlayConnectingPromptActionRequest"
          PlayWelcomePromptAction: "#/components/schemas/CommPlayWelcomePromptActionRequest"
          ScreeningAction: "#/components/schemas/CommScreeningActionRequest"
          RingGroupAction: "#/components/schemas/CommRingGroupActionRequest"
          RingAlwaysGroupAction: "#/components/schemas/CommRingAlwaysGroupActionRequest"
          TerminatingAction: "#/components/schemas/CommTerminatingActionRequest"
    CloudConnectorTargetRequest:
      title: Ring Target - Cloud Connector
      required:
        - destination
      type: object
      description: Ring target
      properties:
        destination:
          $ref: "#/components/schemas/CommCloudDestination"
        type:
          type: string
          description: Type of a ring target
          enum:
            - CloudConnectorRingTarget
          example: CloudConnectorRingTarget
    CommCloudConnectorTargetRequest:
      title: Ring Target - Cloud Connector
      required:
        - name
      description: Ring target
      allOf:
        - $ref: "#/components/schemas/CloudConnectorTargetRequest"
        - type: object
          properties:
            name:
              type: string
              example: Cloud Connector Contact
    CommImsPhoneNumberRingTargetRequest:
      title: Ring Target - IMS Phone Number
      allOf:
        - $ref: "#/components/schemas/CommRingTargetRequest"
        - $ref: "#/components/schemas/CommImsPhoneNumberTargetResource"
    CommIntegrationRingTargetRequest:
      title: Ring Target - Integration
      allOf:
        - $ref: "#/components/schemas/CommRingTargetRequest"
        - $ref: "#/components/schemas/CommIntegrationTargetRequest"
    CommRemoveForwardingTargetsRequest:
      type: object
      required:
        - records
      properties:
        records:
          type: array
          items:
            oneOf:
              - $ref: "#/components/schemas/CommCoworkerAppsRingTargetRequest"
              - $ref: "#/components/schemas/CommCoworkerForwardingTargetRequest"
              - $ref: "#/components/schemas/CommDeviceForwardingTargetRequest"
              - $ref: "#/components/schemas/CommIntegrationForwardingTargetRequest"
              - $ref: "#/components/schemas/CommPhoneNumberForwardingTargetRequest"
              - $ref: "#/components/schemas/CommCloudConnectorRingTargetRequest"
            discriminator:
              propertyName: type
              mapping:
                CoworkerAppsRingTarget: "#/components/schemas/CommCoworkerAppsRingTargetRequest"
                CoworkerRingTarget: "#/components/schemas/CommCoworkerForwardingTargetRequest"
                DeviceRingTarget: "#/components/schemas/CommDeviceForwardingTargetRequest"
                IntegrationRingTarget: "#/components/schemas/CommIntegrationForwardingTargetRequest"
                PhoneNumberRingTarget: "#/components/schemas/CommPhoneNumberForwardingTargetRequest"
                CloudConnectorRingTarget: "#/components/schemas/CommCloudConnectorRingTargetRequest"
    CommForwardingTargetsResource:
      title: Forwarding Targets
      required:
        - records
        - paging
      type: object
      properties:
        records:
          type: array
          items:
            oneOf:
              - $ref: "#/components/schemas/CommCoworkerAppsRingTargetResource"
              - $ref: "#/components/schemas/CommCoworkerForwardingTargetResource"
              - $ref: "#/components/schemas/CommDeviceForwardingTargetResource"
              - $ref: "#/components/schemas/CommImsPhoneNumberForwardingTargetResource"
              - $ref: "#/components/schemas/CommFmcPhoneNumberForwardingTargetResource"
              - $ref: "#/components/schemas/CommIntegrationForwardingTargetResource"
              - $ref: "#/components/schemas/CommPhoneNumberForwardingTargetResource"
              - $ref: "#/components/schemas/CommCloudConnectorForwardingTargetResource"
            discriminator:
              propertyName: type
              mapping:
                CoworkerAppsRingTarget: "#/components/schemas/CommCoworkerAppsRingTargetResource"
                CoworkerRingTarget: "#/components/schemas/CommCoworkerForwardingTargetResource"
                DeviceRingTarget: "#/components/schemas/CommDeviceForwardingTargetResource"
                ImsPhoneNumberRingTarget: "#/components/schemas/CommImsPhoneNumberForwardingTargetResource"
                FmcPhoneNumberRingTarget: "#/components/schemas/CommFmcPhoneNumberForwardingTargetResource"
                IntegrationRingTarget: "#/components/schemas/CommIntegrationForwardingTargetResource"
                PhoneNumberRingTarget: "#/components/schemas/CommPhoneNumberForwardingTargetResource"
                CloudConnectorRingTarget: "#/components/schemas/CommCloudConnectorForwardingTargetResource"
        paging:
          $ref: "#/components/schemas/EnumeratedPagingModel"
    CommCoworkerForwardingTargetResource:
      title: Coworker Forwarding Target
      description: Extension of a coworker to be ringed
      allOf:
        - $ref: "#/components/schemas/CommCoworkerTargetResource"
        - $ref: "#/components/schemas/CommForwardingTargetResource"
    CommDeviceForwardingTargetRequest:
      title: Device Forwarding Target
      allOf:
        - $ref: "#/components/schemas/CommForwardingTargetRequest"
        - $ref: "#/components/schemas/CommDeviceTargetRequest"
    CommIntegrationForwardingTargetRequest:
      title: Integration Forwarding Target
      allOf:
        - $ref: "#/components/schemas/CommForwardingTargetRequest"
        - $ref: "#/components/schemas/CommIntegrationTargetRequest"
    CommForwardingTargetTypeRequest:
      type: string
      description: Ring target type
      enum:
        - CoworkerAppsRingTarget
        - CoworkerRingTarget
        - DeviceRingTarget
        - ImsPhoneNumberRingTarget
        - IntegrationRingTarget
        - PhoneNumberRingTarget
        - CloudConnectorRingTarget
    CommFmcPhoneNumberForwardingTargetResource:
      title: Forwarding Target - Fmc Full Phone Number
      allOf:
        - $ref: "#/components/schemas/CommForwardingTargetResource"
        - $ref: "#/components/schemas/CommFmcPhoneNumberTargetResource"
    CommCoworkerForwardingTargetRequest:
      title: Coworker Forwarding Target
      description: Extension of a coworker to be ringed
      allOf:
        - $ref: "#/components/schemas/CommForwardingTargetRequest"
        - $ref: "#/components/schemas/CommCoworkerTargetResource"
    CommCoworkerAppsRingTargetRequest:
      title: Ring Target - Coworker Apps
      description: Coworker apps target
      required:
        - extension
      allOf:
        - $ref: "#/components/schemas/CommForwardingTargetRequest"
        - type: object
          properties:
            extension:
              $ref: "#/components/schemas/CommReferencedExtensionResource"
            type:
              type: string
              description: Type of a ring target
              enum:
                - CoworkerAppsRingTarget
              example: CoworkerAppsRingTarget
    CommRemoveForwardingTargetsResponse:
      type: object
      required:
        - records
      properties:
        records:
          type: array
          items:
            $ref: "#/components/schemas/CommRemoveForwardingTargetsItemResource"
    CommPhoneNumberForwardingTargetResource:
      title: Forwarding Target - Phone Number
      allOf:
        - $ref: "#/components/schemas/CommForwardingTargetResource"
        - $ref: "#/components/schemas/CommPhoneNumberTargetResource"
    CommCloudConnectorForwardingTargetRequest:
      title: Ring Target - Coworker
      description: Extension of a coworker to be ringed
      allOf:
        - $ref: "#/components/schemas/CloudConnectorTargetRequest"
        - $ref: "#/components/schemas/CommForwardingTargetRequest"
    CommImsPhoneNumberForwardingTargetResource:
      title: Forwarding Target - IMS Phone Number
      allOf:
        - $ref: "#/components/schemas/CommForwardingTargetResource"
        - $ref: "#/components/schemas/CommImsPhoneNumberTargetResource"
    CommCloudConnectorForwardingTargetResource:
      title: Ring Target - Coworker
      description: Extension of a coworker to be ringed
      allOf:
        - $ref: "#/components/schemas/CommCloudConnectorTargetResource"
        - $ref: "#/components/schemas/CommForwardingTargetResource"
    CommPhoneNumberForwardingTargetRequest:
      title: Forwarding Target - Phone Number
      allOf:
        - $ref: "#/components/schemas/CommForwardingTargetRequest"
        - $ref: "#/components/schemas/CommPhoneNumberTargetResource"
    CommIntegrationForwardingTargetResource:
      title: Integration Forwarding Target
      required:
        - name
      allOf:
        - $ref: "#/components/schemas/CommForwardingTargetResource"
        - $ref: "#/components/schemas/CommIntegrationTargetResource"
    CommCoworkerAppsRingTargetResource:
      title: Ring Target - Coworker Apps
      description: Coworker apps target
      required:
        - extension
      allOf:
        - $ref: "#/components/schemas/CommForwardingTargetResource"
        - type: object
          properties:
            extension:
              $ref: "#/components/schemas/CommReferencedExtensionResource"
            type:
              type: string
              description: Type of a ring target
              enum:
                - CoworkerAppsRingTarget
              example: CoworkerAppsRingTarget
    CommDeviceForwardingTargetResource:
      title: Device Forwarding Target
      allOf:
        - $ref: "#/components/schemas/CommForwardingTargetResource"
        - $ref: "#/components/schemas/CommDeviceTargetResource"
        - type: object
          properties:
            name:
              type: string
              description: Device name
              example: HP2
    CommRemoveForwardingTargetsItemResource:
      type: object
      required:
        - bulkItemSuccessful
        - bulkItem
      properties:
        bulkItemSuccessful:
          type: boolean
        bulkItemErrors:
          type: array
          minItems: 1
          items:
            $ref: "#/components/schemas/ApiError"
        bulkItem:
          oneOf:
            - $ref: "#/components/schemas/CommCoworkerAppsRingTargetRequest"
            - $ref: "#/components/schemas/CommCoworkerForwardingTargetRequest"
            - $ref: "#/components/schemas/CommDeviceForwardingTargetRequest"
            - $ref: "#/components/schemas/CommIntegrationForwardingTargetRequest"
            - $ref: "#/components/schemas/CommPhoneNumberForwardingTargetRequest"
            - $ref: "#/components/schemas/CommCloudConnectorRingTargetRequest"
          discriminator:
            propertyName: type
            mapping:
              CoworkerAppsRingTarget: "#/components/schemas/CommCoworkerAppsRingTargetRequest"
              CoworkerRingTarget: "#/components/schemas/CommCoworkerForwardingTargetRequest"
              DeviceRingTarget: "#/components/schemas/CommDeviceForwardingTargetRequest"
              IntegrationRingTarget: "#/components/schemas/CommIntegrationForwardingTargetRequest"
              PhoneNumberRingTarget: "#/components/schemas/CommPhoneNumberForwardingTargetRequest"
              CloudConnectorRingTarget: "#/components/schemas/CommCloudConnectorRingTargetRequest"
    CommForwardingTargetRequest:
      title: Forwarding Target
      required:
        - type
      type: object
      properties:
        name:
          type: string
        type:
          $ref: "#/components/schemas/CommForwardingTargetTypeRequest"
      discriminator:
        propertyName: type
        mapping:
          CoworkerAppsRingTarget: "#/components/schemas/CommCoworkerAppsRingTargetRequest"
          CoworkerRingTarget: "#/components/schemas/CommCoworkerForwardingTargetRequest"
          DeviceRingTarget: "#/components/schemas/CommDeviceForwardingTargetRequest"
          ImsPhoneNumberRingTarget: "#/components/schemas/CommImsPhoneNumberRingTargetRequest"
          IntegrationRingTarget: "#/components/schemas/CommIntegrationForwardingTargetRequest"
          PhoneNumberRingTarget: "#/components/schemas/CommPhoneNumberForwardingTargetRequest"
          CloudConnectorRingTarget: "#/components/schemas/CommCloudConnectorForwardingTargetRequest"
    CommForwardingTargetTypeResource:
      type: string
      description: Ring target type
      enum:
        - CoworkerAppsRingTarget
        - CoworkerRingTarget
        - DeviceRingTarget
        - ImsPhoneNumberRingTarget
        - FmcPhoneNumberRingTarget
        - IntegrationRingTarget
        - PhoneNumberRingTarget
        - CloudConnectorRingTarget
    CommForwardingTargetResource:
      title: Forwarding Target
      required:
        - type
      type: object
      properties:
        type:
          $ref: "#/components/schemas/CommForwardingTargetTypeResource"
      discriminator:
        propertyName: type
        mapping:
          CoworkerAppsRingTarget: "#/components/schemas/CommCoworkerAppsRingTargetResource"
          CoworkerRingTarget: "#/components/schemas/CommCoworkerForwardingTargetResource"
          DeviceRingTarget: "#/components/schemas/CommDeviceForwardingTargetResource"
          ImsPhoneNumberRingTarget: "#/components/schemas/CommImsPhoneNumberForwardingTargetResource"
          FmcPhoneNumberRingTarget: "#/components/schemas/CommFmcPhoneNumberForwardingTargetResource"
          IntegrationRingTarget: "#/components/schemas/CommIntegrationForwardingTargetResource"
          PhoneNumberRingTarget: "#/components/schemas/CommPhoneNumberForwardingTargetResource"
          CloudConnectorRingTarget: "#/components/schemas/CommCloudConnectorForwardingTargetResource"
    CommExtensionListResource:
      title: Extension List
      required:
        - referencedExtensions
      type: object
      properties:
        referencedExtensions:
          type: array
          items:
            $ref: "#/components/schemas/CommReferencedExtensionResource"
        paging:
          $ref: "#/components/schemas/EnumeratedPagingModel"
    CommInteractionRuleStateConditionRequest:
      title: Interaction Rule State Condition
      required:
        - state
      allOf:
        - $ref: "#/components/schemas/CommInteractionRuleConditionRequest"
        - type: object
          properties:
            type:
              type: string
              enum:
                - State
              example: State
            state:
              $ref: "#/components/schemas/CommReferenceStateResource"
    CommInteractionRuleConditionRequest:
      type: object
      title: Interaction Rule Condition
      required:
        - type
      properties:
        type:
          $ref: "#/components/schemas/CommInteractionConditionTypeResource"
      discriminator:
        propertyName: type
        mapping:
          Interaction: "#/components/schemas/CommInteractionRuleInteractionConditionRequest"
          Schedule: "#/components/schemas/CommInteractionRuleScheduleConditionRequest"
          State: "#/components/schemas/CommInteractionRuleStateConditionRequest"
    CommInteractionRuleResource:
      title: Interaction Rule
      required:
        - dispatching
        - enabled
        - id
        - displayName
        - conditions
      description: Interaction rule
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a rule
          example: "400133463175"
        conditions:
          $ref: "#/components/schemas/CommInteractionRuleConditionsResource"
        dispatching:
          $ref: "#/components/schemas/CommInteractionDispatchingResource"
        enabled:
          type: boolean
          description: Specifies if a rule is enabled or not. *Work Hours* and *After Hours* rules cannot be disabled
        displayName:
          type: string
          description: Custom name of a rule
    CommInteractionRuleCreateRequest:
      description: Interaction rule create request
      required:
        - enabled
        - dispatching
        - displayName
        - conditions
      type: object
      properties:
        conditions:
          $ref: "#/components/schemas/CommInteractionRuleConditionsRequest"
        dispatching:
          $ref: "#/components/schemas/CommDispatchingRequest"
        enabled:
          type: boolean
          description: Specifies if a rule is enabled or not. *Work Hours* and *After Hours* rules cannot be disabled
        displayName:
          type: string
          description: Custom name of a rule
    CommInteractionConditionTypeResource:
      type: string
      description: Interaction condition type resource
      enum:
        - Interaction
        - Schedule
        - State
    CommInteractionRuleInteractionConditionResource:
      title: Interaction Rule Condition
      required:
        - from
        - to
      allOf:
        - $ref: "#/components/schemas/CommInteractionRuleConditionResource"
        - type: object
          properties:
            type:
              type: string
              enum:
                - Interaction
              example: Interaction
            from:
              type: array
              items:
                $ref: "#/components/schemas/CommFromResource"
            to:
              type: array
              items:
                $ref: "#/components/schemas/CommPhoneNumberString"
    CommInteractionRuleScheduleResource:
      type: object
      title: Interaction Rule Schedule
      properties:
        startDateTime:
          type: string
          allOf:
            - $ref: "#/components/schemas/CommDateTimeWithoutTimezone"
            - description: Start date-time
        endDateTime:
          type: string
          allOf:
            - $ref: "#/components/schemas/CommDateTimeWithoutTimezone"
            - description: End date-time
        triggers:
          type: array
          description: Trigger information
          items:
            oneOf:
              - $ref: "#/components/schemas/CommDailyTriggerResource"
              - $ref: "#/components/schemas/CommWeeklyTriggerResource"
              - $ref: "#/components/schemas/CommRangeTriggerResource"
            discriminator:
              propertyName: triggerType
              mapping:
                Daily: "#/components/schemas/CommDailyTriggerResource"
                Weekly: "#/components/schemas/CommWeeklyTriggerResource"
                Range: "#/components/schemas/CommRangeTriggerResource"
    CommInteractionRuleScheduleConditionResource:
      title: Interaction Rule Schedule Condition
      required:
        - schedule
      allOf:
        - $ref: "#/components/schemas/CommInteractionRuleConditionResource"
        - type: object
          properties:
            schedule:
              $ref: "#/components/schemas/CommInteractionRuleScheduleResource"
            type:
              type: string
              enum:
                - Schedule
              example: Schedule
    CommInteractionRuleConditionResource:
      type: object
      title: Interaction Rule Condition
      required:
        - type
      properties:
        type:
          $ref: "#/components/schemas/CommInteractionConditionTypeResource"
      discriminator:
        propertyName: type
        mapping:
          Interaction: "#/components/schemas/CommInteractionRuleInteractionConditionResource"
          Schedule: "#/components/schemas/CommInteractionRuleScheduleConditionResource"
          State: "#/components/schemas/CommInteractionRuleStateConditionResource"
    CommInteractionRulesResource:
      title: Interaction Rules
      required:
        - records
        - paging
      type: object
      properties:
        records:
          type: array
          items:
            $ref: "#/components/schemas/CommInteractionRuleResource"
        paging:
          $ref: "#/components/schemas/EnumeratedPagingModel"
    CommInteractionRuleInteractionConditionRequest:
      title: Interaction Rule Condition
      required:
        - from
        - to
      allOf:
        - $ref: "#/components/schemas/CommInteractionRuleConditionRequest"
        - type: object
          properties:
            type:
              type: string
              enum:
                - Interaction
              example: Interaction
            from:
              type: array
              items:
                $ref: "#/components/schemas/CommFromResource"
            to:
              type: array
              items:
                $ref: "#/components/schemas/CommPhoneNumberString"
    CommFromResource:
      required:
        - phoneNumber
        - name
      type: object
      description: Caller ID information
      properties:
        phoneNumber:
          $ref: "#/components/schemas/CommPhoneNumberString"
        name:
          type: string
          description: Caller name
    CommInteractionRuleScheduleConditionRequest:
      title: Interacton Rule Schedule Condition
      required:
        - schedule
      allOf:
        - $ref: "#/components/schemas/CommInteractionRuleConditionRequest"
        - type: object
          properties:
            schedule:
              $ref: "#/components/schemas/CommInteractionRuleScheduleResource"
            type:
              type: string
              enum:
                - Schedule
              example: Schedule
    CommInteractionDispatchingResource:
      title: Interaction Dispatching
      required:
        - actions
        - type
      type: object
      properties:
        callTypes:
          $ref: "#/components/schemas/CommCallTypesResource"
        actions:
          description: Action information
          type: array
          minItems: 1
          items:
            oneOf:
              - $ref: "#/components/schemas/CommPlayConnectingMessageActionResource"
              - $ref: "#/components/schemas/CommPlayConnectingPromptActionResource"
              - $ref: "#/components/schemas/CommPlayWelcomePromptActionResource"
              - $ref: "#/components/schemas/CommScreeningActionResource"
              - $ref: "#/components/schemas/CommRingGroupActionResource"
              - $ref: "#/components/schemas/CommRingAlwaysGroupActionResource"
              - $ref: "#/components/schemas/CommTerminatingActionResource"
            discriminator:
              propertyName: type
              mapping:
                PlayConnectingMessageAction: "#/components/schemas/CommPlayConnectingMessageActionResource"
                PlayConnectingPromptAction: "#/components/schemas/CommPlayConnectingPromptActionResource"
                PlayWelcomePromptAction: "#/components/schemas/CommPlayWelcomePromptActionResource"
                ScreeningAction: "#/components/schemas/CommScreeningActionResource"
                RingGroupAction: "#/components/schemas/CommRingGroupActionResource"
                RingAlwaysGroupAction: "#/components/schemas/CommRingAlwaysGroupActionResource"
                TerminatingAction: "#/components/schemas/CommTerminatingActionResource"
        type:
          $ref: "#/components/schemas/CommDispatchingTypeResource"
    CommInteractionRuleConditionsResource:
      title: Interaction Rule Conditions
      type: array
      minItems: 1
      items:
        oneOf:
          - $ref: "#/components/schemas/CommInteractionRuleInteractionConditionResource"
          - $ref: "#/components/schemas/CommInteractionRuleScheduleConditionResource"
          - $ref: "#/components/schemas/CommInteractionRuleStateConditionResource"
        discriminator:
          propertyName: type
          mapping:
            Interaction: "#/components/schemas/CommInteractionRuleInteractionConditionResource"
            Schedule: "#/components/schemas/CommInteractionRuleScheduleConditionResource"
            State: "#/components/schemas/CommInteractionRuleStateConditionResource"
    CommInteractionRuleConditionsRequest:
      title: Interaction Rule Conditions
      type: array
      minItems: 1
      items:
        oneOf:
          - $ref: "#/components/schemas/CommInteractionRuleInteractionConditionRequest"
          - $ref: "#/components/schemas/CommInteractionRuleScheduleConditionRequest"
          - $ref: "#/components/schemas/CommInteractionRuleStateConditionRequest"
        discriminator:
          propertyName: type
          mapping:
            Interaction: "#/components/schemas/CommInteractionRuleInteractionConditionRequest"
            Schedule: "#/components/schemas/CommInteractionRuleScheduleConditionRequest"
            State: "#/components/schemas/CommInteractionRuleStateConditionRequest"
    CommInteractionRuleStateConditionResource:
      title: Interaction Rule State Condition
      allOf:
        - $ref: "#/components/schemas/CommInteractionRuleConditionResource"
        - type: object
          properties:
            type:
              type: string
              enum:
                - State
              example: State
            state:
              $ref: "#/components/schemas/CommStateResource"
    CommInteractionRuleUpdateRequest:
      description: Interaction rule update request
      type: object
      properties:
        conditions:
          $ref: "#/components/schemas/CommInteractionRuleConditionsRequest"
        dispatching:
          $ref: "#/components/schemas/CommDispatchingRequest"
        enabled:
          type: boolean
          description: Specifies if a rule is enabled or not. *Work Hours* and *After Hours* rules cannot be disabled
        displayName:
          type: string
          description: Custom name of a rule
    SwapDeviceRequest:
      description: Swap device request
      type: object
      properties:
        targetDeviceId:
          type: string
          description: Internal identifier of a target device, to which the current one will be swapped
          example: "8459879873"
    CallFlipNumberResource:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a call flip number
          example: "409926525004"
        phoneNumber:
          type: string
          description: Flip number in E.164 format with '+'
          example: "+16502096935"
        type:
          type: string
          enum:
            - PhoneLine
            - External
            - BusinessMobile
          description: Flip number type
          example: PhoneLine
        label:
          type: string
          description: Flip number label, device name for Digital Line case
          example: My Mobile Number
          maxLength: 60
        flipNumber:
          type: string
          description: Speed dial/flip number, the range is 1-8
          example: "5"
    CallFlipNumberListResource:
      type: object
      properties:
        records:
          type: array
          description: List of call flip numbers
          items:
            $ref: "#/components/schemas/CallFlipNumberResource"
    AccountRegionalSettingRequest:
      type: object
      required:
        - timezone
      properties:
        homeCountry:
          $ref: "#/components/schemas/AccountCountryInfoRequest"
        timezone:
          $ref: "#/components/schemas/AccountTimezoneInfoRequest"
        language:
          $ref: "#/components/schemas/AccountLanguageInfoRequest"
        greetingLanguage:
          $ref: "#/components/schemas/AccountGreetingLanguageInfoRequest"
        formattingLocale:
          $ref: "#/components/schemas/AccountFormattingLocaleInfoRequest"
        timeFormat:
          $ref: "#/components/schemas/TimeFormatEnum"
    CountryCallingCode:
      type: string
      description: |
        Country calling code defined by [ITU-T](http://en.wikipedia.org/wiki/ITU-T)
        recommendations, [E.123](http://en.wikipedia.org/wiki/E.123) and
        [E.164](http://en.wikipedia.org/wiki/E.164).
        See also [Calling Codes](http://en.wikipedia.org/wiki/List_of_country_calling_codes)
    AccountLanguageInfoRequest:
      oneOf:
        - type: object
          required:
            - id
          properties:
            id:
              type: string
              description: Internal identifier of a language set as regional
        - type: object
          required:
            - localeCode
          properties:
            localeCode:
              type: string
              description: Localization code of a language set as regional
    TimezoneInfoBase:
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Canonical URI of a timezone
        id:
          type: string
          description: Internal identifier of a timezone
        name:
          type: string
          description: Short name of a timezone
        description:
          type: string
          description: Meaningful description of the timezone
        bias:
          type: string
          description: |
            Time difference (offset) in minutes from Coordinated Universal Time (UTC) 
            that a specific locale follows
      description: Timezone information
    RegionalLanguageInfo:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a language set as regional
        localeCode:
          type: string
          description: Localization code of a language set as regional
        name:
          type: string
          description: Official name of a language set as regional
      description: Information on a language set as regional
    AccountCountryInfoRequest:
      oneOf:
        - type: object
          required:
            - id
          properties:
            id:
              type: string
              description: Internal identifier of a country
        - type: object
          required:
            - isoCode
          properties:
            isoCode:
              type: string
              description: Two-letter country code in ISO 3166-1 alpha-2 format
    GreetingLanguageInfo:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a greeting language
        localeCode:
          type: string
          description: Localization code of a greeting language
        name:
          type: string
          description: Official name of a greeting language
      description: |
        Information on language used for telephony greetings
    CountryIsoCode:
      type: string
      minLength: 2
      maxLength: 2
      description: Two-letter country code in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format
      example: US
    RegionalSettings:
      type: object
      properties:
        homeCountry:
          $ref: "#/components/schemas/CountryInfoShortModel"
        timezone:
          $ref: "#/components/schemas/TimezoneInfoBase"
        language:
          $ref: "#/components/schemas/RegionalLanguageInfo"
        greetingLanguage:
          $ref: "#/components/schemas/GreetingLanguageInfo"
        formattingLocale:
          $ref: "#/components/schemas/FormattingLocaleInfo"
        timeFormat:
          $ref: "#/components/schemas/TimeFormatEnum"
      description: |
        Regional data (timezone, home country, language) of an extension/account.
        The default is Company (Auto-Receptionist) settings
    FormattingLocaleInfo:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a formatting language
        localeCode:
          type: string
          description: Localization code of a formatting language
        name:
          type: string
          description: Official name of a formatting language
      description: |
        Formatting language preferences for numbers, dates and currencies
    AccountGreetingLanguageInfoRequest:
      oneOf:
        - type: object
          required:
            - id
          properties:
            id:
              type: string
              description: Internal identifier of a greeting language
        - type: object
          required:
            - localeCode
          properties:
            localeCode:
              type: string
              description: Localization code of a greeting language
    CountryInfoMinimalModel:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a country
        uri:
          type: string
          format: uri
          description: Canonical URI of a country resource
    AccountFormattingLocaleInfoRequest:
      oneOf:
        - type: object
          required:
            - id
          properties:
            id:
              type: string
              description: Internal identifier of a formatting language
        - type: object
          required:
            - localeCode
          properties:
            localeCode:
              type: string
              description: Localization code of a formatting language
    AccountTimezoneInfoRequest:
      oneOf:
        - type: object
          required:
            - id
          properties:
            id:
              type: string
              description: Internal identifier of a timezone
        - type: object
          required:
            - name
          properties:
            name:
              type: string
              description: Short name of a timezone
    CountryInfoBasicModel:
      allOf:
        - $ref: "#/components/schemas/CountryInfoMinimalModel"
        - type: object
          properties:
            name:
              type: string
              description: The official name of a country
    CountryInfoShortModel:
      allOf:
        - $ref: "#/components/schemas/CountryInfoBasicModel"
        - type: object
          properties:
            isoCode:
              $ref: "#/components/schemas/CountryIsoCode"
            callingCode:
              $ref: "#/components/schemas/CountryCallingCode"
    NumberParserContext:
      description: The manually set parsing context to override the context parameter values taken from the context source.
      type: object
      properties:
        brandId:
          description: |-
            Internal identifier of the RingCentral brand. Brand context definition.

            - If the value is not specified, it's taken from the context source:
              - `Default` -> `null`
              - `Account` -> brand from the request context header
            - Explicitly set value redefines the value taken from the context source.
            - Explicitly set `null` value disables brand context for parsing.
          type: string
          nullable: true
          maxLength: 4
          example: "1210"
        country:
          $ref: "#/components/schemas/CountryContext"
        defaultAreaCode:
          description: |-
            Default area code of the caller. Provides support for the dial plan feature
            "[Default Area Code](https://support.ringcentral.com/article/dial-plan-default-area-code-ringcentral-mvp.html)".

            If the value is not specified or explicitly set to `null`, the feature "Default Area Code" context is disabled for parsing.
          type: string
          nullable: true
          pattern: ^\d{1,6}$
          example: "650"
        vanityPhoneNumbersAllowed:
          description: |-
            Vanity phone numbers are supported in the parsing input. Provides support for the feature
            "[Vanity Numbers dialing](https://support.ringcentral.com/article/Requesting-a-toll-free-vanity-number.html)".

            - If the value is not specified, it's taken from the context source:
              - `Default` -> `false`
              - `Account` -> `true`
            - Explicitly set value redefines the value taken from the context source.
          type: boolean
          example: true
        maxExtensionNumberLength:
          description: |-
            The maximum allowed length of extension numbers on the account. Provides support for the dial plan feature
            "[Variable-length Extensions](https://support.ringcentral.com/article/11277-Enterprise-Dial-Plan-Max-Extension-Length.html)".

            - If the value is not specified, it's taken from the context source:
              - `Default` -> _5_
              - `Account` -> the value from the requester's account settings
            - Explicitly set value redefines the value taken from the context source.
            - Explicitly set `null` value disables extension numbers detection.
          type: integer
          format: int32
          nullable: true
          minimum: 1
          maximum: 9
          example: null
        shortCodesAllowed:
          description: |-
            Short codes are supported in the parsing input. Provides support for the feature "Shortcodes dialing".

            - If the value is not specified, it's taken from the context source:
              - `Default` -> `false`
              - `Account` -> the value from the requester's account settings
            - Explicitly set value redefines the value taken from the context source.
          type: boolean
          example: false
        siteCode:
          description: |-
            The site code of caller. Together with parameter `context.shortExtensionNumberLength` provides support for the feature
            "[Site Codes](https://support.ringcentral.com/article/11279-Enterprise-Dial-Plan-Site-Codes.html)".

            - If the value is not specified or explicitly set to `null`, the feature "Site Codes" context is disabled for parsing.
          type: string
          nullable: true
          pattern: ^[1-9]\d{0,7}$
          example: "13"
        shortExtensionNumberLength:
          description: |-
            The allowed length of short extension numbers on the account.
            Together with parameter `context.siteCode` provides support for the feature
            "[Site Codes](https://support.ringcentral.com/article/11279-Enterprise-Dial-Plan-Site-Codes.html)".

            - The value is ignored and treated as `null` if parameter `context.siteCode` is not specified or explicitly set to `null`.
            - If the value is not specified, it's taken from the context source:
              - `Default` -> _3_
              - `Account` -> the value from the requester's account settings
            - Explicitly set value redefines the value taken from the context source.
          type: integer
          format: int32
          minimum: 1
          maximum: 8
          example: 4
        outboundCallPrefix:
          description: |-
            Digit of outbound call prefix on the account. Provides support for the dial plan feature
            "[Outbound Call Prefix](https://support.ringcentral.com/article/11278-Enterprise-Dial-Plan-Outbound-Call-Prefix.html)".

            - If the value is not specified, it's taken from the context source:
              - `Default` -> `null`
              - `Account` -> the value from the requester's account settings
            - Explicitly set value redefines the value taken from the context source.
            - Explicitly set `null` value disables outbound call prefix detection.
          type: string
          nullable: true
          pattern: ^[2-9]$
          example: "9"
        maskedPhoneNumbersAllowed:
          description: |-
            Masked phone numbers are supported in the the parsing input.
            Provides support for the feature "[Masked Numbers](https://support.ringcentral.com/article/Number-Masking-French-Numbers.html)".

            - If the value is not specified or explicitly set to `false`, the feature "Masked Numbers" context is disabled for parsing.
          type: boolean
          example: false
        maskSymbol:
          description: |-
            A character used for masking phone numbers.

            Absent if the request's parameter `context.maskedPhoneNumbersAllowed` value is set to `false`.
          type: string
          nullable: true
          readOnly: true
          example: X
        maskLength:
          description: |-
            The number of last digits of the phone number which are masked.

            Absent if the request's parameter `context.maskedPhoneNumbersAllowed` value is set to `false`.
          type: integer
          format: int32
          nullable: true
          readOnly: true
          example: 4
        conflictHandling:
          description: |-
            Defines the logic of conflicts resolving when it's impossible to detect whether the inputted string
            corresponds to an extension number or a phone number. Provides support for the feature "Smart Dial Plan Routing".

            **Possible values**:

            - `Default` - the ambiguous number will always be classified as an extension number;
            - `Client` - the ambiguous number will get `Ambiguous` category and the final decision whether the number is an extension number or a phone number should be made by the requester.
            - If the value is not specified, it's taken from the context source:
              - `Default` -> _Default_
              - `Client` -> the value from the requester's account settings
            - Explicitly set value redefines the value taken from the context source.
          type: string
          enum:
            - Default
            - Client
          default: Default
          example: Client
    DialingDetails:
      description: Absent if the request's parameter `resultContent.includeDialingDetails` value is set to `false`.
      type: object
      properties:
        serviceCode:
          description: Absent if the response's attribute `results.originalString` value doesn't contain a service code.
          type: object
          properties:
            dialing:
              type: string
              readOnly: true
              example: "*811"
            pattern:
              description: Absent if the response's attribute `results.originalString` value doesn't contain a valid RingCentral's service code.
              type: string
              nullable: true
              readOnly: true
              example: "*8xx"
          nullable: true
          readOnly: true
        outboundCallPrefix:
          description: Absent if the response's attribute `results.originalString` value doesn't contain an outbound call prefix.
          type: string
          nullable: true
          readOnly: true
          example: "9"
        specialPrefix:
          description: Absent if the response's attribute `results.originalString` value doesn't contain a special prefix.
          type: object
          properties:
            dialing:
              type: string
              readOnly: true
              example: "18001"
            pattern:
              type: string
              readOnly: true
              example: "18001"
          nullable: true
          readOnly: true
      nullable: true
      readOnly: true
    NumberDetails:
      description: Absent if the request's parameter `resultContent.includeNumberDetails` value is set to `false`.
      type: object
      properties:
        siteCode:
          description: Absent if the request's parameter `context.siteCode` value is set to `null`.
          type: string
          nullable: true
          readOnly: true
          example: "10"
        shortExtensionNumber:
          description: Absent if the request's parameter `context.siteCode` value is set to `null`.
          type: string
          nullable: true
          readOnly: true
          example: "303"
        extensionNumber:
          description: |-
            Absent for the `results.category` response's attribute values:
            `Unknown`, `ServiceCode`, `SpecialService`, `Regular`, `TollFree` and `ShortCode`.
          type: string
          nullable: true
          readOnly: true
          example: "10303"
        specialService:
          description: |-
            Absent for the `results.category` response's attribute values:
            `Unknown`, `ServiceCode`, `Extension`, `Regular`, `TollFree`, `ShortCode` and `Ambiguous`.
          type: object
          properties:
            type:
              description: The type of special service.
              type: string
              enum:
                - Emergency
                - DirectoryAssistance
                - UpdateEmergencyAddress
                - CustomerSupport
                - NonEmergencyPolice
                - NonEmergencyMedical
                - TelecommunicationRelay
                - Unsupported
                - Supplementary
                - Unknown
              readOnly: true
              example: NonEmergencyMedical
            pattern:
              type: string
              readOnly: true
              example: 116xxx
          nullable: true
          readOnly: true
        country:
          $ref: "#/components/schemas/CountryContext"
        nationalDestinationCode:
          description: Absent if the response's attribute `results.originalString` value doesn't contain a national destination code.
          type: string
          nullable: true
          readOnly: true
        areaCode:
          description: Absent if the response's attribute `results.originalString` value doesn't contain an area code.
          type: string
          nullable: true
          readOnly: true
          example: "650"
        regionalDestinationCode:
          description: Absent if the response's attribute `results.originalString` value doesn't contain a regional destination code.
          type: string
          nullable: true
          readOnly: true
        allocationBlockCode:
          description: Absent if the response's attribute `results.originalString` value doesn't contain an allocation block code.
          type: string
          nullable: true
          readOnly: true
        subscriberNumber:
          description: "Absent for the `results.category` response's attribute values: `Unknown`, `ServiceCode` and `Extension`."
          type: string
          nullable: true
          readOnly: true
          example: "5558275"
        subAddress:
          description: Absent if the response's attribute `results.originalString` value doesn't contain a sub-address.
          type: string
          nullable: true
          readOnly: true
          example: "1019"
        dtmfPostfix:
          description: Absent if the response's attribute `results.originalString` value doesn't contain a DTMF postfix.
          type: string
          nullable: true
          readOnly: true
          example: ",,,1,3,1,"
        sipPostfix:
          description: Absent if the response's attribute `results.originalString` value doesn't contain a SIP postfix.
          type: string
          nullable: true
          readOnly: true
          example: "@sip.ringcentral.com"
        probablyMasked:
          description: Absent if the request's parameter `context.maskedPhoneNumbersAllowed` value is set to `false`.
          type: boolean
          nullable: true
          readOnly: true
          example: false
        status:
          description: |-
            Absent for the `results.category` response's attribute values:
            `Unknown`, `SpecialService`, `Extension`, `TollFree`, `ShortCode` and `Ambiguous`.
          type: string
          enum:
            - Valid
            - Possible
            - Invalid
          nullable: true
          readOnly: true
          example: Valid
      nullable: true
      readOnly: true
    Formats:
      description: |-
        Contains several items for the `results.category` response's attribute value `Ambiguous`,
        where each item represents formatting for a specific category from the list of categories between which ambiguity happened,
        e.g. `Extension` and `Regular`, or `Extension` and `ShortCode`.

        Absent if the request's parameter `resultContent.includeFormats` value is set to `false`.
      type: array
      items:
        type: object
        properties:
          category:
            description: |-
              A specific category which formatting below is represented for.

              Absent for the `results.category` response's attribute values:
              `Unknown`, `ServiceCode`, `SpecialService`, `Extension`, `Regular`, `TollFree` and `ShortCode`.
            type: string
            enum:
              - Extension
              - Regular
              - TollFree
              - ShortCode
            nullable: true
            readOnly: true
            example: Regular
          e164:
            description: |-
              E.164 presentation.

              Absent for the `results.category` response's attribute values:
              "Unknown`, `ServiceCode`, `Extension` and `Ambiguous` when the `results.formats.category`
              response's attribute value is `Extension`.
            type: string
            nullable: true
            readOnly: true
            example: "+16505558275"
          e164Extended:
            description: |-
              E.164 presentation with the `results.numberDetails.subAddress` response's attribute value if there is.

              Absent for the `results.category` response's attribute values: "Unknown`, `ServiceCode`, `Extension` and `Ambiguous`
              when the `results.formats.category` response's attribute value is `Extension`.
            type: string
            nullable: true
            readOnly: true
            example: +16505558275*1019
          national:
            description: |-
              Local Canonical presentation.

              Absent for the `results.category` response's attribute values: "Unknown`, `ServiceCode`, `Extension` and `Ambiguous`
              when the `results.formats.category` response's attribute value is `Extension`.
            type: string
            nullable: true
            readOnly: true
            example: (650) 555-8275
          nationalExtended:
            description: |-
              Local Canonical presentation with the `results.numberDetails.subAddress` response's attribute value if there is.

              Absent for the `results.category` response's attribute values: "Unknown`, `ServiceCode`, `Extension` and `Ambiguous`
              when the `results.formats.category` response's attribute value is `Extension`.
            type: string
            nullable: true
            readOnly: true
            example: (650) 555-8275 * 1019
          international:
            description: |-
              International Canonical presentation.

              Absent for the `results.category` response's attribute values:
              "Unknown`, `ServiceCode`, `Extension` and `Ambiguous` when the `results.formats.category` response's attribute value is `Extension`.
            type: string
            nullable: true
            readOnly: true
            example: +1 (650) 5558275
          internationalExtended:
            description: |-
              International Canonical presentation with the `results.numberDetails.subAddress` response's attribute value if there is.

              Absent for the `results.category` response's attribute values: "Unknown`, `ServiceCode`, `Extension` and `Ambiguous`
              when the `results.formats.category` response's attribute value is `Extension`.
            type: string
            nullable: true
            readOnly: true
            example: +1 (650) 5558275 * 1019
          dialable:
            description: |-
              Dialable presentation: the `results.dialingDetails.serviceCode.dialing` response's attribute value
              if there is + `results.dialingDetails.specialPrefix.dialing` response's attribute value if there is + number to dial.
            type: string
            readOnly: true
            example: "*67*6505558275"
          dialableExtended:
            description: Dialable presentation with the `results.numberDetails.subAddress` response's attribute value if there is.
            type: string
            readOnly: true
            example: "*67*6505558275*1019"
        readOnly: true
      nullable: true
      readOnly: true
    ClientErrorsResponse:
      description: Phone Number Parser service's Parse Phone Numbers API 4xx error response schema.
      type: object
      properties:
        errors:
          type: array
          minItems: 1
          uniqueItems: true
          items:
            type: object
            minProperties: 2
            properties:
              errorCode:
                type: string
                description: Logical error code.
                readOnly: true
              message:
                type: string
                description: Detailed user-friendly description of error.
                readOnly: true
              parameterMaxItemCount:
                type: integer
                format: int32
                nullable: true
                readOnly: true
              parameterName:
                type: string
                description: Name of the parameter with an invalid value.
                nullable: true
                readOnly: true
              parameterValueLength:
                type: integer
                format: int32
                nullable: true
                readOnly: true
              parameterRange:
                type: string
                nullable: true
                readOnly: true
            required:
              - errorCode
              - message
            readOnly: true
          readOnly: true
      required:
        - errors
      readOnly: true
    ServerErrorsResponse:
      description: Phone Number Parser service's Parse Phone Numbers API 5xx error response schema.
      type: object
      properties:
        errors:
          type: array
          minItems: 1
          uniqueItems: true
          items:
            type: object
            minProperties: 2
            properties:
              errorCode:
                type: string
                description: Logical error code.
                readOnly: true
              message:
                type: string
                description: Detailed user-friendly description of error.
                readOnly: true
            required:
              - errorCode
              - message
            readOnly: true
          readOnly: true
      required:
        - errors
      readOnly: true
    ParsePhoneNumberResponseV2:
      description: Phone Number Parser service's Parse Phone Numbers API successful response schema.
      type: object
      properties:
        context:
          $ref: "#/components/schemas/NumberParserContext"
        results:
          type: array
          items:
            type: object
            properties:
              dialingDetails:
                $ref: "#/components/schemas/DialingDetails"
              numberDetails:
                $ref: "#/components/schemas/NumberDetails"
              formats:
                $ref: "#/components/schemas/Formats"
    ResultContent:
      description: Flags controlling parsing result content.
      type: object
      properties:
        includeDialingDetails:
          description: Indicates that `results.dialingDetails` section should be returned for particular result items in the response.
          type: boolean
          default: true
          example: false
        includeNumberDetails:
          description: Indicates that `results.numberDetails` section should be returned for particular result items in the response.
          type: boolean
          default: true
          example: true
        includeFormats:
          description: Indicates that `results.formats` section should be returned for particular result items in the response.
          type: boolean
          default: true
          example: true
    ParsePhoneNumbersRequest:
      description: Phone Number Parser service's Parse Phone Numbers API request schema.
      type: object
      properties:
        originalStrings:
          description: |-
            Array of strings containing numbers to be parsed.

            Empty strings or `null` values of the array are ignored and excluded from the request.
          type: array
          minItems: 1
          maxItems: 64
          items:
            description: String containing number to be parsed.
            type: string
            minLength: 1
            maxLength: 64
            example: "+16505558275"
        contextSource:
          description: |-
            The source of the parsing context.

            **Possible values**:
            <br>- `Default` - using default values of parameters for the parsing;
            <br>- `Account` - populating parsing context from requester's account settings.
            |`context.`                  |`Default`|`Account`
            |----------------------------|---------|--------------------------------------------
            |`brandId`                   |`null`   |brand from the request context header
            |`country`                   |`null`   |home country of the requester's account
            |`defaultAreaCode`           |`null`   |`null`
            |`vanityPhoneNumbersAllowed` |`false`  |`true`
            |`maxExtensionNumberLength`  |_5_      |the value from the requester's account settings
            |`shortCodesAllowed`         |`false`  |the value from the requester's account settings
            |`siteCode`                  |`null`   |`null`
            |`shortExtensionNumberLength`|_3_      |the value from the requester's account settings
            |`outboundCallPrefix`        |`null`   |the value from the requester's account settings
            |`maskedPhoneNumbersAllowed` |`false`  |`false`
            |`conflictHandling`          |`Default`|the value from the requester's account settings
          type: string
          enum:
            - Default
            - Account
          default: Default
          example: Account
        context:
          $ref: "#/components/schemas/NumberParserContext"
        resultContent:
          $ref: "#/components/schemas/ResultContent"
      required:
        - originalStrings
    CountryContext:
      description: |-
        Country context definition.

        **In the request**:

        Country context can be identified by `country.isoCode` value only:
        - If the value is not specified, it's taken from the context source:
          - `Default` -> `null`
          - `Account` -> home country of the requester's account
        - Explicitly set value redefines the value taken from the context source.
        - Explicitly set `null` value disables country context for parsing.

        **In the response**:

        Country context is returned with additional attributes.

        **In particular result items**:

        Country attribute is absent for the `results.category` response's attribute values: `Unknown` and `Extension`.
      type: object
      nullable: true
      properties:
        isoCode:
          $ref: "#/components/schemas/CountryIsoCode"
        name:
          description: The official name of the country.
          type: string
          readOnly: true
          example: United States
        callingCode:
          $ref: "#/components/schemas/CountryCallingCode"
    GetAccountInfoResponse:
      type: object
      properties:
        id:
          type: integer
          format: int64
          description: Internal identifier of an account
        uri:
          type: string
          format: uri
          description: Canonical URI of an account
        bsid:
          type: string
          description: |
            Internal identifier of an account in the billing system
        mainNumber:
          type: string
          description: |
            Main phone number of the current account
        operator:
          $ref: "#/components/schemas/AccountOperatorInfo"
        partnerId:
          type: string
          description: |
            Additional account identifier, created by partner application
            and applied on client side
        serviceInfo:
          $ref: "#/components/schemas/ServiceInfo"
        setupWizardState:
          $ref: "#/components/schemas/SetupWizardStateEnum"
        signupInfo:
          $ref: "#/components/schemas/SignupInfoResource"
        status:
          $ref: "#/components/schemas/AccountStatusEnumFull"
        statusInfo:
          $ref: "#/components/schemas/AccountStatusInfo"
        regionalSettings:
          $ref: "#/components/schemas/AccountRegionalSettings"
        federated:
          type: boolean
          description: |
            Specifies whether an account is included into any federation
            of accounts or not
        outboundCallPrefix:
          type: integer
          format: int32
          description: |
            If outbound call prefix is not specified, or set to null (0),
            then the parameter is not returned; the supported value range is 2-9
        cfid:
          type: string
          description: |
            Customer facing identifier. Returned for accounts with the
            turned off PBX features. Equals to main company number in
            [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I)
            (without "+" sign)format
        limits:
          $ref: "#/components/schemas/AccountLimitsInfo"
    CurrencyInfo:
      type: object
      properties:
        id:
          type: integer
          format: int64
          description: Internal identifier of a currency
        code:
          type: string
          description: Official code of a currency
        name:
          type: string
          description: Official name of a currency
        symbol:
          type: string
          description: Graphic symbol of a currency
        minorSymbol:
          type: string
          description: Minor graphic symbol of a currency
      description: Currency information
    AccountOperatorInfo:
      type: object
      description: |
        Operator extension information. This extension will receive
        all calls and messages addressed to an operator.
      properties:
        uri:
          type: string
          format: uri
          description: Link to an operator extension resource
        id:
          type: integer
          format: int64
          description: Internal identifier of an operator extension
        extensionNumber:
          type: string
          description: Number of an operator extension
        partnerId:
          type: string
          description: |
            Internal identifier of an extension created by partner. Supported for Partner Applications.
            The RingCentral supports the mapping of accounts and stores the corresponding account ID/extension
            ID for each partner ID of a client application. In request URIs partner IDs are accepted instead
            of regular RingCentral native IDs as path parameters using `pid=XXX` clause.
            Though in response URIs contain the corresponding account IDs and extension
            IDs. In all request and response bodies these values are reflected via
            partnerId attributes of account and extension
    AccountLimitsInfo:
      type: object
      properties:
        freeSoftPhoneLinesPerExtension:
          type: integer
          format: int32
          description: |
            Max number of free softphone phone lines per user extension
        meetingSize:
          type: integer
          format: int32
          description: |
            Max number of participants in RingCentral meeting hosted by
            this account's user
        cloudRecordingStorage:
          type: integer
          format: int32
          description: |
            Meetings recording cloud storage limitation in Gb
        maxMonitoredExtensionsPerUser:
          type: integer
          format: int32
          description: |
            Max number of extensions which can be included in the list
            of users monitored for Presence
        maxExtensionNumberLength:
          type: integer
          format: int32
          description: |
            Max length of extension numbers of an account; the supported
            value is up to 8 symbols, depends on account type
        siteCodeLength:
          type: integer
          format: int32
          description: Length of a site code
        shortExtensionNumberLength:
          type: integer
          format: int32
          description: Length of a short extension number
      description: Limits which are effective for the account
    BillingPlanInfo:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a billing plan
        name:
          type: string
          description: Billing plan name
        durationUnit:
          type: string
          description: Duration period
          enum:
            - Day
            - Month
            - Year
        duration:
          type: integer
          format: int32
          description: Number of duration units
        type:
          type: string
          description: Billing plan type
          enum:
            - Initial
            - Regular
            - Suspended
            - Trial
            - TrialNoCC
            - Free
        includedPhoneLines:
          type: integer
          format: int32
          description: Included digital lines count
      description: Information on account billing plan
    SignupInfoResource:
      type: object
      properties:
        tosAccepted:
          type: boolean
          default: false
        signupState:
          type: array
          items:
            type: string
            enum:
              - AccountCreated
              - BillingEntered
              - CreditCardApproved
              - AccountConfirmed
              - PhoneVerificationRequired
              - PhoneVerificationPassed
        verificationReason:
          type: string
          enum:
            - CC_Failed
            - Phone_Suspicious
            - CC_Phone_Not_Match
            - AVS_Not_Available
            - MaxMind
            - CC_Blacklisted
            - Email_Blacklisted
            - Phone_Blacklisted
            - Cookie_Blacklisted
            - Device_Blacklisted
            - IP_Blacklisted
            - Agent_Instance_Blacklisted
            - Charge_Limit
            - Other_Country
            - Unknown
        marketingAccepted:
          type: boolean
          description: |
            Updates 'Send Marketing Information' flag on web interface
        creationTime:
          type: string
          format: date-time
          description: The timestamp of account creation
          example: 2023-03-10T18:07:52.534Z
      description: Account sign up data
    AccountRegionalSettings:
      allOf:
        - $ref: "#/components/schemas/RegionalSettings"
        - type: object
          properties:
            currency:
              $ref: "#/components/schemas/CurrencyInfo"
      description: |
        Account level region data (web service Auto-Receptionist settings)
    ServicePlanInfo:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a service plan
        name:
          type: string
          description: Name of a service plan
        edition:
          type: string
          description: Edition of a service plan
        freemiumProductType:
          type: string
          enum:
            - Freyja
            - Phoenix
            - PbxBasic
      description: Information on account service plan
    ServiceInfo:
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Canonical URI of a service info resource
        billingPlan:
          $ref: "#/components/schemas/BillingPlanInfo"
        brand:
          $ref: "#/components/schemas/BrandInfo"
        servicePlan:
          $ref: "#/components/schemas/ServicePlanInfo"
        targetServicePlan:
          $ref: "#/components/schemas/ServicePlanInfo"
        contractedCountry:
          $ref: "#/components/schemas/CountryInfoShortModel"
        uBrand:
          $ref: "#/components/schemas/UBrandInfo"
        ubrand:
          allOf:
            - $ref: "#/components/schemas/UBrandInfo"
            - deprecated: true
          description: "Deprecated: use uBrand instead."
      description: |
        Account service information, including brand, sub-brand, service plan and
        billing plan
    AccountStatusInfo:
      type: object
      description: Optional information to be used when account is moved to "Disabled" status
      properties:
        reason:
          type: string
          description: Type of suspension, voluntarily or not
          enum:
            - SuspendedVoluntarily
            - SuspendedInvoluntarily
            - CancelledVoluntarily
            - CancelledInvoluntarily
          example: CancelledVoluntarily
        comment:
          type: string
          description: A meaningful description of the reason to change the status
          minLength: 1
          maxLength: 256
          example: By customer request. Case ABC123
        till:
          type: string
          description: |
            Date after which the disabled account will get deleted.
            Parameter can be used to overwrite default retention period
            (that is 30 days after disabling the account)
          format: date-time
          example: 2023-03-26T11:30:45.940Z
    UBrandInfo:
      type: object
      properties:
        id:
          type: string
          description: Sub-brand unique ID
          example: "111.222"
        name:
          type: string
          description: Sub-brand name
          example: Sub-brand name
      description: Account sub-brand information
    BrandInfo:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a brand
        name:
          type: string
          description: "Brand name, for example  RingCentral UK ,  ClearFax "
        homeCountry:
          $ref: "#/components/schemas/CountryInfoShortModel"
      description: Information on account brand
    SetupWizardStateEnum:
      type: string
      description: Initial configuration wizard state
      enum:
        - NotStarted
        - Incomplete
        - Completed
        - Unknown
    CompanyBusinessHoursUpdateRequest:
      type: object
      properties:
        schedule:
          $ref: "#/components/schemas/CompanyBusinessHoursScheduleInfo"
      example:
        schedule:
          weeklyRanges:
            tuesday:
              - from: 09:00
                to: 18:00
            friday:
              - from: 09:00
                to: 18:00
            thursday:
              - from: 09:00
                to: 18:00
            wednesday:
              - from: 09:00
                to: 18:00
            monday:
              - from: 09:00
                to: 18:00
    WeeklyScheduleInfo:
      type: object
      properties:
        monday:
          type: array
          description: Time intervals for a particular day
          items:
            $ref: "#/components/schemas/TimeInterval"
        tuesday:
          type: array
          description: Time intervals for a particular day
          items:
            $ref: "#/components/schemas/TimeInterval"
        wednesday:
          type: array
          description: Time intervals for a particular day
          items:
            $ref: "#/components/schemas/TimeInterval"
        thursday:
          type: array
          description: Time intervals for a particular day
          items:
            $ref: "#/components/schemas/TimeInterval"
        friday:
          type: array
          description: Time intervals for a particular day
          items:
            $ref: "#/components/schemas/TimeInterval"
        saturday:
          type: array
          description: Time intervals for a particular day
          items:
            $ref: "#/components/schemas/TimeInterval"
        sunday:
          type: array
          description: Time intervals for a particular day
          items:
            $ref: "#/components/schemas/TimeInterval"
      description: Weekly schedule
    CompanyBusinessHours:
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: "Canonical URI of a business-hours resource "
        schedule:
          $ref: "#/components/schemas/CompanyBusinessHoursScheduleInfo"
      example:
        uri: https://platform.ringcentral.com/restapi/v1.0/account/401800045008/business-hours
        schedule:
          weeklyRanges:
            wednesday:
              - from: 09:00
                to: 18:00
            friday:
              - from: 09:00
                to: 18:00
            tuesday:
              - from: 09:00
                to: 18:00
            monday:
              - from: 09:00
                to: 18:00
            thursday:
              - from: 09:00
                to: 18:00
    TimeInterval:
      type: object
      properties:
        from:
          type: string
          description: Time in format hh:mm
        to:
          type: string
          description: Time in format hh:mm
    CompanyBusinessHoursScheduleInfo:
      type: object
      properties:
        weeklyRanges:
          $ref: "#/components/schemas/WeeklyScheduleInfo"
      description: Schedule when an answering rule is applied
    ShippingAddressInfo:
      type: object
      properties:
        customerName:
          type: string
          description: Name of a primary contact person (receiver)
        additionalCustomerName:
          type: string
          description: |
            Name of an additional contact person. Should be specified for
            countries except the US, Canada, the UK and Australia.
        customerEmail:
          type: string
          format: email
          description: |
            Email of a primary contact person (receiver). Should be specified
            for countries except the US, Canada, the UK and Australia.
        additionalCustomerEmail:
          type: string
          format: email
          description: |
            Email of an additional contact person. Should be specified
            for countries except the US, Canada, the UK and Australia.
        customerPhone:
          type: string
          description: |
            Phone number of a primary contact person (receiver). Should
            be specified for countries except the US, Canada, the UK and Australia
        additionalCustomerPhone:
          type: string
          description: |
            Phone number of an additional contact person. Should be specified
            for countries except the US, Canada, the UK & Australia.
        street:
          type: string
          description: |
            Street address, line 1 - street address, P.O. box, company
            name, c/o
        street2:
          type: string
          description: |
            Street address, line 2 - apartment, suite, unit, building,
            floor, etc.
        city:
          type: string
          description: City name
        state:
          type: string
          description: State/province name
        stateId:
          type: string
          description: Internal identifier of a state
        stateIsoCode:
          type: string
          description: ISO code of a state
        stateName:
          type: string
          description: Full name of a state
        countryId:
          type: string
          description: Internal identifier of a country
        countryIsoCode:
          type: string
          description: ISO code of a country
        country:
          type: string
          description: Country name
        countryName:
          type: string
          description: Full name of a country
        zip:
          type: string
          description: Zip code
        taxId:
          type: string
          description: |
            National taxpayer identification number. Should be specified
            for Brazil (CNPJ/CPF number) and Argentina (CUIT number).
      description: |
        Shipping address for the order. If it coincides with the Emergency
        Service Address, then can be omitted. By default, the same value as the
        emergencyServiceAddress. Multiple addresses can be specified; in case
        an order contains several devices, they can be delivered to different addresses
    DeviceFeatureEnum:
      type: string
      description: Device feature
      enum:
        - BLA
        - CommonPhone
        - Intercom
        - Paging
        - HELD
    EmergencyAddress:
      type: object
      properties:
        required:
          type: boolean
          description: If set to `true` then specifying emergency address is required
        localOnly:
          type: boolean
          description: If set to `true` then only local emergency address can be specified
        lineProvisioningStatus:
          type: string
          description: This status is associated with a phone line provision state
          enum:
            - Valid
            - Provisioning
            - Invalid
    ShippingStatus:
      description: |
        Order item shipping status. It is set to `Initial` when the order is submitted.
        Then it is changed to `Accepted` when a distributor starts processing the order.
        Finally, it is changed to `Shipped` which means that the distributor has shipped the device.
      type: string
      enum:
        - Initial
        - Accepted
        - Shipped
        - Won't ship
      example: Shipped
    ShippingInfo:
      type: object
      properties:
        status:
          $ref: "#/components/schemas/ShippingStatus"
        carrier:
          type: string
          description: |
            Shipping carrier name. Appears only if the device status is 'Shipped'
        trackingNumber:
          type: string
          description: |
            Carrier-specific tracking number. Appears only if the device status is 'Shipped'
        method:
          $ref: "#/components/schemas/ShippingMethodInfo"
        address:
          $ref: "#/components/schemas/ShippingAddressInfo"
      description: |
        Shipping information, according to which devices (in case of HardPhone)
        or e911 stickers (in case of SoftPhone and OtherPhone) will be delivered
        to the customer
    ShippingMethodInfo:
      allOf:
        - $ref: "#/components/schemas/ShippingMethodIdModel"
        - type: object
          properties:
            name:
              type: string
              description: Method name, corresponding to the identifier
              enum:
                - Ground
                - 2 Day
                - Overnight
    EmergencyServiceAddressResourceRequest:
      type: object
      properties:
        street:
          type: string
          description: First line address
        street2:
          type: string
          description: |
            Second line address (apartment, suite, unit, building, floor,
            etc.)
        zip:
          type: string
          description: Postal (Zip) code
        customerName:
          type: string
          description: Customer name
        state:
          type: string
          description: State/province name
        stateId:
          type: string
          description: Internal identifier of a state
        country:
          type: string
          description: Country name
        countryId:
          type: string
          description: Internal identifier of a country
      description: |
        Address for emergency cases. The same emergency address is assigned to all
        numbers of a single device. If the emergency address is also specified in
        `emergency` resource, then this value is ignored
    ShippingMethodIdModel:
      type: object
      description: |
        Devices shipping method. It is required if devices are ordered.
        Availability of different shipping methods depends on package
        definition.
      required:
        - id
      properties:
        id:
          type: string
          description: |
            Shipping method ID:
            - "1" - Ground Shipping (5-7 business days)
            - "2" - Expedited Shipping (2-days)
            - "3" - Overnight Shipping
          enum:
            - "1"
            - "2"
            - "3"
          default: "1"
    PhoneLineTypeEnum:
      type: string
      description: The type of phone line
      enum:
        - Unknown
        - Standalone
        - StandaloneFree
        - BlaPrimary
        - BlaSecondary
    AccountDeviceUpdate:
      type: object
      properties:
        emergencyServiceAddress:
          $ref: "#/components/schemas/EmergencyServiceAddressResourceRequest"
        emergency:
          $ref: "#/components/schemas/DeviceEmergencyInfo"
        extension:
          $ref: "#/components/schemas/DeviceUpdateExtensionInfo"
        phoneLines:
          $ref: "#/components/schemas/DeviceUpdatePhoneLinesInfo"
        useAsCommonPhone:
          type: boolean
          description: |
            Supported only for devices assigned to Limited extensions.
            If true, enables users to log in to this phone as a common phone
        name:
          type: string
          description: Device label, maximum number of symbols is 64
    AddressFormatStatus:
      type: string
      enum:
        - Actual
        - Outdated
        - Deprecated
      description: Address format statuses
    DeviceResource:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a device
        uri:
          type: string
          format: uri
          description: Canonical URI of a device
        sku:
          type: string
          description: |
            Device identification number (SKU, Stock Keeping Unit) in the format
            TP-ID [-AT-AC], where TP is device type (HP for RC desk phones, DV for all
            other devices including soft phones); ID - device model ID; AT - add-on type
            ID; AC - add-on count (if any). For example 'HP-56-2-2'
        type:
          type: string
          description: Device type
          enum:
            - BLA
            - SoftPhone
            - OtherPhone
            - HardPhone
            - WebPhone
            - Paging
            - Room
            - WebRTC
        name:
          type: string
          description: |
            Device name. Mandatory if ordering SoftPhone or OtherPhone.
            Optional for HardPhone. If not specified for HardPhone, then
            a device model is used as a device name
        serial:
          type: string
          description: |
            Serial number for HardPhone (is returned only when the phone
            is shipped and provisioned); endpoint ID for SoftPhone and
            mobile applications
        status:
          type: string
          description: Device status
          enum:
            - Offline
            - Online
        computerName:
          type: string
          description: Computer name (for devices of `SoftPhone` type only)
        model:
          $ref: "#/components/schemas/ModelInfo"
        extension:
          $ref: "#/components/schemas/ExtensionInfoIntId"
        emergency:
          $ref: "#/components/schemas/DeviceEmergencyInfo"
        emergencyServiceAddress:
          $ref: "#/components/schemas/DeviceEmergencyServiceAddressResource"
        phoneLines:
          type: array
          description: Phone lines information
          items:
            $ref: "#/components/schemas/PhoneLinesInfo"
        shipping:
          $ref: "#/components/schemas/ShippingInfo"
        boxBillingId:
          type: integer
          format: int64
          description: |
            Box billing identifier of a device. Applicable only for devices of `HardPhone` type.
            It is an alternative way to identify the device to be ordered. Either
            `model` structure, or `boxBillingId` must be specified
        useAsCommonPhone:
          type: boolean
          description: |
            Supported only for devices assigned to Limited extensions.
            If true, enables users to log in to this phone as a common phone.
        hotDeskDevice:
          type: boolean
          description: |
            Indicates whether this device is used for hot desking or not.
            Returned if `useAsCommonPhone` is set to false
          readOnly: true
        inCompanyNet:
          type: boolean
          description: |
            Network location status. `true` if the device is located in
            the configured corporate network (On-Net); `false` for Off-Net location.
            Parameter is not returned if `EmergencyAddressAutoUpdate` feature is not
            enabled for the account/user, or if device network location is not determined
        site:
          $ref: "#/components/schemas/DeviceSiteInfo"
        lastLocationReportTime:
          type: string
          format: date-time
          description: |
            Date/time of receiving last location report in
            [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)
            format including timezone, for example *2016-03-10T18:07:52.534Z
        linePooling:
          $ref: "#/components/schemas/LinePoolingEnum"
        billingStatement:
          $ref: "#/components/schemas/BillingStatementInfo"
        automaticVoicemailLogin:
          type: boolean
          description: |
            Ability to access the Voicemail without being prompted to enter a PIN from the hard phone
    BillingStatementCharges:
      type: object
      properties:
        description:
          type: string
        amount:
          type: number
          format: double
        feature:
          type: string
        freeServiceCredit:
          type: number
          format: double
    PaymentTypeInfo:
      type: string
      description: |
        Payment type. 'External' is returned for forwarded numbers
        which are not terminated in the RingCentral phone system
      enum:
        - External
        - TollFree
        - Local
        - BusinessMobileNumberProvider
        - ExternalNumberProvider
        - ExternalNumberProviderTollFree
        - Mobile
    DeviceEmergencyServiceAddressResource:
      type: object
      properties:
        country:
          type: string
          description: Country name
        countryId:
          type: string
          description: Internal identifier of a country
        countryIsoCode:
          $ref: "#/components/schemas/CountryIsoCode"
        countryName:
          type: string
          description: Full name of a country
        city:
          type: string
          description: City name
        customerName:
          type: string
          description: Customer name
        customerEmail:
          type: string
          format: email
          description: |
            Email of a primary contact person (receiver). Should be specified
            for countries except the US, Canada, the UK and Australia
        additionalCustomerEmail:
          type: string
          format: email
          description: |
            Email of an additional contact person. Should be specified
            for countries except the US, Canada, the UK and Australia
        additionalCustomerName:
          type: string
          description: |
            Name of an additional contact person. Should be specified for
            countries except the US, Canada, the UK and Australia
        customerPhone:
          type: string
          description: |
            Phone number of a primary contact person (receiver). Should
            be specified for countries except the US, Canada, the UK and Australia
        additionalCustomerPhone:
          type: string
          description: |
            Phone number of an additional contact person. Should be specified
            for countries except the US, Canada, the UK & Australia
        state:
          type: string
          description: State/province name. Mandatory for the USA, the UK and Canada
        stateId:
          type: string
          description: Internal identifier of a state
        stateIsoCode:
          type: string
          description: ISO code of a state
        stateName:
          type: string
          description: Full name of a state
        street:
          type: string
          description: First line address
        street2:
          type: string
          description: |
            Second line address (apartment, suite, unit, building, floor,
            etc.)
        streetType:
          type: string
          description: Street type
        buildingName:
          type: string
          description: (Optional) Building name
        buildingNumber:
          type: string
          description: Building/street number
        outOfCountry:
          type: boolean
          description: Specifies if the emergency address is out of country
        zip:
          type: string
          description: Postal (Zip) code
        lineProvisioningStatus:
          type: string
          description: Status of a digital line provisioning
          enum:
            - Provisioning
            - Valid
            - Invalid
        syncStatus:
          type: string
          description: |
            Resulting status of emergency address synchronization. Returned
            if `syncEmergencyAddress` parameter is set to `true`
          enum:
            - Verified
            - Updated
            - Deleted
            - NotRequired
            - Unsupported
            - Failed
        taxId:
          type: string
          description: Internal identifier of a tax
        apartment:
          type: string
          description: Apartment number (country-specific address field, e.g. Portugal)
        floor:
          type: string
          description: Floor number (country-specific address field, e.g. Portugal)
        designation:
          type: string
          description: Designation (country-specific address field, e.g. Portugal)
      description: Address for emergency cases. The same emergency address is assigned to all numbers of a single device
    LinePoolingEnum:
      type: string
      description: |
        Pooling type of device:
        - `Host` - device with a standalone paid phone line which can be linked to soft phone client instance;
        - `Guest` - device with a linked phone line;
        - `None` - device without a phone line or with a specific line (free, BLA, etc.)
      enum:
        - Host
        - Guest
        - None
    DeviceUpdatePhoneLinesInfo:
      type: object
      properties:
        phoneLines:
          type: array
          description: Information on phone lines added to a device
          items:
            $ref: "#/components/schemas/UpdateDevicePhoneInfo"
      description: Information on phone lines added to a device
    EmergencyLocationAddressResource:
      type: object
      properties:
        country:
          type: string
          description: Country name
        countryId:
          type: string
          description: Internal identifier of a country
        countryIsoCode:
          $ref: "#/components/schemas/CountryIsoCode"
        countryName:
          type: string
          description: Full name of a country
        state:
          type: string
          description: |
            State/Province name. Mandatory for the USA, the UK and Canada
        stateId:
          type: string
          description: Internal identifier of a state
        stateIsoCode:
          type: string
          description: ISO code of a state
        stateName:
          type: string
          description: Full name of a state
        city:
          type: string
          description: City name
        street:
          type: string
          description: First line address
        street2:
          type: string
          description: |
            Second line address (apartment, suite, unit, building, floor,
            etc.)
        zip:
          type: string
          description: Postal (Zip) code
        customerName:
          type: string
          description: Customer name
        outOfCountry:
          type: boolean
          description: Specifies if the emergency address is out of country
        buildingName:
          type: string
          description: (Optional) Building name
        streetType:
          type: string
          description: Street type
        buildingNumber:
          type: string
          description: Building/street number
      additionalProperties:
        description: |
          Any address fields are accepted but within the boundaries of the address format (specific or default for a certain country)
        type: string
    AddonInfo:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        count:
          type: integer
          format: int32
    UpdateDevicePhoneInfo:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a phone number
    ExtensionInfoIntId:
      type: object
      properties:
        id:
          type: integer
          description: Internal identifier of an extension
          format: int64
        uri:
          type: string
          format: uri
          description: Canonical URI of an extension
        extensionNumber:
          type: string
          description: Number of extension
        partnerId:
          type: string
          description: |
            For Partner Applications Internal identifier of an extension
            created by partner. The RingCentral supports the mapping of accounts and
            stores the corresponding account ID/extension ID for each partner ID of
            a client application. In request URIs partner IDs are accepted instead
            of regular RingCentral native IDs as path parameters using `pid=XXX` clause.
            Though in response URIs contain the corresponding account IDs and extension
            IDs. In all request and response bodies these values are reflected via
            partnerId attributes of account and extension
      description: This attribute can be omitted for unassigned devices
    AddressStatus:
      type: string
      description: Emergency address status
      enum:
        - Valid
        - Invalid
        - Provisioning
        - Deprovisioned
    PhoneNumberCountryInfo:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a home country
        uri:
          type: string
          format: uri
          description: Canonical URI of a home country
        name:
          type: string
          description: Official name of a home country
      description: Brief information on a phone number country
    PhoneLinesInfo:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a phone line
        lineType:
          $ref: "#/components/schemas/PhoneLineTypeEnum"
        phoneInfo:
          $ref: "#/components/schemas/PhoneNumberInfoIntId"
        emergencyAddress:
          $ref: "#/components/schemas/EmergencyAddress"
    DeviceSiteInfo:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a site
        name:
          type: string
          description: Name of a site
      description: Site data
    BillingStatementInfo:
      type: object
      properties:
        currency:
          type: string
          description: |
            Currency code complying with [ISO-4217](https://en.wikipedia.org/wiki/ISO_4217)
            standard
        charges:
          type: array
          items:
            $ref: "#/components/schemas/BillingStatementCharges"
        fees:
          type: array
          items:
            $ref: "#/components/schemas/BillingStatementFees"
        totalCharged:
          type: number
          format: double
        totalCharges:
          type: number
          format: double
        totalFees:
          type: number
          format: double
        subtotal:
          type: number
          format: double
        totalFreeServiceCredit:
          type: number
          format: double
      description: |
        Billing information. Returned for device update request if `prestatement`
        query parameter is set to 'true'
    BillingStatementFees:
      type: object
      properties:
        description:
          type: string
        amount:
          type: number
          format: double
        freeServiceCredit:
          type: number
          format: double
    TrustedFlag:
      type: boolean
      description: |
        Specifies emergency address validation during the ERL creation/update.
        If set to 'true', then address validation for non-US addresses is skipped
    DeviceEmergencyInfo:
      type: object
      properties:
        address:
          $ref: "#/components/schemas/EmergencyLocationAddressResource"
        location:
          $ref: "#/components/schemas/DeviceEmergencyLocationInfo"
        outOfCountry:
          type: boolean
          description: Specifies if emergency address is out of country
        addressStatus:
          $ref: "#/components/schemas/AddressStatus"
        visibility:
          type: string
          description: |
            Visibility of an emergency response location. If `Private`
            is set, then location is visible only for the restricted number of users,
            specified in `owners` array
          enum:
            - Private
            - Public
        syncStatus:
          type: string
          description: |
            Resulting status of the emergency address synchronization. Returned
            if `syncEmergencyAddress` parameter is set to `true`
          enum:
            - Verified
            - Updated
            - Deleted
            - NotRequired
            - Unsupported
            - Failed
        addressEditableStatus:
          type: string
          description: |
            Ability to register new emergency address for a phone line
            using devices sharing this line or only main device (line owner)
          enum:
            - MainDevice
            - AnyDevice
      description: Device emergency settings
    DeviceProvisioningExtensionInfo:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of an extension
        uri:
          type: string
          format: uri
          description: Canonical URI of an extension
        extensionNumber:
          type: string
          description: Number of extension
        partnerId:
          type: string
          description: |
            For Partner Applications Internal identifier of an extension
            created by partner. The RingCentral supports the mapping of accounts and
            stores the corresponding account ID/extension ID for each partner ID of
            a client application. In request URIs partner IDs are accepted instead
            of regular RingCentral native IDs as path parameters using `pid=XXX` clause.
            Though in response URIs contain the corresponding account IDs and extension
            IDs. In all request and response bodies these values are reflected via
            partnerId attributes of account and extension
      description: Information on the extension, to which the phone number is assigned. Returned only for the request of Account phone number list
    ModelInfo:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a HardPhone device model
        name:
          type: string
          description: Device name
        addons:
          type: array
          description: Add-ons description
          items:
            $ref: "#/components/schemas/AddonInfo"
        deviceClass:
          type: string
        features:
          type: array
          description: Device feature or multiple features supported
          items:
            $ref: "#/components/schemas/DeviceFeatureEnum"
        lineCount:
          type: integer
          format: int32
          description: Max supported count of phone lines
      description: HardPhone model information
    PhoneNumberInfoIntId:
      type: object
      properties:
        id:
          type: integer
          description: Internal identifier of a phone number
          format: int64
        country:
          $ref: "#/components/schemas/PhoneNumberCountryInfo"
        extension:
          $ref: "#/components/schemas/DeviceProvisioningExtensionInfo"
        label:
          type: string
          description: Custom user-defined name of a phone number, if any
        location:
          type: string
          description: Location (City, State). Filled for local US numbers
        paymentType:
          $ref: "#/components/schemas/PaymentTypeInfo"
        phoneNumber:
          type: string
          description: Phone number
        status:
          type: string
          description: |
            Status of a phone number. If the value is 'Normal', the phone
            number is ready to be used. Otherwise, it is an external number not yet
            ported to RingCentral
        type:
          $ref: "#/components/schemas/PhoneNumberType"
        usageType:
          type: string
          description: Usage type of the phone number
          enum:
            - MainCompanyNumber
            - AdditionalCompanyNumber
            - CompanyNumber
            - DirectNumber
            - CompanyFaxNumber
            - ForwardedNumber
            - ForwardedCompanyNumber
            - ContactCenterNumber
            - IntegrationNumber
      description: Phone number information
    DeviceUpdateExtensionInfo:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of an extension
      description: Information on extension that the device is assigned to
    DeviceEmergencyLocationInfo:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of the emergency response location
        name:
          type: string
          description: Location name
        addressFormatId:
          type: string
          description: Address format ID
        addressFormatStatus:
          $ref: "#/components/schemas/AddressFormatStatus"
        trusted:
          allOf:
            - $ref: "#/components/schemas/TrustedFlag"
            - readOnly: true
      description: Company emergency response location details
    OutboundProxyInfo:
      type: object
      properties:
        region:
          type: string
          description: Geographical region
          example: APAC
        proxy:
          type: string
          description: SIP outbound proxy
        proxyTLS:
          type: string
          description: SIP details for TLS (Transport Layer Security)
    SipInfoResource:
      type: object
      properties:
        domain:
          type: string
          description: SIP domain
        outboundProxies:
          type: array
          description: List of outbound proxies
          items:
            $ref: "#/components/schemas/OutboundProxyInfo"
        userName:
          type: string
          description: User credentials
        password:
          type: string
          description: User password
        authorizationId:
          type: string
          description: Internal identifier for SIP authorization
    ThreadUserModel:
      type: object
      required:
        - extensionId
      properties:
        extensionId:
          type: string
          description: Thread user's extension ID
          example: "9876453210"
        name:
          type: string
          description: Thread user's name (first + last)
          example: John Doe
        extensionType:
          $ref: "#/components/schemas/AllExtensionTypesEnum"
    OwnerResource:
      type: object
      description: Message owner information. Supported for shared voicemail and sms messages only
      properties:
        name:
          type: string
          description: Name of a voicemail owner
        extensionType:
          $ref: "#/components/schemas/AllExtensionTypesEnum"
        extensionId:
          type: string
          description: Internal identifier of an extension
    ThreadAvailabilityEnum:
      type: string
      description: Thread/message availability
      enum:
        - Alive
        - Deleted
    ThreadStatusReasonEnum:
      type: string
      description: |
        Thread status transition reason (for threads in `Resolved` status only):

        - `Manual` - the thread was resolved manually;
        - `ThreadExpired` - the thread was automatically resolved according to TTL settings;
        - `OwnerDeleted` - the thread owner's extension was deleted;
        - `OwnerPhoneNumberDeleted` - the thread owner's phone number this thread was created for was deleted.
      enum:
        - Manual
        - ThreadExpired
        - OwnerDeleted
        - OwnerPhoneNumberDeleted
    MessagePhoneParty:
      type: object
      required:
        - phoneNumber
      properties:
        phoneNumber:
          $ref: "#/components/schemas/PhoneNumberE164"
    MessageThreadList:
      type: object
      required:
        - records
        - paging
      properties:
        records:
          type: array
          minItems: 0
          items:
            $ref: "#/components/schemas/MessageThread"
        paging:
          $ref: "#/components/schemas/EnumeratedPagingModel"
    ThreadStatusEnum:
      type: string
      description: Thread status
      enum:
        - Open
        - Resolved
    AllExtensionTypesEnum:
      type: string
      description: |
        Type of the extension. For unrecognized types the `Unknown` value is returned.
        Please note that legacy 'Department' extension type corresponds to 'Call Queue'
        extensions in modern RingCentral product terminology
      enum:
        - User
        - Department
        - Announcement
        - Voicemail
        - DigitalUser
        - VirtualUser
        - FaxUser
        - PagingOnly
        - SharedLinesGroup
        - DelegatedLinesGroup
        - GroupCallPickup
        - IvrMenu
        - ApplicationExtension
        - ProxyAdmin
        - RoomConnector
        - ParkLocation
        - Limited
        - Bot
        - Site
        - Room
        - FlexibleUser
        - TieLine
        - Unknown
      example: User
    MessageThread:
      type: object
      required:
        - id
        - status
        - availability
        - creationTime
        - lastModifiedTime
        - owner
      properties:
        id:
          type: string
          description: Thread ID
        label:
          type: string
          description: Thread human-readable label
          maxLength: 200
        status:
          $ref: "#/components/schemas/ThreadStatusEnum"
        statusReason:
          $ref: "#/components/schemas/ThreadStatusReasonEnum"
        availability:
          $ref: "#/components/schemas/ThreadAvailabilityEnum"
        owner:
          $ref: "#/components/schemas/OwnerResource"
        ownerParty:
          allOf:
            - $ref: "#/components/schemas/MessagePhoneParty"
            - description: Thread owner phone number information
        guestParty:
          allOf:
            - $ref: "#/components/schemas/MessagePhoneParty"
            - description: Thread guest phone number information
        assignee:
          nullable: true
          allOf:
            - $ref: "#/components/schemas/ThreadUserModel"
            - description: Cleared automatically when the thread is resolved or deleted
        creationTime:
          type: string
          format: date-time
          description: Thread creation time
        lastModifiedTime:
          type: string
          format: date-time
          description: Thread last modification time
    ThreadSyncList:
      type: object
      required:
        - records
        - syncInfo
      properties:
        records:
          type: array
          minItems: 0
          items:
            $ref: "#/components/schemas/MessageThread"
        syncInfo:
          $ref: "#/components/schemas/SyncInfoModel"
    SyncInfoModel:
      type: object
      required:
        - syncType
        - syncToken
        - syncTime
      properties:
        syncType:
          $ref: "#/components/schemas/SyncTypeEnum"
        syncToken:
          type: string
          description: Synchronization token
        syncTime:
          type: string
          description: |
            Last synchronization date/time
          format: date-time
    SyncTypeEnum:
      type: string
      enum:
        - FSync
        - ISync
      description: |
        Type of message synchronization request:
          - FSync -- full sync
          - ISync -- incremental sync
    MessageStatusEnum:
      type: string
      description: |
        Message status. Different message types may have different
        allowed status values. For outbound faxes the aggregated message status
        is returned. If, for multi-recipient outbound message, a status for
        at least one recipient is `Queued`, then the `Queued` value is returned.
        If a status for at least one recipient is `SendingFailed`,
        then the 'SendingFailed' value is returned. In other cases,
        the `Sent` status is returned
      enum:
        - Queued
        - Sent
        - Delivered
        - DeliveryFailed
        - SendingFailed
        - Received
    ThreadMessagesDeleteRequest:
      type: object
      required:
        - ids
      properties:
        ids:
          type: array
          description: IDs of messages to be deleted
          minItems: 1
          maxItems: 100
          items:
            type: string
          example:
            - "2268298947"
            - "2268300303"
    ThreadMessageModel:
      title: Thread Message
      type: object
      required:
        - id
        - threadId
        - availability
        - creationTime
        - lastModifiedTime
        - direction
      properties:
        id:
          type: string
          description: Internal identifier of a message
        threadId:
          type: string
          description: Internal identifier of a message thread
        availability:
          $ref: "#/components/schemas/ThreadAvailabilityEnum"
        creationTime:
          type: string
          description: |
            Message creation date/time
          format: date-time
        direction:
          $ref: "#/components/schemas/MessageDirectionEnum"
        lastModifiedTime:
          type: string
          description: |
            Message last modification date/time
          format: date-time
        messageStatus:
          $ref: "#/components/schemas/MessageStatusEnum"
        text:
          $ref: "#/components/schemas/ThreadMessageText"
        attachments:
          type: array
          description: Message attachments (if any)
          minItems: 1
          items:
            $ref: "#/components/schemas/MessageAttachmentResponseEntry"
        author:
          allOf:
            - $ref: "#/components/schemas/ThreadUserModel"
            - description: Message author (for outbound messages only)
    ThreadMessageList:
      type: object
      required:
        - records
        - paging
      properties:
        records:
          type: array
          minItems: 0
          items:
            $ref: "#/components/schemas/ThreadMessageModel"
        paging:
          $ref: "#/components/schemas/EnumeratedPagingModel"
    MessagePhonePartiesList:
      type: array
      minItems: 1
      maxItems: 10
      items:
        $ref: "#/components/schemas/MessagePhoneParty"
    MessageAttachmentResponseEntry:
      type: object
      required:
        - id
        - contentType
        - contentUri
        - size
      properties:
        id:
          type: string
          description: Unique identifier of an attachment
        contentType:
          type: string
          description: MIME content type of an attachment
          example: audio/mpeg
        filename:
          type: string
          description: |
            Suggested filename of an attachment.
          example: my-song.mp3
        contentUri:
          type: string
          format: uri
          description: Link to the attachment binary content
        size:
          type: integer
          format: int64
          description: Size of the file in bytes
    SmsBinaryAttachmentPart:
      type: string
      description: |
        Multipart attachments in binary format. For supported  MIME types see
        [Sending MMS](https://developers.ringcentral.com/guide/messaging/sms/sending-images)
      format: binary
    ThreadMessageText:
      type: string
      minLength: 1
      maxLength: 1000
      description: |
        Message or note text
      example: Hello, how are you doing today?
    MessageDirectionEnum:
      type: string
      enum:
        - Inbound
        - Outbound
      description: |
        Message direction (inbound or outbound)
    NewThreadMessageRequest:
      type: object
      required:
        - from
        - to
        - text
      properties:
        threadId:
          type: string
          description: |
            Internal identifier of a message thread.
            If not specified, the thread will be assigned automatically based on phone numbers.
            If provided `threadId` is invalid (e.g. does not exist, already resolved, etc.), the API returns an error.
        from:
          $ref: "#/components/schemas/MessagePhoneParty"
        to:
          $ref: "#/components/schemas/MessagePhonePartiesList"
        text:
          $ref: "#/components/schemas/ThreadMessageText"
    AssignMessageThreadRequest:
      type: object
      description: |
        Assignee extension information (can be `null` to unassign the thread)
      required:
        - assignee
      properties:
        assignee:
          type: object
          nullable: true
          required:
            - extensionId
          properties:
            extensionId:
              type: string
              description: Extension ID of the assignee
              example: "9876453210"
    ThreadNoteList:
      type: object
      required:
        - records
        - paging
      properties:
        records:
          type: array
          minItems: 0
          items:
            $ref: "#/components/schemas/ThreadNoteModel"
        paging:
          $ref: "#/components/schemas/EnumeratedPagingModel"
    ThreadNoteCreateRequest:
      type: object
      required:
        - threadId
        - text
      properties:
        threadId:
          type: string
          description: |
            Internal identifier of a message thread
        text:
          $ref: "#/components/schemas/ThreadMessageText"
    ThreadNotesDeleteRequest:
      type: object
      required:
        - ids
      properties:
        ids:
          type: array
          description: IDs of notes to be deleted
          minItems: 1
          maxItems: 100
          items:
            type: string
            format: uuid
          example:
            - c21e5807-a143-4bb2-b275-1e9f9695bd9a
            - 60a8dbff-0e1e-4143-8114-9424675f9890
    ThreadNoteModel:
      title: Thread Note
      type: object
      required:
        - id
        - threadId
        - availability
        - creationTime
        - lastModifiedTime
      properties:
        id:
          type: string
          description: Internal identifier of a note
        threadId:
          type: string
          description: Internal identifier of a message thread
        availability:
          $ref: "#/components/schemas/ThreadAvailabilityEnum"
        creationTime:
          type: string
          description: |
            Note creation date/time
          format: date-time
        lastModifiedTime:
          type: string
          description: |
            Message last modification date/time
          format: date-time
        text:
          $ref: "#/components/schemas/ThreadMessageText"
        author:
          allOf:
            - $ref: "#/components/schemas/ThreadUserModel"
            - description: Thread note author
    ThreadNoteUpdateRequest:
      type: object
      required:
        - text
      properties:
        text:
          $ref: "#/components/schemas/ThreadMessageText"
    MthSyncAliveMessage:
      title: Alive Message
      allOf:
        - required:
            - recordType
        - type: object
          properties:
            recordType:
              type: string
              enum:
                - AliveMessage
        - $ref: "#/components/schemas/ThreadMessageModel"
    ThreadEntriesSyncList:
      type: object
      required:
        - records
        - syncInfo
      properties:
        records:
          type: array
          minItems: 0
          items:
            $ref: "#/components/schemas/ThreadEntrySyncItem"
        syncInfo:
          $ref: "#/components/schemas/SyncInfoModel"
    ThreadEntrySyncItem:
      oneOf:
        - $ref: "#/components/schemas/MthSyncAliveMessage"
        - $ref: "#/components/schemas/MthSyncDeletedMessage"
        - $ref: "#/components/schemas/MthSyncAliveNote"
        - $ref: "#/components/schemas/MthSyncDeletedNote"
        - $ref: "#/components/schemas/MthSyncBaseHint"
        - $ref: "#/components/schemas/MthSyncAssignedHint"
      discriminator:
        propertyName: recordType
        mapping:
          AliveMessage: "#/components/schemas/MthSyncAliveMessage"
          DeletedMessage: "#/components/schemas/MthSyncDeletedMessage"
          AliveNote: "#/components/schemas/MthSyncAliveNote"
          DeletedNote: "#/components/schemas/MthSyncDeletedNote"
          ThreadCreatedHint: "#/components/schemas/MthSyncBaseHint"
          ThreadResolvedHint: "#/components/schemas/MthSyncBaseHint"
          ThreadDeletedHint: "#/components/schemas/MthSyncBaseHint"
          ThreadAssignedHint: "#/components/schemas/MthSyncAssignedHint"
    MthSyncAssignedHint:
      title: Thread Assignment System Hint
      allOf:
        - $ref: "#/components/schemas/MthSyncBaseHint"
        - type: object
          properties:
            assignee:
              $ref: "#/components/schemas/ThreadUserModel"
            previousAssignee:
              $ref: "#/components/schemas/ThreadUserModel"
    MthSyncDeletedMessage:
      title: Deleted Message
      type: object
      required:
        - recordType
        - id
        - threadId
        - availability
        - lastModifiedTime
      properties:
        recordType:
          type: string
          enum:
            - DeletedMessage
        id:
          type: string
          description: Internal identifier of a message
        threadId:
          type: string
          description: Internal identifier of a message thread
        availability:
          type: string
          description: Message availability status
          enum:
            - Deleted
        lastModifiedTime:
          type: string
          description: |
            Message last modification date/time
          format: date-time
    MthSyncAliveNote:
      title: Alive Note
      allOf:
        - required:
            - recordType
        - type: object
          properties:
            recordType:
              type: string
              enum:
                - AliveNote
        - $ref: "#/components/schemas/ThreadNoteModel"
    MthSyncDeletedNote:
      title: Deleted Note
      type: object
      required:
        - recordType
        - id
        - threadId
        - availability
        - lastModifiedTime
      properties:
        recordType:
          type: string
          enum:
            - DeletedNote
        id:
          type: string
          description: Internal identifier of a note
        threadId:
          type: string
          description: Internal identifier of a message thread
        availability:
          type: string
          description: Note availability status
          enum:
            - Deleted
        lastModifiedTime:
          type: string
          description: |
            Note last modification date/time
          format: date-time
    MthSyncBaseHint:
      title: Thread System Hint
      type: object
      required:
        - recordType
        - id
        - threadId
        - lastModifiedTime
      properties:
        recordType:
          type: string
          enum:
            - ThreadCreatedHint
            - ThreadResolvedHint
            - ThreadDeletedHint
            - ThreadAssignedHint
        id:
          type: string
          description: Internal identifier of a system message
        threadId:
          type: string
          description: Internal identifier of a message thread
        lastModifiedTime:
          type: string
          description: |
            Last modification date/time (always the same as a creation time since the system hints are immutable)
          format: date-time
        initiator:
          allOf:
            - $ref: "#/components/schemas/ThreadUserModel"
            - description: |
                Initiator of the action.
                Can be missing if the action was initiated by the system.
    CustomFieldModel:
      type: object
      properties:
        id:
          type: string
          description: Custom field identifier
        category:
          type: string
          description: Object category to attach custom fields
          enum:
            - User
        displayName:
          type: string
          description: Custom field display name
    CustomFieldCreateRequest:
      type: object
      properties:
        category:
          type: string
          description: Object category to attach custom fields
          enum:
            - User
        displayName:
          type: string
          description: Custom field display name
    CustomFieldList:
      type: object
      properties:
        records:
          type: array
          items:
            $ref: "#/components/schemas/CustomFieldModel"
    CustomFieldUpdateRequest:
      type: object
      properties:
        displayName:
          type: string
          description: Custom field display name
    CallRecordingGreetingResource:
      type: object
      properties:
        type:
          type: string
          enum:
            - StartRecording
            - StopRecording
            - AutomaticRecording
        mode:
          type: string
          description: |
            Greeting prompt mode for the given `type`. When at least one custom greeting
            exists for this type (in any language), the literal value `Custom` is returned.
            Otherwise the localized display name of the system default prompt is returned
            (for example `Default` in English or `Par défaut` in French), based on the
            request locale.
          example: Default
    AutomaticRecordingResource:
      type: object
      properties:
        enabled:
          type: boolean
          description: Flag for controlling Automatic Call Recording settings
        outboundCallTones:
          type: boolean
          description: Flag for controlling 'Play Call Recording Announcement for Outbound Calls' settings
        outboundCallAnnouncement:
          type: boolean
          description: Flag for controlling 'Play periodic tones for outbound calls' settings
        allowMute:
          type: boolean
          description: Flag for controlling 'Allow mute in auto call recording' settings
        extensionCount:
          type: integer
          format: int32
          description: Total amount of extension that are used in call recordings
        retentionPeriod:
          type: integer
          format: int32
          description: Retention period of a call recording, the default value is 90 days
        maxNumberLimit:
          type: integer
          format: int32
          description: Maximum number of automatic call recordings per account, the default value is 100 000
    OnDemandResource:
      type: object
      properties:
        enabled:
          type: boolean
          description: Flag for controlling OnDemand Call Recording settings
        retentionPeriod:
          type: integer
          format: int32
          description: Retention period of a call recording, the default value is 90 days
    CallRecordingSettingsResource:
      type: object
      properties:
        onDemand:
          $ref: "#/components/schemas/OnDemandResource"
        automatic:
          $ref: "#/components/schemas/AutomaticRecordingResource"
        greetings:
          type: array
          description: Collection of Greeting Info
          items:
            $ref: "#/components/schemas/CallRecordingGreetingResource"
    CallRecordingCustomGreeting:
      type: object
      properties:
        type:
          type: string
          enum:
            - StartRecording
            - StopRecording
            - AutomaticRecording
        custom:
          $ref: "#/components/schemas/CallRecordingCustomGreetingData"
        language:
          $ref: "#/components/schemas/CallRecordingCustomGreetingLanguage"
    CallRecordingCustomGreetingLanguage:
      type: object
      description: Custom greeting language
      properties:
        uri:
          type: string
          format: uri
          description: Link to a language
        id:
          type: string
          description: Internal identifier of a language
        name:
          type: string
          description: Language name
        localeCode:
          type: string
          description: Language locale code
    CallRecordingCustomGreetingData:
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Link to a custom company greeting
        id:
          type: string
          description: Internal identifier of a custom company greeting
      description: Custom greeting data
    CallRecordingCustomGreetings:
      type: object
      description: Returns data on call recording custom greetings.
      properties:
        records:
          type: array
          items:
            $ref: "#/components/schemas/CallRecordingCustomGreeting"
    CallRecordingExtensionResource:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of an extension
        uri:
          type: string
          format: uri
        extensionNumber:
          type: string
        type:
          type: string
        callDirection:
          type: string
          description: Direction of a call
          enum:
            - Outbound
            - Inbound
            - All
        alternateOutboundCallRecordingMode:
          type: boolean
          description: |
            Alternate call recording setting. Status of the smart ACR for outbound call recordings.
            Supported for "Outbound" and "All" call directions.
    BulkAccountCallRecordingsResource:
      type: object
      properties:
        addedExtensions:
          type: array
          items:
            $ref: "#/components/schemas/CallRecordingExtensionResource"
        updatedExtensions:
          type: array
          items:
            $ref: "#/components/schemas/CallRecordingExtensionResource"
        removedExtensions:
          type: array
          items:
            $ref: "#/components/schemas/CallRecordingExtensionResource"
    CallRecordingExtensions:
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Link to call recording extension list resource
        records:
          type: array
          items:
            $ref: "#/components/schemas/CallRecordingExtensionResource"
        navigation:
          $ref: "#/components/schemas/PageNavigationModel"
        paging:
          $ref: "#/components/schemas/EnumeratedPagingModel"
    PageNavigationUri:
      type: object
      additionalProperties: false
      properties:
        uri:
          type: string
          description: Canonical URI to retrieve the particular page of the result set
          format: uri
    PageNavigationModel:
      type: object
      description: Links to other pages of the current result set
      additionalProperties: false
      properties:
        firstPage:
          $ref: "#/components/schemas/PageNavigationUri"
        nextPage:
          $ref: "#/components/schemas/PageNavigationUri"
        previousPage:
          $ref: "#/components/schemas/PageNavigationUri"
        lastPage:
          $ref: "#/components/schemas/PageNavigationUri"
    MakeCallOutRequest:
      required:
        - from
        - to
      type: object
      properties:
        from:
          $ref: "#/components/schemas/MakeCallOutCallerInfoRequestFrom"
        to:
          $ref: "#/components/schemas/MakeCallOutCallerInfoRequestTo"
        countryId:
          $ref: "#/components/schemas/CountryId"
    CallParty:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a party
        accountId:
          type: string
          description: Internal identifier of an account
        extensionId:
          type: string
          description: Internal identifier of an extension
        attributes:
          $ref: "#/components/schemas/Attributes"
        status:
          $ref: "#/components/schemas/CallStatusInfo"
        muted:
          type: boolean
          description: |
            Specifies if a call participant is muted or not. **Note:**
            If a call is also controlled via Hard phone or RingCentral App (not only
            through the API by calling call control methods) then it cannot be fully
            muted/unmuted via API only, in this case the action should be duplicated
            via Hard phone/RC App interfaces
        standAlone:
          type: boolean
          description: |
            If `true` then the party is not connected to a session voice
            conference, `false` means the party is connected to other parties in a
            session
        park:
          $ref: "#/components/schemas/ParkInfo"
        from:
          $ref: "#/components/schemas/PartyInfo"
        to:
          $ref: "#/components/schemas/PartyInfo"
        owner:
          $ref: "#/components/schemas/OwnerInfo"
        direction:
          type: string
          description: Direction of a call
          enum:
            - Inbound
            - Outbound
        conferenceRole:
          type: string
          description: A party's role in the conference scenarios. For calls of 'Conference' type only
          enum:
            - Host
            - Participant
        ringOutRole:
          type: string
          description: A party's role in 'Ring Me'/'RingOut' scenarios. For calls of 'Ringout' type only
          enum:
            - Initiator
            - Target
        ringMeRole:
          type: string
          description: A party's role in 'Ring Me'/'RingOut' scenarios. For calls of 'Ringme' type only
          enum:
            - Initiator
            - Target
        recordings:
          type: array
          description: Active recordings list
          items:
            $ref: "#/components/schemas/RecordingInfo"
        metadata:
          type: array
          description: Call metadata.
          items:
            $ref: "#/components/schemas/MetaData"
      description: Information on a party of a call session
    MakeCallOutCallerInfoRequestFrom:
      type: object
      properties:
        deviceId:
          type: string
          description: Internal identifier of a device
          example: "59474004"
      description: Instance id of the caller. It corresponds to the 1st leg of the CallOut call.
    MetaData:
      type: object
      description: Call metadata.
      required:
        - values
      properties:
        values:
          type: array
          description: Identifier of metadata category
          items:
            type: object
            required:
              - id
              - value
            properties:
              id:
                type: string
                description: Unique identifier
              value:
                type: string
                description: Value
    PartyInfo:
      type: object
      properties:
        phoneNumber:
          type: string
          description: Phone number of a party
        name:
          type: string
          description: Displayed name of a party
        deviceId:
          type: string
          description: Internal identifier of a device
        extensionId:
          type: string
          description: Internal identifier of an extension
    CallSessionObject:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a call session
        origin:
          $ref: "#/components/schemas/OriginInfo"
        voiceCallToken:
          type: string
          description: For calls of 'Conference' type only
        parties:
          type: array
          items:
            $ref: "#/components/schemas/CallParty"
        creationTime:
          type: string
          format: date-time
          description: Date and time of the latest session update represented in Unix time format
      description: Call session information
    MakeCallOutCallerInfoRequestTo:
      type: object
      properties:
        phoneNumber:
          type: string
          description: Phone number in E.164 format, short codes (*67, *86), emergency (911, 112) or special (988) numbers
          example: "+16502223366"
        extensionNumber:
          type: string
          description: Extension number
          example: "103"
      description: Phone number of the called party. This number corresponds to the 2nd leg of a CallOut call
    CallSession:
      type: object
      properties:
        session:
          $ref: "#/components/schemas/CallSessionObject"
    Attributes:
      type: object
      properties:
        queueCall:
          type: boolean
          description: Indicates that this party is agent of new call queue
        emergencyCallback:
          type: boolean
          description: Indicates that it was emergency ringback to party
    OwnerInfo:
      type: object
      properties:
        accountId:
          type: string
          description: Internal identifier of an account that monitors a call
        extensionId:
          type: string
          description: Internal identifier of an extension that monitors a call
        brandId:
          type: string
          description: Internal identifier of an account brandId that monitors a call
      description: Deprecated. Information on a call owner
    RecordingInfo:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a recording resource
        active:
          type: boolean
          description: True if the recording is active. False if the recording is paused.
    CountryId:
      type: integer
      format: int64
      description: Optional. Dialing plan country data. If not specified, then extension home country is applied by default.
    MobilePickupData:
      type: object
      properties:
        ccMailboxes:
          type: array
          description: List of extension IDs, configured to pick up a call from Desktop/Mobile applications
          items:
            type: string
        to:
          type: string
          description: SIP proxy registration name
        sid:
          type: string
          description: User data
        srvlvl:
          type: string
          description: User data
        srvLvlExt:
          type: string
          description: User data
    CallStatusInfo:
      type: object
      properties:
        code:
          type: string
          description: Status code of a call
          enum:
            - Setup
            - Proceeding
            - Answered
            - Disconnected
            - Gone
            - Parked
            - Hold
            - VoiceMail
            - FaxReceive
            - Tds
            - VoiceMailScreening
        reason:
          type: string
          description: Reason for a call status, might be specified for some codes
          enum:
            - Pickup
            - Supervising
            - TakeOver
            - Timeout
            - BlindTransfer
            - RccTransfer
            - AttendedTransfer
            - CallerInputRedirect
            - CallFlip
            - ParkLocation
            - DtmfTransfer
            - AgentAnswered
            - AgentDropped
            - Rejected
            - Cancelled
            - InternalError
            - NoAnswer
            - TargetBusy
            - InvalidNumber
            - InternationalDisabled
            - DestinationBlocked
            - NotEnoughFunds
            - NoSuchUser
            - CallPark
            - CallRedirected
            - CallReplied
            - CallSwitch
            - CallFinished
            - CallDropped
            - Voicemail
        description:
          type: string
          description: Optional message
        parkData:
          type: string
          description: Call park data. Returned for calls in 'Parked' state
        peerId:
          $ref: "#/components/schemas/PeerInfo"
        mobilePickupData:
          $ref: "#/components/schemas/MobilePickupData"
        rcc:
          type: boolean
          description: Specifies if it's a conference call
      description: Status data of a call session
    PeerInfo:
      type: object
      properties:
        sessionId:
          type: string
        telephonySessionId:
          type: string
        partyId:
          type: string
      description: Peer (linked) session/party details. Valid in 'Gone' state of a call
    OriginInfo:
      type: object
      properties:
        type:
          type: string
          description: Session origin type
          enum:
            - Call
            - RingOut
            - RingMe
            - Conference
            - GreetingsRecording
            - VerificationCall
            - Zoom
            - CallOut
      description: Session origin details
    ParkInfo:
      type: object
      properties:
        id:
          type: string
          description: Call park identifier
      description: Call park information
    AccountTelephonySessionsEvent:
      type: object
      properties:
        uuid:
          type: string
          description: Universally unique identifier of a notification
        event:
          type: string
          description: Event filter URI
        timestamp:
          type: string
          description: Date/time of sending a notification in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format including timezone, for example *2016-03-10T18:07:52.534Z*
        subscriptionId:
          type: string
          description: Internal identifier of a subscription
        ownerId:
          type: string
          description: Internal identifier of a subscription owner extension
        body:
          $ref: "#/components/schemas/TelephonySessionsEventBody"
    TelephonySessionsEventBody:
      type: object
      properties:
        sequence:
          type: integer
          format: int64
          description: Order number of a notification to state the chronology
        sessionId:
          type: string
          description: Legacy identifier of a call session
        telephonySessionId:
          type: string
          description: Call session identifier, required for Telephony API
        serverId:
          type: string
          description: Identifier of a server
        eventTime:
          type: string
          format: date-time
          description: The call start date/time in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format including timezone, for example *2016-03-10T18:07:52.534Z*
        origin:
          $ref: "#/components/schemas/OriginInfo"
        parties:
          type: array
          description: Call participants details
          items:
            $ref: "#/components/schemas/TelephonySessionsEventPartyInfo"
      description: Notification payload body
    UiCallInfo:
      type: object
      description: Call information on user interface
      properties:
        primary:
          $ref: "#/components/schemas/UiCallInfoRecord"
        additional:
          $ref: "#/components/schemas/UiCallInfoRecord"
    CallPartyShortInfo:
      type: object
      properties:
        phoneNumber:
          type: string
          description: Call party phone number in [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I)(with '+' sign) format
        name:
          type: string
          description: Call party name
        extensionId:
          type: string
          description: Internal identifier of a call party extensionId
    SipData:
      type: object
      description: |
        SIP (Session Initiation Protocol) information.
        Returned if query parameter sipData is set to 'True'
      properties:
        toTag:
          type: string
          description: Recipient's data
        fromTag:
          type: string
          description: Sender's data
        callId:
          type: string
          description: SIP call identifier
    ExtensionTelephonySessionsEvent:
      type: object
      properties:
        uuid:
          type: string
          description: Universally unique identifier of a notification
        event:
          type: string
          description: Event filter URI
        timestamp:
          type: string
          description: |
            Date/time of sending a notification in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)
            format including timezone, for example *2016-03-10T18:07:52.534Z*
        subscriptionId:
          type: string
          description: Internal identifier of a subscription
        ownerId:
          type: string
          description: Internal identifier of a subscription owner extension
        body:
          $ref: "#/components/schemas/TelephonySessionsEventBody"
    UiCallInfoRecord:
      type: object
      properties:
        type:
          type: string
          description: UI call info type
          enum:
            - QueueName
            - CallerIdName
        value:
          type: string
          description: UI call info value
          example: John Doe
    TelephonySessionsEventPartyInfo:
      type: object
      properties:
        accountId:
          type: string
          description: Internal identifier of an account
        extensionId:
          type: string
          description: Internal identifier of an extension
        id:
          type: string
          description: Internal identifier of a party
        direction:
          type: string
          description: Call direction
          enum:
            - Inbound
            - Outbound
        to:
          $ref: "#/components/schemas/CallPartyShortInfo"
        from:
          $ref: "#/components/schemas/CallPartyShortInfo"
        recordings:
          type: array
          items:
            $ref: "#/components/schemas/RecordingInfo"
        status:
          $ref: "#/components/schemas/CallStatusInfo"
        park:
          $ref: "#/components/schemas/ParkInfo"
        queueCall:
          type: boolean
          description: Specifies if it's a queue call
        missedCall:
          type: boolean
          description: Specifies if a call was missed by the party
        standAlone:
          type: boolean
          description: |
            If `true` then the party is not connected to a session voice
            conference, `false` means the party is connected to other parties in a
            session
        muted:
          type: boolean
          description: |
            Specifies if a call participant is muted or not. **Note:**
            If a call is also controlled via Hard phone or RingCentral App (not only
            through the API by calling call control methods) then it cannot be fully
            muted/unmuted via API only, in this case the action should be duplicated
            via Hard phone/RC App interfaces
        conferenceRole:
          type: string
          description: Defines party role in Server Side Conference
          enum:
            - Host
            - Participant
        sipData:
          $ref: "#/components/schemas/SipData"
        uiCallInfo:
          $ref: "#/components/schemas/UiCallInfo"
    AddPartyRequest:
      required:
        - partyId
        - sessionId
      type: object
      properties:
        sessionId:
          type: string
          description: Internal identifier of a call session
        partyId:
          type: string
          description: Internal identifier of a party that should be added to the call session
    PartyUpdateRequest:
      type: object
      properties:
        party:
          $ref: "#/components/schemas/PartyUpdateInfo"
    PartyUpdateInfo:
      type: object
      properties:
        muted:
          type: boolean
          description: Specifies if a call participant is muted or not. **Note:** If a call is also controlled via Hard phone or RingCentral App (not only through the API by calling call control methods) then it cannot be fully muted/unmuted via API only, in this case the action should be duplicated via Hard phone/RC App interfaces
        standAlone:
          type: boolean
          description: If `true` then the party is not connected to a session voice conference, `false` means the party is connected to other parties in a session
      description: Party update data
    DeletePartyRequest:
      type: object
      properties:
        keepConferenceAlive:
          type: boolean
          description: Keep conference session alive after deleting the party
          default: false
          example: false
    CallPartyFlip:
      required:
        - callFlipId
      type: object
      properties:
        callFlipId:
          type: string
          description: Call flip id
    ReplyWithPattern:
      type: object
      properties:
        pattern:
          type: string
          description: Predefined reply pattern name.
          example: OnMyWay
          enum:
            - WillCallYouBack
            - CallMeBack
            - OnMyWay
            - OnTheOtherLine
            - WillCallYouBackLater
            - CallMeBackLater
            - InAMeeting
            - OnTheOtherLineNoCall
        time:
          type: integer
          format: int32
          description: Number of time units. Applicable only to WillCallYouBack, CallMeBack patterns.
          example: 5
        timeUnit:
          type: string
          description: Time unit name.
          example: Minute
          enum:
            - Minute
            - Hour
            - Day
    ReplyParty:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a party
        status:
          $ref: "#/components/schemas/CallStatusInfo"
        muted:
          type: boolean
          description: Specifies if a call participant is muted or not. **Note:** If a call is also controlled via Hard phone or RingCentral App (not only through the API by calling call control methods) then it cannot be fully muted/unmuted via API only, in this case the action should be duplicated via Hard phone/RC App interfaces
        standAlone:
          type: boolean
          description: If `true` then the party is not connected to a session voice conference, `false` means the party is connected to other parties in a session
        park:
          $ref: "#/components/schemas/ParkInfo"
        from:
          $ref: "#/components/schemas/PartyInfo"
        to:
          $ref: "#/components/schemas/PartyInfo"
        owner:
          $ref: "#/components/schemas/OwnerInfo"
        direction:
          type: string
          description: Direction of a call
          enum:
            - Inbound
            - Outbound
    CallPartyReply:
      oneOf:
        - type: object
          required:
            - replyWithText
          properties:
            replyWithText:
              type: string
              description: Text to reply
        - type: object
          required:
            - replyWithPattern
          properties:
            replyWithPattern:
              $ref: "#/components/schemas/ReplyWithPattern"
    BridgeTargetRequest:
      required:
        - partyId
        - telephonySessionId
      type: object
      properties:
        telephonySessionId:
          type: string
          description: Internal identifier of a call session to be connected to (bridged)
        partyId:
          type: string
          description: Internal identifier of a call party to be connected to (bridged)
    IgnoreRequestBody:
      required:
        - deviceId
      type: object
      properties:
        deviceId:
          type: string
          description: Internal device identifier
          example: "400020454008"
    PartySuperviseRequest:
      required:
        - agentExtensionId
        - mode
        - supervisorDeviceId
      type: object
      properties:
        mode:
          type: string
          description: Supervising mode
          example: Listen
          enum:
            - Listen
        supervisorDeviceId:
          type: string
          description: Internal identifier of a supervisor's device
          example: "191888004"
        agentExtensionId:
          type: string
          description: Mailbox ID of a user that will be monitored
          example: "400378008008"
        autoAnswer:
          type: boolean
          description: Specifies if auto-answer SIP header should be sent. If auto-answer is set to `true`, the call is automatically answered by the supervising party, if set to `false` - then the supervising party has to accept or decline the monitored call
          default: true
        mediaSDP:
          type: string
          description: Specifies session description protocol (SDP) setting. The possible values are 'sendOnly' (only sending) meaning one-way audio streaming; and 'sendRecv' (sending/receiving) meaning two-way audio streaming
          enum:
            - sendOnly
            - sendRecv
    PartySuperviseResponse:
      type: object
      properties:
        from:
          $ref: "#/components/schemas/PartyInfo"
        to:
          $ref: "#/components/schemas/PartyInfo"
        direction:
          type: string
          description: Direction of a call
          enum:
            - Outbound
            - Inbound
        id:
          type: string
          description: Internal identifier of a party that monitors a call
        accountId:
          type: string
          description: Internal identifier of an account that monitors a call
        extensionId:
          type: string
          description: Internal identifier of an extension that monitors a call
        muted:
          type: boolean
          description: Specifies if a call party is muted
        owner:
          $ref: "#/components/schemas/OwnerInfo"
        standAlone:
          type: boolean
          description: |
            If `true` then the party is not connected to a session voice
            conference, `false` means the party is connected to other parties in a
            session
        status:
          $ref: "#/components/schemas/CallStatusInfo"
    CallRecording:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a call recording
        active:
          type: boolean
          description: Call recording status
        mode:
          type: string
          description: Recording mode
          enum:
            - Automatic
            - OnDemand
        view:
          type: string
          description: Recording view
          enum:
            - Party
            - Session
    CallRecordingUpdate:
      required:
        - active
      type: object
      properties:
        active:
          type: boolean
          description: Recording status
    AnswerTarget:
      required:
        - deviceId
      type: object
      properties:
        deviceId:
          type: string
          description: Device ID that is used to answer to incoming call.
          example: "400018633008"
    TransferTarget:
      allOf:
        - type: object
          description: |
            Identifier of a call party the call will be transferred to. Only **one of** these parameters: `phoneNumber`, `voicemail`, `extensionNumber`, `parkOrbit` or `extensionId` must be specified, otherwise an error is returned.
          properties: {}
        - oneOf:
            - type: object
              required:
                - phoneNumber
              properties:
                phoneNumber:
                  type: string
                  description: Phone number
            - type: object
              required:
                - voicemail
              properties:
                voicemail:
                  type: string
                  description: Voicemail owner extension identifier
            - type: object
              required:
                - extensionNumber
              properties:
                extensionNumber:
                  type: string
                  description: Extension short number
            - type: object
              required:
                - parkOrbit
              properties:
                parkOrbit:
                  type: string
                  description: Park orbit identifier
            - type: object
              required:
                - extensionId
              properties:
                extensionId:
                  type: string
                  description: Extension mailbox identifier
    HoldCallPartyRequest:
      type: object
      properties:
        proto:
          type: string
          description: Protocol for hold mode initiation
          default: Auto
          enum:
            - Auto
            - RC
            - BroadWorks
            - DisconnectHolder
            - BroadWorksOrDisconnectHolder
    PickupTarget:
      required:
        - deviceId
      type: object
      properties:
        deviceId:
          type: string
          description: Device identifier that is used to pick up the parked call.
          example: "400018633008"
    ForwardTarget:
      allOf:
        - type: object
          description: |
            Identifier of a call party the call will be forwarded to. Only **one of** these parameters: `phoneNumber`, `voicemail`, `extensionNumber` or `extensionId` must be specified, otherwise an error is returned.
          properties: {}
        - oneOf:
            - type: object
              required:
                - phoneNumber
              properties:
                phoneNumber:
                  type: string
                  description: Phone number
            - type: object
              required:
                - voicemail
              properties:
                voicemail:
                  type: string
                  description: Voicemail owner extension identifier
            - type: object
              required:
                - extensionNumber
              properties:
                extensionNumber:
                  type: string
                  description: Extension short number
            - type: object
              required:
                - extensionId
              properties:
                extensionId:
                  type: string
                  description: Extension mailbox identifier
    ForwardCallPartyResponse:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a party
        status:
          $ref: "#/components/schemas/CallStatusInfo"
        muted:
          type: boolean
          description: |
            Specifies if a call participant is muted or not. **Note:**
            If a call is also controlled via Hard phone or RingCentral App (not only
            through the API by calling call control methods) then it cannot be fully
            muted/unmuted via API only, in this case the action should be duplicated
            via Hard phone/RC App interfaces
        standAlone:
          type: boolean
          description: |
            If `true` then the party is not connected to a session voice
            conference, `false` means the party is connected to other parties in a
            session
        park:
          $ref: "#/components/schemas/ParkInfo"
        from:
          $ref: "#/components/schemas/PartyInfo"
        to:
          $ref: "#/components/schemas/PartyInfo"
        owner:
          $ref: "#/components/schemas/OwnerInfo"
        direction:
          type: string
          description: Direction of a call
          enum:
            - Inbound
            - Outbound
        conferenceRole:
          type: string
          description: A party's role in the conference scenarios. For calls of 'Conference' type only
          enum:
            - Host
            - Participant
        ringOutRole:
          type: string
          description: A party's role in 'Ring Me'/'RingOut' scenarios. For calls of 'Ringout' type only
          enum:
            - Initiator
            - Target
        ringMeRole:
          type: string
          description: A party's role in 'Ring Me'/'RingOut' scenarios. For calls of 'Ringme' type only
          enum:
            - Initiator
            - Target
        recordings:
          type: array
          description: Active recordings list
          items:
            $ref: "#/components/schemas/RecordingInfo"
      description: Information on a party of a call session
    SuperviseCallSessionRequest:
      allOf:
        - type: object
          required:
            - mode
            - supervisorDeviceId
          properties:
            mode:
              type: string
              description: Supervising mode
              example: Listen
              enum:
                - Listen
            supervisorDeviceId:
              type: string
              description: Internal identifier of a supervisor's device which will be used for call session monitoring
              example: "191888004"
            autoAnswer:
              type: boolean
              description: |
                Specifies if auto-answer SIP header should be sent. If auto-answer is set to `true`, the call is automatically answered by the supervising party, if set to `false` - then the supervising party has to accept or decline the monitored call
              default: true
            mediaSDP:
              type: string
              description: Specifies session description protocol setting
              enum:
                - sendOnly
                - sendRecv
        - oneOf:
            - type: object
              required:
                - agentExtensionNumber
              properties:
                agentExtensionNumber:
                  type: string
                  description: Extension number of the user that will be monitored
                  example: "105"
            - type: object
              required:
                - agentExtensionId
              properties:
                agentExtensionId:
                  type: string
                  description: Extension identifier of the user that will be monitored
                  example: "400378008008"
    SuperviseCallSessionResponse:
      type: object
      properties:
        from:
          $ref: "#/components/schemas/PartyInfo"
        to:
          $ref: "#/components/schemas/PartyInfo"
        direction:
          type: string
          description: Direction of a call
          enum:
            - Outbound
            - Inbound
        id:
          type: string
          description: Internal identifier of a party that monitors a call
        accountId:
          type: string
          description: Internal identifier of an account that monitors a call
        extensionId:
          type: string
          description: Internal identifier of an extension that monitors a call
        muted:
          type: boolean
          description: Specifies if a call participant is muted or not. **Note:** If a call is also controlled via Hard phone or RingCentral App (not only through the API by calling call control methods) then it cannot be fully muted/unmuted via API only, in this case the action should be duplicated via Hard phone/RC App interfaces
        owner:
          $ref: "#/components/schemas/OwnerInfo"
        standAlone:
          type: boolean
          description: If `true` then the party is not connected to a session voice conference, `false` means the party is connected to other parties in a session
        status:
          $ref: "#/components/schemas/CallStatusInfo"
    MessageTemplateInfo:
      type: object
      description: Text message template information
      required:
        - text
      properties:
        text:
          type: string
          description: |
            Text of a message template. Maximum length is 1000 symbols (2-byte UTF-16 encoded)
    MessageTemplateRequest:
      type: object
      required:
        - displayName
        - body
      properties:
        id:
          type: string
          description: Internal identifier of a template. Ignored on input
        displayName:
          type: string
          description: Name of a template
        body:
          $ref: "#/components/schemas/MessageTemplateInfo"
        scope:
          $ref: "#/components/schemas/VisibilityType"
        site:
          $ref: "#/components/schemas/Site"
    Site:
      type: object
      description: |
        Specifies a site that message template is associated with. Supported only if the Sites feature is enabled.
        The default is `main-site` value.
      properties:
        id:
          type: string
          description: Internal identifier of a site
        name:
          type: string
          description: Custom name of a site
    VisibilityType:
      type: string
      description: Specifies if a template is available on a user (Personal) or a company (Company) level
      enum:
        - Company
        - Personal
    MessageTemplatesListResponse:
      type: object
      properties:
        records:
          type: array
          description: List of text message templates
          items:
            $ref: "#/components/schemas/MessageTemplateResponse"
    MessageTemplateResponse:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a template
        displayName:
          type: string
          description: Name of a template
        body:
          $ref: "#/components/schemas/MessageTemplateInfo"
        scope:
          $ref: "#/components/schemas/VisibilityType"
        site:
          $ref: "#/components/schemas/Site"
    BillingPackageInfo:
      type: object
      properties:
        version:
          type: string
          description: Billing package version
        id:
          type: string
          description: Billing package identifier
    AccountServiceInfoRequest:
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Canonical URI of the account Service Info resource
        servicePlanName:
          type: string
          description: Account Service Plan name
        brand:
          $ref: "#/components/schemas/BrandInfo"
        contractedCountry:
          $ref: "#/components/schemas/CountryInfoShortModel"
        servicePlan:
          $ref: "#/components/schemas/ServicePlanInfo"
        targetServicePlan:
          $ref: "#/components/schemas/ServicePlanInfo"
        billingPlan:
          $ref: "#/components/schemas/BillingPlanInfo"
        serviceFeatures:
          type: array
          description: Service features information, see Service Feature List
          items:
            $ref: "#/components/schemas/ServiceFeatureInfo"
        limits:
          $ref: "#/components/schemas/AccountLimitsInfo"
        package:
          $ref: "#/components/schemas/BillingPackageInfo"
      description: |
        Account service information, including brand, service plan and billing plan
    AccountServiceInfo:
      allOf:
        - $ref: "#/components/schemas/AccountServiceInfoRequest"
        - type: object
          properties:
            uBrand:
              $ref: "#/components/schemas/UBrandInfo"
          description: |
            Account service information, including brand, service plan and billing plan
    ServiceFeatureInfo:
      type: object
      properties:
        featureName:
          type: string
          description: Feature name
          enum:
            - AccountFederation
            - Archiver
            - AutomaticCallRecordingMute
            - AutomaticInboundCallRecording
            - AutomaticOutboundCallRecording
            - BlockedMessageForwarding
            - Calendar
            - CallerIdControl
            - CallForwarding
            - CallPark
            - CallParkLocations
            - CallSupervision
            - CallSwitch
            - CallQualitySurvey
            - Conferencing
            - ConferencingNumber
            - ConfigureDelegates
            - DeveloperPortal
            - DND
            - DynamicConference
            - EmergencyAddressAutoUpdate
            - EmergencyCalling
            - EncryptionAtRest
            - ExternalDirectoryIntegration
            - Fax
            - FaxReceiving
            - FreeSoftPhoneLines
            - HDVoice
            - HipaaCompliance
            - Intercom
            - InternationalCalling
            - InternationalSMS
            - LinkedSoftphoneLines
            - MMS
            - MobileVoipEmergencyCalling
            - OnDemandCallRecording
            - Pager
            - PagerReceiving
            - Paging
            - PasswordAuth
            - PromoMessage
            - Reports
            - Presence
            - RCTeams
            - RingOut
            - SalesForce
            - SharedLines
            - SingleExtensionUI
            - SiteCodes
            - SMS
            - SMSReceiving
            - SoftPhoneUpdate
            - TelephonySessions
            - UserManagement
            - VideoConferencing
            - VoipCalling
            - VoipCallingOnMobile
            - Voicemail
            - VoicemailToText
            - WebPhone
        enabled:
          type: boolean
          description: |
            Feature status, shows feature availability for the extension
    BaseCallLogFromParty:
      type: object
      properties:
        dialerPhoneNumber:
          type: string
          description: Dialer phone number without any format modifications. Returned for inbound calls
      description: Sender/initiator caller information
    CallLogToParty:
      allOf:
        - $ref: "#/components/schemas/CallLogParty"
        - $ref: "#/components/schemas/BaseCallLogToParty"
    ExtensionInfoCallLog:
      type: object
      required:
        - id
        - uri
      properties:
        id:
          type: integer
          format: int64
          description: Internal identifier of an extension
        uri:
          type: string
          format: uri
          description: Canonical URI of an extension
      description: Information about extension on whose behalf a call is initiated. For Secretary call log the Boss extension info is returned
    CallTypeEnum:
      type: string
      description: The type of call
      enum:
        - Voice
        - Fax
    CallInternalTypeEnum:
      type: string
      description: The internal type of the call
      enum:
        - Local
        - LongDistance
        - International
        - Sip
        - RingMe
        - RingOut
        - Usual
        - TollFreeNumber
        - VerificationNumber
        - Vma
        - LocalNumber
        - ImsOutgoing
        - ImsIncoming
        - Unknown
    CallLogFromParty:
      allOf:
        - $ref: "#/components/schemas/CallLogParty"
        - $ref: "#/components/schemas/BaseCallLogFromParty"
    DelegationTypeEnum:
      type: string
      description: Call delegation type
      enum:
        - Coworker
        - QueueForwarding
        - Unknown
    CallDirectionEnum:
      description: The direction of a call
      type: string
      enum:
        - Inbound
        - Outbound
    CallLogRecord:
      allOf:
        - $ref: "#/components/schemas/BaseCallLogRecord"
        - description: Call log record
          type: object
          required:
            - id
            - uri
            - sessionId
          properties:
            id:
              type: string
              description: Internal identifier of a call log record
            uri:
              type: string
              format: uri
              description: Canonical URI of a call log record
            sessionId:
              type: string
              description: Internal identifier of a call session
            deleted:
              type: boolean
              description: Indicates whether the record is deleted. Returned for deleted records, for ISync requests
            legs:
              type: array
              description: For 'Detailed' view only. Leg description
              items:
                $ref: "#/components/schemas/CallLogRecordLegInfo"
            lastModifiedTime:
              type: string
              description: |
                For 'Detailed' view only. The datetime when the call log record
                was modified in (ISO 8601)[https://en.wikipedia.org/wiki/ISO_8601] format
                including timezone, for example *2016-03-10T18:07:52.534Z*
              format: date-time
    CallLogResponse:
      required:
        - navigation
        - paging
        - records
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Link to the list of company/user call log records
        records:
          type: array
          description: List of call log records
          items:
            $ref: "#/components/schemas/CallLogRecord"
        navigation:
          $ref: "#/components/schemas/PageNavigationModel"
        paging:
          $ref: "#/components/schemas/EnumeratedPagingModel"
    CallLogRecordMessage:
      type: object
      required:
        - id
        - type
        - uri
      properties:
        id:
          type: string
          description: Internal identifier of a message
        type:
          type: string
          description: Type of message
        uri:
          type: string
          format: uri
          description: Link to a message resource
      description: Linked message (Fax/Voicemail)
    BaseCallLogRecord:
      description: Base schema for CallLogRecord and CallLogRecordLegInfo
      type: object
      required:
        - type
        - direction
        - action
        - startTime
      properties:
        extension:
          $ref: "#/components/schemas/ExtensionInfoCallLog"
        telephonySessionId:
          type: string
          description: Telephony identifier of a call session
        sipUuidInfo:
          type: string
          description: Call session identifier, required for Telephony REST API
        transferTarget:
          type: object
          properties:
            telephonySessionId:
              type: string
              description: Internal Identifier of Telephony Session, which belongs to transfer target in case of Warm Transfer
        transferee:
          type: object
          properties:
            telephonySessionId:
              type: string
              description: Internal Identifier of Telephony Session, which belongs to transferee in case of Warm Transfer
        partyId:
          type: string
          description: Internal Identifier of Participant
        metadataCategories:
          type: array
          minItems: 1
          items:
            type: string
          description: List of metadata categories applied to the call
        transport:
          $ref: "#/components/schemas/CallTransportEnum"
        from:
          $ref: "#/components/schemas/CallLogFromParty"
        to:
          $ref: "#/components/schemas/CallLogToParty"
        type:
          $ref: "#/components/schemas/CallTypeEnum"
        direction:
          $ref: "#/components/schemas/CallDirectionEnum"
        message:
          $ref: "#/components/schemas/CallLogRecordMessage"
        delegate:
          $ref: "#/components/schemas/CallLogDelegateInfo"
        delegationType:
          $ref: "#/components/schemas/DelegationTypeEnum"
        action:
          $ref: "#/components/schemas/CallActionEnum"
        result:
          $ref: "#/components/schemas/CallResultEnum"
        reason:
          $ref: "#/components/schemas/CallResultReasonEnum"
        reasonDescription:
          type: string
          description: The detailed reason description of the call result
        startTime:
          type: string
          description: The call start datetime in ISO 8601 format including timezone, for example 2016-03-10T18:07:52.534Z
          format: date-time
        duration:
          type: integer
          format: int64
          description: Call duration in seconds
        durationMs:
          type: integer
          format: int64
          description: Call duration in milliseconds
        recording:
          $ref: "#/components/schemas/CallLogRecordingInfo"
        shortRecording:
          type: boolean
          description: Indicates that the recording is too short and therefore wouldn't be returned. The flag is not returned if the value is false
        billing:
          $ref: "#/components/schemas/BillingInfo"
        internalType:
          $ref: "#/components/schemas/CallInternalTypeEnum"
        finished:
          type: boolean
          description: Indicates whether the call has reached a finished state
    CallTransportEnum:
      type: string
      description: |
        The type of call transport. 'PSTN' indicates that a call leg was initiated
        from the PSTN network provider; 'VoIP' - from an RC phone.
      enum:
        - PSTN
        - VoIP
    CallLogRecordLegInfo:
      allOf:
        - $ref: "#/components/schemas/BaseCallLogRecord"
        - description: Call leg record
          type: object
          required:
            - legType
          properties:
            legType:
              $ref: "#/components/schemas/CallLegTypeEnum"
            master:
              type: boolean
              description: Returned for 'Detailed' call log. Specifies if the leg is master-leg
    CallLogParty:
      allOf:
        - $ref: "#/components/schemas/BaseCallLogParty"
        - type: object
          properties:
            location:
              type: string
              description: Contains party location (city, state) if one can be determined from phoneNumber. This property is filled only when phoneNumber is not empty and server can calculate location information from it (for example, this information is unavailable for US toll-free numbers)
            device:
              $ref: "#/components/schemas/CallLogRecordDeviceInfo"
          description: Base schema for CallLogFromParty and CallLogToParty
    CallLogRecordingInfo:
      type: object
      required:
        - id
        - uri
        - type
        - contentUri
      properties:
        id:
          type: string
          description: Internal identifier of the call recording
        uri:
          type: string
          format: uri
          description: Link to the call recording metadata resource
        type:
          type: string
          description: Indicates recording mode used
          enum:
            - Automatic
            - OnDemand
        contentUri:
          type: string
          format: uri
          description: |
            Link to a call recording binary content. Has to be retrieved with proper authorization
            (access token must be passed via `Authorization` header or query parameter)
      description: Call recording data. Returned if the call was recorded
    CallLogRecordDeviceInfo:
      type: object
      required:
        - id
        - uri
      properties:
        id:
          type: string
          description: Internal identifier of a device
        uri:
          type: string
          format: uri
          description: Canonical URI of a device resource
    CallResultEnum:
      type: string
      description: The result of the call operation
      enum:
        - "911"
        - "933"
        - Abandoned
        - Accepted
        - Answered Not Accepted
        - Blocked
        - Busy
        - Call Failed
        - Call Failure
        - Call connected
        - Carrier is not active
        - Declined
        - EDGE trunk misconfigured
        - Fax Not Sent
        - Fax Partially Sent
        - Fax Poor Line
        - Fax Receipt Error
        - Fax on Demand
        - Hang Up
        - IP Phone Offline
        - In Progress
        - Internal Error
        - International Disabled
        - International Restricted
        - Missed
        - No Answer
        - No Calling Credit
        - Not Allowed
        - Partial Receive
        - Phone Login
        - Receive Error
        - Received
        - Rejected
        - Reply
        - Restricted Number
        - Send Error
        - Sent
        - Sent to Voicemail
        - Stopped
        - Suspended account
        - Unknown
        - Voicemail
        - Wrong Number
        - Answered Elsewhere
        - Callback requested
    BillingInfo:
      type: object
      properties:
        costIncluded:
          type: number
          format: double
          description: |
            Cost per minute, paid and already included in your RingCentral service plan.
            For example International Calls
        costPurchased:
          type: number
          format: double
          description: Cost per minute, paid and not included in your RingCentral service plan
      description: Billing information related to the call. Returned for 'Detailed' view only
    BaseCallLogParty:
      type: object
      properties:
        phoneNumber:
          type: string
          description: Phone number of a party. Usually it is a plain number including country and area code like 18661234567. But sometimes it could be returned from database with some formatting applied, for example (866)123-4567. This property is filled in all cases where parties communicate by means of global phone numbers, for example when calling to direct numbers or sending/receiving SMS
        extensionNumber:
          type: string
          description: Extension short number (usually 3 or 4 digits). This property is filled when parties communicate by means of short internal numbers, for example when calling to other extension or sending/receiving Company Pager message
        extensionId:
          type: string
          description: Internal identifier of an extension
        name:
          type: string
          description: Symbolic name associated with a party. If the phone does not belong to the known extension, only the location is returned, the name is not determined then
      description: Base schema for call log parties and history call log parties
    CallLogDelegateInfo:
      type: object
      required:
        - id
      properties:
        id:
          type: string
          description: Internal identifier of a Secretary extension
        name:
          type: string
          description: Custom name of a Secretary extension
      description: Information on a delegate extension that actually implemented a call action. For Secretary call log the field is returned if the current extension implemented a call. For Boss call log the field contains information on a Secretary extension which actually implemented a call on behalf of the current extension
    CallResultReasonEnum:
      type: string
      description: |
        The reason of the call result:
          * `Accepted` - The call was connected to and accepted by this number
          * `Connected` - The call was answered, but there was no response on how to handle the call (for example, a voice mail system answered the call and did not push "1" to accept)
          * `Line Busy` - The phone number you dialed was busy
          * `Not Answered` - The phone number you dialed was not answered
          * `No Answer` - You did not answer the call
          * `Hang Up` - The caller hung up before the call was answered
          * `Stopped` - This attempt was stopped because the call was answered by another phone
          * `Internal Error` - An internal error occurred when making the call. Please try again
          * `No Credit` - There was not enough Calling Credit on your account to make this call
          * `Restricted Number` - The number you dialed is restricted by RingCentral
          * `Wrong Number` - The number you dialed has either been disconnected or is not a valid phone number. Please check the number and try again
          * `International Disabled` - International calling is not enabled on your account. Contact customer service to activate International Calling
          * `International Restricted` - The country and/or area you attempted to call has been prohibited by your administrator
          * `Bad Number` - An error occurred when making the call. Please check the number before trying again
          * `Info 411 Restricted` - Calling to 411 Information Services is restricted
          * `Customer 611 Restricted` - 611 customer service is not supported. Please contact customer service at <(888) 555-1212>
          * `No Digital Line` - This DigitalLine was either not plugged in or did not have an internet connection
          * `Failed Try Again` - Call failed. Please try again
          * `Max Call Limit` - The number of simultaneous calls to your account has reached its limit
          * `Too Many Calls` - The number of simultaneous calls for per DigitalLine associated with Other Phone has reached its limit. Please contact customer service
          * `Calls Not Accepted` - Your account was not accepting calls at this time
          * `Number Not Allowed` - The number that was dialed to access your account is not allowed
          * `Number Blocked` - This number is in your Blocked Numbers list
          * `Number Disabled` - The phone number and/or area you attempted to call has been prohibited by your administrator
          * `Resource Error` - An error occurred when making the call. Please try again
          * `Call Loop` - A call loop occurred due to an incorrect call forwarding configuration. Please check that you are not forwarding calls back to your own account
          * `Fax Not Received` - An incoming fax could not be received because a proper connection with the sender's fax machine could not be established
          * `Fax Partially Sent` - The fax was only partially sent. Possible explanations include phone line quality to poor to maintain the connection or the call was dropped
          * `Fax Not Sent` - An attempt to send the fax was made, but could not connect with the receiving fax machine
          * `Fax Poor Line` - An attempt to send the fax was made, but the phone line quality was too poor to send the fax
          * `Fax Prepare Error` - An internal error occurred when preparing the fax. Please try again
          * `Fax Save Error` - An internal error occurred when saving the fax. Please try again
          * `Fax Send Error` - An error occurred when sending the fax. Please try again
          * `Emergency Address not defined` - The call was rejected due to no E911 address
          * `Carrier is not active` - The call was rejected due to carrier inactivity
          * `EDGE trunk misconfigured` - The call was rejected due to error in EDGE trunk configuration
          * `Internal Call Error` - An internal error occurred when making the call. Please try again
          * `Receive Error` - Fax receive error
      enum:
        - Accepted
        - Bad Number
        - Call Loop
        - Calls Not Accepted
        - Carrier is not active
        - Connected
        - Customer 611 Restricted
        - EDGE trunk misconfigured
        - Emergency Address not defined
        - Failed Try Again
        - Fax Not Received
        - Fax Not Sent
        - Fax Partially Sent
        - Fax Poor Line
        - Fax Prepare Error
        - Fax Save Error
        - Fax Send Error
        - Hang Up
        - Info 411 Restricted
        - Internal Call Error
        - Internal Error
        - International Disabled
        - International Restricted
        - Line Busy
        - Max Call Limit
        - No Answer
        - No Credit
        - No Digital Line
        - Not Answered
        - Number Blocked
        - Number Disabled
        - Number Not Allowed
        - Receive Error
        - Resource Error
        - Restricted Number
        - Stopped
        - Too Many Calls
        - Unknown
        - Wrong Number
    CallLegTypeEnum:
      type: string
      description: Leg type
      enum:
        - SipForwarding
        - ServiceMinus2
        - ServiceMinus3
        - PstnToSip
        - Accept
        - FindMe
        - FollowMe
        - TestCall
        - FaxSent
        - CallBack
        - CallingCard
        - RingDirectly
        - RingOutWebToSubscriber
        - RingOutWebToCaller
        - SipToPstnMetered
        - RingOutClientToSubscriber
        - RingOutClientToCaller
        - RingMe
        - TransferCall
        - SipToPstnUnmetered
        - RingOutDeviceToSubscriber
        - RingOutDeviceToCaller
        - RingOutOneLegToCaller
        - ExtensionToExtension
        - CallPark
        - PagingServer
        - Hunting
        - OutgoingFreeSpDl
        - ParkLocation
        - CallMeCallOut
        - ConferenceCall
        - MobileApp
        - MoveToConference
        - Unknown
        - MeetingsCall
        - SilentMonitoring
        - Monitoring
        - Pickup
        - ImsCall
        - JoinCall
        - TextRelay
        - IvaCall
        - VoiceChat
    CallActionEnum:
      type: string
      description: The internal action corresponding to the call operation
      enum:
        - Accept Call
        - Barge In Call
        - Call Park
        - Call Return
        - CallOut-CallMe
        - Calling Card
        - Conference Call
        - E911 Update
        - Emergency
        - External Application
        - FindMe
        - FollowMe
        - FreeSPDL
        - Hunting
        - Incoming Fax
        - Monitoring
        - Move
        - Outgoing Fax
        - Paging
        - Park Location
        - Phone Call
        - Phone Login
        - Pickup
        - RC Meetings
        - Ring Directly
        - RingMe
        - RingOut Mobile
        - RingOut PC
        - RingOut Web
        - Sip Forwarding
        - Support
        - Text Relay
        - Transfer
        - Unknown
        - VoIP Call
        - VoiceChat Call
    BaseCallLogToParty:
      type: object
      properties:
        dialedPhoneNumber:
          type: string
          description: Dialed phone number without any format modifications. Returned for outbound calls
      description: Target caller information
    CallLogSyncTypeEnum:
      type: string
      description: "Type of call log synchronization request: full or incremental sync"
      enum:
        - FSync
        - ISync
    CallLogSyncInfo:
      type: object
      required:
        - syncTime
        - syncToken
        - syncType
      properties:
        syncType:
          $ref: "#/components/schemas/CallLogSyncTypeEnum"
        syncToken:
          type: string
          description: Synchronization token
        syncTime:
          type: string
          format: date-time
          description: Time of the last synchronization in (ISO 8601)[https://en.wikipedia.org/wiki/ISO_8601] format including timezone, for example *2016-03-10T18:07:52.534Z*
    CallLogSyncResponse:
      type: object
      required:
        - uri
        - records
        - syncInfo
      properties:
        uri:
          type: string
          format: uri
          description: Link to the list of call log records with sync information
        records:
          type: array
          description: |
            List of call log records with synchronization information. For `ISync` the total number of returned records is limited to 250;
            this includes both new records and the old ones, specified by the recordCount parameter
          items:
            $ref: "#/components/schemas/CallLogRecord"
        syncInfo:
          $ref: "#/components/schemas/CallLogSyncInfo"
    ExtensionBulkUpdateTaskResource:
      required:
        - creationTime
        - id
        - lastModifiedTime
        - status
        - uri
      type: object
      description: |
        Information on a task for updating multiple extensions
      properties:
        uri:
          type: string
          format: uri
          description: Link to a task resource
        id:
          type: string
          description: Internal identifier of a task
        status:
          type: string
          description: Task status
          enum:
            - Accepted
            - InProgress
            - Completed
            - Failed
        creationTime:
          type: string
          format: date-time
          description: Task creation date/time
        lastModifiedTime:
          type: string
          format: date-time
          description: Task latest update date/time
        result:
          $ref: "#/components/schemas/ExtensionBulkUpdateTaskResult"
    PronouncedNameInfo:
      type: object
      properties:
        type:
          type: string
          description: |
            The method used to pronounce the user's name:
            - `Default` - default extension name; first and last name specified in user's profile are pronounced using text-to-speech;
            - `TextToSpeech` - custom text specified by a user  pronounced using text-to-speech;
            - `Recorded` - custom audio uploaded by a user, the name recorded in user's own voice (supported only for extension retrieval).
          enum:
            - Default
            - TextToSpeech
            - Recorded
        text:
          type: string
          description: Custom text (for `TextToSpeech` type only)
        prompt:
          $ref: "#/components/schemas/PronouncedNamePromptInfo"
    SetupWizardStateForUpdateEnum:
      type: string
      description: Initial configuration wizard state
      enum:
        - NotStarted
        - Incomplete
        - Completed
      default: NotStarted
    ExtensionStatusEnumForUpdate:
      type: string
      description: Extension status
      enum:
        - Enabled
        - Disabled
        - Frozen
        - NotActivated
    ProvisioningSiteInfo:
      type: object
      properties:
        id:
          type: string
          format: uri
          description: Internal identifier of a site
        uri:
          type: string
          format: uri
          description: Link to a site resource
        name:
          type: string
          description: Name of a site
        code:
          type: string
          description: Site code value. Returned only if specified
      description: |
        Site data. If multi-site feature is turned on for an account,
        then ID of a site must be specified. In order to assign a wireless
        point to the main site (company) the site ID should be set to `main-site`
    CustomFieldInfo:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a custom field
        value:
          type: string
          description: Custom field value
        displayName:
          type: string
    UserTransitionInfo:
      type: object
      properties:
        sendWelcomeEmailsToUsers:
          type: boolean
          description: |
            Specifies if a welcome/activation email is sent to the existing
            users during account confirmation
        sendWelcomeEmail:
          type: boolean
          description: |
            Specifies if a welcome/activation email is sent to the new users (within extension status changing from
            `Unassigned` to `NotActivated/Disabled`)
      description: |
        For `NotActivated` extensions only. Welcome email settings
    ContactInfoUpdateRequest:
      type: object
      properties:
        firstName:
          type: string
          description: |
            For User extension type only. Extension user first name
          maxLength: 64
        lastName:
          type: string
          description: |
            For User extension type only. Extension user last name
          maxLength: 64
        company:
          type: string
          description: Extension user company name
          maxLength: 64
        jobTitle:
          type: string
          maxLength: 64
        email:
          type: string
          format: email
          description: Email of extension user
          maxLength: 254
        businessPhone:
          type: string
          description: |
            Extension user contact phone number in
            [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I)
            format
        mobilePhone:
          type: string
          description: |
            Extension user mobile (**non** Toll Free) phone number in
            [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I)
            (with '+' sign) format
        businessAddress:
          $ref: "#/components/schemas/ContactBusinessAddressInfo"
        emailAsLoginName:
          type: boolean
          description: |
            If `true` then contact email is enabled as login name for
            this user. Please note that email should be unique in this case.
            The default value is `false`
        pronouncedName:
          $ref: "#/components/schemas/PronouncedNameInfo"
        department:
          type: string
          description: Extension user department, if any
          maxLength: 64
    ErrorEntity:
      type: object
      properties:
        errorCode:
          type: string
          description: Error code
        message:
          type: string
          description: Error message
        parameterName:
          type: string
          description: Name of invalid parameter
        parameterValue:
          type: string
          description: Value of invalid parameter
    CallQueueInfoRequest:
      type: object
      properties:
        slaGoal:
          type: integer
          format: int32
          description: |
            Target percentage of calls that must be answered by agents
            within the service level time threshold
        slaThresholdSeconds:
          type: integer
          format: int32
        includeAbandonedCalls:
          type: boolean
        abandonedThresholdSeconds:
          type: integer
          format: int32
      description: |
        For Call Queue extension type only. Please note that legacy 'Department'
        extension type corresponds to 'Call Queue' extensions in modern RingCentral
        product terminology
    ExtensionStatusInfo:
      type: object
      description: |
        Status information (reason, comment). Returned for `Disabled` extensions only
      properties:
        comment:
          type: string
          description: A free-form user comment, describing the status change reason
        reason:
          type: string
          description: Type of suspension
          enum:
            - Voluntarily
            - Involuntarily
    ReferenceInfo:
      type: object
      properties:
        ref:
          type: string
          description: Non-RC identifier of an extension
        type:
          type: string
          description: Type of external identifier
          enum:
            - PartnerId
            - CustomerDirectoryId
        refAccId:
          type: string
          description: Primary federation admin account identifier
    ExtensionBulkUpdateInfo:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of an extension
        status:
          $ref: "#/components/schemas/ExtensionStatusEnumForUpdate"
        statusInfo:
          $ref: "#/components/schemas/ExtensionStatusInfo"
        reason:
          type: string
          description: Type of suspension
        comment:
          type: string
          description: Free form user comment
        extensionNumber:
          type: string
          description: Extension number available
        contact:
          $ref: "#/components/schemas/ContactInfoUpdateRequest"
        regionalSettings:
          $ref: "#/components/schemas/ExtensionRegionalSettingRequest"
        setupWizardState:
          $ref: "#/components/schemas/SetupWizardStateForUpdateEnum"
        partnerId:
          type: string
          description: |
            Additional extension identifier created by partner application
            and applied on client side
        ivrPin:
          type: string
          description: IVR PIN
        password:
          type: string
          description: Password for extension
        callQueueInfo:
          $ref: "#/components/schemas/CallQueueInfoRequest"
        transition:
          $ref: "#/components/schemas/UserTransitionInfo"
        customFields:
          type: array
          items:
            $ref: "#/components/schemas/CustomFieldInfo"
        site:
          $ref: "#/components/schemas/ProvisioningSiteInfo"
        type:
          type: string
          description: |
            Extension type. Please note that legacy 'Department' extension
            type corresponds to 'Call Queue' extensions in modern RingCentral
            product terminology
          enum:
            - User
            - FaxUser
            - VirtualUser
            - DigitalUser
            - Department
            - Announcement
            - Voicemail
            - SharedLinesGroup
            - PagingOnly
            - IvrMenu
            - ApplicationExtension
            - ParkLocation
            - DelegatedLinesGroup
        references:
          type: array
          description: List of non-RC internal identifiers assigned to an extension
          items:
            $ref: "#/components/schemas/ReferenceInfo"
    PronouncedNamePromptInfo:
      type: object
      properties:
        id:
          type: string
        contentUri:
          type: string
          format: uri
          description: Link to a prompt resource
        contentType:
          type: string
          description: Content media type
          enum:
            - audio/mpeg
            - audio/wav
    ContactBusinessAddressInfo:
      type: object
      properties:
        country:
          type: string
          description: Country name of a user's company
        state:
          type: string
          description: |
            State/province name of a user's company. Mandatory
            for the USA, UK and Canada
        city:
          type: string
          description: City name of a user's company
        street:
          type: string
          description: Street address of a user's company
        zip:
          type: string
          description: Zip code of a user's company
      description: |
        User's business address. The default is
        Company (Auto-Receptionist) settings
    ExtensionBulkUpdateRequest:
      required:
        - records
      description: List of extensions to be updated
      type: object
      properties:
        records:
          type: array
          items:
            $ref: "#/components/schemas/ExtensionBulkUpdateInfo"
    ExtensionBulkUpdateTaskResult:
      type: object
      description: Resulting record of a task on multiple extensions update
      properties:
        affectedItems:
          type: object
          properties:
            result:
              type: array
              items:
                $ref: "#/components/schemas/ExtensionUpdateShortResult"
        errors:
          type: array
          items:
            $ref: "#/components/schemas/ErrorEntity"
    ExtensionUpdateShortResult:
      type: object
      properties:
        extensionId:
          type: string
          description: Internal identifier of an extension
        status:
          type: string
          description: Extension update status
          enum:
            - Fail
            - Success
        errors:
          type: array
          items:
            $ref: "#/components/schemas/ErrorEntity"
    ConnectTeamsUsersRequest:
      type: object
      required:
        - mappings
      properties:
        mappings:
          type: array
          minItems: 1
          maxItems: 25
          items:
            $ref: "#/components/schemas/MsTeamsUserEntry"
    MsTeamsUserEntry:
      type: object
      required:
        - extensionId
        - phoneNumber
      properties:
        extensionId:
          type: string
          description: RingCentral extension ID of the user to connect
        phoneNumber:
          $ref: "#/components/schemas/PhoneNumberE164"
    MsTeamsUserListResponse:
      type: object
      required:
        - mappings
      properties:
        mappings:
          type: array
          minItems: 0
          items:
            allOf:
              - $ref: "#/components/schemas/MsTeamsUserEntry"
              - type: object
                required:
                  - status
                properties:
                  status:
                    $ref: "#/components/schemas/MsTeamsUserStatus"
    MsTeamsUserStatus:
      type: string
      description: Connection status of the Microsoft Teams Direct Routing user
      enum:
        - Connected
        - Initial
        - RemoteNotFound
        - OutOfSync
        - Connecting
        - Disconnecting
        - DisconnectFailed
        - RemoteUserRemoved
    UserTemplates:
      required:
        - navigation
        - paging
        - records
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Link to user templates resource
        records:
          type: array
          description: List of user templates
          items:
            $ref: "#/components/schemas/TemplateInfo"
        navigation:
          $ref: "#/components/schemas/PageNavigationModel"
        paging:
          $ref: "#/components/schemas/EnumeratedPagingModel"
    TemplateType:
      type: string
      enum:
        - CallHandling
        - CallQueueCallHandling
        - CallQueueSettings
        - KeyTemplates
        - LimitedExtensions
        - SiteCallHandling
        - UserSettings
    TemplateInfo:
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Link to a template
        id:
          type: string
          description: Internal identifier of a template
        description:
          type: string
          description: Description of a template
        type:
          $ref: "#/components/schemas/TemplateType"
        name:
          type: string
          description: Name of a template
        creationTime:
          type: string
          format: date-time
          description: Time of a template creation
        lastModifiedTime:
          type: string
          format: date-time
          description: Time of the last template modification
    CompanyDetails:
      type: object
      properties:
        businessContactEmail:
          type: string
          format: email
          description: Business contact email
        companyName:
          type: string
          description: Company name
        industryCategory:
          type: string
          description: Industry category
        webSiteUri:
          type: string
          format: uri
          description: Web site URL
        commercialType:
          $ref: "#/components/schemas/TcrOrganizationType"
        businessAddress:
          $ref: "#/components/schemas/BusinessAddress"
        contact:
          $ref: "#/components/schemas/Contact"
    TcrBrandRecord:
      type: object
      properties:
        id:
          type: integer
          format: int64
          description: Identifier of a TCR brand
        name:
          type: string
          description: Name of a TCR brand
        countryCode:
          type: string
          description: Country code
        status:
          $ref: "#/components/schemas/TcrBrandStatus"
        registrationTime:
          type: string
          format: date-time
          description: Registration time
        externalId:
          type: string
          description: External ID
        companyDetails:
          $ref: "#/components/schemas/CompanyDetails"
        errors:
          type: array
          items:
            $ref: "#/components/schemas/ApiErrorWithParameter"
    TcrBrandStatus:
      type: string
      enum:
        - Created
        - Submitted
        - SubmitFailed
        - Verified
        - Unverified
        - UpdateRequested
        - DeleteRequested
        - Suspended
        - Expired
        - Draft
        - PreventFailed
    TcrOrganizationType:
      type: string
      enum:
        - SoleProprietor
        - PrivateProfit
        - PublicProfit
        - NonProfit
        - Government
    BusinessAddress:
      type: object
      properties:
        street:
          type: string
          description: Street
        city:
          type: string
          description: City
        state:
          type: string
          description: State
        zip:
          type: string
          description: ZIP code
        countryCode:
          type: string
          description: Country code
    BrandListResponse:
      type: object
      required:
        - records
      properties:
        records:
          type: array
          minItems: 0
          items:
            $ref: "#/components/schemas/TcrBrandRecord"
    Contact:
      type: object
      properties:
        firstName:
          type: string
          description: First name
        lastName:
          type: string
          description: Last name
        email:
          type: string
          format: email
          description: Email address
        phoneNumber:
          type: string
          description: Phone number
    TcrCampaignRecord:
      type: object
      properties:
        id:
          type: integer
          format: int64
          description: Identifier of a TCR campaign
        name:
          type: string
          description: Name of a TCR campaign
        status:
          $ref: "#/components/schemas/TcrCampaignStatus"
        registrationTime:
          type: string
          format: date-time
          description: Registration time
        externalId:
          type: string
          description: External ID
        brand:
          type: object
          description: Brand info
          properties:
            id:
              type: string
            name:
              type: string
        consentSettings:
          allOf: []
        registrationTier:
          $ref: "#/components/schemas/RegistrationTier"
        useCases:
          type: array
          items:
            $ref: "#/components/schemas/TcrUseCase"
        errors:
          type: array
          items:
            $ref: "#/components/schemas/ApiErrorWithParameter"
    TcrUseCase:
      type: string
      enum:
        - AccountNotification
        - ConversationsInternal
        - ConversationsExternal
        - CustomerCare
        - DeliveryNotification
        - FraudAlert
        - HigherEducation
        - K12Education
        - MachineToMachine
        - Marketing
        - Mixed
        - PollingVoting
        - PublicServiceAnnouncement
        - SecurityAlert
        - Unknown
    RegistrationTier:
      type: string
      enum:
        - LowVolume
        - StandardVolume
    CampaignListResponse:
      type: object
      required:
        - records
      properties:
        records:
          type: array
          minItems: 0
          items:
            $ref: "#/components/schemas/TcrCampaignRecord"
    TcrCampaignStatus:
      type: string
      enum:
        - Created
        - Submitted
        - Confirmed
        - SubmitFailed
        - UpdateRequested
        - DeleteRequested
        - CampaignSuspended
        - CampaignExpired
        - Draft
        - PreventFailed
        - Unconfirmed
    AssignNumbersRequest:
      type: object
      properties:
        phoneNumbers:
          type: array
          items:
            $ref: "#/components/schemas/PhoneNumberE164"
          maxItems: 100
          minItems: 1
          description: List of phone numbers to assign
    CallLogExtractSyncInfo:
      type: object
      required:
        - syncTime
        - syncToken
        - syncType
        - newerRecordsExist
      properties:
        syncType:
          $ref: "#/components/schemas/CallLogSyncTypeEnum"
        syncToken:
          type: string
          description: Synchronization token
        syncTime:
          type: string
          format: date-time
          description: Time of the last synchronization in (ISO 8601)[https://en.wikipedia.org/wiki/ISO_8601] format including timezone, for example *2016-03-10T18:07:52.534Z*
        newerRecordsExist:
          type: boolean
          description: Identifies if there are more calls data can be returned in the next API call (with 'ISync' sync type)
    CallLogExtractSyncResponse:
      type: object
      required:
        - uri
        - records
        - syncInfo
      properties:
        uri:
          type: string
          format: uri
          description: Link to the list of call log records with sync information
        records:
          type: array
          description: List of call log records
          items:
            $ref: "#/components/schemas/CallLogRecord"
        syncInfo:
          $ref: "#/components/schemas/CallLogExtractSyncInfo"
    MessageStatusesResponse:
      type: object
      description: The messages status object with details of each status
      properties:
        queued:
          $ref: "#/components/schemas/MessageStatusCounts"
        delivered:
          $ref: "#/components/schemas/MessageStatusCounts"
        deliveryFailed:
          $ref: "#/components/schemas/MessageStatusCounts"
        sent:
          $ref: "#/components/schemas/MessageStatusCounts"
        sendingFailed:
          $ref: "#/components/schemas/MessageStatusCounts"
    ASGErrorResponse:
      allOf:
        - $ref: "#/components/schemas/ErrorEntry"
        - type: object
          description: Error response
          properties:
            errors:
              type: array
              items:
                $ref: "#/components/schemas/ErrorEntry"
    ErrorEntry:
      type: object
      description: Single (of potential multiple) error entry in an ASG error response
      required:
        - errorCode
        - message
      properties:
        errorCode:
          type: string
          description: Error code
          example: CMN-101
        message:
          type: string
          description: Human-readable description of the error. Not suitable for end users.
          example: AccountId 1234 is invalid
    MessageStatusCounts:
      type: object
      description: Message status parameters
      properties:
        cost:
          type: number
          format: float
          description: Total cost of all messages with this status code
        count:
          type: integer
          description: Count of messages with this status code
          format: int32
          example: 7
        errorCodeCounts:
          type: object
          description: Message sending/delivery errors. Returned in `deliveryFailed` and `sendingFailed` resources
          additionalProperties:
            type: integer
            description: Count of messages with this error code
            format: int32
            example: 5
    SmsDirectionEnum:
      $ref: "#/components/schemas/MessageDirectionEnum"
    MessageListMessageResponse:
      type: object
      description: The short detail of the message in the get batch response
      properties:
        id:
          type: integer
          format: int64
          description: The Id of the message
          example: 1234
        batchId:
          type: string
          description: Internal identifier of a batch the message was submitted in
          example: "12345"
        from:
          type: string
          description: Phone number in [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I) format from which the message is sent
          example: "+15551234567"
        to:
          type: array
          description: Phone number in [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I) format to which a message is sent
          example:
            - "+15551234567"
          items:
            type: string
        creationTime:
          type: string
          format: date-time
          description: The time at which the message was created
        lastModifiedTime:
          type: string
          format: date-time
          description: The time at which the message was last updated
        messageStatus:
          $ref: "#/components/schemas/SmsStatusEnum"
        segmentCount:
          type: integer
          description: Number of segments of a message
          format: int32
          example: 1
        text:
          type: string
          description: |
            Text of a message. Returned if the `view` parameter is set to `Detailed`
        cost:
          type: number
          description: Cost of a message
          format: double
          example: 0.007
        direction:
          $ref: "#/components/schemas/SmsDirectionEnum"
        errorCode:
          type: string
          description: The RC error code of the message sending failure reason
          example: SMS-RC-503
    SmsStatusEnum:
      type: string
      description: Status of the message
      example: Queued
      enum:
        - Queued
        - Delivered
        - Sent
        - SendingFailed
        - DeliveryFailed
    MessageListResponse:
      type: object
      properties:
        records:
          type: array
          description: An array containing individual messages
          items:
            $ref: "#/components/schemas/MessageListMessageResponse"
        paging:
          $ref: "#/components/schemas/NonEnumeratedPagingModel"
      description: List of messages retrieved for an account and other filter criteria such as `batchId` and `fromPhoneNumber` specified in the request
    MessageDetailsResponse:
      type: object
      description: Complete details of the message
      properties:
        id:
          type: string
          description: Internal identifier of a message
          example: "1234"
        from:
          type: string
          description: |
            Phone number in [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I)
            format from which the message was sent
          example: "+15551234567"
        to:
          type: array
          description: |
            List of phone numbers in [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I)
            format to which the message was sent
          example:
            - "+15551234567"
          items:
            type: string
        text:
          type: string
          maxLength: 1000
          description: Text of a message, maximum number of characters is 1000
          example: Hello, World!
        creationTime:
          type: string
          format: date-time
          description: The time when this message was created.
        lastModifiedTime:
          type: string
          format: date-time
          description: The time when this message was last updated.
        messageStatus:
          $ref: "#/components/schemas/SmsStatusEnum"
        segmentCount:
          type: integer
          description: Number of segments of a message
          format: int32
          example: 1
        cost:
          type: number
          description: Cost of a message
          format: double
          example: 0.007
        batchId:
          type: string
          description: The batch in which the message was submitted
          example: batch12345
        direction:
          $ref: "#/components/schemas/SmsDirectionEnum"
        errorCode:
          type: string
          description: The RC error code of the message sending failure reason
          example: SMS-RC-503
    OptOutListResponse:
      type: object
      description: The list of opt outs
      properties:
        records:
          type: array
          description: List of individual opt-out number records
          items:
            $ref: "#/components/schemas/OptOutResponse"
        paging:
          $ref: "#/components/schemas/NonEnumeratedPagingModel"
    OptOutResponse:
      type: object
      description: Opt-out record
      properties:
        from:
          type: string
          description: Phone number in [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I) format from which the recipient has opted out
          example: "+15551234567"
        to:
          type: string
          description: Phone number in [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I) format which is opted out
          example: "+15551234567"
        status:
          type: string
          description: Status of a phone number
          enum:
            - OptIn
            - OptOut
        source:
          type: string
          description: The source of the opt-out record
          enum:
            - Recipient
            - Account
            - Upstream
            - Carrier
    OptOutBulkAssignResponse:
      type: object
      description: The results of adding opt-outs and opt-ins
      properties:
        optIns:
          type: object
          description: Contains successful and failed opt-ins
          properties:
            successful:
              type: array
              description: Recipients' phone numbers which opt-ins were successfully added for.
              items:
                type: string
              example:
                - "+15551237799"
            failed:
              type: array
              description: Recipients' phone numbers which opt-ins were failed to be added for. Plus, error messages
              items:
                $ref: "#/components/schemas/OptOutBulkAssignFailedEntry"
              example:
                - to: "+15551237798"
                  errorMessage: Unexpected issue on removing an opt-out from bulk-assign request
        optOuts:
          type: object
          description: Contains successful and failed opt-outs
          properties:
            successful:
              type: array
              description: Recipients' phone numbers which opt-outs were successfully added for.
              items:
                type: string
              example:
                - "+15551237755"
            failed:
              type: array
              description: Recipients' phone numbers which opt-outs were failed to be added for. Plus, error messages
              items:
                $ref: "#/components/schemas/OptOutBulkAssignFailedEntry"
              example:
                - to: "+15551237756"
                  errorMessage: Unexpected issue on creating an opt-out from bulk-assign request
    OptOutBulkAssignRequest:
      type: object
      description: Consists of `from` field and `optOuts` and `optIns` lists. Both `optOuts` and `optIns` can be empty but not simultaneously - at least one of the lists must be entered."
      required:
        - from
      properties:
        from:
          type: string
          description: The phone number of a sender which the recipients should be opted out from or opted in to
          example: "+15551234455"
        optOuts:
          type: array
          description: The list of phone numbers to be opted out
          items:
            type: string
          example:
            - "+15551237755"
            - "+15551237756"
        optIns:
          type: array
          description: The list of phone numbers to be opted in
          items:
            type: string
          example:
            - "+15551237799"
            - "+15551237798"
    OptOutBulkAssignFailedEntry:
      type: object
      description: Represents a failure of adding opt-out / opt-in. A pair of a recipient phone number and an error message
      properties:
        to:
          type: string
          description: A recipient phone number
          example: "+15551237756"
        errorMessage:
          type: string
          description: An error happened on adding opt-out / opt-in
          example: Unexpected issue on creating an opt-out from bulk-assign request
    MessageBatchCreateRequest:
      required:
        - from
        - messages
      type: object
      description: |
        Batch of A2P SMS messages. This object provides specification to
        send message(s) to many recipients. It contains top-level attributes, such
        as `text` which apply to all `messages`. In addition to that, it is possible
        to override this attribute for each message. This way a single API call may
        be used to send individual messages to many recipients.
      properties:
        from:
          type: string
          description: |
            Sender's phone number in [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I)
            format.
          example: "+15551234567"
        text:
          type: string
          description: |
            Text to send to `messages.to` phone numbers. Can be overridden on a per-message basis
          example: Hello, World!
        messages:
          type: array
          description: Individual messages
          items:
            $ref: "#/components/schemas/MessageCreateRequest"
    RejectedRecipientResponseResource:
      type: object
      description: The rejected recipient details
      properties:
        index:
          type: integer
          description: The index of the messages list in the send batch request where the invalid recipient was found
          format: int64
          example: 1
        to:
          type: array
          items:
            type: string
          description: The invalid recipient number as found in the request
          example:
            - "29395"
        errorCode:
          type: string
          description: The error code
          example: CMN-100
        description:
          type: string
          description: The description of the error
          example: The recipient is invalid
    MessageBatchResponse:
      type: object
      description: |
        Batch of A2P SMS messages. This object provides a specification
        to send message(s) to many recipients. It contains top-level attributes which apply to all messages. In addition
        to that, it is possible to override this attribute for each message. This
        way a single API call may be used to send individual messages to many recipients
      properties:
        id:
          type: string
          description: Unique identifier of the message batch
          readOnly: true
          example: "12345"
        from:
          type: string
          description: |
            Phone number in [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I)
            format from which the messages are going to be sent
          example: "+15551234567"
        batchSize:
          type: integer
          description: Total number of messages in the accepted batch
          format: int32
          example: 5
        processedCount:
          type: integer
          format: int32
          description: Total number of messages currently processed in the batch
          example: 1
        lastModifiedTime:
          type: string
          format: date-time
          description: |
            The last time the batch was processed.
        status:
          type: string
          description: Current status of a message batch
          example: Processing
          enum:
            - Processing
            - Completed
            - Sent
        creationTime:
          type: string
          format: date-time
          description: |
            The time at which the batch was created
        rejected:
          type: array
          description: The list of rejected/invalid recipients
          items:
            $ref: "#/components/schemas/RejectedRecipientResponseResource"
        cost:
          type: number
          format: double
          description: |
            The estimated batch cost for completed batch.
            Calculated after batch processing is completed.
          example: 0.007
    MessageCreateRequest:
      type: object
      description: Single individual SMS resource
      required:
        - to
      properties:
        to:
          type: array
          items:
            type: string
          description: |
            List of phone numbers in [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I)
            format, recipients of this message. Currently only one number is supported
          example:
            - "15551234477"
        text:
          type: string
          maxLength: 1000
          description: Text to send, maximum number of characters is 1000
          example: Hello, World!
    BatchListResponse:
      type: object
      description: |
        The list of batches retrieved for an account and other filter criteria such as
        fromPhoneNumber, date specified in the request.
      properties:
        records:
          type: array
          description: An array containing individual batches
          items:
            $ref: "#/components/schemas/MessageBatchResponse"
        paging:
          $ref: "#/components/schemas/NonEnumeratedPagingModel"
    CompanyAnsweringRuleCallersInfoRequest:
      type: object
      properties:
        callerId:
          type: string
          description: Phone number of a caller
        name:
          type: string
          description: Displayed name for a caller ID
    CompanyAnsweringRuleCalledNumberInfoRequest:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of an account phone number
        phoneNumber:
          type: string
          description: Phone number of a callee
    CompanyAnsweringRuleList:
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Link to an answering rule resource
        records:
          type: array
          description: List of company answering rules
          items:
            $ref: "#/components/schemas/ListCompanyAnsweringRuleInfo"
        paging:
          $ref: "#/components/schemas/EnumeratedPagingModel"
        navigation:
          $ref: "#/components/schemas/PageNavigationModel"
    GreetingTypeEnum:
      type: string
      description: Type of greeting, specifying the case when the greeting is played.
      enum:
        - Introductory
        - Announcement
        - AutomaticRecording
        - BlockedCallersAll
        - BlockedCallersSpecific
        - BlockedNoCallerId
        - BlockedPayPhones
        - ConnectingMessage
        - ConnectingAudio
        - StartRecording
        - StopRecording
        - Voicemail
        - Unavailable
        - InterruptPrompt
        - HoldMusic
        - Company
    RangesInfo:
      type: object
      properties:
        from:
          type: string
          format: date-time
          description: |
            Beginning timestamp of the range in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601),
            for example *2018-10-29T14:00:00*, *2018-10-29T14:00:00Z*, *2018-10-29T14:00:00+0100*
        to:
          type: string
          format: date-time
          description: |
            Ending timestamp of the range in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601),
            for example *2018-10-29T14:00:00*, *2018-10-29T14:00:00Z*, *2018-10-29T14:00:00+0100*
    CompanyAnsweringRuleExtensionInfo:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of an extension
    ListCompanyAnsweringRuleInfo:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of an answering rule
        uri:
          type: string
          format: uri
          description: Canonical URI of an answering rule
        enabled:
          type: boolean
          description: Specifies if the rule is active or inactive. The default value is `true`
          default: true
        type:
          $ref: "#/components/schemas/RuleTypeInfo"
        name:
          type: string
          description: Name of an answering rule specified by user. Max number of symbols is 30. The default value is 'My Rule N' where 'N' is the first free number
        calledNumbers:
          type: array
          description: Answering rules are applied when calling to selected number(s)
          items:
            $ref: "#/components/schemas/CalledNumberInfo"
        extension:
          $ref: "#/components/schemas/CompanyAnsweringRuleExtensionInfo"
    CompanyAnsweringRuleExtensionInfoRequest:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of an extension
      description: Extension to which the call is forwarded in 'Bypass' mode
    CompanyAnsweringRuleWeeklyScheduleInfoRequest:
      type: object
      properties:
        monday:
          type: array
          description: Time interval for a particular day
          items:
            $ref: "#/components/schemas/CompanyAnsweringRuleTimeIntervalRequest"
        tuesday:
          type: array
          description: Time interval for a particular day
          items:
            $ref: "#/components/schemas/CompanyAnsweringRuleTimeIntervalRequest"
        wednesday:
          type: array
          description: Time interval for a particular day
          items:
            $ref: "#/components/schemas/CompanyAnsweringRuleTimeIntervalRequest"
        thursday:
          type: array
          description: Time interval for a particular day
          items:
            $ref: "#/components/schemas/CompanyAnsweringRuleTimeIntervalRequest"
        friday:
          type: array
          description: Time interval for a particular day
          items:
            $ref: "#/components/schemas/CompanyAnsweringRuleTimeIntervalRequest"
        saturday:
          type: array
          description: Time interval for a particular day
          items:
            $ref: "#/components/schemas/CompanyAnsweringRuleTimeIntervalRequest"
        sunday:
          type: array
          description: Time interval for a particular day
          items:
            $ref: "#/components/schemas/CompanyAnsweringRuleTimeIntervalRequest"
      description: Weekly schedule. If specified, ranges cannot be specified
    CompanyAnsweringRuleCalledNumberInfo:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of an account phone number
        phoneNumber:
          type: string
          description: Phone number of a callee
    CompanyAnsweringRuleTimeIntervalRequest:
      type: object
      properties:
        from:
          type: string
          description: Time in format hh:mm
        to:
          type: string
          description: Time in format hh:mm
    CalledNumberInfo:
      type: object
      properties:
        phoneNumber:
          type: string
          description: Called phone number
    CustomGreetingInfoRequest:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a custom user greeting
    CompanyAnsweringRuleRequest:
      type: object
      properties:
        name:
          type: string
          description: Name of an answering rule specified by user. Max number of symbols is 30. The default value is 'My Rule N' where 'N' is the first free number
        enabled:
          type: boolean
          description: Specifies if the rule is active or inactive. The default value is `true`
          default: true
        type:
          $ref: "#/components/schemas/RuleTypeInfo"
        callers:
          type: array
          description: Answering rule will be applied when calls are received from the specified caller(s)
          items:
            $ref: "#/components/schemas/CompanyAnsweringRuleCallersInfoRequest"
        calledNumbers:
          type: array
          description: Answering rule will be applied when calling the specified number(s)
          items:
            $ref: "#/components/schemas/CompanyAnsweringRuleCalledNumberInfo"
        schedule:
          $ref: "#/components/schemas/CompanyAnsweringRuleScheduleInfoRequest"
        callHandlingAction:
          type: string
          description: Specifies how incoming calls are forwarded. The default value is 'Operator' 'Operator' - play company greeting and forward to operator extension 'Disconnect' - play company greeting and disconnect 'Bypass' - bypass greeting to go to selected extension = ['Operator', 'Disconnect', 'Bypass']
          enum:
            - Operator
            - Disconnect
            - Bypass
        extension:
          $ref: "#/components/schemas/CompanyAnsweringRuleExtensionInfoRequest"
        greetings:
          type: array
          description: Greetings applied for an answering rule; only predefined greetings can be applied, see Dictionary Greeting List
          items:
            $ref: "#/components/schemas/GreetingInfo"
    PresetInfo:
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Link to a greeting resource
        id:
          type: string
          description: Internal identifier of a greeting
        name:
          type: string
          description: Name of a greeting
    CompanyAnsweringRuleScheduleInfo:
      type: object
      properties:
        weeklyRanges:
          $ref: "#/components/schemas/CompanyAnsweringRuleWeeklyScheduleInfoRequest"
        ranges:
          type: array
          description: Specific data ranges. If specified, weeklyRanges cannot be specified
          items:
            $ref: "#/components/schemas/RangesInfo"
        ref:
          type: string
          description: Reference to Business Hours or After Hours schedule = ['BusinessHours', 'AfterHours']
          enum:
            - BusinessHours
            - AfterHours
      description: Schedule when an answering rule should be applied
    GreetingInfo:
      type: object
      properties:
        type:
          $ref: "#/components/schemas/GreetingTypeEnum"
        preset:
          $ref: "#/components/schemas/PresetInfo"
        custom:
          $ref: "#/components/schemas/CustomGreetingInfoRequest"
    CompanyAnsweringRuleScheduleInfoRequest:
      type: object
      properties:
        weeklyRanges:
          $ref: "#/components/schemas/CompanyAnsweringRuleWeeklyScheduleInfoRequest"
        ranges:
          type: array
          description: Specific data ranges. If specified, weeklyRanges cannot be specified
          items:
            $ref: "#/components/schemas/RangesInfo"
        ref:
          type: string
          description: Reference to Business Hours or After Hours schedule
          enum:
            - BusinessHours
            - AfterHours
      description: Schedule when an answering rule should be applied
    RuleTypeInfo:
      type: string
      default: Custom
      description: Type of an answering rule
      enum:
        - BusinessHours
        - AfterHours
        - Custom
    CompanyAnsweringRuleInfo:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of an answering rule
        uri:
          type: string
          format: uri
          description: Canonical URI of an answering rule
        enabled:
          type: boolean
          description: Specifies if the rule is active or inactive
          default: true
        type:
          $ref: "#/components/schemas/RuleTypeInfo"
        name:
          type: string
          description: Name of an answering rule specified by user. Max number of symbols is 30. The default value is 'My Rule N' where 'N' is the first free number
        callers:
          type: array
          description: Answering rule will be applied when calls are received from the specified caller(s)
          items:
            $ref: "#/components/schemas/CompanyAnsweringRuleCallersInfoRequest"
        calledNumbers:
          type: array
          description: Answering rule will be applied when calling the specified number(s)
          items:
            $ref: "#/components/schemas/CompanyAnsweringRuleCalledNumberInfoRequest"
        schedule:
          $ref: "#/components/schemas/CompanyAnsweringRuleScheduleInfo"
        callHandlingAction:
          type: string
          description: Specifies how incoming calls are forwarded. The default value is 'Operator' 'Operator' - play company greeting and forward to operator extension 'Disconnect' - play company greeting and disconnect 'Bypass' - bypass greeting to go to selected extension = ['Operator', 'Disconnect', 'Bypass']
          enum:
            - Operator
            - Disconnect
            - Bypass
        extension:
          $ref: "#/components/schemas/CompanyAnsweringRuleExtensionInfoRequest"
        greetings:
          type: array
          description: Greetings applied for an answering rule; only predefined greetings can be applied, see Dictionary Greeting List
          items:
            $ref: "#/components/schemas/GreetingInfo"
    CompanyAnsweringRuleUpdate:
      type: object
      properties:
        id:
          type: string
          description: Identifier of an answering rule
        enabled:
          type: boolean
          description: Specifies if a rule is active or inactive. The default value is `true`
          default: true
        name:
          type: string
          description: |
            Name of an answering rule specified by user. Max number of
            symbols is 30. The default value is 'My Rule N' where 'N' is the first
            free number
        callers:
          type: array
          description: |
            Answering rule will be applied when calls are received from
            the specified caller(s)
          items:
            $ref: "#/components/schemas/CompanyAnsweringRuleCallersInfoRequest"
        calledNumbers:
          type: array
          description: Answering rule will be applied when calling the specified number(s)
          items:
            $ref: "#/components/schemas/CompanyAnsweringRuleCalledNumberInfo"
        schedule:
          $ref: "#/components/schemas/CompanyAnsweringRuleScheduleInfoRequest"
        callHandlingAction:
          type: string
          description: Specifies how incoming calls are forwarded. The default value is 'Operator' 'Operator' - play company greeting and forward to operator extension 'Disconnect' - play company greeting and disconnect 'Bypass' - bypass greeting to go to selected extension = ['Operator', 'Disconnect','Bypass']
          enum:
            - Operator
            - Disconnect
            - Bypass
        type:
          $ref: "#/components/schemas/RuleTypeInfo"
        extension:
          $ref: "#/components/schemas/CompanyAnsweringRuleExtensionInfo"
        greetings:
          type: array
          description: |
            Greetings applied for an answering rule; only predefined greetings
            can be applied, see Dictionary Greeting List
          items:
            $ref: "#/components/schemas/GreetingInfo"
    PromptInfo:
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Internal identifier of a prompt
        id:
          type: string
          description: Link to a prompt metadata
        contentType:
          type: string
          description: Type of prompt media content
        contentUri:
          type: string
          format: uri
          description: Link to a prompt media content
        filename:
          type: string
          description: Name of a prompt
    IvrPrompts:
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Link to prompts library resource
        records:
          type: array
          description: List of Prompts
          items:
            $ref: "#/components/schemas/PromptInfo"
        navigation:
          $ref: "#/components/schemas/PageNavigationModel"
        paging:
          $ref: "#/components/schemas/EnumeratedPagingModel"
    UpdateIVRPromptRequest:
      type: object
      properties:
        filename:
          type: string
          description: Name of a file to be uploaded as a prompt
    AddressBookBulkUploadTaskResult:
      type: object
      properties:
        affectedItems:
          type: array
          items:
            $ref: "#/components/schemas/AddressBookBulkUploadResource"
        errors:
          type: array
          items:
            $ref: "#/components/schemas/ErrorEntity"
    AddressBookBulkUploadResponse:
      description: |
        Information on a task for adding multiple contacts to multiple extensions
      required:
        - id
        - uri
        - creationTime
        - lastModifiedTime
        - status
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a task
        uri:
          type: string
          format: uri
          description: Link for the task status retrieval
        status:
          type: string
          description: Task status
          enum:
            - Accepted
            - InProgress
            - Completed
            - Failed
        creationTime:
          type: string
          format: date-time
          description: Date/time of a task creation
        lastModifiedTime:
          type: string
          format: date-time
          description: Date/time of a task latest update
        results:
          $ref: "#/components/schemas/AddressBookBulkUploadTaskResult"
    AddressBookBulkUploadResource:
      required:
        - extensionId
        - contacts
      type: object
      properties:
        extensionId:
          type: string
        contacts:
          type: array
          minItems: 1
          maxItems: 10000
          items:
            $ref: "#/components/schemas/AddressBookBulkContactResource"
    AddressBookBulkUploadRequest:
      required:
        - records
      type: object
      properties:
        records:
          type: array
          minItems: 1
          maxItems: 500
          items:
            $ref: "#/components/schemas/AddressBookBulkUploadResource"
    AddressBookBulkContactResource:
      type: object
      properties:
        email:
          type: string
          format: email
          description: Email of a contact
          example: charlie.williams@example.com
        notes:
          type: string
          description: Notes for a contact
          example: "#1 Customer"
        company:
          type: string
          description: Company name of a contact
          example: Example, Inc.
        firstName:
          type: string
          description: First name of a contact
          example: Charlie
        lastName:
          type: string
          description: Last name of a contact
          example: Williams
        jobTitle:
          type: string
          description: Job title of a contact
          example: CEO
        birthday:
          type: string
          description: Date of birth of a contact
          format: date-time
        webPage:
          type: string
          description: Link to a contact home page
          example: http://www.example.com
        middleName:
          type: string
          description: Middle name of a contact
          example: J
        nickName:
          type: string
          description: Nick name of a contact
          example: The Boss
        email2:
          type: string
          format: email
          description: Second email of a contact
          example: charlie-example@gmail.com
        email3:
          type: string
          format: email
          description: Third email of the contact
          example: theboss-example@hotmail.com
        homePhone:
          type: string
          description: Home phone number of a contact in e.164 (with "+") format
          example: "+15551234567"
        homePhone2:
          type: string
          description: Second home phone number of a contact in e.164 (with "+") format
          example: "+15551234567"
        businessPhone:
          type: string
          description: Business phone of a contact in e.164 (with "+") format
          example: "+15551234567"
        businessPhone2:
          type: string
          description: Second business phone of a contact in e.164 (with "+") format
          example: "+15551234567"
        mobilePhone:
          type: string
          description: Mobile phone of the contact in e.164 (with "+") format
          example: "+15551234567"
        businessFax:
          type: string
          description: Business fax number of a contact in e.164 (with "+") format
          example: "+15551234567"
        companyPhone:
          type: string
          description: Company number of a contact in e.164 (with "+") format
          example: "+15551234567"
        assistantPhone:
          type: string
          description: Phone number of a contact assistant in e.164 (with "+") format
          example: "+15551234567"
        carPhone:
          type: string
          description: Car phone number of a contact in e.164 (with "+") format
          example: "+15551234567"
        otherPhone:
          type: string
          description: Other phone number of a contact in e.164 (with "+") format
          example: "+15551234567"
        otherFax:
          type: string
          description: Other fax number of a contact in e.164 (with "+") format
          example: "+15551234567"
        callbackPhone:
          type: string
          description: Callback phone number of a contact in e.164 (with "+") format
          example: "+15551234567"
        businessAddress:
          $ref: "#/components/schemas/AddressBookBulkContactAddressInfo"
        homeAddress:
          $ref: "#/components/schemas/AddressBookBulkContactAddressInfo"
        otherAddress:
          $ref: "#/components/schemas/AddressBookBulkContactAddressInfo"
    AddressBookBulkContactAddressInfo:
      type: object
      properties:
        country:
          type: string
          description: |
            Country name of the extension user company. Not returned for Address
            Book
        state:
          type: string
          description: State/province name of the extension user company
        city:
          type: string
          description: City name of the extension user company
        street:
          type: string
          description: Street address of the extension user company
        zip:
          type: string
          description: Zip code of the extension user company
    CallQueueInfo:
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Link to a call queue
        id:
          type: string
          description: Internal identifier of a call queue
        extensionNumber:
          type: string
          description: Extension number of a call queue
        name:
          type: string
          description: Name of a call queue
        status:
          $ref: "#/components/schemas/ExtensionStatusEnumGroup"
        subType:
          type: string
          description: Indicates whether it is an emergency call queue extension or not
          enum:
            - Emergency
            - Unknown
        site:
          $ref: "#/components/schemas/SiteBasicInfo"
    CallQueueList:
      required:
        - navigation
        - paging
        - records
        - uri
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Link to a call queues resource
        records:
          type: array
          description: List of call queues
          items:
            $ref: "#/components/schemas/CallQueueInfo"
        navigation:
          $ref: "#/components/schemas/PageNavigationModel"
        paging:
          $ref: "#/components/schemas/EnumeratedPagingModel"
    ExtensionStatusEnumGroup:
      type: string
      description: Group extension status
      enum:
        - Enabled
        - Disabled
        - NotActivated
        - Unassigned
    CallQueueServiceLevelSettings:
      type: object
      properties:
        slaGoal:
          type: integer
          format: int32
          description: |
            Target percentage of calls that must be answered by agents
            within the service level time threshold
        slaThresholdSeconds:
          type: integer
          format: int32
          description: |
            The period of time in seconds that is considered to be an acceptable
            service level
        includeAbandonedCalls:
          type: boolean
          description: |
            Includes abandoned calls (when callers hang up prior to being
            served by an agent) into service-level calculation
        abandonedThresholdSeconds:
          type: integer
          format: int32
          description: |
            Abandoned calls that are shorter than the defined period of
            time in seconds will not be included into the calculation of Service Level
      description: Call queue service level settings
    SiteReference:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a site
    CallQueueDetails:
      allOf:
        - $ref: "#/components/schemas/CallQueueInfo"
        - type: object
          properties:
            serviceLevelSettings:
              $ref: "#/components/schemas/CallQueueServiceLevelSettings"
            editableMemberStatus:
              type: boolean
              description: Allows members to change their queue status
            alertTimer:
              $ref: "#/components/schemas/CallQueueAlertTimerEnum"
    CallQueueDetailsForUpdate:
      type: object
      properties:
        extensionNumber:
          type: string
          description: Extension number of a call queue
        name:
          type: string
          description: Name of a call queue
        status:
          $ref: "#/components/schemas/ExtensionStatusEnumGroup"
        subType:
          type: string
          description: Indicates whether it is an emergency call queue extension or not
          enum:
            - Emergency
            - Unknown
        site:
          $ref: "#/components/schemas/SiteReference"
        serviceLevelSettings:
          $ref: "#/components/schemas/CallQueueServiceLevelSettings"
        editableMemberStatus:
          type: boolean
          description: Allows members to change their queue status
        alertTimer:
          $ref: "#/components/schemas/CallQueueAlertTimerEnum"
    CallQueueAlertTimerEnum:
      type: integer
      format: int32
      description: |
        Alert timer or pickup setting. Delay time in seconds before call queue group members are notified when calls are queued
      enum:
        - 5
        - 10
        - 15
        - 20
        - 30
        - 45
        - 60
        - 120
        - 180
        - 240
        - 300
        - 360
        - 420
        - 480
        - 540
        - 600
    AllExtensionSubtypesEnum:
      type: string
      description: |
        Extension subtype, if applicable.
        For unrecognized subtypes the `Unknown` value is returned
      enum:
        - VideoPro
        - VideoProPlus
        - DigitalSignageOnlyRooms
        - Unknown
        - Emergency
    CallQueuePresenceEvent:
      type: object
      properties:
        uuid:
          type: string
          description: Universally unique identifier of a notification
        event:
          type: string
          description: Event filter name
        timestamp:
          type: string
          format: date-time
          description: Timestamp when this notification was sent in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format including timezone, for example *2016-03-10T18:07:52.534Z*
        subscriptionId:
          type: string
          description: Internal identifier of a subscription
        body:
          $ref: "#/components/schemas/CallQueuePresenceEventBody"
    CallQueuePresenceEventBody:
      type: object
      description: Notification payload body
      properties:
        extensionId:
          type: string
          description: Agent extension ID
        callQueueId:
          type: string
          description: Call queue extension ID
        acceptCalls:
          type: boolean
          description: Call queue agent availability for calls of this queue
    CallQueueMember:
      type: object
      description: Call queue member information
      properties:
        id:
          type: string
          description: Internal identifier of an extension - queue member
        name:
          type: string
          description: Extension full name
        extensionNumber:
          type: string
          description: Extension number
        site:
          $ref: "#/components/schemas/SiteBasicInfo"
        extensionSubType:
          $ref: "#/components/schemas/AllExtensionSubtypesEnum"
    CallQueuePresence:
      type: object
      properties:
        records:
          type: array
          items:
            $ref: "#/components/schemas/CallQueueMemberPresence"
    CallQueueMemberPresence:
      type: object
      properties:
        member:
          $ref: "#/components/schemas/CallQueueMember"
        acceptQueueCalls:
          readOnly: true
          type: boolean
          description: |
            Private member telephony availability status applied to calls
            of all queues. Please note - this parameter can be passed in request body,
            but will be ignored
        acceptCurrentQueueCalls:
          type: boolean
          description: Call queue member availability in this particular queue
    CallQueueUpdatePresence:
      type: object
      properties:
        records:
          type: array
          items:
            $ref: "#/components/schemas/CallQueueMemberPresence"
    CallQueueBulkAssignResource:
      type: object
      properties:
        addedExtensionIds:
          type: array
          items:
            type: string
        removedExtensionIds:
          type: array
          items:
            type: string
    CallQueueMemberInfo:
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Link to a call queue member
        id:
          type: integer
          format: int64
          description: Internal identifier of a call queue member
        extensionNumber:
          type: string
          description: Extension number of a call queue member
    CallQueueMembers:
      required:
        - navigation
        - paging
        - records
        - uri
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Link to a call queue members resource
        records:
          type: array
          description: List of call queue members
          items:
            $ref: "#/components/schemas/CallQueueMemberInfo"
        navigation:
          $ref: "#/components/schemas/PageNavigationModel"
        paging:
          $ref: "#/components/schemas/EnumeratedPagingModel"
    EmergencyLocationRequestResource:
      type: object
      properties:
        address:
          $ref: "#/components/schemas/EmergencyAddressResourceRequest"
        name:
          type: string
          description: Emergency response location name
        site:
          $ref: "#/components/schemas/SiteBasicInfo"
        addressFormatId:
          type: string
          description: Address format ID
        visibility:
          type: string
          description: |
            Visibility of an emergency response location. If `Private`
            is set, then a location is visible only for restricted number of users,
            specified in `owners` array
          default: Public
          enum:
            - Public
        trusted:
          allOf:
            - $ref: "#/components/schemas/TrustedFlag"
            - default: false
    EmergencyAddressStatus:
      type: string
      description: Emergency address status
      enum:
        - Valid
        - Invalid
        - Provisioning
        - Deprovisioned
    EmergencyLocationsPaging:
      required:
        - page
        - totalPages
        - perPage
        - totalElements
        - pageStart
        - pageEnd
      type: object
      properties:
        page:
          type: integer
          format: int32
        totalPages:
          type: integer
          format: int32
        perPage:
          type: integer
          format: int32
        totalElements:
          type: integer
          format: int32
        pageStart:
          type: integer
          format: int32
        pageEnd:
          type: integer
          format: int32
    SyncStatus:
      type: string
      description: |
        Resulting status of emergency address synchronization. Returned
        if `syncEmergencyAddress` parameter is set to `true`
      enum:
        - Verified
        - Updated
        - Deleted
        - ActivationProcess
        - NotRequired
        - Unsupported
        - Failed
    EmergencyLocationsResource:
      type: object
      properties:
        uri:
          type: string
          description: Link to an emergency locations resource
        records:
          type: array
          items:
            $ref: "#/components/schemas/CommonEmergencyLocationResource"
        paging:
          $ref: "#/components/schemas/EmergencyLocationsPaging"
        navigation:
          $ref: "#/components/schemas/PageNavigationModel"
    EmergencyAddressResourceRequest:
      type: object
      properties:
        country:
          type: string
          description: Country name
        countryId:
          type: string
          description: Internal identifier of a country
        state:
          type: string
          description: |
            State/Province name. Mandatory for the USA, the UK and Canada
        stateId:
          type: string
          description: Internal identifier of a state
        city:
          type: string
          description: City name
        street:
          type: string
          description: First line address
        street2:
          type: string
          description: |
            Second line address (apartment, suite, unit, building, floor,
            etc.)
        zip:
          type: string
          description: Postal (Zip) code
        customerName:
          type: string
          description: Customer name
      additionalProperties:
        description: |
          Any address fields are accepted but within the boundaries of the address format (specific or default for a certain country)
        type: string
    EmergencyAddressType:
      type: string
      enum:
        - LocationWithElins
        - LocationWithEndpoint
    CommonEmergencyLocationResource:
      type: object
      properties:
        uri:
          type: string
          readOnly: true
          description: Link to an emergency location resource
        id:
          type: string
          description: |
            Internal identifier of an emergency response location
        address:
          $ref: "#/components/schemas/EmergencyLocationAddressResource"
        name:
          type: string
          description: Emergency response location name
        site:
          $ref: "#/components/schemas/SiteBasicInfo"
        addressStatus:
          $ref: "#/components/schemas/EmergencyAddressStatus"
        usageStatus:
          $ref: "#/components/schemas/UsageStatus"
        syncStatus:
          $ref: "#/components/schemas/SyncStatus"
        addressType:
          $ref: "#/components/schemas/EmergencyAddressType"
        visibility:
          $ref: "#/components/schemas/EmergencyLocationVisibility"
        owners:
          type: array
          description: List of private location owners
          items:
            $ref: "#/components/schemas/LocationOwnerInfo"
        addressFormatId:
          type: string
          description: Address format ID
        addressFormatStatus:
          $ref: "#/components/schemas/AddressFormatStatus"
        trusted:
          $ref: "#/components/schemas/TrustedFlag"
      description: Company emergency response location details
    LocationOwnerInfo:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a user - private location owner
        extensionNumber:
          type: string
          description: Extension number of a location number
        name:
          type: string
          description: Name of a location owner
    EmergencyLocationUsageStatus:
      type: string
      enum:
        - Active
        - Inactive
    UsageStatus:
      type: string
      description: Status of emergency response location usage.
      enum:
        - Active
        - Inactive
    EmergencyLocationResponseResource:
      $ref: "#/components/schemas/CommonEmergencyLocationResource"
    EmergencyLocationVisibility:
      type: string
      description: |
        Visibility of an emergency response location. If `Private`
        is set, then location is visible only for the restricted number of users,
        specified in `owners` array
      default: Public
      enum:
        - Private
        - Public
    LocationDeletionInfo:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        deletion:
          type: string
          description: |
            Identifies the possibility and status of emergency location
            deletion
          enum:
            - Failed
            - Completed
            - Forbidden
            - Restricted
            - Allowed
        errors:
          $ref: "#/components/schemas/LocationDeletionErrorInfo"
    GetLocationDeletionMultiResponse:
      type: object
      properties:
        deletion:
          type: string
          enum:
            - Forbidden
            - Restricted
            - Allowed
        reassignment:
          type: string
          enum:
            - Forbidden
            - Allowed
        emergencyLocations:
          type: array
          items:
            $ref: "#/components/schemas/LocationDeletionInfo"
    LocationDeletionErrorInfo:
      type: object
      properties:
        errorCode:
          type: string
          description: Error code
        message:
          type: string
          description: Error message
        additionalInfo:
          type: string
          description: Additional attribute for this error, for example `parameterName`
    DepartmentMemberList:
      type: object
      description: |
        Please note that legacy 'Department' extension type corresponds to
        'Call Queue' extensions in modern RingCentral product terminology
      properties:
        uri:
          type: string
          format: uri
          description: Canonical URL of the resource
        records:
          type: array
          description: List of call queue member extensions
          items:
            $ref: "#/components/schemas/ExtensionInfo"
        navigation:
          $ref: "#/components/schemas/PageNavigationModel"
        paging:
          $ref: "#/components/schemas/EnumeratedPagingModel"
    ExtensionInfo:
      type: object
      properties:
        id:
          type: integer
          format: int64
          description: Internal identifier of an extension
        uri:
          type: string
          format: uri
          description: Canonical URI of an extension
        name:
          type: string
          description: Extension name
        extensionNumber:
          type: string
          description: Extension short number
        partnerId:
          type: string
          description: |
            For partner applications. Internal identifier of an extension
            created by partner. The RingCentral supports the mapping of accounts and
            stores the corresponding account ID/extension ID for each partner ID of
            a client application. In request URIs partner IDs are accepted instead
            of regular RingCentral native IDs as path parameters using `pid=XXX` clause.
            Though in response URIs contain the corresponding account IDs and extension
            IDs. In all request and response bodies these values are reflected via
            partnerId attributes of account and extension
      description: |
        Information on the extension, to which the phone number is assigned.
        Returned only for the request of Account phone number list
    BulkAssignItem:
      type: object
      properties:
        departmentId:
          type: string
        addedExtensionIds:
          type: array
          items:
            type: string
        removedExtensionIds:
          type: array
          items:
            type: string
    DepartmentBulkAssignResource:
      type: object
      description: |
        Please note that legacy 'Department' extension type corresponds to
        'Call Queue' extensions in modern RingCentral product terminology
      properties:
        items:
          type: array
          items:
            $ref: "#/components/schemas/BulkAssignItem"
    PresenceNavigationInfoURI:
      type: object
      description: Canonical URI for the corresponding page of the list
      properties:
        uri:
          type: string
          format: uri
    AcceptCallQueueCalls:
      type: boolean
      description: |
        Specifies if a Call Queue member extension will be able to receive Call Queue calls.
        Used for the Agent state type. Applicable for User extensions if the new communication
        handling service is activated on account
      default: false
    ActiveCallInfo:
      type: object
      properties:
        id:
          type: string
        direction:
          type: string
          enum:
            - Inbound
            - Outbound
        queueCall:
          type: boolean
          description: Identifies if a call belongs to the call queue
        from:
          type: string
          description: Phone number or extension number of a caller. For GCM transport type '_from' property should be used
        fromName:
          type: string
          description: Name of a caller
        to:
          type: string
          description: Phone number or extension number of a callee
        toName:
          type: string
          description: Name of a callee
        startTime:
          type: string
          format: date-time
          description: Time when the call is actually started
        telephonyStatus:
          type: string
          description: Telephony presence status
          enum:
            - NoCall
            - CallConnected
            - Ringing
            - OnHold
            - ParkedCall
        sipData:
          $ref: "#/components/schemas/DetailedCallInfo"
        sessionId:
          type: string
        telephonySessionId:
          type: string
          description: Telephony identifier of a call session
        onBehalfOf:
          type: string
          description: Extension ID of the call owner on whose behalf a call is performed
        partyId:
          type: string
          description: Internal identifier of a call party
        terminationType:
          type: string
        callInfo:
          $ref: "#/components/schemas/CallInfoCQ"
        appearanceInfo:
          $ref: "#/components/schemas/AppearanceInfo"
    PrimaryCQInfo:
      type: object
      properties:
        type:
          type: string
          description: Call information to be displayed as 'Line 1' for a call queue call session
          enum:
            - PhoneNumberLabel
            - PhoneNumber
            - QueueExtension
            - QueueName
            - CallerIdName
            - CallerIdNumber
            - None
        value:
          type: string
          description: Call information value
      description: Primary call session information. Supported for Call Queues only
    DndStatusPersonal:
      type: string
      description: |
        Do Not Disturb status of a User extension. Connected to the DND State type.
        Applicable for User extensions if the new communication handling service is
        activated on account.
      enum:
        - TakeAllCalls
        - DoNotAcceptAnyCalls
        - Unknown
    AdditionalCQInfo:
      type: object
      properties:
        type:
          type: string
          description: Call information to be displayed as 'Line 2' for a call queue call session
          enum:
            - PhoneNumberLabel
            - PhoneNumber
            - QueueExtension
            - QueueName
            - CallerIdName
            - CallerIdNumber
            - None
        value:
          type: string
          description: Call information value
      description: Additional call session information. Supported for Call Queues only
    AccountPresenceInfo:
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Canonical URI of account presence resource
        records:
          type: array
          description: List of Prompts
          items:
            $ref: "#/components/schemas/PresenceInfoResponse"
        navigation:
          $ref: "#/components/schemas/PresenceNavigationInfo"
        paging:
          $ref: "#/components/schemas/PresencePagingInfo"
    AggregatedTelephonyStatus:
      type: string
      description: Telephony status of the extension aggregated across all telephony status sources.
      enum:
        - NoCall
        - CallConnected
        - Ringing
        - OnHold
        - ParkedCall
    AccountPresenceEvent:
      type: object
      properties:
        uuid:
          type: string
          description: Universally unique identifier of a notification
        event:
          type: string
          description: Event filter name
        timestamp:
          type: string
          format: date-time
          description: Timestamp when this notification was sent in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format including timezone, for example *2016-03-10T18:07:52.534Z*
        subscriptionId:
          type: string
          description: Internal identifier of a subscription
        body:
          $ref: "#/components/schemas/AccountPresenceEventBody"
    PresencePagingInfo:
      type: object
      description: Information on paging
      properties:
        page:
          type: integer
          format: int32
          description: The current page number. 1-indexed, so the first page is 1 by default. May be omitted if result is empty (because non-existent page was specified or perPage=0 was requested)
        perPage:
          type: integer
          format: int32
          description: Current page size, describes how many items are in each page. Default value is 100. Maximum value is 1000. If perPage value in the request is greater than 1000, the maximum value (1000) is applied
        pageStart:
          type: integer
          format: int32
          description: The zero-based number of the first element on the current page. Omitted if the page is omitted or result is empty
        pageEnd:
          type: integer
          format: int32
          description: The zero-based index of the last element on the current page. Omitted if the page is omitted or result is empty
        totalPages:
          type: integer
          format: int32
          description: The total number of pages in a dataset. May be omitted for some resources due to performance reasons
        totalElements:
          type: integer
          format: int32
          description: The total number of elements in a dataset. May be omitted for some resource due to performance reasons
    AppearanceInfo:
      type: object
      description: Appearance phone numbers information. Supported only for Delegated Lines Group extensions
      properties:
        phoneNumber:
          type: string
          description: Appearance phone number
        appearanceNumber:
          type: integer
          format: int32
          description: Appearance number. The value range is from 1 to 8
    DetailedCallInfo:
      type: object
      properties:
        callId:
          type: string
        toTag:
          type: string
        fromTag:
          type: string
        remoteUri:
          format: uri
          type: string
        localUri:
          format: uri
          type: string
        rcSessionId:
          type: string
    CallInfoCQ:
      type: object
      description: Primary/additional CQ information
      properties:
        primary:
          $ref: "#/components/schemas/PrimaryCQInfo"
        additional:
          $ref: "#/components/schemas/AdditionalCQInfo"
    GetPresenceExtensionInfo:
      type: object
      description: Information on extension, for which this presence data is returned
      properties:
        id:
          type: integer
          format: int64
          description: Internal identifier of an extension
        uri:
          type: string
          format: uri
          description: Canonical URI of an extension
        extensionNumber:
          type: string
          description: Extension number (usually 3 or 4 digits)
    CxTelephonyStatus:
      type: string
      description: CX telephony status
      enum:
        - NoCall
        - CallConnected
    PresenceInfoResponse:
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Link to the presence resource
        userStatus:
          type: string
          description: User-defined presence status (as previously published by the user)
          enum:
            - Offline
            - Busy
            - Available
        dndStatus:
          type: string
          description: |
            Do Not Disturb status. Not applicable for User extensions
            if the new communication handling service is activated on account.

            Please note: Cannot be set for Department/Announcement/Voicemail
            (Take Messages Only)/Fax User/Shared Lines Group/Paging Only Group/IVR
            Menu/Application Extension/Park Location extensions.

            The 'DoNotAcceptDepartmentCalls' and 'TakeDepartmentCallsOnly' values
            are applicable only for extensions - members of a Department; if these values
            are set for department outsiders, the 400 Bad Request error code is returned.

            The 'TakeDepartmentCallsOnly' status can be set through the old RingCentral
            user interface and is available for some migrated accounts only.
          enum:
            - TakeAllCalls
            - DoNotAcceptDepartmentCalls
            - TakeDepartmentCallsOnly
            - DoNotAcceptAnyCalls
            - Unknown
        dndStatusPersonal:
          $ref: "#/components/schemas/DndStatusPersonal"
        acceptCallQueueCalls:
          $ref: "#/components/schemas/AcceptCallQueueCalls"
        message:
          type: string
          description: Custom status message (as previously published by user)
          maxLength: 75
          minLength: 0
        allowSeeMyPresence:
          type: boolean
          description: If set to `true` enables other extensions to see the extension presence status
          default: true
        callerIdVisibility:
          type: string
          description: |
            Configures the user presence visibility. When the `allowSeeMyPresence` parameter is set to `true`,
            the following visibility options are supported via this parameter - All, None, PermittedUsers
          enum:
            - All
            - None
            - PermittedUsers
        ringOnMonitoredCall:
          type: boolean
          description: |
            If `true` enables to ring extension phone, if any user monitored
            by this extension is ringing
          default: false
        pickUpCallsOnHold:
          type: boolean
          description: If `true` enables the extension user to pick up a monitored line on hold
          default: false
        activeCalls:
          type: array
          items:
            $ref: "#/components/schemas/ActiveCallInfo"
        extension:
          $ref: "#/components/schemas/GetPresenceExtensionInfo"
        meetingStatus:
          type: string
          description: Meetings presence status
          enum:
            - Connected
            - Disconnected
        telephonyStatus:
          type: string
          description: Telephony presence status. Returned if telephony status is changed
          enum:
            - NoCall
            - CallConnected
            - Ringing
            - OnHold
            - ParkedCall
        presenceStatus:
          type: string
          description: Aggregated presence status, calculated from a number of sources
          enum:
            - Offline
            - Busy
            - Available
        cxTelephonyStatus:
          $ref: "#/components/schemas/CxTelephonyStatus"
        aggregatedTelephonyStatus:
          $ref: "#/components/schemas/AggregatedTelephonyStatus"
    AccountPresenceEventBody:
      type: object
      description: Notification payload body
      properties:
        extensionId:
          type: string
          description: Internal identifier of an extension. Optional parameter
          default: "~"
        telephonyStatus:
          type: string
          description: Telephony presence status. Returned if telephony status is changed
          enum:
            - NoCall
            - CallConnected
            - Ringing
            - OnHold
            - ParkedCall
        sequence:
          type: integer
          format: int32
          description: Order number of a notification to state the chronology
        presenceStatus:
          type: string
          description: Aggregated presence status, calculated from a number of sources
          enum:
            - Offline
            - Busy
            - Available
        userStatus:
          type: string
          description: User-defined presence status (as previously published by the user)
          enum:
            - Offline
            - Busy
            - Available
        dndStatus:
          type: string
          description: |
            Do Not Disturb status. Not applicable for User extensions
            if the new communication handling service is activated on account
          enum:
            - TakeAllCalls
            - DoNotAcceptDepartmentCalls
            - TakeDepartmentCallsOnly
            - DoNotAcceptAnyCalls
            - Unknown
        dndStatusPersonal:
          $ref: "#/components/schemas/DndStatusPersonal"
        meetingStatus:
          type: string
          enum:
            - Connected
            - Disconnected
          description: Meetings presence status. Specifies if a user is on a meeting
        allowSeeMyPresence:
          type: boolean
          description: If set to `true` enables other extensions to see the extension presence status
        acceptCallQueueCalls:
          $ref: "#/components/schemas/AcceptCallQueueCalls"
        ringOnMonitoredCall:
          type: boolean
          description: |
            If `true` enables to ring extension phone, if any user monitored
            by this extension is ringing
        pickUpCallsOnHold:
          type: boolean
          description: If `true` enables the extension user to pick up a monitored line on hold
        ownerId:
          type: string
          description: Internal identifier of a subscription owner extension
    PresenceNavigationInfo:
      type: object
      description: Information on navigation
      properties:
        firstPage:
          $ref: "#/components/schemas/PresenceNavigationInfoURI"
        nextPage:
          $ref: "#/components/schemas/PresenceNavigationInfoURI"
        previousPage:
          $ref: "#/components/schemas/PresenceNavigationInfoURI"
        lastPage:
          $ref: "#/components/schemas/PresenceNavigationInfoURI"
    ExtensionWithRolesCollectionResource:
      type: object
      properties:
        uri:
          type: string
          format: uri
        records:
          type: array
          items:
            $ref: "#/components/schemas/ExtensionWithRolesResource"
        paging:
          $ref: "#/components/schemas/EnumeratedPagingModel"
        navigation:
          $ref: "#/components/schemas/PageNavigationModel"
    AssignedRoleResource:
      type: object
      properties:
        uri:
          type: string
          description: Link to an assigned role resource
          format: uri
          readOnly: true
        id:
          type: string
          description: Internal identifier of a role
        autoAssigned:
          type: boolean
          default: false
          description: Specifies if a role can be auto assigned
        displayName:
          type: string
          description: Name of a default role
        siteCompatible:
          type: boolean
          description: Site compatibility flag
        siteRestricted:
          type: boolean
          description: Site restricted flag
    ExtensionWithRolesResource:
      type: object
      properties:
        uri:
          type: string
          format: uri
        extensionId:
          type: string
        roles:
          type: array
          items:
            $ref: "#/components/schemas/AssignedRoleResource"
    CallRecordingIds:
      type: object
      required:
        - records
      properties:
        records:
          type: array
          description: Call recordings ID(s) to delete
          items:
            type: string
          minItems: 1
          maxItems: 100
    ForwardAllCompanyCallsRequest:
      type: object
      required:
        - enabled
      properties:
        enabled:
          type: boolean
          description: Indicates whether the *Forward All Company Calls* feature is enabled or disabled for an account
    ForwardAllCallsReason:
      type: object
      properties:
        code:
          type: string
          enum:
            - ExtensionLimitation
            - FeatureLimitation
          description: |
            Specifies the type of limitation. `ExtensionLimitation` means that the feature is turned off for this particular extension.
            `FeatureLimitation` means that the user may enable this feature and setup the rule via the Service Web UI
        message:
          type: string
          description: Error message depending on the type of limitation
    ForwardAllCompanyCallsInfo:
      type: object
      properties:
        enabled:
          type: boolean
          description: Indicates whether the *Forward All Company Calls* feature is enabled or disabled for an account
        ranges:
          type: array
          description: Specific data ranges. If specified, weeklyRanges cannot be specified
          items:
            $ref: "#/components/schemas/RangesInfo"
        callHandlingAction:
          $ref: "#/components/schemas/IvrCallHandlingActionEnum"
        extension:
          $ref: "#/components/schemas/ExtensionShortInfoResource"
        reason:
          $ref: "#/components/schemas/ForwardAllCallsReason"
    ExtensionShortInfoResource:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of an extension
        name:
          type: string
          description: Extension name
        extensionNumber:
          type: string
          description: Extension number
    IvrCallHandlingActionEnum:
      type: string
      description: |
        Specifies how incoming calls are forwarded. The default value
        is 'Operator' 'Operator' - play company greeting and forward to operator
        extension 'Disconnect' - play company greeting and disconnect 'Bypass'
        - bypass greeting to go to selected extension = ['Operator', 'Disconnect',
        'Bypass']
      enum:
        - Operator
        - Disconnect
        - Bypass
    CallMonitoringGroups:
      required:
        - navigation
        - paging
        - records
        - uri
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Link to a call monitoring groups resource
        records:
          type: array
          description: List of call monitoring group members
          items:
            $ref: "#/components/schemas/CallMonitoringGroup"
        navigation:
          $ref: "#/components/schemas/PageNavigationModel"
        paging:
          $ref: "#/components/schemas/EnumeratedPagingModel"
    CallMonitoringGroup:
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Link to a call monitoring group resource
        id:
          type: string
          description: Internal identifier of a group
        name:
          type: string
          description: Name of a group
        site:
          type: object
          properties:
            id:
              type: string
              description: Identifier of a site
            name:
              type: string
              description: Name of a site
    CreateCallMonitoringGroupRequest:
      required:
        - name
      type: object
      properties:
        name:
          type: string
          description: Name of a group
        site:
          type: object
          properties:
            id:
              type: string
              description: Identifier of a site
    CallMonitoringBulkAssign:
      type: object
      properties:
        addedExtensions:
          type: array
          items:
            $ref: "#/components/schemas/CallMonitoringExtensionInfo"
        updatedExtensions:
          type: array
          items:
            $ref: "#/components/schemas/CallMonitoringExtensionInfo"
        removedExtensions:
          type: array
          items:
            $ref: "#/components/schemas/CallMonitoringExtensionInfo"
    CallMonitoringExtensionInfo:
      type: object
      properties:
        id:
          type: string
          description: |
            Internal identifier of an extension. Only the following extension
            types are allowed: User, DigitalUser, VirtualUser, FaxUser, Limited
        permissions:
          type: array
          description: |
            Set of call monitoring group permissions granted to a specified
            extension. In order to remove a specified extension from a call monitoring
            group use an empty value
          items:
            type: string
            enum:
              - Monitoring
              - Monitored
    CallMonitoringGroupMemberInfo:
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Link to a call monitoring group member
        id:
          type: string
          description: |
            Internal identifier of a call monitoring group member
        extensionNumber:
          type: string
          description: |
            Extension number of a call monitoring group member
        permissions:
          type: array
          items:
            type: string
            description: |
              Call monitoring permission; multiple values are allowed:
              - `Monitoring` - User can monitor a group;
              - `Monitored` - User can be monitored.
            enum:
              - Monitoring
              - Monitored
    CallMonitoringGroupMemberList:
      required:
        - navigation
        - paging
        - records
        - uri
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Link to a call monitoring group members resource
        records:
          type: array
          description: List of a call monitoring group members
          items:
            $ref: "#/components/schemas/CallMonitoringGroupMemberInfo"
        navigation:
          $ref: "#/components/schemas/PageNavigationModel"
        paging:
          $ref: "#/components/schemas/EnumeratedPagingModel"
    ModifyAccountBusinessAddressRequest:
      type: object
      properties:
        company:
          type: string
          description: Company business name
        email:
          type: string
          format: email
          description: Company business email address
        businessAddress:
          $ref: "#/components/schemas/BusinessAddressInfo"
        mainSiteName:
          type: string
          description: Custom site name
    BusinessAddressInfo:
      type: object
      properties:
        country:
          type: string
          description: Name of a country
        state:
          type: string
          description: Name of a state/province
        city:
          type: string
          description: Name of a city
        street:
          type: string
          description: Street address
        zip:
          type: string
          description: Zip code
      description: Company business address
    AccountBusinessAddressResource:
      type: object
      properties:
        uri:
          type: string
          format: uri
        businessAddress:
          $ref: "#/components/schemas/ContactBusinessAddressInfo"
        company:
          type: string
          description: Company business name
        email:
          type: string
          format: email
          description: Company business email address
        mainSiteName:
          type: string
          description: Custom site name
    AccountHistoryRecordTarget:
      type: object
      description: Action target object (company/extension)
      properties:
        objectId:
          type: string
          description: Extension identifier of the affected entity or "0" for Company level
          example: "404611540004"
        objectType:
          type: string
          description: Type of the entity.
          example: Extension
          enum:
            - Extension
            - Account
            - Company
            - Template
        name:
          type: string
          description: Target extension name
          example: Charlie Williams
        extensionNumber:
          type: string
          description: Target extension (short) number  of the affected entity (if the objectType is EXTENSION).
          example: "103"
        siteId:
          type: string
          description: Target extension site identifier (if any)
          example: "871836004"
    AccountHistoryRecordPublicDetails:
      type: object
      properties:
        parameters:
          type: array
          description: Event details (additional parameters)
          items:
            $ref: "#/components/schemas/AccountHistoryRecordDetailsParameters"
    AccountHistoryRecordDetailsParameters:
      required:
        - key
        - value
      type: object
      properties:
        key:
          type: string
          example: settingName
        value:
          type: string
          example: Password
    AccountHistoryPaging:
      type: object
      properties:
        page:
          type: integer
          format: int32
          minimum: 1
          maximum: 1000
          description: |
            The current page number. 1-indexed, so the first page is 1 by default. May be omitted if result is empty
            (because non-existent page was specified or perPage=0 was requested)
        perPage:
          type: integer
          format: int32
          minimum: 1
          maximum: 1000
          description: Current page size, describes how many items are in each page. Matches "perPage" parameter from the request
          example: 50
        total:
          type: integer
          format: int32
          minimum: 0
          description: Total number of pages in a dataset. May be omitted for some resources due to performance reasons
          example: 25
        totalFound:
          type: integer
          format: int32
          minimum: 0
          description: Total number of elements in a dataset. May be omitted for some resources due to performance reasons
          example: 25
    AccountHistorySearchPublicResponse:
      type: object
      properties:
        records:
          type: array
          description: List of records
          items:
            $ref: "#/components/schemas/AccountHistoryPublicRecord"
        paging:
          $ref: "#/components/schemas/AccountHistoryPaging"
    AccountHistoryPublicRecord:
      type: object
      properties:
        id:
          type: string
          description: Internal record identifier
          example: 9835bead-397b-4ba8-b457-73f07ab79997
        eventTime:
          type: string
          description: Timestamp of an event (provided by a client), RFC3339 date-time format, UTC time zone.
          format: date-time
        initiator:
          $ref: "#/components/schemas/AccountHistoryRecordPublicInitiator"
        actionId:
          type: string
          description: Action type
          example: CHANGE_SECRET_INFO
        eventType:
          type: string
          description: 'Operation: "CREATE", "UPDATE", "DELETE" or custom'
          example: UPDATE
        accountId:
          type: string
          description: Account identifier which is related with the particular record.
          example: "403858014008"
        accountName:
          type: string
          description: Account (company) name
          example: Some Company
        target:
          $ref: "#/components/schemas/AccountHistoryRecordTarget"
        clientIp:
          type: string
          description: IP-address of a client.
          example: 192.168.42.6
        comment:
          type: string
          description: Custom top-level comment
        details:
          $ref: "#/components/schemas/AccountHistoryRecordPublicDetails"
    AccountHistorySearchPublicRequest:
      type: object
      properties:
        eventTimeFrom:
          type: string
          format: date-time
          description: |
            The beginning of the time range to return records in ISO 8601 format in UTC timezone, default is "eventTimeFrom"-24 hours
        eventTimeTo:
          type: string
          format: date-time
          description: The end of the time range to return records in ISO 8601 format in UTC timezone, default is the current time
        initiatorIds:
          type: array
          description: List of extension IDs of change initiators.
          items:
            type: string
        page:
          type: integer
          format: int32
          example: 1
          description: Page number in the result set
        perPage:
          type: integer
          format: int32
          example: 25
          description: Number of records to be returned per page.
        targetIds:
          type: array
          example:
            - "404611540004"
          description: List of extension (user) IDs affected by this action.
          items:
            type: string
        siteId:
          type: string
          example: "871836004"
          description: Site ID to apply as a filter
        actionIds:
          type: array
          example:
            - CHANGE_SECRET_INFO
            - CHANGE_USER_INFO
          description: List of action IDs (exact keys) to search for (alternatively "excludeActionIds" option can be used).
          items:
            type: string
        searchString:
          type: string
          example: "542617"
          description: |-
            The (sub)string to search, applied to the following fields:

            - initiator.name
            - initiator.role
            - initiator.extensionNumber
            - target.name
            - target.extensionNumber
            - details.parameters.value
        excludeActionIds:
          type: array
          example:
            - CHANGE_SECRET_INFO
            - CHANGE_USER_INFO
          description: List of action IDs (exact keys) to exclude from your search (alternatively "actionIds" option can be used).
          items:
            type: string
    AccountHistoryRecordPublicInitiator:
      type: object
      description: Event initiator info
      properties:
        extensionId:
          type: string
          description: Current user extension identifier
          example: "402539300008"
        extensionNumber:
          type: string
          description: Current user extension (short) number
          example: "101"
        name:
          type: string
          description: Current user full name
          example: Alice Smith
        role:
          type: string
          description: Current user role
          example: Super Admin
    IvrMenuInfo:
      type: object
      required:
        - promptRepeatCount
      properties:
        id:
          type: string
          description: Internal identifier of an IVR Menu extension
        uri:
          type: string
          format: uri
          description: Link to an IVR Menu extension resource
        name:
          type: string
          description: First name of an IVR Menu user
        extensionNumber:
          type: string
          description: Number of an IVR Menu extension
        promptRepeatCount:
          $ref: "#/components/schemas/IvrPromptRepeatCount"
        site:
          $ref: "#/components/schemas/IvrMenuSiteInfo"
        prompt:
          $ref: "#/components/schemas/IvrMenuPromptInfo"
        actions:
          type: array
          description: Keys handling settings
          items:
            $ref: "#/components/schemas/IvrMenuActionsInfo"
    IvrMenuPromptInfo:
      type: object
      properties:
        mode:
          type: string
          description: "Prompt mode: custom media or text"
          enum:
            - Audio
            - TextToSpeech
        audio:
          $ref: "#/components/schemas/AudioPromptInfo"
        text:
          type: string
          description: For 'TextToSpeech' mode only. Prompt text
        language:
          $ref: "#/components/schemas/PromptLanguageInfo"
      description: Prompt metadata
    IvrMenuSiteInfo:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a site. If the value is not specified in request, then the `main-site` default value is used
        name:
          type: string
          description: Site name
      description: Site data
    IvrMenuListInfo:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of an IVR Menu extension
          example: "7258440006"
        uri:
          type: string
          format: uri
          description: Link to an IVR Menu extension resource
          example: https://api-example.rincentral.com/restapi/v1.0/account/5936989006/ivr-menus/7258440006
        name:
          type: string
          description: First name of an IVR Menu user
          example: IVR Menu 1001
        extensionNumber:
          type: string
          description: Number of an IVR Menu extension
          example: "1001"
    PromptLanguageInfo:
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Link to a prompt language
        id:
          type: string
          description: Internal identifier of a language
        name:
          type: string
          description: Language name
        localeCode:
          type: string
          description: Language locale code
      description: For 'TextToSpeech' mode only. Prompt language metadata
    IvrPromptRepeatCountDefault:
      allOf:
        - $ref: "#/components/schemas/IvrPromptRepeatCount"
        - type: integer
          default: 3
    IvrMenuExtensionInfo:
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Link to an extension resource
        id:
          type: string
          description: Internal identifier of an extension
        name:
          type: string
          description: Name of an extension
        pin:
          type: string
          description: Extension number
      description: For 'Connect' or 'Voicemail' actions only. Extension reference
    IvrMenuActionsInfo:
      type: object
      properties:
        input:
          type: string
          description: Key pressed by the user
          enum:
            - "0"
            - "1"
            - "2"
            - "3"
            - "4"
            - "5"
            - "6"
            - "7"
            - "8"
            - "9"
            - Hash
            - Star
            - NoInput
        action:
          type: string
          description: Action to be taken on key press
          enum:
            - Connect
            - Voicemail
            - DialByName
            - Transfer
            - Repeat
            - ReturnToRoot
            - ReturnToPrevious
            - Disconnect
            - ReturnToTopLevelMenu
            - DoNothing
            - ConnectToOperator
            - TransferToContactCenterNumber
            - ConnectToIncomingCallRoutingSelection
        extension:
          $ref: "#/components/schemas/IvrMenuExtensionInfo"
        phoneNumber:
          type: string
          description: For 'Transfer' action only. PSTN number in E.164 format
    AudioPromptInfo:
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Link to a prompt audio file
        id:
          type: string
          description: Internal identifier of a prompt
      description: For 'Audio' mode only. Prompt media reference
    IvrMenuList:
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Link to an IVR Menu list
        records:
          type: array
          description: List of ivr menus
          items:
            $ref: "#/components/schemas/IvrMenuListInfo"
    IvrPromptRepeatCount:
      type: integer
      format: int32
      description: |
        Number of attempts the IVR prompt will be played during a call before
        the "NoInput" rule will be executed. For request payloads, unsupported
        values return a `CMN-101` error.
      enum:
        - 1
        - 2
        - 3
    IvrMenuInfoRequest:
      type: object
      properties:
        name:
          type: string
          description: First name of an IVR Menu user
        extensionNumber:
          type: string
          description: Number of an IVR Menu extension
        site:
          $ref: "#/components/schemas/IvrMenuSiteInfo"
        prompt:
          $ref: "#/components/schemas/IvrMenuPromptInfo"
        actions:
          type: array
          description: Keys handling settings
          items:
            $ref: "#/components/schemas/IvrMenuActionsInfo"
    IvrMenuInfoCreate:
      allOf:
        - $ref: "#/components/schemas/IvrMenuInfoRequest"
        - type: object
          properties:
            promptRepeatCount:
              $ref: "#/components/schemas/IvrPromptRepeatCountDefault"
    IvrMenuInfoUpdate:
      allOf:
        - $ref: "#/components/schemas/IvrMenuInfoRequest"
        - type: object
          properties:
            promptRepeatCount:
              $ref: "#/components/schemas/IvrPromptRepeatCount"
    CreateMessageStoreReportRequest:
      type: object
      properties:
        dateTo:
          type: string
          format: date-time
          description: |
            The end of the time range to collect message records in ISO 8601 format including timezone.
            Default is the current time
        dateFrom:
          type: string
          format: date-time
          description: |
            The beginning of the time range to collect call log records in ISO 8601 format including timezone.
            Default is the current time minus 24 hours
        messageTypes:
          type: array
          description: Types of messages to be collected. If not specified, all messages without message type filtering will be returned. Multiple values are accepted
          items:
            $ref: "#/components/schemas/PicMessageTypeEnum"
          example:
            - Fax
            - VoiceMail
    MessageStoreReport:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a message store report task
          example: 400142200026-400142200026-bd162f24028442489385eb3f44c18354
        uri:
          type: string
          format: uri
          description: Canonical URI of a task
        status:
          type: string
          description: Status of a message store report task
          enum:
            - Accepted
            - Pending
            - InProgress
            - AttemptFailed
            - Failed
            - Completed
            - Cancelled
        accountId:
          type: string
          description: Internal identifier of an account
        extensionId:
          type: string
          description: Internal identifier of an extension
        dateTo:
          type: string
          format: date-time
          description: The end of the time range to collect message records in ISO 8601 format including timezone
        dateFrom:
          type: string
          format: date-time
          description: The beginning of the time range to collect call log records in ISO 8601 format including timezone
        startTime:
          type: string
          format: date-time
          description: The time when this task was started
        finishTime:
          type: string
          format: date-time
          description: The time when this task was finished
        messageTypes:
          type: array
          description: Type of messages to be collected.
          items:
            $ref: "#/components/schemas/PicMessageTypeEnum"
          example:
            - Fax
            - VoiceMail
    PicMessageTypeEnum:
      type: string
      description: Type of messages to be collected
      enum:
        - Fax
        - SMS
        - VoiceMail
        - Pager
      example: Fax
    MessageStoreReportArchive:
      type: object
      properties:
        records:
          type: array
          items:
            $ref: "#/components/schemas/ArchiveInfo"
    ArchiveInfo:
      type: object
      properties:
        size:
          type: integer
          format: int64
          description: Archive size in bytes
          example: 201412
        uri:
          type: string
          format: uri
          description: Link for archive download
    ADGError:
      type: object
      properties:
        errorCode:
          type: string
          description: Code that characterizes this error. Code uniquely identifies the source of the error.
          readOnly: true
          enum:
            - ErrorCode{code='ADG-000', httpStatus=503, description='Service temporary unavailable.'}
            - ErrorCode{code='ADG-010', httpStatus=503, description='Federation data temporary unavailable.'}
            - ErrorCode{code='ADG-001', httpStatus=500, description='Service internal error.'}
            - ErrorCode{code='ADG-100', httpStatus=403, description='Insufficient permissions.'}
            - ErrorCode{code='ADG-101', httpStatus=403, description='Unauthorized access.'}
            - ErrorCode{code='ADG-102', httpStatus=405, description='Method not allowed.'}
            - ErrorCode{code='ADG-111', httpStatus=400, description='Need Content-Type header.'}
            - ErrorCode{code='ADG-112', httpStatus=400, description='Request body is invalid.'}
            - ErrorCode{code='ADG-121', httpStatus=400, description='Parameter [${paramName}] is invalid. ${additionalInfo:-}'}
            - ErrorCode{code='ADG-115', httpStatus=415, description='Unsupported Media Type.'}
            - ErrorCode{code='ADG-105', httpStatus=404, description='Current account is not linked to any federation.'}
            - ErrorCode{code='ADG-107', httpStatus=404, description='Account not found.'}
            - ErrorCode{code='ADG-122', httpStatus=404, description='Contact not found.'}
            - ErrorCode{code='ADG-200', httpStatus=404, description='Invalid URI'}
        message:
          type: string
          description: Message that describes the error. This message can be used in UI.
          readOnly: true
        parameterName:
          type: string
          description: Name of invalid parameter.
          readOnly: true
      description: Description of an error occurred during request processing. This data type can be used only in readonly mode, no writing is allowed
    BusinessSiteResource:
      type: object
      properties:
        id:
          type: string
          example: "872781820006"
        name:
          type: string
          example: Sales site
        code:
          type: string
          example: "1007"
    UsageTypes:
      type: string
      enum:
        - MainCompanyNumber
        - AdditionalCompanyNumber
        - DirectNumber
        - CompanyNumber
        - CompanyFaxNumber
        - ForwardedNumber
        - ForwardedCompanyNumber
        - ContactCenterNumber
        - ConferencingNumber
        - MeetingsNumber
        - NumberPool
        - ELIN
        - BusinessMobileNumber
        - ExternalMobileNumber
        - IntegrationNumber
        - PartnerBusinessMobileNumber
        - NumberPoolPartnerBusinessMobileNumber
        - NumberStorage
        - FmcBusinessMobileNumber
        - InventoryFmcBusinessMobileNumber
        - InventoryMobileNumber
    AdgPhoneNumberResource:
      type: object
      properties:
        formattedPhoneNumber:
          type: string
          example: +1 (205) 6812029
        phoneNumber:
          type: string
          example: "+12056812029"
        type:
          type: string
          example: VoiceFax
        label:
          type: string
          description: Custom user name of a phone number, if any
          example: Boss
        usageType:
          description: Usage type of phone number
          example: DirectNumber
          anyOf:
            - $ref: "#/components/schemas/UsageTypes"
            - type: string
              enum:
                - MobileNumber
                - ContactNumber
        hidden:
          type: boolean
          description: Specifies if a phone number should be hidden or not
        primary:
          type: boolean
          description: Specifies if the number is primary, i.e. displayed as 'main number' and called by default
        e164:
          type: string
          description: Phone number in E.164 format
          example: "+12056812029"
        formatted:
          type: string
          description: Formatted phone number
          example: +1 (205) 681-2029
        smsAvailabilityStatus:
          $ref: "#/components/schemas/ADGPhoneNumberSmsAvailabilityStatus"
        smsCampaignId:
          type: string
          description: SMS campaign identifier
    ExternalIntegrationResource:
      type: object
      properties:
        id:
          type: string
          example: "9813"
        typeId:
          type: string
          example: "1"
        type:
          type: string
          example: External
        displayName:
          type: string
          example: Integration X
        routingType:
          type: string
          example: Account
        outboundEdgeId:
          type: string
          example: "1726"
    ContactResource:
      required:
        - id
      type: object
      properties:
        id:
          type: string
          description: Contact extension identifier
          example: "865706371004"
        type:
          type: string
          description: Contact type
          example: User
          enum:
            - User
            - Department
            - Announcement
            - Voicemail
            - SharedLinesGroup
            - PagingOnly
            - ParkLocation
            - IvrMenu
            - Limited
            - ApplicationExtension
            - Site
            - Bot
            - Room
            - ProxyAdmin
            - DelegatedLinesGroup
            - GroupCallPickup
            - External
            - RoomConnector
            - Unknown
        status:
          type: string
          description: Contact status
          example: Enabled
          enum:
            - Enabled
            - Disabled
            - Frozen
            - NotActivated
            - Unassigned
            - Unknown
        account:
          $ref: "#/components/schemas/AccountResource"
        department:
          type: string
          example: External
        email:
          type: string
          format: email
          example: john.doe@mycompany.com
        extensionNumber:
          type: string
          example: "103"
        firstName:
          type: string
          description: First name of a contact, for user extensions only
          example: John
        lastName:
          type: string
          description: Last name of a contact, for user extensions only
          example: Doe
        name:
          type: string
          description: Name of a contact, for non-user extensions
          example: Conference room ?5
        jobTitle:
          type: string
          example: Sales manager
        phoneNumbers:
          type: array
          items:
            $ref: "#/components/schemas/AdgPhoneNumberResource"
        profileImage:
          $ref: "#/components/schemas/AccountDirectoryProfileImageResource"
        site:
          $ref: "#/components/schemas/BusinessSiteResource"
        hidden:
          type: boolean
        customFields:
          type: array
          items:
            $ref: "#/components/schemas/CustomFieldResource"
        integration:
          $ref: "#/components/schemas/ExternalIntegrationResource"
    AccountResource:
      required:
        - id
      type: object
      properties:
        companyName:
          type: string
          example: My lovely company
        federatedName:
          type: string
          example: Lovely Holding
        id:
          type: string
          example: "400131426008"
        mainNumber:
          $ref: "#/components/schemas/AdgPhoneNumberResource"
    DirectoryResource:
      required:
        - records
        - paging
      type: object
      properties:
        paging:
          $ref: "#/components/schemas/EnumeratedPagingModel"
        records:
          type: array
          items:
            $ref: "#/components/schemas/ContactResource"
    CustomFieldResource:
      type: object
      properties:
        id:
          type: string
          example: "1032854"
        name:
          type: string
          example: Rank
        value:
          type: string
          example: "5"
    ADGSearchableExtensionTypesEnum:
      type: string
      enum:
        - User
        - Department
        - Announcement
        - Voicemail
        - SharedLinesGroup
        - PagingOnly
        - IvrMenu
        - ParkLocation
        - Limited
        - External
        - DelegatedLinesGroup
        - TieLine
    ADGPhoneNumberSmsAvailabilityStatus:
      type: string
      description: SMS availability status of a phone number
      enum:
        - Active
        - Inactive
        - Disabled
        - Banned
        - Suspended
        - Deprovisioning
        - InboundOnly
        - Unknown
    AccountDirectoryProfileImageResource:
      type: object
      properties:
        etag:
          type: string
          example: tag
        uri:
          type: string
          format: uri
    ADGErrorResponse:
      type: object
      properties:
        errors:
          type: array
          description: Collection of all gathered errors
          readOnly: true
          items:
            $ref: "#/components/schemas/ADGError"
      description: Format of response in case that any error occurred during request processing
    SearchDirectoryExtensionTypes:
      type: array
      description: Types of extension to filter the contacts
      items:
        $ref: "#/components/schemas/SearchDirectoryExtensionType"
    ADGIntegrationRoutingSearchType:
      type: string
      enum:
        - Carrier
        - Account
    SearchDirectoryExtensionType:
      type: string
      description: Type of extension to filter the contacts
      enum:
        - User
        - Department
        - Announcement
        - Voicemail
        - DigitalUser
        - VirtualUser
        - FaxUser
        - PagingOnly
        - SharedLinesGroup
        - IvrMenu
        - ApplicationExtension
        - ParkLocation
        - Limited
        - Bot
        - Site
        - Room
        - ProxyAdmin
        - DelegatedLinesGroup
        - FlexibleUser
        - GroupCallPickup
        - RoomConnector
        - TieLine
        - External
      example: User
    SearchDirectoryEntriesRequest:
      type: object
      properties:
        searchString:
          type: string
          description: |
            String value to filter the contacts. The value specified is
            searched through the following fields: `firstName`, `lastName`, `extensionNumber`, `phoneNumber`, `email`,
            `jobTitle`, `department`, `customFieldValue`
        searchFields:
          type: array
          description: The list of field to be searched for
          items:
            type: string
            enum:
              - firstName
              - lastName
              - extensionNumber
              - phoneNumber
              - email
              - jobTitle
              - department
              - customFieldValue
        showFederated:
          type: boolean
          description: If `true` then contacts of all accounts in federation are returned, if it is in federation, account section will be returned. If `false` then only contacts of the current account are returned, and account section is eliminated in this case
          default: true
        showAdminOnlyContacts:
          type: boolean
          description: Should show AdminOnly Contacts
          default: false
        extensionType:
          $ref: "#/components/schemas/SearchDirectoryContactType"
        siteId:
          type: string
          description: Internal identifier of the business site to which extensions belong
          example: "872781797006"
        showExternalContacts:
          type: boolean
          default: false
          description: Allows to control whether External (Hybrid) contacts should be returned in the response or not
          example: true
        accountIds:
          type: array
          description: The list of Internal identifiers of an accounts
          items:
            type: string
          example:
            - "854874047006"
            - "422456828004"
            - "854874151006"
        department:
          type: string
          description: Department
        siteIds:
          type: array
          description: The list of Internal identifiers of the business sites to which extensions belong
          items:
            type: string
        extensionStatuses:
          type: array
          description: Extension current state.
          items:
            type: string
            enum:
              - Enabled
              - Disabled
              - NotActivated
        extensionTypes:
          $ref: "#/components/schemas/SearchDirectoryExtensionTypes"
        extensionIds:
          type: array
          description: The list of internal identifiers of the extension
          minItems: 0
          maxItems: 100
          items:
            type: string
        integrationRoutingTypes:
          type: array
          minItems: 1
          maxItems: 2
          items:
            $ref: "#/components/schemas/ADGIntegrationRoutingSearchType"
        phoneNumberSmsAvailabilityStatuses:
          type: array
          description: The list of SMS availability statuses to filter phone numbers
          minItems: 1
          items:
            $ref: "#/components/schemas/ADGPhoneNumberSmsAvailabilityStatus"
        phoneNumberSmsCampaignIds:
          type: array
          description: The list of SMS campaign IDs to filter phone numbers
          minItems: 1
          items:
            type: string
        orderBy:
          type: array
          description: Sorting settings
          items:
            $ref: "#/components/schemas/OrderBy"
        page:
          type: integer
          format: int32
        perPage:
          type: integer
          format: int32
      example:
        searchString: John Doe
        searchFields:
          - lastName
          - email
        showFederated: true
        siteIds:
          - "872781797006"
          - "872781820006"
        extensionStatuses:
          - Enabled
        department: R&D department
        page: 1
        perPage: 30
    SearchDirectoryContactType:
      type: string
      description: Type of directory contact to filter
      enum:
        - User
        - Department
        - Announcement
        - Voicemail
        - SharedLinesGroup
        - PagingOnly
        - ParkLocation
        - IvrMenu
        - Limited
        - ApplicationExtension
        - Site
        - Bot
        - Room
        - DelegatedLinesGroup
        - GroupCallPickup
        - External
      example: User
    OrderBy:
      type: object
      properties:
        index:
          type: integer
          format: int32
          default: 1
          description: Sorting priority index, starting from '1'. Optional if only one element in `orderBy` array is specified
          example: 1
        fieldName:
          type: string
          description: Field name by which to sort the contacts
          enum:
            - firstName
            - lastName
            - extensionNumber
            - phoneNumber
            - email
            - jobTitle
            - department
          example: department
        direction:
          type: string
          default: Asc
          description: Sorting direction
          enum:
            - Asc
            - Desc
          example: Asc
    FederationType:
      type: string
      description: Federation type
      enum:
        - Regular
        - AdminOnly
    FederationTypes:
      type: string
      description: Federation types for search
      enum:
        - All
        - Regular
        - AdminOnly
    FederationResource:
      type: object
      properties:
        accounts:
          type: array
          items:
            $ref: "#/components/schemas/FederatedAccountResource"
        creationTime:
          type: string
          format: date-time
        displayName:
          type: string
        id:
          type: string
        lastModifiedTime:
          type: string
          format: date-time
        type:
          $ref: "#/components/schemas/FederationType"
    FederatedAccountResource:
      allOf:
        - type: object
          required:
            - id
          properties:
            companyName:
              type: string
            conflictCount:
              type: integer
              format: int32
            federatedName:
              type: string
            id:
              type: string
            linkCreationTime:
              type: string
              format: date-time
            mainNumber:
              $ref: "#/components/schemas/AdgPhoneNumberResource"
    PagingGroupExtensionInfo:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a paging group user extension
        uri:
          type: string
          format: uri
          description: Link to a paging group user extension
        extensionNumber:
          type: string
          description: Extension number of a paging group user
        name:
          type: string
          description: Name of a paging group user
    PagingOnlyGroupUsers:
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: |
            Link to a list of users allowed to page the Paging Only group
        records:
          type: array
          description: List of users allowed to page the Paging Only group
          items:
            $ref: "#/components/schemas/PagingGroupExtensionInfo"
        navigation:
          $ref: "#/components/schemas/PageNavigationModel"
        paging:
          $ref: "#/components/schemas/EnumeratedPagingModel"
    EditPagingGroupRequest:
      type: object
      properties:
        addedUserIds:
          type: array
          description: |
            List of users that will be allowed to page a group specified
          items:
            type: string
        removedUserIds:
          type: array
          description: |
            List of users that will be disallowed to page a group specified
          items:
            type: string
        addedDeviceIds:
          type: array
          description: |
            List of account devices that will be assigned to a paging group
            specified
          items:
            type: string
        removedDeviceIds:
          type: array
          description: |
            List of account devices that will be unassigned from a paging
            group specified
          items:
            type: string
    PagingOnlyGroupDevices:
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Link to a list of devices assigned to the paging only group
        records:
          type: array
          description: List of paging devices assigned to this group
          items:
            $ref: "#/components/schemas/PagingDeviceInfo"
        navigation:
          $ref: "#/components/schemas/PageNavigationModel"
        paging:
          $ref: "#/components/schemas/EnumeratedPagingModel"
    PagingDeviceInfo:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a paging device
        uri:
          type: string
          format: uri
          description: Link to a paging device resource
        name:
          type: string
          description: Name of a paging device
    SiteInfo:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a site extension
        uri:
          type: string
          format: uri
          description: Link to a site resource
        name:
          type: string
          description: Extension user first name
        extensionNumber:
          type: string
          description: Extension number
        callerIdName:
          type: string
          description: |
            Custom name of a caller. Max number of characters is 15 (only
            alphabetical symbols, numbers and commas are supported)
        email:
          type: string
          format: email
          description: Site extension contact email
        businessAddress:
          $ref: "#/components/schemas/ContactBusinessAddressInfo"
        regionalSettings:
          $ref: "#/components/schemas/RegionalSettings"
        siteAccess:
          $ref: "#/components/schemas/SiteAccessStatus"
        operator:
          $ref: "#/components/schemas/OperatorInfo"
        code:
          type: string
          description: |
            Site code value. Returned only if specified
    SiteAccessStatus:
      type: string
      description: Site access status for cross-site limitation
      enum:
        - Limited
        - Unlimited
    SitesList:
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Link to a sites resource
        records:
          type: array
          items:
            $ref: "#/components/schemas/SiteInfo"
        navigation:
          $ref: "#/components/schemas/PageNavigationModel"
        paging:
          $ref: "#/components/schemas/EnumeratedPagingModel"
    CreateSiteRequest:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a site extension
        name:
          type: string
          description: Extension user first name
        extensionNumber:
          type: string
          description: Extension number
        callerIdName:
          type: string
          description: |
            Custom name of a caller. Max number of characters is 15 (only
            alphabetical symbols, numbers and commas are supported)
        email:
          type: string
          format: email
          description: Extension user email
        businessAddress:
          $ref: "#/components/schemas/ContactBusinessAddressInfo"
        regionalSettings:
          $ref: "#/components/schemas/RegionalSettings"
        operator:
          $ref: "#/components/schemas/SiteOperatorReference"
        siteAccess:
          $ref: "#/components/schemas/SiteAccessStatus"
        accessibleSiteIds:
          type: array
          items:
            type: string
            description: Site id that is accessible for the current site
        code:
          type: string
          description: Site code value
        costCenter:
          $ref: "#/components/schemas/CostCenterInfo"
    OperatorInfo:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of an operator
        uri:
          type: string
          format: uri
          description: Link to an operator resource
        extensionNumber:
          type: string
          description: Extension number (pin)
        name:
          type: string
          description: Operator extension user full name
      description: |
        Site Fax/SMS recipient (operator) reference. Multi-level IVR should
        be enabled
    CostCenterInfo:
      type: object
      description: Cost center information. Applicable if Cost Center feature is enabled. The default is `root` cost center value
      properties:
        id:
          type: string
          description: Internal identifier of a cost center
        name:
          type: string
          description: Name of a cost center
    SiteOperatorReference:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of an operator extension
      description: |
        Site Fax/SMS recipient (operator) reference. Multi-level IVR should
        be enabled
    SiteUpdateRequest:
      type: object
      properties:
        name:
          type: string
          description: Extension user first name
        extensionNumber:
          type: string
          description: Extension number
        callerIdName:
          type: string
          description: |
            Custom name of a caller. Max number of characters is 15 (only
            alphabetical symbols, numbers and commas are supported)
        email:
          type: string
          format: email
          description: Site extension contact email
        businessAddress:
          $ref: "#/components/schemas/ContactBusinessAddressInfo"
        regionalSettings:
          $ref: "#/components/schemas/RegionalSettings"
        operator:
          $ref: "#/components/schemas/OperatorInfo"
        siteAccess:
          $ref: "#/components/schemas/SiteAccessStatus"
        accessibleSiteIds:
          type: array
          items:
            type: string
            description: Site id that is accessible for the current site
    SiteMembersBulkUpdate:
      type: object
      properties:
        removedExtensionIds:
          type: array
          description: List of removed extensions
          items:
            type: string
        addedExtensionIds:
          type: array
          description: List of added extensions
          items:
            type: string
    SiteMembersList:
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Link to a site members list resource
        records:
          type: array
          items:
            $ref: "#/components/schemas/SiteMemberInfo"
        navigation:
          $ref: "#/components/schemas/PageNavigationModel"
        paging:
          $ref: "#/components/schemas/EnumeratedPagingModel"
    SiteMemberInfo:
      type: object
      properties:
        id:
          type: integer
          format: int64
        uri:
          type: string
          format: uri
        extensionNumber:
          type: string
        type:
          type: string
        name:
          type: string
    SiteIVRActionsExtensionInfo:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of an extension
        uri:
          readOnly: true
          type: string
          format: uri
          description: Canonical URI of an extension
        name:
          type: string
          description: Name of an extension user
      description: Extension information
    SiteIVRSettings:
      type: object
      required:
        - promptRepeatCount
      properties:
        topMenu:
          $ref: "#/components/schemas/SiteIVRTopMenu"
        promptRepeatCount:
          $ref: "#/components/schemas/IvrPromptRepeatCount"
        actions:
          type: array
          items:
            $ref: "#/components/schemas/SiteIvrActions"
    SiteIvrActions:
      type: object
      properties:
        input:
          type: string
          enum:
            - Star
            - Hash
            - NoInput
            - "0"
        action:
          type: string
          description: |
            Key handling action:
            - Repeat - repeat menu greeting, for Star and Hash only;
            - ReturnToRoot - return to root IVR menu, for Star and Hash only;
            - ReturnToPrevious - return to previous IVR menu, for Star and Hash only;
            - Connect - connect to specific extension, for NoInput and "0" (zero) only;
            - Disconnect - end call, for NoInput only.
          enum:
            - Repeat
            - ReturnToRoot
            - ReturnToPrevious
            - ReturnToTopLevelMenu
            - Connect
            - ConnectToIncomingCallRoutingSelection
            - ConnectToOperator
            - Disconnect
            - DoNothing
        extension:
          $ref: "#/components/schemas/SiteIVRActionsExtensionInfo"
      description: Keys handling settings
    SiteIVRTopMenuUpdate:
      type: object
      properties:
        id:
          type: string
          description: |
            Internal identifier of an IVR menu extension
      description: Top IVR Menu extension
    SiteIVRTopMenu:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of an IVR menu extension
        uri:
          type: string
          format: uri
          description: Link to an IVR menu extension resource
        name:
          type: string
          description: Full name of an IVR menu extension user
      description: |
        Top IVR Menu extension. Mandatory for MultiLevel mode
    SiteIVRSettingsUpdate:
      type: object
      properties:
        topMenu:
          $ref: "#/components/schemas/SiteIVRTopMenuUpdate"
        actions:
          type: array
          items:
            $ref: "#/components/schemas/SiteIvrActions"
        promptRepeatCount:
          $ref: "#/components/schemas/IvrPromptRepeatCount"
    GetCallRecordingResponse:
      type: object
      required:
        - id
        - contentUri
        - contentType
        - duration
      properties:
        id:
          type: string
          description: Internal identifier of a call recording
        contentUri:
          type: string
          format: uri
          description: |
            Link to a call recording binary content. Has to be retrieved with proper authorization
            (access token must be passed via `Authorization` header or query parameter)
        contentType:
          type: string
          description: Call recording file MIME format. Supported format is `audio/wav` and `audio/mpeg`
          example: audio/wav
        duration:
          type: integer
          format: int32
          description: Recorded call duration
    MessageStoreConfiguration:
      type: object
      properties:
        retentionPeriod:
          maximum: 90
          minimum: 7
          type: integer
          format: int32
          description: |
            Retention policy setting, specifying how long to keep messages;
            the supported value range is 7-90 days. Currently, the retention period is supported for `Fax` and `Voicemail` messages only.
            SMS messages are stored with no time limits
    AnsweringRuleQueryRequest:
      type: object
      description: |
        This parameter is not supported for all User type extensions if the new call handling service
        is activated on account
      properties:
        id:
          type: string
          description: Internal identifier of an answering rule
    CustomCompanyGreetingLanguageInfo:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a greeting language
        uri:
          type: string
          format: uri
          description: Link to a greeting language
        name:
          type: string
          description: Name of a greeting language
        localeCode:
          type: string
          description: Locale code of a greeting language
      description: Information on a greeting language. Supported for types 'StopRecording', 'StartRecording', 'AutomaticRecording'
    CustomCompanyGreetingInfo:
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Link to an extension custom greeting
        id:
          type: string
          description: Internal identifier of an answering rule
        type:
          type: string
          description: Type of a company greeting
          enum:
            - Company
            - StartRecording
            - StopRecording
            - AutomaticRecording
            - TemplateGreeting
        contentType:
          type: string
          description: Content media type
          enum:
            - audio/mpeg
            - audio/wav
        contentUri:
          type: string
          format: uri
          description: Link to a greeting content (audio file)
        answeringRule:
          $ref: "#/components/schemas/CustomGreetingAnsweringRuleInfo"
        language:
          $ref: "#/components/schemas/CustomCompanyGreetingLanguageInfo"
        text:
          $ref: "#/components/schemas/TextForSpeech"
    CustomGreetingAnsweringRuleInfo:
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Canonical URI of an answering rule
        id:
          type: string
          description: Internal identifier of an answering rule
      description: Information on an answering rule that the greeting is applied to
    TextForSpeech:
      type: string
      description: Text to be used for speech transcription
      maxLength: 2000
      example: Welcome to RingCentral
    RoleResource:
      type: object
      properties:
        uri:
          type: string
          description: Link to a role resource
          format: uri
          readOnly: true
        id:
          type: string
          description: Internal identifier of a role
        displayName:
          maxLength: 128
          minLength: 0
          pattern: ^((?!(<|>|\/|\")).)*$
          type: string
          example: Super Admin
          description: Display name of a role
        description:
          maxLength: 2000
          minLength: 0
          pattern: ^((?!(<|>|\/|\")).)*$
          type: string
          description: Role description
          example: Primary company administrator role
        siteCompatible:
          type: boolean
          description: Site compatibility of a user role
        custom:
          type: boolean
          default: false
          description: Specifies if a user role is custom
        scope:
          type: string
          description: Specifies resource for permission
          enum:
            - Account
            - AllExtensions
            - Federation
            - Group
            - NonUserExtensions
            - RoleBased
            - Self
            - UserExtensions
        hidden:
          type: boolean
          default: false
        lastUpdated:
          type: string
          format: date-time
        permissions:
          type: array
          items:
            $ref: "#/components/schemas/PermissionIdResource"
    PermissionsCapabilities:
      type: object
      description: Advanced permissions capabilities. Returned if `advancedPermissions` query parameter is set to `true`.
      properties:
        enabled:
          type: boolean
          description: Specifies whether the user is enabled with the listed permission or not
        manageEnabled:
          type: boolean
          description: Specifies if the user can manage the listed permission and is allowed to enable it on other users
        grantEnabled:
          type: boolean
          description: Specifies if the users who were enabled with the listed permission can grant it further to other users
    RolesCollectionResource:
      type: object
      properties:
        uri:
          type: string
          format: uri
        records:
          type: array
          items:
            $ref: "#/components/schemas/RoleResource"
        paging:
          $ref: "#/components/schemas/EnumeratedPagingModel"
        navigation:
          $ref: "#/components/schemas/PageNavigationModel"
    PermissionIdResource:
      type: object
      properties:
        uri:
          type: string
          format: uri
        id:
          type: string
        siteCompatible:
          type: string
          description: Site compatibility flag set for permission
          enum:
            - Compatible
            - Incompatible
            - Independent
        readOnly:
          type: boolean
          description: Specifies if the permission is editable on UI (if set to `true`) or not (if set to `false`)
        assignable:
          type: boolean
          description: Specifies if the permission can be assigned by the account administrator
        permissionsCapabilities:
          $ref: "#/components/schemas/PermissionsCapabilities"
    DefaultUserRole:
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Link to a default role resource
        id:
          type: string
          description: Internal identifier of a default role
        displayName:
          maxLength: 128
          minLength: 0
          pattern: ^((?!(<|>|\/|\")).)*$
          type: string
          description: Custom name of a default role
          example: My Custom User Role
        siteCompatible:
          type: boolean
          description: Site compatibility of a user role
    DefaultUserRoleRequest:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a user role to be set as default
    BulkRoleAssignResource:
      type: object
      properties:
        siteRestricted:
          type: boolean
          example: true
        siteCompatible:
          type: boolean
        uri:
          type: string
          format: uri
        addedExtensionIds:
          type: array
          items:
            type: string
        removedExtensionIds:
          type: array
          items:
            type: string
    ProfileImageInfoURI:
      type: object
      properties:
        uri:
          type: string
          format: uri
    GetExtensionAccountInfo:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of an account
        uri:
          type: string
          format: uri
          description: Canonical URI of an account resource
      description: Account information
    AssignedCountryInfo:
      type: object
      description: Information on a country assigned to an extension user. Returned for the User extension type only
      properties:
        id:
          type: string
          description: Internal identifier of an assigned country
        uri:
          type: string
          format: uri
          description: Canonical URI of an assigned country resource
        isoCode:
          $ref: "#/components/schemas/CountryIsoCode"
        name:
          type: string
          description: Official name of a country
    ExtensionListEventBody:
      type: object
      properties:
        extensionId:
          type: string
          description: Internal identifier of an extension
        eventType:
          type: string
          description: Type of extension info change
          enum:
            - Create
            - Update
            - Delete
        ownerId:
          type: string
          description: |
            Internal identifier of a subscription owner extension
      description: Notification payload body
    ExtensionListEvent:
      type: object
      properties:
        uuid:
          type: string
          description: |
            Universally unique identifier of a notification
        event:
          type: string
          description: Event filter URI
        timestamp:
          type: string
          description: |
            Date/time of sending a notification in
            [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)
            format including timezone, for example *2016-03-10T18:07:52.534Z*
        subscriptionId:
          type: string
          description: Internal identifier of a subscription
        body:
          $ref: "#/components/schemas/ExtensionListEventBody"
    GetExtensionInfoResponse:
      type: object
      properties:
        id:
          type: integer
          description: Internal identifier of an extension
          format: int64
        uri:
          type: string
          format: uri
          description: Canonical URI of an extension
        account:
          $ref: "#/components/schemas/GetExtensionAccountInfo"
        contact:
          $ref: "#/components/schemas/ContactInfo"
        costCenter:
          $ref: "#/components/schemas/CostCenterInfo"
        customFields:
          type: array
          items:
            $ref: "#/components/schemas/CustomFieldInfo"
        departments:
          type: array
          description: |
            Information on department extension(s), to which the requested
            extension belongs. Returned only for user extensions, members of
            department, requested by single extensionId. Please note that
            legacy 'Department' extension type corresponds to 'Call Queue'
            extensions in modern RingCentral product terminology
          items:
            $ref: "#/components/schemas/DepartmentInfo"
        extensionNumber:
          type: string
          description: Extension short number
        extensionNumbers:
          type: array
          items:
            type: string
        name:
          type: string
          description: |
            Extension name. For user extension types the value is a combination
            of the specified first name and last name
        partnerId:
          type: string
          description: |
            For Partner Applications Internal identifier of an extension
            created by partner. The RingCentral supports mapping of accounts and
            stores the corresponding account ID/extension ID for each partner ID of
            a client application. In request URIs partner IDs are accepted instead
            of regular RingCentral native IDs as path parameters using `pid=XXX` clause.
            Though in response URIs contain the corresponding account IDs and extension
            IDs. In all request and response bodies these values are reflected via
            partnerId attributes of account and extension
        permissions:
          $ref: "#/components/schemas/ExtensionPermissions"
        profileImage:
          $ref: "#/components/schemas/ProfileImageInfo"
        references:
          type: array
          description: List of non-RC internal identifiers assigned to an extension
          items:
            $ref: "#/components/schemas/ReferenceInfo"
        roles:
          type: array
          items:
            $ref: "#/components/schemas/Roles"
        regionalSettings:
          $ref: "#/components/schemas/RegionalSettings"
        serviceFeatures:
          type: array
          description: |
            Extension service features is returned in response only when the
            logged-in user requests their own extension info, see also Extension
            Service Features
          items:
            $ref: "#/components/schemas/ExtensionServiceFeatureInfo"
        setupWizardState:
          $ref: "#/components/schemas/SetupWizardStateForUpdateEnum"
        status:
          $ref: "#/components/schemas/ExtensionStatusEnumFull"
        statusInfo:
          $ref: "#/components/schemas/ExtensionStatusInfo"
        type:
          $ref: "#/components/schemas/AllExtensionTypesEnum"
        subType:
          $ref: "#/components/schemas/AllExtensionSubtypesEnum"
        callQueueInfo:
          $ref: "#/components/schemas/CallQueueExtensionInfo"
        hidden:
          type: boolean
          description: |
            Hides extension from showing in company directory. Supported for
            extensions of User type only
        site:
          $ref: "#/components/schemas/ProvisioningSiteInfo"
        assignedCountry:
          $ref: "#/components/schemas/AssignedCountryInfo"
        creationTime:
          type: string
          description: |
            Extension creation date/time, in ISO 8601 format
          format: date-time
          example: 2024-06-06T07:01:14.123Z
        siteAccess:
          $ref: "#/components/schemas/SiteAccessStatus"
        alertTimer:
          $ref: "#/components/schemas/CallQueueAlertTimerEnum"
    PermissionInfoAdmin:
      type: object
      properties:
        enabled:
          type: boolean
          description: Specifies if a permission is enabled or not
      description: Admin permission
    ExtensionPermissions:
      type: object
      properties:
        admin:
          $ref: "#/components/schemas/PermissionInfoAdmin"
        internationalCalling:
          $ref: "#/components/schemas/PermissionInfoInt"
      description: |
        Extension permissions, corresponding to the Service Web permissions
        'Admin' and 'InternationalCalling'
    ContactInfoCreationRequest:
      type: object
      required:
        - firstName
        - email
      properties:
        firstName:
          type: string
          description: |
            For User extension type only. Extension user first name
          maxLength: 64
        lastName:
          type: string
          description: |
            For User extension type only. Extension user last name
          maxLength: 64
        company:
          type: string
          description: Extension user company name
          maxLength: 64
        jobTitle:
          type: string
          maxLength: 64
        email:
          type: string
          format: email
          description: Email of extension user
          maxLength: 254
        businessPhone:
          type: string
          description: |
            Extension user contact phone number in
            [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I)
            format
        mobilePhone:
          type: string
          description: |
            Extension user mobile (**non** Toll Free) phone number in
            [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I)
            (with '+' sign) format
        businessAddress:
          $ref: "#/components/schemas/ContactBusinessAddressInfo"
        emailAsLoginName:
          type: boolean
          description: |
            If `true` then contact email is enabled as login name for
            this user. Please note that email should be unique in this case.
            The default value is `false`
        pronouncedName:
          $ref: "#/components/schemas/PronouncedNameInfo"
        department:
          type: string
          description: Extension user department, if any
          maxLength: 64
      description: Contact Information
    CallQueueExtensionInfo:
      type: object
      properties:
        slaGoal:
          type: integer
          format: int32
          description: |
            Target percentage of calls that must be answered by agents
            within the service level time threshold
        slaThresholdSeconds:
          type: integer
          format: int32
          description: |
            Period of time in seconds that is considered to be an acceptable
            service level
        includeAbandonedCalls:
          type: boolean
          description: |
            If `true` abandoned calls (hanged up prior to being served)
            are included into service level calculation
        abandonedThresholdSeconds:
          type: integer
          format: int32
          description: |
            Period of time in seconds specifying abandoned calls duration
            - calls that are shorter will not be included into the calculation of
            service level.; zero value means that abandoned calls of any duration
            will be included into calculation
      description: |
        For Call Queue extension type only. Please note that legacy
        'Department' extension type corresponds to 'Call Queue' extensions
        in modern RingCentral product terminology
    ProfileImageInfo:
      required:
        - uri
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: |
            Link to a profile image. If an image is not uploaded for an
            extension, only `uri` is returned
        etag:
          type: string
          description: Identifier of an image
        lastModified:
          type: string
          description: |
            Date/time when an image was last updated, in ISO 8601 format,
            for example 2016-03-10T18:07:52.534Z
          format: date-time
        contentType:
          type: string
          description: The type of image
        scales:
          type: array
          description: |
            List of URIs to profile images in different dimensions
          items:
            $ref: "#/components/schemas/ProfileImageInfoURI"
      description: Information on profile image
    PermissionInfoInt:
      type: object
      properties:
        enabled:
          type: boolean
          description: Specifies if a permission is enabled or not
      description: International Calling permission
    ExtensionServiceFeatureInfo:
      type: object
      properties:
        enabled:
          type: boolean
          description: Feature status; shows feature availability for an extension
        featureName:
          type: string
          description: Feature name
          enum:
            - AccountFederation
            - Archiver
            - AutomaticCallRecordingMute
            - AutomaticInboundCallRecording
            - AutomaticOutboundCallRecording
            - BlockedMessageForwarding
            - Calendar
            - CallerIdControl
            - CallForwarding
            - CallPark
            - CallParkLocations
            - CallSupervision
            - CallSwitch
            - CallQualitySurvey
            - Conferencing
            - ConferencingNumber
            - ConfigureDelegates
            - DeveloperPortal
            - DND
            - DynamicConference
            - EmergencyAddressAutoUpdate
            - EmergencyCalling
            - EncryptionAtRest
            - ExternalDirectoryIntegration
            - Fax
            - FaxReceiving
            - FreeSoftPhoneLines
            - HDVoice
            - HipaaCompliance
            - Intercom
            - InternationalCalling
            - InternationalSMS
            - LinkedSoftphoneLines
            - MMS
            - MobileVoipEmergencyCalling
            - OnDemandCallRecording
            - Pager
            - PagerReceiving
            - Paging
            - PasswordAuth
            - PromoMessage
            - Reports
            - Presence
            - RCTeams
            - RingOut
            - SalesForce
            - SharedLines
            - SingleExtensionUI
            - SiteCodes
            - SMS
            - SMSReceiving
            - SoftPhoneUpdate
            - TelephonySessions
            - UserManagement
            - VideoConferencing
            - VoipCalling
            - VoipCallingOnMobile
            - Voicemail
            - VoicemailToText
            - WebPhone
        reason:
          type: string
          description: |
            Reason for limitation of a particular service feature. Returned
            only if the enabled parameter value is `false`, see Service Feature
            Limitations and Reasons. When retrieving service features for an extension,
            the reasons for limitations, if any, are returned in response
    ExtensionCreationRequest:
      type: object
      properties:
        contact:
          $ref: "#/components/schemas/ContactInfoCreationRequest"
        extensionNumber:
          type: string
          description: Extension short number
        costCenter:
          $ref: "#/components/schemas/CostCenterInfo"
        customFields:
          type: array
          items:
            $ref: "#/components/schemas/CustomFieldInfo"
        password:
          type: string
          description: Password for extension. If not specified, the password is auto-generated
        references:
          type: array
          description: List of non-RC internal identifiers assigned to an extension
          items:
            $ref: "#/components/schemas/ReferenceInfo"
        regionalSettings:
          $ref: "#/components/schemas/RegionalSettings"
        partnerId:
          type: string
          description: |
            Additional extension identifier, created by partner application
            and applied on client side
        ivrPin:
          type: string
          description: IVR PIN
        setupWizardState:
          $ref: "#/components/schemas/SetupWizardStateForUpdateEnum"
        site:
          $ref: "#/components/schemas/SiteInfo"
        status:
          $ref: "#/components/schemas/ExtensionStatusEnumFull"
        statusInfo:
          $ref: "#/components/schemas/ExtensionStatusInfo"
        type:
          type: string
          description: |
            Extension type. Please note that legacy 'Department' extension type
            corresponds to 'Call Queue' extensions in modern RingCentral product
            terminology
          enum:
            - User
            - VirtualUser
            - DigitalUser
            - FlexibleUser
            - Department
            - Announcement
            - Voicemail
            - SharedLinesGroup
            - PagingOnly
            - ParkLocation
            - Limited
        hidden:
          type: boolean
          description: |
            Hides extension from showing in company directory. Supported
            for extensions of 'User' type only. For unassigned extensions the value
            is set to `true` by default. For assigned extensions the value is set
            to `false` by default
        name:
          type: string
          description: |
            Extension name. For user extension types the value is a combination
            of the specified first name and last name
    GetExtensionListResponse:
      required:
        - records
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Link to an extension list resource
        records:
          type: array
          description: List of extensions with extension information
          items:
            $ref: "#/components/schemas/GetExtensionListInfoResponse"
        navigation:
          $ref: "#/components/schemas/PageNavigationModel"
        paging:
          $ref: "#/components/schemas/EnumeratedPagingModel"
    DepartmentInfo:
      type: object
      description: |
        Please note that the `Department` extension type corresponds to
        'Call Queue' extensions in modern RingCentral product terminology
      properties:
        id:
          type: string
          format: uri
          description: Internal identifier of a department extension
        uri:
          type: string
          format: uri
          description: Canonical URI of an extension resource
        extensionNumber:
          type: string
          description: Short number of a department extension
    ContactInfo:
      type: object
      properties:
        firstName:
          type: string
          description: |
            User's first name (for extensions of `User` type only)
          maxLength: 64
        lastName:
          type: string
          description: |
            For User extension type only. User's last name (for extensions of `User` type only)
          maxLength: 64
        name:
          type: string
          description: |
            Extension name (for extensions of `User` type - concatenation of first and last name)
          maxLength: 129
        company:
          type: string
          description: User's company name
          maxLength: 64
        jobTitle:
          type: string
          description: User's job title
          maxLength: 64
        email:
          type: string
          format: email
          description: User's contact email
          maxLength: 254
        businessPhone:
          type: string
          description: |
            User's contact phone number in [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I)
            (with '+' sign) format
        mobilePhone:
          type: string
          description: |
            User's mobile (**non** Toll Free) phone number in [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I)
            (with '+' sign) format
        businessAddress:
          $ref: "#/components/schemas/ContactBusinessAddressInfo"
        emailAsLoginName:
          type: boolean
          description: |
            Indicates that the contact email is enabled as a login name for this
            user. Please note that the email must be unique in this case.
          default: false
        pronouncedName:
          $ref: "#/components/schemas/PronouncedNameInfo"
        department:
          type: string
          description: |
            User's department name
          maxLength: 64
      description: Detailed contact information
    GetExtensionListInfoResponse:
      type: object
      properties:
        id:
          type: integer
          description: Internal identifier of an extension
          format: int64
        uri:
          type: string
          format: uri
          description: Canonical URI of an extension
        contact:
          $ref: "#/components/schemas/ContactInfo"
        extensionNumber:
          type: string
          description: Extension short number
          maxLength: 8
        name:
          type: string
          description: |
            Extension name. For user extension types the value is a combination
            of the specified first name and last name
          maxLength: 129
        permissions:
          $ref: "#/components/schemas/ExtensionPermissions"
        profileImage:
          $ref: "#/components/schemas/ProfileImageInfo"
        partnerId:
          type: string
          description: |
            For Partner Applications Internal identifier of an extension
            created by partner. The RingCentral supports mapping of accounts and
            stores the corresponding account ID/extension ID for each partner ID of
            a client application. In request URIs partner IDs are accepted instead
            of regular RingCentral native IDs as path parameters using `pid=XXX` clause.
            Though in response URIs contain the corresponding account IDs and extension
            IDs. In all request and response bodies these values are reflected via
            partnerId attributes of account and extension
        references:
          type: array
          description: List of non-RC internal identifiers assigned to an extension
          items:
            $ref: "#/components/schemas/ReferenceInfo"
        status:
          $ref: "#/components/schemas/ExtensionStatusEnumFull"
        type:
          $ref: "#/components/schemas/AllExtensionTypesEnum"
        subType:
          $ref: "#/components/schemas/AllExtensionSubtypesEnum"
        callQueueInfo:
          $ref: "#/components/schemas/CallQueueExtensionInfo"
        hidden:
          type: boolean
          description: |
            Hides extension from showing in company directory.
            Supported for extensions of User type only
        roles:
          type: array
          items:
            $ref: "#/components/schemas/Roles"
        site:
          $ref: "#/components/schemas/ProvisioningSiteInfo"
        assignedCountry:
          $ref: "#/components/schemas/AssignedCountryInfo"
        costCenter:
          $ref: "#/components/schemas/CostCenterInfo"
        creationTime:
          type: string
          description: |
            Extension creation date/time, in ISO 8601 format
          format: date-time
          example: 2024-06-06T07:01:14.123Z
        alertTimer:
          $ref: "#/components/schemas/CallQueueAlertTimerEnum"
    Roles:
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Link to a role
        id:
          type: string
          description: Internal identifier of a role
        autoAssigned:
          type: boolean
          default: false
        displayName:
          type: string
        siteCompatible:
          type: boolean
        siteRestricted:
          type: boolean
    ExtensionInfoEventBody:
      type: object
      properties:
        extensionId:
          type: string
          description: Internal identifier of an extension
        eventType:
          type: string
          description: Type of extension info change
          enum:
            - Update
            - Delete
        hints:
          type: array
          description: Returned for 'Update' event type only
          items:
            type: string
            enum:
              - AccountSettings
              - AccountStatus
              - AnsweringRules
              - CompanyNumbers
              - DialingPlan
              - ExtensionInfo
              - Features
              - Limits
              - Permissions
              - ProfileImage
              - VideoConfiguration
        ownerId:
          type: string
          description: |
            Internal identifier of a subscription owner extension
      description: Notification payload body
    ExtensionUpdateRequest:
      type: object
      properties:
        status:
          $ref: "#/components/schemas/ExtensionStatusEnumForUpdate"
        statusInfo:
          $ref: "#/components/schemas/ExtensionStatusInfo"
        extensionNumber:
          type: string
          description: Extension number available
        contact:
          $ref: "#/components/schemas/ContactInfoUpdateRequest"
        regionalSettings:
          $ref: "#/components/schemas/ExtensionRegionalSettingRequest"
        setupWizardState:
          $ref: "#/components/schemas/SetupWizardStateForUpdateEnum"
        partnerId:
          type: string
          description: |
            Additional extension identifier, created by partner application
            and applied on client side
        ivrPin:
          type: string
          description: IVR PIN
        password:
          type: string
          description: Password for extension
        callQueueInfo:
          $ref: "#/components/schemas/CallQueueInfoRequest"
        transition:
          $ref: "#/components/schemas/UserTransitionInfo"
        customFields:
          type: array
          items:
            $ref: "#/components/schemas/CustomFieldInfo"
        site:
          $ref: "#/components/schemas/SiteReference"
        type:
          type: string
          description: |
            Extension type. Please note that legacy 'Department' extension
            type corresponds to 'Call Queue' extensions in modern RingCentral
            product terminology
          enum:
            - User
            - FaxUser
            - FlexibleUser
            - VirtualUser
            - DigitalUser
            - Department
            - Announcement
            - Voicemail
            - SharedLinesGroup
            - PagingOnly
            - IvrMenu
            - ApplicationExtension
            - ParkLocation
            - DelegatedLinesGroup
            - GroupCallPickup
        subType:
          $ref: "#/components/schemas/AllExtensionSubtypesEnum"
        references:
          type: array
          description: List of non-RC internal identifiers assigned to an extension
          items:
            $ref: "#/components/schemas/ReferenceInfo"
    ExtensionInfoEvent:
      type: object
      properties:
        uuid:
          type: string
          description: Universally unique identifier of a notification
        event:
          type: string
          description: Event filter URI
        timestamp:
          type: string
          description: |
            Date/time of sending a notification in
            [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)
            format including timezone, for example *2016-03-10T18:07:52.534Z*
        subscriptionId:
          type: string
          description: Internal identifier of a subscription
        body:
          $ref: "#/components/schemas/ExtensionInfoEventBody"
    GetUserBusinessHoursResponse:
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Canonical URI of a business-hours resource
        schedule:
          $ref: "#/components/schemas/ScheduleInfoUserBusinessHours"
      example:
        uri: https://restapi/v1.0/account/401800045008/extension/401800045008/business-hours
        schedule:
          weeklyRanges:
            wednesday:
              - from: 09:00
                to: 18:00
            friday:
              - from: 09:00
                to: 18:00
            tuesday:
              - from: 09:00
                to: 18:00
            monday:
              - from: 09:00
                to: 18:00
            thursday:
              - from: 09:00
                to: 18:00
    UserBusinessHoursScheduleInfo:
      type: object
      properties:
        weeklyRanges:
          $ref: "#/components/schemas/WeeklyScheduleInfo"
      description: Schedule when an answering rule is applied
    UserBusinessHoursUpdateRequest:
      required:
        - schedule
      type: object
      properties:
        schedule:
          $ref: "#/components/schemas/UserBusinessHoursScheduleInfo"
    ScheduleInfoUserBusinessHours:
      type: object
      properties:
        weeklyRanges:
          $ref: "#/components/schemas/WeeklyScheduleInfo"
      description: Schedule when an answering rule is applied
    UserBusinessHoursUpdateResponse:
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Canonical URI of a business-hours resource
        schedule:
          $ref: "#/components/schemas/UserBusinessHoursScheduleInfo"
    UserVideoConfiguration:
      type: object
      properties:
        provider:
          type: string
          description: Video provider of the user
          enum:
            - RCMeetings
            - RCVideo
            - None
        userLicenseType:
          type: string
          description: |
            Specifies if the user is 'paid' (has meeting license) or 'free' (w/o meeting license)
          enum:
            - Paid
            - Free
    FavoriteCollection:
      type: object
      properties:
        records:
          type: array
          items:
            $ref: "#/components/schemas/FavoriteContactResource"
    ExtensionFavoritesEvent:
      type: object
      properties:
        uuid:
          type: string
          description: Universally unique identifier of a notification
        event:
          type: string
          description: Event filter URI
        timestamp:
          format: date-time
          type: string
          description: |
            Date/time of sending a notification in
            [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)
            format including timezone, for example *2016-03-10T18:07:52.534Z*
        subscriptionId:
          type: string
          description: Internal identifier of a subscription
        body:
          $ref: "#/components/schemas/ExtensionFavoritesEventBody"
    ExtensionFavoritesEventBody:
      type: object
      properties:
        extensionId:
          type: string
          description: Internal identifier of an extension
        ownerId:
          type: string
          description: Internal identifier of a subscription owner extension
      description: Notification payload body
    FavoriteContactList:
      type: object
      properties:
        uri:
          type: string
          format: uri
        records:
          type: array
          items:
            $ref: "#/components/schemas/FavoriteContactResource"
    FavoriteContactResource:
      type: object
      properties:
        id:
          type: integer
          format: int64
        extensionId:
          type: string
        accountId:
          type: string
        contactId:
          type: string
    GetExtensionDevicesResponse:
      required:
        - navigation
        - paging
        - records
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Link to a list of extension devices
        records:
          type: array
          description: List of extension devices
          items:
            $ref: "#/components/schemas/DeviceResource"
        navigation:
          $ref: "#/components/schemas/PageNavigationModel"
        paging:
          $ref: "#/components/schemas/EnumeratedPagingModel"
    ExtensionGrantListEventBody:
      type: object
      properties:
        extensionId:
          type: string
          description: Internal identifier of an extension
        ownerId:
          type: string
          description: Internal identifier of a subscription owner extension
      description: Notification payload body
    ExtensionInfoGrants:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of an extension
        uri:
          type: string
          format: uri
          description: Canonical URI of an extension
        extensionNumber:
          type: string
          description: Extension short number (usually 3 or 4 digits)
        name:
          type: string
          description: Name of extension
        type:
          type: string
          description: |
            Extension type. Please note that legacy 'Department'
            extension type corresponds to 'Call Queue' extensions in modern RingCentral
            product terminology
          enum:
            - User
            - Fax User
            - VirtualUser
            - DigitalUser
            - Department
            - Announcement
            - Voicemail
            - SharedLinesGroup
            - PagingOnly
            - IvrMenu
            - ApplicationExtension
            - ParkLocation
            - DelegatedLinesGroup
      description: Extension information
    ExtensionGrantListEvent:
      type: object
      properties:
        uuid:
          type: string
          description: Universally unique identifier of a notification
        event:
          type: string
          description: Event filter URI
        timestamp:
          type: string
          description: |
            Date/time of sending a notification in
            [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)
            format including timezone, for example *2016-03-10T18:07:52.534Z*
        subscriptionId:
          type: string
          description: Internal identifier of a subscription
        body:
          $ref: "#/components/schemas/ExtensionGrantListEventBody"
    GrantInfo:
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Canonical URI of a grant
        extension:
          $ref: "#/components/schemas/ExtensionInfoGrants"
        callPickup:
          type: boolean
          description: |
            Specifies if picking up of other extensions' calls is allowed
            for the extension. If 'Presence' feature is disabled for the given extension,
            the flag is not returned
        callMonitoring:
          type: boolean
          description: |
            Specifies if monitoring of other extensions' calls is allowed
            for the extension. If 'CallMonitoring' feature is disabled for the given
            extension, the flag is not returned
        callOnBehalfOf:
          type: boolean
          description: |
            Specifies whether the current extension is able to make or
            receive calls on behalf of the user referenced in extension object
        callDelegation:
          type: boolean
          description: |
            Specifies whether the current extension can delegate a call
            to the user referenced in extension object
        groupPaging:
          type: boolean
          description: |
            Specifies whether the current extension is allowed to call
            Paging Only group referenced to in extension object
        callQueueSetup:
          type: boolean
          description: |
            Specifies whether the current extension is assigned as a Full-Access
            manager in the call queue referenced in extension object
        callQueueMembersSetup:
          type: boolean
          description: |
            Specifies whether the current extension is assigned as a Members-Only
            manager in the call queue referenced in extension object
        callQueueMessages:
          type: boolean
          description: |
            Specifies whether the current extension is assigned as a Messages Manager
            in the queue referenced in extension object
        callQueueFacSetup:
          type: boolean
          description: |
            Specifies whether the current extension is granted *Forward All Calls (FAC)* permission
        sharedVoicemails:
          type: boolean
          description: |
            Specifies whether the user referenced in extension object is sharing voicemails
            with the current extension
        callQueueSmsRecipient:
          type: boolean
          description: |
            Specifies whether the current extension is configured as SMS Recipient
            for the call queue referenced in extension object
        smsRecipient:
          type: boolean
          description: |
            Specifies whether the current extension is configured as SMS Recipient for an extension
    GetExtensionGrantListResponse:
      required:
        - navigation
        - paging
        - records
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Link to the list of extension grants
        records:
          type: array
          description: List of extension grants with details
          items:
            $ref: "#/components/schemas/GrantInfo"
        navigation:
          $ref: "#/components/schemas/PageNavigationModel"
        paging:
          $ref: "#/components/schemas/EnumeratedPagingModel"
    SearchGrantExtensionTypeEnumList:
      type: array
      minItems: 1
      uniqueItems: true
      items:
        $ref: "#/components/schemas/SearchGrantExtensionTypeEnum"
    SearchGrantExtensionTypeEnum:
      type: string
      enum:
        - User
        - FaxUser
        - VirtualUser
        - DigitalUser
        - Department
        - Announcement
        - Voicemail
        - SharedLinesGroup
        - PagingOnly
        - IvrMenu
        - ApplicationExtension
        - ParkLocation
        - Limited
        - Bot
        - Room
        - DelegatedLinesGroup
    ConferencePhoneNumberInfo:
      type: object
      properties:
        phoneNumber:
          type: string
          description: Dial-in phone number to connect to a conference
        default:
          type: boolean
          description: |
            The value should be `true` if the number is default for the conference. Default
            conference number is a domestic number that can be set by user (otherwise
            it is set by the system). Only one default number per country is allowed
    PhoneNumberInfoConferencing:
      type: object
      properties:
        country:
          $ref: "#/components/schemas/CountryInfoShortModel"
        default:
          type: boolean
          description: |
            The value should be `true` if the number is default for the conference. Default
            conference number is a domestic number that can be set by user (otherwise
            it is set by the system). Only one default number per country is allowed
        hasGreeting:
          type: boolean
          description: |
            The value should be `true` if any greeting message is played on this number
        location:
          type: string
          description: |
            Location (city, region, state) of a conference phone number
        phoneNumber:
          type: string
          description: Dial-in phone number to connect to a conference
        premium:
          type: boolean
          description: |
            Indicates if the number is 'premium' (account phone number
            with the `ConferencingNumber` usageType)
    GetConferencingInfoResponse:
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Canonical URI of a conferencing
        allowJoinBeforeHost:
          type: boolean
          description: |
            Determines if host user allows conference participants to join
            before the host
        hostCode:
          type: string
          description: Access code for a host user
        mode:
          type: string
          description: |
            Internal parameter specifying a conferencing engine
        participantCode:
          type: string
          description: Access code for any participant
        phoneNumber:
          type: string
          description: |
            Primary conference phone number for user's home country returned
            in [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I) format
        supportUri:
          description: Link to a branded support page
          type: string
          format: uri
          example: http://success.ringcentral.com
        tapToJoinUri:
          type: string
          format: uri
          description: |
            Short URL leading to the service web page Tap to Join for audio
            conference bridge
        phoneNumbers:
          type: array
          description: |
            List of multiple dial-in phone numbers to connect to audio
            conference service, relevant for the user's brand. Each number is given with
            the country and location information, in order to let the user choose
            less expensive way to connect to a conference. The first number in
            the list is a primary conference number, that is default and domestic
          items:
            $ref: "#/components/schemas/PhoneNumberInfoConferencing"
    UpdateConferencingInfoRequest:
      type: object
      properties:
        phoneNumbers:
          type: array
          description: |
            Multiple dial-in phone numbers to connect to audio conference
            service, relevant for user's brand. Each number is given with the country
            and location information, in order to let the user choose the less expensive
            way to connect to a conference. The first number in the list is the primary
            conference number, that is default and domestic
          items:
            $ref: "#/components/schemas/ConferencePhoneNumberInfo"
        allowJoinBeforeHost:
          type: boolean
          description: Determines if host user allows conference participants to join before the host
    ExtensionCallQueuePresenceList:
      type: object
      properties:
        records:
          type: array
          items:
            $ref: "#/components/schemas/ExtensionCallQueuePresence"
    CallQueueId:
      type: object
      description: Call queue information
      properties:
        id:
          type: string
          description: Internal identifier of a call queue
    PresenceCallQueueInfo:
      type: object
      description: Call queue information
      properties:
        id:
          type: string
          description: Internal identifier of a call queue
        name:
          type: string
          description: Name of a call queue
        extensionNumber:
          type: string
          description: Extension number of a call queue
        editableMemberStatus:
          type: boolean
          description: Flag allow members to change their queue status
    ExtensionCallQueueUpdatePresenceList:
      type: object
      properties:
        records:
          type: array
          items:
            $ref: "#/components/schemas/ExtensionCallQueueUpdatePresence"
    ExtensionCallQueuePresence:
      type: object
      properties:
        callQueue:
          $ref: "#/components/schemas/PresenceCallQueueInfo"
        acceptCalls:
          type: boolean
          description: Call queue agent availability for calls of this queue
    ExtensionCallQueueUpdatePresence:
      type: object
      properties:
        callQueue:
          $ref: "#/components/schemas/CallQueueId"
        acceptCalls:
          type: boolean
          description: Call queue agent availability for calls of this queue
    MessageTypeEnum:
      type: string
      enum:
        - Fax
        - SMS
        - VoiceMail
        - Pager
      description: Type of the message
    ConversationInfo:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a conversation
        uri:
          type: string
          format: uri
          description: Deprecated. Link to a conversation resource
      description: SMS and Pager only. Information about a conversation the message belongs to
    MessageStoreCallerInfoResponseFrom:
      type: object
      properties:
        extensionNumber:
          type: string
          description: |
            Extension short number (usually 3 or 4 digits). This property
            is filled when parties communicate by means of short internal numbers,
            for example when calling to other extension or sending/receiving Company
            Pager message
        extensionId:
          type: string
          description: Internal identifier of an extension
        location:
          type: string
          description: |
            Contains party location (city, state) if one can be determined
            from phoneNumber. This property is filled only when phoneNumber is not
            empty and server can calculate location information from it (for example,
            this information is unavailable for US toll-free numbers)
        name:
          type: string
          description: |
            Symbolic name associated with a party. If the phone does not
            belong to the known extension, only the location is returned, the name
            is not determined then
        phoneNumber:
          type: string
          description: |
            Phone number of a party. Usually it is a plain number including
            country and area code like 18661234567. But sometimes it could be returned
            from database with some formatting applied, for example (866)123-4567.
            This property is filled in all cases where parties communicate by means
            of global phone numbers, for example when calling to direct numbers or
            sending/receiving SMS
      description: Sender information
    GetMessageSyncResponse:
      required:
        - records
        - syncInfo
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Link to the message sync resource
        records:
          type: array
          description: List of message records with synchronization information
          items:
            $ref: "#/components/schemas/GetMessageInfoResponse"
        syncInfo:
          $ref: "#/components/schemas/SyncInfoMessages"
    MessageAttachmentTypeEnum:
      type: string
      description: Type of message attachment
      enum:
        - AudioRecording
        - AudioTranscription
        - Text
        - SourceDocument
        - RenderedDocument
        - MmsAttachment
    FaxErrorCodeEnum:
      type: string
      enum:
        - AllLinesInUse
        - Undefined
        - NoFaxSendPermission
        - NoInternationalPermission
        - NoFaxMachine
        - NoAnswer
        - LineBusy
        - CallerHungUp
        - NotEnoughCredits
        - SentPartially
        - InternationalCallingDisabled
        - DestinationCountryDisabled
        - UnknownCountryCode
        - NotAccepted
        - InvalidNumber
        - CallDeclined
        - TooManyCallsPerLine
        - CallFailed
        - RenderingFailed
        - TooManyPages
        - ReturnToDBQueue
        - NoCallTime
        - WrongNumber
        - ProhibitedNumber
        - InternalError
        - FaxSendingProhibited
        - ThePhoneIsBlacklisted
        - UserNotFound
        - ConvertError
        - DBGeneralError
        - SkypeBillingFailed
        - AccountSuspended
        - ProhibitedDestination
        - InternationalDisabled
    MessageAttachmentInfo:
      type: object
      properties:
        id:
          type: integer
          format: int64
          description: Internal identifier of a message attachment
        uri:
          type: string
          format: uri
          description: Canonical URI of a message attachment
        type:
          $ref: "#/components/schemas/MessageAttachmentTypeEnum"
        contentType:
          type: string
          description: MIME type for a given attachment, for instance 'audio/wav'
        vmDuration:
          type: integer
          format: int32
          description: |
            Supported for `Voicemail` only. Duration of a voicemail in
            seconds
        fileName:
          type: string
          description: Name of a file attached
        size:
          type: integer
          format: int32
          description: Size of attachment in bytes
        height:
          type: integer
          format: int32
          description: Attachment height in pixels if available
        width:
          type: integer
          format: int32
          description: Attachment width in pixels if available
    SyncInfoMessages:
      type: object
      properties:
        syncType:
          $ref: "#/components/schemas/SyncTypeEnum"
        syncToken:
          type: string
          description: Synchronization token
        syncTime:
          type: string
          description: |
            Last synchronization date/time in ISO 8601 format including
            timezone, for example 2016-03-10T18:07:52.534Z
          format: date-time
        olderRecordsExist:
          type: boolean
          default: false
      description: Sync type, token and time
    GetMessageForwardingInfo:
      type: object
      properties:
        originalSender:
          $ref: "#/components/schemas/MessageStoreCallerInfoResponseTo"
        originalCreationTime:
          type: string
          description: |
            Original message creation date/time in ISO 8601 format including timezone,
            for example 2016-03-10T18:07:52.534Z
          format: date-time
    MessageReadStatusEnum:
      description: Message read status
      type: string
      enum:
        - Read
        - Unread
    MessageStoreCallerInfoResponseTo:
      type: object
      properties:
        extensionNumber:
          type: string
          description: |
            Extension short number (usually 3 or 4 digits). This property
            is filled when parties communicate by means of short internal numbers,
            for example when calling to other extension or sending/receiving Company
            Pager messages
        extensionId:
          type: string
        location:
          type: string
          description: |
            Contains party location (city, state) if one can be determined
            from a phone number. This property is filled only when `phoneNumber` is not
            empty and a server can calculate location information from it (for example,
            this information is unavailable for US toll-free numbers)
        target:
          type: boolean
          description: |
            The `true` value specifies that message is sent exactly to this recipient.
            Returned in the `to` field for group MMS. Useful if one extension has several
            phone numbers'
        messageStatus:
          $ref: "#/components/schemas/MessageStatusEnum"
        faxErrorCode:
          $ref: "#/components/schemas/FaxErrorCodeEnum"
        name:
          type: string
          description: |
            Symbolic name associated with a party. If the phone does not
            belong to the known extension, only the location is returned, the name
            is not determined then
        phoneNumber:
          type: string
          description: |
            Phone number of a party. Usually it is a plain number including
            country and area code like 18661234567. But sometimes it could be returned
            from database with some formatting applied, for example (866)123-4567.
            This property is filled in all cases where parties communicate by means
            of global phone numbers, for example when calling to direct numbers or
            sending/receiving SMS
        recipientId:
          type: string
          description: Internal identifier of a message recipient
    MessageAvailabilityEnum:
      type: string
      enum:
        - Alive
        - Deleted
        - Purged
      description: |
        Message availability status. Message in `Deleted` state is still
        preserved with all its attachments and can be restored. `Purged` means
        that all attachments are already deleted and the message itself is about
        to be physically deleted shortly
    GetMessageInfoResponse:
      type: object
      properties:
        id:
          type: integer
          format: int64
          description: Internal identifier of a message
          example: 1724099032020
        uri:
          type: string
          format: uri
          description: Canonical URI of a message
        extensionId:
          type: string
          description: Internal identifier of an extension
        attachments:
          type: array
          description: List of message attachments
          items:
            $ref: "#/components/schemas/MessageAttachmentInfo"
        availability:
          $ref: "#/components/schemas/MessageAvailabilityEnum"
        conversationId:
          type: integer
          format: int64
          description: |
            SMS and Pager only. Identifier of a conversation the message
            belongs to
        conversation:
          $ref: "#/components/schemas/ConversationInfo"
        creationTime:
          type: string
          description: |
            Message creation date/time in ISO 8601 format including timezone,
            for example 2016-03-10T18:07:52.534Z
          format: date-time
        deliveryErrorCode:
          type: string
          description: SMS only. Delivery error code returned by gateway
        segmentCount:
          type: integer
          format: int32
          description: SMS size in segments
        direction:
          $ref: "#/components/schemas/MessageDirectionEnum"
        faxPageCount:
          type: integer
          format: int32
          description: Fax only. Page count in a fax message
        faxResolution:
          $ref: "#/components/schemas/FaxResolutionEnum"
        from:
          $ref: "#/components/schemas/MessageStoreCallerInfoResponseFrom"
        lastModifiedTime:
          type: string
          description: |
            The date/time when the message was modified on server in ISO
            8601 format including timezone, for example 2016-03-10T18:07:52.534Z
          format: date-time
        messageStatus:
          $ref: "#/components/schemas/MessageStatusEnum"
        pgToDepartment:
          type: boolean
          description: |
            Pager only. `true` if at least one of the message recipients is
            'Department' extension
        priority:
          $ref: "#/components/schemas/MessagePriorityEnum"
        readStatus:
          $ref: "#/components/schemas/MessageReadStatusEnum"
        smsDeliveryTime:
          type: string
          description: |
            SMS only. Date/time when outbound SMS was delivered to recipient's
            handset in ISO 8601 format including timezone, for example
            2016-03-10T18:07:52.534Z. It is filled only if a carrier sends a delivery
            receipt to RingCentral
          format: date-time
        smsSendingAttemptsCount:
          type: integer
          format: int32
          description: |
            SMS only. Number of attempts made to send an outbound SMS to
            the Gateway (if Gateway is temporary unavailable)
        subject:
          type: string
          description: |
            Message subject. For SMS and Pager messages it replicates message
            text which is also returned as an attachment
        to:
          type: array
          description: Recipient information
          items:
            $ref: "#/components/schemas/MessageStoreCallerInfoResponseTo"
        type:
          type: string
          description: Message type
          enum:
            - Fax
            - SMS
            - VoiceMail
            - Pager
            - Text
        vmTranscriptionStatus:
          type: string
          description: |
            Voicemail only. Status of a voicemail to text transcription.
            If 'VoicemailToText' feature is not activated for account,
            the 'NotAvailable' value is returned
          enum:
            - NotAvailable
            - InProgress
            - TimedOut
            - Completed
            - CompletedPartially
            - Failed
            - Unknown
        coverIndex:
          type: integer
          format: int32
          description: |
            Cover page identifier. If coverIndex is set to '0' (zero) cover
            page is not attached. For the list of available cover page identifiers
            (1-13) please call the Fax Cover Pages method. If not specified,
            the default cover page is attached (which is configured in 'Outbound
            Fax Settings')
        coverPageText:
          type: string
          description: |
            Cover page text, entered by the fax sender and printed on the
            cover page. Maximum length is limited to 1024 symbols
        owner:
          $ref: "#/components/schemas/OwnerResource"
        private:
          type: boolean
          description: Indicator which tells that this Voice Message can't be forwarded.
          default: false
        forwarding:
          $ref: "#/components/schemas/GetMessageForwardingInfo"
    MessagePriorityEnum:
      type: string
      description: Message priority
      enum:
        - Normal
        - High
    FaxResolutionEnum:
      type: string
      description: |
        Fax only. Resolution of a fax message. 'High' for black and
        white image scanned at 200 dpi, 'Low' for black and white image scanned
        at 100 dpi
      enum:
        - High
        - Low
    CallerIdData:
      type: object
      properties:
        type:
          type: string
          description: |
            If 'PhoneNumber' value is specified, then a certain phone number
            is shown as a caller ID when using this telephony feature. If 'Blocked'
            value is specified, then a caller ID is hidden. The value 'CurrentLocation'
            can be specified for 'RingOut' feature only
          default: PhoneNumber
          enum:
            - PhoneNumber
            - Blocked
            - CurrentLocation
        phoneInfo:
          $ref: "#/components/schemas/CallerIdPhoneInfo"
    CallerIdByFeature:
      type: object
      properties:
        feature:
          type: string
          enum:
            - RingOut
            - RingMe
            - CallFlip
            - FaxNumber
            - AdditionalSoftphone
            - Alternate
            - CommonPhone
            - MobileApp
            - Delegated
            - BusinessMobile
        callerId:
          $ref: "#/components/schemas/CallerIdData"
      description: Caller ID settings by feature
    CallerIdPhoneInfo:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a phone number
        uri:
          type: string
          format: uri
          description: Link to a phone number resource
          readOnly: true
        phoneNumber:
          type: string
          description: |
            Phone number in [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I)
            (with '+' sign) format
          readOnly: true
    CallerIdDeviceInfo:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a device
        uri:
          type: string
          format: uri
          description: Link to a device resource
          readOnly: true
        name:
          type: string
          description: Name of a device
          readOnly: true
    ExtensionCallerIdInfo:
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Canonical URL of a caller ID resource
        byDevice:
          type: array
          items:
            $ref: "#/components/schemas/CallerIdByDevice"
        byFeature:
          type: array
          items:
            $ref: "#/components/schemas/CallerIdByFeature"
        extensionNameForOutboundCalls:
          type: boolean
          description: |
            If `true`, then user first name and last name will be used
            as caller ID when making outbound calls from extension
        extensionNumberForInternalCalls:
          type: boolean
          description: |
            If `true`, then extension number will be used as caller ID
            when making internal calls
    CallerIdByDevice:
      type: object
      properties:
        device:
          $ref: "#/components/schemas/CallerIdDeviceInfo"
        callerId:
          $ref: "#/components/schemas/CallerIdData"
      description: Caller ID settings by device
    TransferredExtension:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of an extension
        uri:
          type: string
          readOnly: true
          description: Canonical URI of an extension resource
      description: Transfer extension settings, set/returned if `callHandlingAction` is specified as `TransferToExtension`
    RecipientInfo:
      type: object
      description: Recipient data
      properties:
        uri:
          type: string
          format: uri
          description: Link to a voicemail recipient extension resource
        id:
          description: Internal identifier of a voicemail recipient
          type: string
    TransferInfo:
      type: object
      properties:
        extension:
          $ref: "#/components/schemas/TransferExtensionInfo"
        action:
          type: string
          description: Event that initiates transferring to the specified extension
          enum:
            - HoldTimeExpiration
            - MaxCallers
            - NoAnswer
    QueueInfo:
      type: object
      properties:
        transferMode:
          type: string
          description: Specifies how calls are transferred to group members
          enum:
            - Rotating
            - Simultaneous
            - FixedOrder
        transfer:
          type: array
          description: Call transfer information
          items:
            $ref: "#/components/schemas/TransferInfo"
        noAnswerAction:
          type: string
          description: |
            Specifies the type of action to be taken if: members are available
            but no one answers, or all members are busy/unavailable. This option is
            available for Business hours only. For simultaneous transfer mode only
            'WaitPrimaryMembers' and 'WaitPrimaryAndOverflowMembers' are supported
          enum:
            - WaitPrimaryMembers
            - WaitPrimaryAndOverflowMembers
            - Voicemail
            - TransferToExtension
            - UnconditionalForwarding
        fixedOrderAgents:
          type: array
          description: Information on a call forwarding rule
          items:
            $ref: "#/components/schemas/FixedOrderAgents"
        holdAudioInterruptionMode:
          type: string
          description: Connecting audio interruption mode
          enum:
            - Never
            - WhenMusicEnds
            - Periodically
        holdAudioInterruptionPeriod:
          type: integer
          format: int32
          description: Connecting audio interruption message period in seconds
        holdTimeExpirationAction:
          type: string
          description: |
            Specifies the type of action to be taken after the hold time
            (waiting for an available call queue member) expires. If 'TransferToExtension'
            option is selected, the extension specified in `transfer` field is used.
            The default value is `Voicemail`
          default: Voicemail
          enum:
            - TransferToExtension
            - UnconditionalForwarding
            - Voicemail
        agentTimeout:
          type: integer
          format: int32
          description: Maximum time in seconds to wait for a call queue member before trying the next member
        wrapUpTime:
          type: integer
          format: int32
          default: 15
          minimum: 0
          maximum: 300
          description: |
            Minimum post-call wrap up time in seconds before agent status
            is automatically set; the value range is from 0 to 300 sec.
        holdTime:
          type: integer
          format: int32
          description: Maximum hold time in seconds to wait for an available call queue member
        maxCallers:
          type: integer
          format: int32
          maximum: 25
          description: Maximum count of callers on hold; the limitation is 25 callers
        maxCallersAction:
          type: string
          description: Specifies the type of action to be taken if count of callers on hold exceeds the supported maximum
          enum:
            - Voicemail
            - Announcement
            - TransferToExtension
            - UnconditionalForwarding
        unconditionalForwarding:
          type: array
          items:
            $ref: "#/components/schemas/UnconditionalForwardingInfo"
        positionInQueue:
          type: object
          properties:
            playbackFrequency:
              type: string
              default: EveryInterval
              enum:
                - EveryInterval
                - OnPositionChange
              description: |
                Controls when position-in-queue announcement is played.
                `OnPositionChange` - only if the caller's position changed since the last announcement.
        callBack:
          type: object
          properties:
            confirmationAnnouncements:
              type: array
              default: []
              description: |
                Additional announcements appended to the base callback confirmation.
                Empty array means no additional announcements.
              items:
                type: string
                enum:
                  - PositionInQueue
                  - EstimatedWaitTime
      description: |
        Queue settings applied for department (call queue) extension type,
        with the 'AgentQueue' value specified as a call handling action
    CallersInfo:
      type: object
      properties:
        callerId:
          type: string
          description: Phone number of a caller
        name:
          type: string
          description: Contact name of a caller
    TransferExtensionInfo:
      allOf:
        - $ref: "#/components/schemas/TransferredExtension"
        - type: object
          properties:
            name:
              type: string
              description: Extension name
            extensionNumber:
              type: string
              description: Extension number
    MissedCallExtensionInfo:
      type: object
      description: Specifies an extension (a calling group) which should be used for the missed call transfer. Returned only if the `actionType` is set to 'ConnectToExtension'
      properties:
        id:
          type: string
          description: Internal identifier of an extension which should be used for the missed call transfer
    SharedLinesInfo:
      type: object
      properties:
        timeout:
          type: integer
          format: int32
          minimum: 10
          maximum: 80
          description: |
            Number of seconds to wait before forwarding unanswered calls. The value range is 10 - 80
      description: SharedLines call handling action settings
    CallersInfoRequest:
      type: object
      properties:
        callerId:
          type: string
          description: Phone number of a caller
        name:
          type: string
          description: Contact name of a caller
    ForwardingPhoneNumberTypeEnum:
      type: string
      description: Forwarding phone number type
      enum:
        - Home
        - Mobile
        - Work
        - PhoneLine
        - Outage
        - Other
        - BusinessMobilePhone
        - ExtensionApps
    CreateAnsweringRuleRequest:
      required:
        - name
        - type
      type: object
      properties:
        enabled:
          type: boolean
          description: |
            Specifies if the rule is active or inactive. The default value
            is `true`
        type:
          type: string
          description: Type of an answering rule. The 'Custom' value should be specified
        name:
          type: string
          description: Name of an answering rule specified by user
        callers:
          type: array
          description: Answering rule will be applied when calls are received from the specified caller(s)
          items:
            $ref: "#/components/schemas/CallersInfoRequest"
        calledNumbers:
          type: array
          description: Answering rules are applied when calling to selected number(s)
          items:
            $ref: "#/components/schemas/CalledNumberInfo"
        schedule:
          $ref: "#/components/schemas/ScheduleInfo"
        callHandlingAction:
          type: string
          description: Specifies how incoming calls are forwarded
          enum:
            - ForwardCalls
            - UnconditionalForwarding
            - AgentQueue
            - TransferToExtension
            - TakeMessagesOnly
            - PlayAnnouncementOnly
            - SharedLines
        forwarding:
          $ref: "#/components/schemas/ForwardingInfo"
        unconditionalForwarding:
          $ref: "#/components/schemas/UnconditionalForwardingInfo"
        queue:
          $ref: "#/components/schemas/QueueInfo"
        transfer:
          $ref: "#/components/schemas/TransferredExtensionInfo"
        voicemail:
          $ref: "#/components/schemas/VoicemailInfo"
        missedCall:
          $ref: "#/components/schemas/MissedCallInfo"
        greetings:
          type: array
          description: |
            Greetings applied for an answering rule; only predefined greetings
            can be applied, see Dictionary Greeting List
          items:
            $ref: "#/components/schemas/GreetingInfo"
        screening:
          type: string
          description: |
            Call screening status. 'Off' - no call screening; 'NoCallerId'
            - if caller ID is missing, then callers are asked to say their name before
            connecting; 'UnknownCallerId' - if caller ID is not in contact list, then
            callers are asked to say their name before connecting; 'Always' - the
            callers are always asked to say their name before connecting. The default
            value is 'Off'
          enum:
            - Off
            - NoCallerId
            - UnknownCallerId
            - Always
          default: Off
    UserAnsweringRuleList:
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Canonical URI of an answering rule list resource
          example: https://platform.ringcentral.com/restapi/v1.0/account/240913004/extension/240972004/answering-rule?page=1&perPage=100
        records:
          type: array
          description: List of answering rules
          items:
            $ref: "#/components/schemas/CallHandlingRuleInfo"
        paging:
          $ref: "#/components/schemas/EnumeratedPagingModel"
        navigation:
          $ref: "#/components/schemas/PageNavigationModel"
    ForwardingInfo:
      type: object
      properties:
        notifyMySoftPhones:
          type: boolean
          description: Specifies if the user's softphone(s) are notified before forwarding the incoming call to desk phones and forwarding numbers
        notifyAdminSoftPhones:
          type: boolean
          description: Deprecated parameter. Specifies if the administrator's softphone is notified before forwarding the incoming call to desk phones and forwarding numbers. The default value is `false`
          deprecated: true
        softPhonesRingCount:
          type: integer
          format: int32
          description: Number of rings before forwarding starts
        softPhonesAlwaysRing:
          type: boolean
          description: Specifies that desktop and mobile applications of the user will ring till the end of their forwarding list. If set to `true` then `softPhonesRingCount` is ignored
          default: true
        ringingMode:
          type: string
          description: Specifies the order in which the forwarding numbers ring. 'Sequentially' means that forwarding numbers are ringing one at a time, in order of priority. 'Simultaneously' means that forwarding numbers are ring all at the same time
          enum:
            - Sequentially
            - Simultaneously
        rules:
          type: array
          description: Information on a call forwarding rule
          items:
            $ref: "#/components/schemas/ForwardingRuleInfo"
        softPhonesPositionTop:
          type: boolean
          description: Specifies if desktop and mobile applications of the user are notified before (true) or after (false) forwarding the incoming call to desk phones and forwarding numbers. Applicable only if `notifyMySoftPhones` parameter is set to `true`
        mobileTimeout:
          type: boolean
          description: Deprecated parameter. Specifies if mobile timeout is activated for the rule
          deprecated: true
      description: Forwarding parameters. Returned if 'ForwardCalls' is specified in 'callHandlingAction'. These settings determine the forwarding numbers to which the call will be forwarded
    ForwardingRuleInfo:
      type: object
      properties:
        index:
          type: integer
          format: int32
          description: Forwarding number (or group) ordinal
        ringCount:
          type: integer
          format: int32
          description: Number of rings for a forwarding number (or group)
        enabled:
          type: boolean
          description: Forwarding number status. Returned only if `showInactiveNumbers` is set to `true`
        forwardingNumbers:
          type: array
          description: Forwarding number (or group) data
          items:
            $ref: "#/components/schemas/CreateAnsweringRuleForwardingNumberInfo"
    VoicemailInfo:
      type: object
      properties:
        enabled:
          type: boolean
          description: If `true` then voicemails are allowed to be received
        recipient:
          $ref: "#/components/schemas/RecipientInfo"
      description: Specifies whether to take a voicemail and who should do it
    FixedOrderAgentsExtensionInfo:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of an extension
        uri:
          type: string
          format: uri
          description: Canonical URI of an extension
        extensionNumber:
          type: string
          description: Number of extension
        name:
          type: string
          description: Name of agent extension
    UnconditionalForwardingInfo:
      type: object
      description: |
        Unconditional forwarding parameters.
        Returned if 'UnconditionalForwarding' value is specified for the `callHandlingAction` parameter
      properties:
        phoneNumber:
          type: string
          description: |
            Phone number to which the call is forwarded. In addition to
            common E.164 format, the following number patterns are supported: 11xxxxxxxxxxx,
            444xxxxxxxxxxx, 616xxxxxxxxxxx, 1700yyyy; where xxxxxxxxxxx is a phone number in
            E.164 format (without '+' sign) and yyyy is an external short extension number.
            Max number of digits is 15
        action:
          type: string
          description: Event that initiates forwarding to the specified phone number
          enum:
            - HoldTimeExpiration
            - MaxCallers
            - NoAnswer
    TransferredExtensionInfo:
      type: object
      properties:
        extension:
          $ref: "#/components/schemas/TransferredExtension"
    CallHandlingRuleInfo:
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Canonical URI to an answering rule resource
        id:
          type: string
          description: Internal identifier of an answering rule
        type:
          $ref: "#/components/schemas/RuleTypeInfo"
        name:
          type: string
          description: Name of an answering rule specified by user
        enabled:
          type: boolean
          description: Specifies if an answering rule is active or inactive
        schedule:
          $ref: "#/components/schemas/ScheduleInfo"
        calledNumbers:
          type: array
          description: Answering rules are applied when calling to selected number(s)
          items:
            $ref: "#/components/schemas/CalledNumberInfo"
        callers:
          type: array
          description: Answering rules are applied when calls are received from specified caller(s)
          items:
            $ref: "#/components/schemas/CallersInfo"
        callHandlingAction:
          type: string
          description: Specifies how incoming calls are forwarded
          enum:
            - ForwardCalls
            - UnconditionalForwarding
            - AgentQueue
            - TransferToExtension
            - TakeMessagesOnly
            - PlayAnnouncementOnly
            - SharedLines
        forwarding:
          $ref: "#/components/schemas/ForwardingInfo"
        unconditionalForwarding:
          $ref: "#/components/schemas/UnconditionalForwardingInfo"
        queue:
          $ref: "#/components/schemas/QueueInfo"
        transfer:
          $ref: "#/components/schemas/TransferredExtensionInfo"
        voicemail:
          $ref: "#/components/schemas/VoicemailInfo"
        greetings:
          type: array
          description: Greetings applied for an answering rule; only predefined greetings can be applied, see Dictionary Greeting List
          items:
            $ref: "#/components/schemas/GreetingInfo"
        screening:
          type: string
          description: Call screening status. 'Off' - no call screening; 'NoCallerId' - if caller ID is missing, then callers are asked to say their name before connecting; 'UnknownCallerId' - if caller ID is not in contact list, then callers are asked to say their name before connecting; 'Always' - the callers are always asked to say their name before connecting. The default value is 'Off'
          enum:
            - Off
            - NoCallerId
            - UnknownCallerId
            - Always
          default: Off
        sharedLines:
          $ref: "#/components/schemas/SharedLinesInfo"
        missedCall:
          $ref: "#/components/schemas/MissedCallInfo"
    CreateAnsweringRuleForwardingNumberInfo:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a forwarding number
        uri:
          type: string
          format: uri
          description: Canonical URI of a forwarding/call flip phone number
        phoneNumber:
          type: string
          description: Forwarding/Call flip phone number
        label:
          type: string
          description: Forwarding/Call flip number title
          maxLength: 60
        type:
          $ref: "#/components/schemas/ForwardingPhoneNumberTypeEnum"
    FixedOrderAgents:
      type: object
      properties:
        extension:
          $ref: "#/components/schemas/FixedOrderAgentsExtensionInfo"
        index:
          type: integer
          format: int32
          description: Ordinal of an agent (call queue member)
    ScheduleInfo:
      type: object
      description: Schedule when an answering rule should be applied
      properties:
        weeklyRanges:
          $ref: "#/components/schemas/WeeklyScheduleInfo"
        ranges:
          type: array
          description: Specific data ranges
          items:
            $ref: "#/components/schemas/RangesInfo"
        ref:
          type: string
          description: The user's schedule specified for business hours or after hours; it can also be set/retrieved calling the corresponding method
          enum:
            - BusinessHours
            - AfterHours
    MissedCallExtensionInfoExternalNumber:
      type: object
      description: Specifies an external PSTN number which should be used for the missed call transfer. Returned only if the actionType is set to `ConnectToExternalNumber`
      properties:
        phoneNumber:
          type: string
          description: "Phone number to which the call is forwarded. In addition to common [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I) format, the following number patterns are supported: 11xxxxxxxxxxx, 444xxxxxxxxxxx, 616xxxxxxxxxxx, 1700yyyy; where `xxxxxxxxxxx` is a phone number in E.164 format (without '+' sign) and `yyyy` is an external short extension number. Maximum number of digits is 15"
    CustomAnsweringRuleInfo:
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Canonical URI to an answering rule resource
        id:
          type: string
          description: Internal identifier of an answering rule
        type:
          $ref: "#/components/schemas/RuleTypeInfo"
        name:
          type: string
          description: Name of an answering rule specified by user
        enabled:
          type: boolean
          description: Specifies if an answering rule is active or inactive
        schedule:
          $ref: "#/components/schemas/ScheduleInfo"
        calledNumbers:
          type: array
          description: Answering rules are applied when calling to selected number(s)
          items:
            $ref: "#/components/schemas/CalledNumberInfo"
        callers:
          type: array
          description: Answering rules are applied when calls are received from specified caller(s)
          items:
            $ref: "#/components/schemas/CallersInfo"
        callHandlingAction:
          type: string
          description: Specifies how incoming calls are forwarded
          enum:
            - ForwardCalls
            - UnconditionalForwarding
            - AgentQueue
            - TransferToExtension
            - TakeMessagesOnly
            - PlayAnnouncementOnly
            - SharedLines
        forwarding:
          $ref: "#/components/schemas/ForwardingInfo"
        unconditionalForwarding:
          $ref: "#/components/schemas/UnconditionalForwardingInfo"
        queue:
          $ref: "#/components/schemas/QueueInfo"
        transfer:
          $ref: "#/components/schemas/TransferredExtensionInfo"
        voicemail:
          $ref: "#/components/schemas/VoicemailInfo"
        greetings:
          type: array
          description: Greetings applied for an answering rule; only predefined greetings can be applied, see Dictionary Greeting List
          items:
            $ref: "#/components/schemas/GreetingInfo"
        screening:
          type: string
          description: Call screening status. 'Off' - no call screening; 'NoCallerId' - if caller ID is missing, then callers are asked to say their name before connecting; 'UnknownCallerId' - if caller ID is not in contact list, then callers are asked to say their name before connecting; 'Always' - the callers are always asked to say their name before connecting. The default value is 'Off'
          enum:
            - Off
            - NoCallerId
            - UnknownCallerId
            - Always
          default: Off
        sharedLines:
          $ref: "#/components/schemas/SharedLinesInfo"
        missedCall:
          $ref: "#/components/schemas/MissedCallInfo"
    MissedCallInfo:
      type: object
      description: Specifies behavior for the missed call scenario. Returned only if `enabled` parameter of a voicemail is set to 'false'
      properties:
        actionType:
          type: string
          description: Specifies the action that should be executed on a missed call. It can either be playing greeting message and disconnection, or sending call to a calling group. If 'ConnectToExtension' is set, then calling group extension should be specified
          enum:
            - PlayGreetingAndDisconnect
            - ConnectToExtension
            - ConnectToExternalNumber
        extension:
          $ref: "#/components/schemas/MissedCallExtensionInfo"
        externalNumber:
          $ref: "#/components/schemas/MissedCallExtensionInfoExternalNumber"
    UpdateAnsweringRuleRequest:
      type: object
      properties:
        id:
          type: string
          description: Identifier of an answering rule
        forwarding:
          $ref: "#/components/schemas/ForwardingInfoCreateRuleRequest"
        enabled:
          type: boolean
          description: Specifies if the rule is active or inactive. The default value is `true`
        name:
          type: string
          description: Name of an answering rule specified by user
        callers:
          type: array
          description: Answering rule will be applied when calls are received from the specified caller(s)
          items:
            $ref: "#/components/schemas/CallersInfoRequest"
        calledNumbers:
          type: array
          description: Answering rules are applied when calling to selected number(s)
          items:
            $ref: "#/components/schemas/CalledNumberInfo"
        schedule:
          $ref: "#/components/schemas/ScheduleInfo"
        callHandlingAction:
          type: string
          description: Specifies how incoming calls are forwarded
          enum:
            - ForwardCalls
            - UnconditionalForwarding
            - AgentQueue
            - TransferToExtension
            - TakeMessagesOnly
            - PlayAnnouncementOnly
            - SharedLines
        type:
          $ref: "#/components/schemas/RuleTypeInfo"
        unconditionalForwarding:
          $ref: "#/components/schemas/UnconditionalForwardingInfo"
        queue:
          $ref: "#/components/schemas/QueueInfo"
        voicemail:
          $ref: "#/components/schemas/VoicemailInfo"
        missedCall:
          $ref: "#/components/schemas/MissedCallInfo"
        greetings:
          type: array
          description: |
            Greetings applied for an answering rule; only predefined greetings
            can be applied, see Dictionary Greeting List
          items:
            $ref: "#/components/schemas/GreetingInfo"
        screening:
          type: string
          description: |
            Call screening status. 'Off' - no call screening; 'NoCallerId'
            - if caller ID is missing, then callers are asked to say their name before
            connecting; 'UnknownCallerId' - if caller ID is not in contact list, then
            callers are asked to say their name before connecting; 'Always' - the
            callers are always asked to say their name before connecting. The default
            value is 'Off'
          enum:
            - Off
            - NoCallerId
            - UnknownCallerId
            - Always
          default: Off
        showInactiveNumbers:
          type: boolean
          description: Indicates whether inactive numbers should be returned or not
        transfer:
          $ref: "#/components/schemas/TransferredExtensionInfo"
    ForwardingInfoCreateRuleRequest:
      type: object
      properties:
        notifyMySoftPhones:
          type: boolean
          description: Specifies if the first ring on desktop/mobile apps is enabled. The default value is `true`
        notifyAdminSoftPhones:
          type: boolean
          description: Deprecated parameter. Specifies if the administrator's softphone (desktop application) is notified before forwarding the incoming call to desk phones and forwarding numbers. The default value is `true`.
          deprecated: true
        softPhonesRingCount:
          type: integer
          format: int32
          description: Specifies delay between ring on apps and starting of a call forwarding. To activate this parameter use the value > 0, and turn off the `softPhonesAlwaysRing` setting. If the value is 1 or 0, the `softPhonesAlwaysRing` setting cannot be turned off
        softPhonesAlwaysRing:
          type: boolean
          description: Specifies that desktop and mobile applications of the user will ring till the end of their forwarding list. If set to `true` then `softPhonesRingCount` is ignored
          default: true
        ringingMode:
          type: string
          description: Specifies the order in which forwarding numbers ring. 'Sequentially' means that forwarding numbers are ringing one at a time, in order of priority. 'Simultaneously' means that forwarding numbers are ringing all at the same time. The default value is 'Sequentially'
          enum:
            - Sequentially
            - Simultaneously
        rules:
          type: array
          description: Information on a call forwarding rule
          items:
            $ref: "#/components/schemas/ForwardingRuleCreateRequest"
        mobileTimeout:
          type: boolean
          description: Deprecated parameter. Specifies if mobile timeout is activated for the rule
          deprecated: true
      description: Forwarding parameters. Returned if 'ForwardCalls' is specified in 'callHandlingAction'. These settings determine the forwarding numbers to which the call will be forwarded
    ForwardingRuleCreateRequest:
      type: object
      properties:
        index:
          type: integer
          format: int32
          description: Forwarding number (or group) ordinal. Not returned for inactive numbers
        ringCount:
          type: integer
          format: int32
          description: |
            Number of rings for a forwarding number (or group). For inactive
            numbers the default value ('4') is returned
        enabled:
          type: boolean
          description: Phone number status
        forwardingNumbers:
          type: array
          description: Forwarding number (or group) data
          items:
            $ref: "#/components/schemas/ForwardingNumberInfoRulesCreateRuleRequest"
    ForwardingNumberInfoRulesCreateRuleRequest:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a forwarding number
        type:
          $ref: "#/components/schemas/ForwardingPhoneNumberTypeEnum"
        phoneNumber:
          type: string
          description: Forwarding/Call flip phone number
        label:
          type: string
          description: Forwarding/Call flip number title
          maxLength: 60
    GetInternalTextMessageInfoResponse:
      type: object
      properties:
        id:
          type: integer
          format: int64
          description: Internal identifier of a message
        uri:
          type: string
          format: uri
          description: Canonical URI of a message
        attachments:
          type: array
          description: The list of message attachments
          items:
            $ref: "#/components/schemas/MessageAttachmentInfo"
        availability:
          $ref: "#/components/schemas/MessageAvailabilityEnum"
        conversationId:
          type: integer
          format: int64
          description: |
            SMS and Pager only. Identifier of a conversation that the message
            belongs to
        conversation:
          $ref: "#/components/schemas/ConversationInfo"
        creationTime:
          type: string
          description: |
            Message creation date/time in ISO 8601 format including timezone,
            for example 2016-03-10T18:07:52.534Z
          format: date-time
        direction:
          $ref: "#/components/schemas/MessageDirectionEnum"
        from:
          $ref: "#/components/schemas/MessageStoreCallerInfoResponseFrom"
        lastModifiedTime:
          type: string
          description: |
            Date/time when the message was modified on server in ISO
            8601 format including timezone, for example 2016-03-10T18:07:52.534Z
          format: date-time
        messageStatus:
          $ref: "#/components/schemas/MessageStatusEnum"
        pgToDepartment:
          type: boolean
          description: |
            Pager only. `true` if at least one of a message recipients
            is 'Department' extension
        priority:
          $ref: "#/components/schemas/MessagePriorityEnum"
        readStatus:
          $ref: "#/components/schemas/MessageReadStatusEnum"
        subject:
          type: string
          description: |
            Message subject. For SMS and Pager messages it replicates message
            text which is also returned as an attachment
        to:
          type: array
          description: Recipient information
          items:
            $ref: "#/components/schemas/MessageStoreCallerInfoResponseTo"
        type:
          type: string
          description: Message type
          enum:
            - Fax
            - SMS
            - VoiceMail
            - Pager
            - Text
    CreateInternalTextMessageRequest:
      required:
        - text
      type: object
      properties:
        from:
          $ref: "#/components/schemas/PagerCallerInfoRequest"
        replyOn:
          type: integer
          format: int64
          description: Internal identifier of a message this message replies to
        text:
          type: string
          description: |
            Text of a pager message. Max length is 1024 symbols (2-byte
            UTF-16 encoded). If a character is encoded in 4 bytes in UTF-16 it is
            treated as 2 characters, thus restricting the maximum message length to
            512 symbols
          example: hello world
        to:
          type: array
          description: |
            Optional if `replyOn` parameter is specified. Receiver of a pager
            message.
          items:
            $ref: "#/components/schemas/PagerCallerInfoRequest"
    PagerCallerInfoRequest:
      type: object
      properties:
        extensionId:
          type: string
          description: Extension identifier
          example: "123456789"
        extensionNumber:
          type: string
          description: Extension number
          example: "105"
      description: Sender of a pager message.
    AuthProfileResource:
      type: object
      properties:
        uri:
          type: string
          format: uri
        permissions:
          type: array
          items:
            $ref: "#/components/schemas/ActivePermissionResource"
    ActivePermissionResource:
      type: object
      properties:
        permission:
          $ref: "#/components/schemas/PermissionIdResource"
        effectiveRole:
          $ref: "#/components/schemas/EffectiveRoleResource"
        scopes:
          type: array
          items:
            type: string
            enum:
              - Account
              - AllExtensions
              - Federation
              - NonUserExtensions
              - RoleBased
              - Self
              - UserExtensions
    EffectiveRoleResource:
      type: object
      properties:
        uri:
          type: string
          format: uri
        id:
          type: string
        domain:
          type: string
    AuthProfileCheckResource:
      type: object
      properties:
        uri:
          type: string
          format: uri
        successful:
          type: boolean
          default: false
        details:
          $ref: "#/components/schemas/ActivePermissionResource"
    UserCallQueues:
      type: object
      properties:
        records:
          type: array
          description: List of queues where an extension is an agent
          items:
            $ref: "#/components/schemas/QueueShortInfoResource"
    QueueShortInfoResource:
      type: object
      properties:
        id:
          type: string
          description: Call queue extension identifier
        name:
          type: string
          description: Call queue name (read-only)
    CreateUserEmergencyLocationRequest:
      type: object
      properties:
        name:
          type: string
          description: Name of a new personal emergency response location
        addressFormatId:
          type: string
          description: Address format ID
        trusted:
          allOf:
            - $ref: "#/components/schemas/TrustedFlag"
            - default: false
        address:
          $ref: "#/components/schemas/EmergencyAddressResourceRequest"
        site:
          $ref: "#/components/schemas/SiteBasicInfo"
    GetExtensionForwardingNumberListResponse:
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Link to the forwarding number list resource
        records:
          type: array
          description: List of forwarding phone numbers
          items:
            $ref: "#/components/schemas/ForwardingNumberInfo"
        navigation:
          $ref: "#/components/schemas/PageNavigationModel"
        paging:
          $ref: "#/components/schemas/EnumeratedPagingModel"
    CreateForwardingNumberDeviceInfo:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of the other extension device
      description: |
        Forwarding device information. Applicable for 'PhoneLine' type only.
        Cannot be specified together with 'phoneNumber' parameter
    ForwardingNumberId:
      type: object
      properties:
        forwardingNumberId:
          type: string
          description: Forwarding number id
    DeleteForwardingNumbersRequest:
      type: object
      properties:
        records:
          type: array
          description: List of forwarding number IDs
          items:
            $ref: "#/components/schemas/ForwardingNumberId"
    ForwardingNumberInfo:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a forwarding/call flip phone number
        uri:
          type: string
          format: uri
          description: Canonical URI of a forwarding/call flip phone number
        phoneNumber:
          type: string
          description: Forwarding/Call flip phone number
        label:
          type: string
          description: Forwarding/Call flip number title
          maxLength: 60
        features:
          type: array
          description: Type of option this phone number is used for. Multiple values are accepted
          items:
            type: string
            enum:
              - CallFlip
              - CallForwarding
        flipNumber:
          type: string
          description: Number assigned to the call flip phone number, corresponds to the shortcut dial number
        device:
          $ref: "#/components/schemas/CreateForwardingNumberDeviceInfo"
        type:
          $ref: "#/components/schemas/ForwardingPhoneNumberTypeEnum"
        extension:
          $ref: "#/components/schemas/ForwardingNumberExtensionInfo"
    ForwardingNumberExtensionInfo:
      type: object
      description: Extension information (for ExtensionApps type only)
      properties:
        id:
          type: string
          description: Internal identifier of an extension
        name:
          type: string
          description: Extension name
        extensionNumber:
          type: string
          description: Number of an extension
    CreateForwardingNumberRequest:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a forwarding/call flip phone number
        flipNumber:
          type: integer
          format: int32
          description: Number assigned to the call flip phone number, corresponds to the shortcut dial number
        phoneNumber:
          type: string
          description: Forwarding/call flip phone number
        label:
          type: string
          description: Forwarding/call flip number title
          maxLength: 60
        type:
          allOf:
            - $ref: "#/components/schemas/ForwardingPhoneNumberTypeEnum"
            - default: Other
          description: Forwarding/call flip phone type. If specified, 'label' attribute value is ignored
        device:
          $ref: "#/components/schemas/CreateForwardingNumberDeviceInfo"
    UpdateForwardingNumberRequest:
      type: object
      properties:
        phoneNumber:
          type: string
          description: Forwarding/Call flip phone number
        label:
          type: string
          description: Forwarding/Call flip number title
          maxLength: 60
        flipNumber:
          type: string
          description: Number assigned to the call flip phone number, corresponds to the shortcut dial number
        type:
          $ref: "#/components/schemas/ForwardingPhoneNumberTypeEnum"
    DetailedExtensionPresenceWithSIPEventBody:
      type: object
      description: Notification payload body
      properties:
        extensionId:
          type: string
          description: Internal identifier of an extension
          default: "~"
        telephonyStatus:
          type: string
          description: Telephony presence status. Returned if telephony status is changed.
          enum:
            - NoCall
            - CallConnected
            - Ringing
            - OnHold
            - ParkedCall
        activeCalls:
          type: array
          description: List of the latest 7 active calls on extension
          items:
            $ref: "#/components/schemas/ActiveCallInfo"
        sequence:
          type: integer
          format: int32
          description: Order number of a notification to state the chronology
        presenceStatus:
          type: string
          description: Aggregated presence status, calculated from a number of sources
          enum:
            - Offline
            - Busy
            - Available
        userStatus:
          type: string
          description: User-defined presence status (as previously published by the user)
          enum:
            - Offline
            - Busy
            - Available
        meetingStatus:
          type: string
          description: Meetings presence status
          enum:
            - Connected
            - Disconnected
        dndStatus:
          type: string
          description: |
            Do Not Disturb status. Not applicable for User extensions
            if the new communication handling service is activated on account
          enum:
            - TakeAllCalls
            - DoNotAcceptDepartmentCalls
            - TakeDepartmentCallsOnly
            - DoNotAcceptAnyCalls
            - Unknown
        dndStatusPersonal:
          $ref: "#/components/schemas/DndStatusPersonal"
        allowSeeMyPresence:
          type: boolean
          description: If `true` enables other extensions to see the extension presence status
        acceptCallQueueCalls:
          $ref: "#/components/schemas/AcceptCallQueueCalls"
        ringOnMonitoredCall:
          type: boolean
          description: |
            If `true` enables to ring extension phone, if any user monitored
            by this extension is ringing
        pickUpCallsOnHold:
          type: boolean
          description: If `true` enables the extension user to pick up a monitored line on hold
        totalActiveCalls:
          type: integer
          format: int32
          description: Total number of active calls on extension at the present moment
        ownerId:
          type: string
          description: Internal identifier of a subscription owner extension
        appearances:
          $ref: "#/components/schemas/AppearancesInfo"
    ExtensionPresenceEvent:
      type: object
      properties:
        uuid:
          type: string
          description: Universally unique identifier of a notification
        event:
          type: string
          description: Event filter name
        timestamp:
          type: string
          format: date-time
          description: Timestamp when this notification was sent in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format including timezone, for example *2016-03-10T18:07:52.534Z*
        subscriptionId:
          type: string
          description: Internal identifier of a subscription
        body:
          $ref: "#/components/schemas/ExtensionPresenceEventBody"
    DetailedExtensionPresenceWithSIPEvent:
      type: object
      properties:
        uuid:
          type: string
          description: Universally unique identifier of a notification
        event:
          type: string
          description: Event filter name
        timestamp:
          type: string
          format: date-time
          description: Timestamp when this notification was sent in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format including timezone, for example *2016-03-10T18:07:52.534Z*
        subscriptionId:
          type: string
          description: Internal identifier of a subscription
        body:
          $ref: "#/components/schemas/DetailedExtensionPresenceWithSIPEventBody"
    APNSInfo:
      type: object
      description: APNS (Apple Push Notification Service) information
      properties:
        aps:
          $ref: "#/components/schemas/APSInfo"
    DetailedExtensionPresenceEventBody:
      type: object
      description: Notification payload body
      properties:
        extensionId:
          type: string
          description: Internal identifier of an extension
          default: "~"
        telephonyStatus:
          type: string
          description: Telephony presence status. Returned if telephony status is changed.
          enum:
            - NoCall
            - CallConnected
            - Ringing
            - OnHold
            - ParkedCall
        activeCalls:
          type: array
          description: List of the latest 7 active calls on extension
          items:
            $ref: "#/components/schemas/ActiveCallInfoWithoutSIP"
        sequence:
          type: integer
          format: int32
          description: Order number of a notification to state the chronology
        presenceStatus:
          type: string
          description: Aggregated presence status, calculated from a number of sources
          enum:
            - Offline
            - Busy
            - Available
        userStatus:
          type: string
          description: User-defined presence status (as previously published by the user)
          enum:
            - Offline
            - Busy
            - Available
        meetingStatus:
          type: string
          description: Meetings presence status
          enum:
            - Connected
            - Disconnected
        dndStatus:
          type: string
          description: |
            Do Not Disturb status. Not applicable for User extensions
            if the new communication handling service is activated on account
          enum:
            - TakeAllCalls
            - DoNotAcceptDepartmentCalls
            - TakeDepartmentCallsOnly
            - DoNotAcceptAnyCalls
            - Unknown
        dndStatusPersonal:
          $ref: "#/components/schemas/DndStatusPersonal"
        allowSeeMyPresence:
          type: boolean
          description: If `true` enables other extensions to see the extension presence status
        acceptCallQueueCalls:
          $ref: "#/components/schemas/AcceptCallQueueCalls"
        ringOnMonitoredCall:
          type: boolean
          description: |
            If `true` enables to ring extension phone, if any user monitored
            by this extension is ringing
        pickUpCallsOnHold:
          type: boolean
          description: If `true` enables the extension user to pick up a monitored line on hold
        totalActiveCalls:
          type: integer
          format: int32
          description: Total number of active calls on extension at the present moment
        ownerId:
          type: string
          description: Internal identifier of a subscription owner extension
        appearances:
          $ref: "#/components/schemas/AppearancesInfo"
    AppearancesInfo:
      type: object
      description: Appearance phone numbers information. Supported only for Delegated Lines Group extensions
      properties:
        phoneNumber:
          type: string
          description: Appearance phone number
        appearanceNumber:
          type: integer
          format: int32
          description: Appearance number. The value range is from 1 to 8
        lineStatus:
          type: string
          enum:
            - Seized
            - Released
          description: |
            Appearance line status. The two possible values: 'Seized' - the phone line is busy; 'Released' - the phone line is open
    ActiveCallInfoWithoutSIP:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a call
        direction:
          type: string
          description: Call direction
          enum:
            - Inbound
            - Outbound
        queueCall:
          type: boolean
          description: Identifies if a call belongs to the call queue
        from:
          type: string
          description: Phone number or extension number of a caller. For GCM transport type '_from' property should be used
        fromName:
          type: string
          description: Name of a caller
        to:
          type: string
          description: Phone number or extension number of a callee
        toName:
          type: string
          description: Name of a callee
        partyId:
          type: string
          description: Internal identifier of a call party
        startTime:
          type: string
          format: date-time
          description: Time when the call is actually started
        sessionId:
          type: string
          description: Internal identifier of a call session
        telephonySessionId:
          type: string
          description: Telephony identifier of a call session
        telephonyStatus:
          type: string
          description: Telephony call status
          enum:
            - NoCall
            - CallConnected
            - Ringing
            - OnHold
            - ParkedCall
        terminationType:
          type: string
          description: Type of call termination. Supported for calls in 'NoCall' status. If the returned termination type is 'intermediate' it means the call is not actually ended, the connection is established on one of the devices
          enum:
            - final
            - intermediate
        callInfo:
          $ref: "#/components/schemas/CallInfoCQ"
        appearanceInfo:
          $ref: "#/components/schemas/AppearanceInfo"
    MissedCallEvent:
      type: object
      properties:
        uuid:
          type: string
          description: Universally unique identifier of a notification
        pn_apns:
          $ref: "#/components/schemas/APNSInfo"
        event:
          type: string
          description: Event filter name
        subscriptionId:
          type: string
          description: Internal identifier of a subscription
        timestamp:
          type: string
          format: date-time
          description: The timestamp of a call action in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format including timezone, for example 2016-03-10T18:07:52.534Z
        extensionId:
          type: string
          description: Internal identifier of an extension
          default: "~"
        action:
          type: string
          description: Calling action, for example 'StartRing'
        sessionId:
          type: string
          description: Identifier of a call session
        serverId:
          type: string
          description: Identifier of a server
        from:
          type: string
          description: Phone number of a caller. For GCM transport type '_from' property should be used
        fromName:
          type: string
          description: Caller name
        to:
          type: string
          description: Phone number of a callee
        toName:
          type: string
          description: Callee name
        sid:
          type: string
          description: Unique identifier of a session
        toUrl:
          type: string
          description: SIP proxy registration name
        srvLvl:
          type: string
          description: User data
        srvLvlExt:
          type: string
          description: User data
        recUrl:
          type: string
          description: File containing recorded caller name
        pn_ttl:
          type: integer
          format: int32
          description: Notification lifetime value in seconds, the default value is 30 seconds
        ownerId:
          type: string
          description: Internal identifier of a subscription owner extension
    IncomingCallEvent:
      type: object
      properties:
        aps:
          $ref: "#/components/schemas/APSInfo"
        event:
          type: string
          description: Event filter name
        uuid:
          type: string
          description: Universally unique identifier of a notification
        subscriptionId:
          type: string
          description: Internal identifier of a subscription
        timestamp:
          type: string
          format: date-time
          description: The timestamp of a call action in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format including timezone, for example 2016-03-10T18:07:52.534Z
        extensionId:
          type: string
          description: Internal identifier of an extension
          default: "~"
        action:
          type: string
          description: Calling action, for example 'StartRing'
        sessionId:
          type: string
          description: Identifier of a call session
        serverId:
          type: string
          description: Identifier of a server
        from:
          type: string
          description: Phone number of a caller. For GCM transport type '_from' property should be used
        fromName:
          type: string
          description: Caller name
        to:
          type: string
          description: Phone number of a callee
        toName:
          type: string
          description: Callee name
        sid:
          type: string
          description: Unique identifier of a session
        toUrl:
          type: string
          description: SIP proxy registration name
        srvLvl:
          type: string
          description: User data
        srvLvlExt:
          type: string
          description: User data
        recUrl:
          type: string
          description: File containing recorded caller name
        pn_ttl:
          type: integer
          format: int32
          description: Notification lifetime value in seconds, the default value is 30 seconds
        ownerId:
          type: string
          description: Internal identifier of a subscription owner extension
    APSInfo:
      type: object
      description: APS (Apple Push Service) information/ priority data
      properties:
        content-available:
          type: integer
          format: int32
          description: If the value is '1' then notification is turned on even if the application is in background
    PresenceInfoRequest:
      type: object
      properties:
        userStatus:
          type: string
          description: User-defined presence status (as previously published by the user)
          enum:
            - Offline
            - Busy
            - Available
        dndStatus:
          type: string
          description: |
            Do Not Disturb status. Not applicable for User extensions
            if the new communication handling service is activated on account
          enum:
            - TakeAllCalls
            - DoNotAcceptDepartmentCalls
            - TakeDepartmentCallsOnly
            - DoNotAcceptAnyCalls
            - Unknown
        dndStatusPersonal:
          $ref: "#/components/schemas/DndStatusPersonal"
        message:
          type: string
          description: Custom status message (as previously published by user)
          maxLength: 75
          minLength: 0
        allowSeeMyPresence:
          type: boolean
          description: If set to `true` enables other extensions to see the extension presence status
          default: true
        ringOnMonitoredCall:
          type: boolean
          description: |
            If `true` enables to ring extension phone, if any user monitored
            by this extension is ringing
          default: false
        pickUpCallsOnHold:
          type: boolean
          description: If `true` enables the extension user to pick up a monitored line on hold
          default: false
        callerIdVisibility:
          type: string
          description: |
            Configures the user presence visibility. When the `allowSeeMyPresence` parameter is set to `true`,
            the following visibility options are supported via this parameter - All, None, PermittedUsers
          enum:
            - All
            - None
            - PermittedUsers
        acceptCallQueueCalls:
          $ref: "#/components/schemas/AcceptCallQueueCalls"
    ExtensionPresenceEventBody:
      type: object
      properties:
        extensionId:
          type: string
          description: Internal identifier of an extension. Optional parameter
          default: "~"
        telephonyStatus:
          type: string
          description: Telephony presence status. Returned if telephony status is changed.
          enum:
            - NoCall
            - CallConnected
            - Ringing
            - OnHold
            - ParkedCall
        aggregatedTelephonyStatus:
          $ref: "#/components/schemas/AggregatedTelephonyStatus"
        sequence:
          type: integer
          format: int32
          description: Order number of a notification to state the chronology
        presenceStatus:
          type: string
          description: Aggregated presence status, calculated from a number of sources
          enum:
            - Offline
            - Busy
            - Available
        userStatus:
          type: string
          description: User-defined presence status (as previously published by the user)
          enum:
            - Offline
            - Busy
            - Available
        dndStatus:
          type: string
          description: |
            Do Not Disturb status. Not applicable for User extensions
            if the new communication handling service is activated on account
          enum:
            - TakeAllCalls
            - DoNotAcceptDepartmentCalls
            - TakeDepartmentCallsOnly
            - DoNotAcceptAnyCalls
            - Unknown
        dndStatusPersonal:
          $ref: "#/components/schemas/DndStatusPersonal"
        allowSeeMyPresence:
          type: boolean
          description: If set to `true` enables other extensions to see the extension presence status
        acceptCallQueueCalls:
          $ref: "#/components/schemas/AcceptCallQueueCalls"
        ringOnMonitoredCall:
          type: boolean
          description: |
            If `true` enables to ring extension phone, if any user monitored
            by this extension is ringing
        pickUpCallsOnHold:
          type: boolean
          description: If `true` enables the extension user to pick up a monitored line on hold
        ownerId:
          type: string
          description: Internal identifier of a subscription owner extension
        cxTelephonyStatus:
          $ref: "#/components/schemas/CxTelephonyStatus"
    DetailedExtensionPresenceEvent:
      type: object
      properties:
        uuid:
          type: string
          description: Universally unique identifier of a notification
        event:
          type: string
          description: Event filter name
        timestamp:
          type: string
          format: date-time
          description: Timestamp when this notification was sent in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format including timezone, for example *2016-03-10T18:07:52.534Z*
        subscriptionId:
          type: string
          description: Internal identifier of a subscription
        body:
          $ref: "#/components/schemas/DetailedExtensionPresenceEventBody"
    FaxResponseTo:
      type: object
      properties:
        recipientId:
          type: string
          description: Internal identifier of a fax recipient
        phoneNumber:
          type: string
          description: Phone number in E.164 (with '+' sign) format
          example: "+18661234567"
        name:
          type: string
          description: Name of a fax recipient listed on a fax cover page
        messageStatus:
          $ref: "#/components/schemas/MessageStatusEnum"
        location:
          type: string
          description: |
            Contains party location (city, state) if one can be determined
            from phoneNumber. This property is filled only when phoneNumber is not
            empty and server can calculate location information from it (for example,
            this information is unavailable for US toll-free numbers)
    MessageAttachmentInfoIntId:
      type: object
      properties:
        id:
          type: integer
          description: Internal identifier of a message attachment
          format: int64
        uri:
          type: string
          format: uri
          description: Canonical URI of a message attachment
        type:
          type: string
          description: Type of message attachment
          enum:
            - AudioRecording
            - AudioTranscription
            - Text
            - SourceDocument
            - RenderedDocument
            - MmsAttachment
        contentType:
          type: string
          description: MIME type for a given attachment, for instance 'audio/wav'
        filename:
          type: string
          description: Name of a file attached
        size:
          type: integer
          format: int32
          description: Size of an attachment in bytes
    FaxRequestTo:
      type: object
      properties:
        phoneNumber:
          type: string
          description: Phone number in E.164 (with '+' sign) format
          example: "+18661234567"
        name:
          type: string
          description: Name of a fax recipient that will be listed on a fax cover page
    FaxResponse:
      type: object
      properties:
        id:
          type: integer
          description: Internal identifier of a message
          format: int64
        uri:
          type: string
          format: uri
          description: Canonical URI of a message
        type:
          type: string
          description: Message type - 'Fax'
          enum:
            - Fax
        from:
          $ref: "#/components/schemas/MessageStoreCallerInfoResponseFrom"
        to:
          type: array
          description: Recipient information
          items:
            $ref: "#/components/schemas/FaxResponseTo"
        creationTime:
          type: string
          description: |
            Message creation date/time in ISO 8601 format including timezone,
            for example 2016-03-10T18:07:52.534Z
          format: date-time
        readStatus:
          $ref: "#/components/schemas/MessageReadStatusEnum"
        priority:
          $ref: "#/components/schemas/MessagePriorityEnum"
        attachments:
          type: array
          description: List of message attachments
          items:
            $ref: "#/components/schemas/MessageAttachmentInfoIntId"
        direction:
          $ref: "#/components/schemas/MessageDirectionEnum"
        availability:
          $ref: "#/components/schemas/MessageAvailabilityEnum"
        messageStatus:
          $ref: "#/components/schemas/MessageStatusEnum"
        faxResolution:
          $ref: "#/components/schemas/FaxResolutionEnum"
        faxPageCount:
          type: integer
          format: int32
          description: Page count in a fax message
        lastModifiedTime:
          type: string
          description: |
            Date/time when the message was modified on server in ISO 8601
            format including timezone, for example 2016-03-10T18:07:52.534Z
          format: date-time
        coverIndex:
          type: integer
          format: int32
          description: |
            Cover page identifier. If `coverIndex` is set to '0' (zero), a cover
            page is not attached. For a list of available cover page identifiers
            (1-13) please call the Fax Cover Pages method. If not specified,
            the default cover page is attached (which is configured in
            'Outbound Fax Settings')
        coverPageText:
          type: string
          description: |
            Cover page text, entered by a fax sender and printed on a
            cover page. Maximum length is limited to 1024 symbols
    RingOutStatusInfo:
      type: object
      properties:
        callStatus:
          $ref: "#/components/schemas/CallingStatusInfo"
        callerStatus:
          $ref: "#/components/schemas/CallingStatusInfo"
        calleeStatus:
          $ref: "#/components/schemas/CallingStatusInfo"
      description: RingOut status information
    MakeRingOutCallerInfoRequestTo:
      type: object
      properties:
        phoneNumber:
          type: string
          description: Phone number in E.164 format
      description: |
        Phone number of a called party. This number corresponds to the
        2nd leg of a RingOut call
    GetRingOutStatusResponse:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a RingOut call
        uri:
          type: string
          description: Link to a RingOut call resource
          format: uri
        status:
          $ref: "#/components/schemas/RingOutStatusInfo"
    CallingStatusInfo:
      type: string
      description: Status of a call and calling/called party
      enum:
        - Invalid
        - Success
        - InProgress
        - Busy
        - NoAnswer
        - RingOutFromThisNumberIsNotSupported
        - Rejected
        - GenericError
        - Finished
        - InternationalDisabled
        - DestinationBlocked
        - NotEnoughFunds
        - NosuchUser
        - Error
        - CannotReach
        - NoAnsweringMachine
        - NoSessionFound
        - Unknown
    MakeRingOutRequest:
      required:
        - from
        - to
      type: object
      properties:
        from:
          $ref: "#/components/schemas/MakeRingOutCallerInfoRequestFrom"
        to:
          $ref: "#/components/schemas/MakeRingOutCallerInfoRequestTo"
        callerId:
          $ref: "#/components/schemas/MakeRingOutCallerIdInfo"
        playPrompt:
          type: boolean
          description: |
            Audio prompt that a calling party hears when a call
            is connected
        country:
          $ref: "#/components/schemas/MakeRingOutCountryInfo"
    MakeRingOutCallerInfoRequestFrom:
      type: object
      properties:
        phoneNumber:
          type: string
          description: Phone number in E.164 format
        forwardingNumberId:
          type: string
          description: |
            Internal identifier of a forwarding number; returned in response
            as an 'id' field value. Can be specified instead of a `phoneNumber` attribute
      description: |
        Phone number of a caller. This number corresponds to the 1st
        leg of a RingOut call. This number can be one of the user's configured forwarding
        numbers or an arbitrary number
    MakeRingOutCountryInfo:
      type: object
      properties:
        id:
          type: string
          description: Dialing plan country identifier
      description: |
        Optional. Dialing plan country data. If not specified, then an extension
        home country is applied by default
    MakeRingOutCallerIdInfo:
      type: object
      properties:
        phoneNumber:
          type: string
          description: Phone number in E.164 format
      description: Phone number which will be displayed to the called party
    BusinessSiteCollectionResource:
      type: object
      properties:
        uri:
          type: string
          format: uri
        records:
          type: array
          items:
            $ref: "#/components/schemas/RolesBusinessSiteResource"
    RolesCountryResource:
      type: object
      properties:
        uri:
          type: string
          format: uri
        id:
          type: string
        name:
          type: string
        isoCode:
          $ref: "#/components/schemas/CountryIsoCode"
        callingCode:
          $ref: "#/components/schemas/CountryCallingCode"
        emergencyCalling:
          type: boolean
        numberSelling:
          type: boolean
        loginAllowed:
          type: boolean
        freeSoftphoneLine:
          type: boolean
        signupAllowed:
          type: boolean
    BusinessSiteCollectionRequest:
      type: object
      properties:
        records:
          type: array
          items:
            $ref: "#/components/schemas/RolesBusinessSiteResource"
    RolesBusinessSiteResource:
      type: object
      required:
        - id
      properties:
        uri:
          type: string
          description: Link to a business site resource
        id:
          type: string
        email:
          type: string
          format: email
        code:
          type: string
        name:
          type: string
        extensionNumber:
          type: string
        callerIdName:
          type: string
        operator:
          $ref: "#/components/schemas/BasicExtensionInfoResource"
        regionalSettings:
          $ref: "#/components/schemas/RolesRegionalSettingsResource"
        businessAddress:
          $ref: "#/components/schemas/ContactAddressInfoResource"
    BasicExtensionInfoResource:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        extensionNumber:
          type: string
    RolesTimezoneResource:
      type: object
      properties:
        uri:
          type: string
          format: uri
        id:
          type: string
        name:
          type: string
        description:
          type: string
        bias:
          type: string
    RolesLanguageResource:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        localeCode:
          type: string
    CurrencyResource:
      type: object
      properties:
        id:
          type: string
        code:
          type: string
        name:
          type: string
        symbol:
          type: string
        minorSymbol:
          type: string
    ContactAddressInfoResource:
      type: object
      properties:
        street:
          type: string
        city:
          type: string
        state:
          type: string
        zip:
          type: string
        country:
          type: string
    RolesRegionalSettingsResource:
      type: object
      properties:
        timezone:
          $ref: "#/components/schemas/RolesTimezoneResource"
        homeCountry:
          $ref: "#/components/schemas/RolesCountryResource"
        language:
          $ref: "#/components/schemas/RolesLanguageResource"
        greetingLanguage:
          $ref: "#/components/schemas/RolesLanguageResource"
        formattingLocale:
          $ref: "#/components/schemas/RolesLanguageResource"
        timeFormat:
          $ref: "#/components/schemas/TimeFormatEnum"
        currency:
          $ref: "#/components/schemas/CurrencyResource"
    UserContactsGroupsInfo:
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Link to the list of address book groups
      description: Information on address book groups
    UserContactsNavigationInfoUri:
      type: object
      properties:
        uri:
          type: string
          format: uri
      description: Canonical URI for a corresponding page of a list
    ContactList:
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Link to the list of user personal contacts
        records:
          type: array
          description: |
            List of personal contacts from the extension address book
          items:
            $ref: "#/components/schemas/PersonalContactResource"
        navigation:
          $ref: "#/components/schemas/UserContactsNavigationInfo"
        paging:
          $ref: "#/components/schemas/UserContactsPagingInfo"
        groups:
          $ref: "#/components/schemas/UserContactsGroupsInfo"
    PersonalContactRequest:
      type: object
      properties:
        firstName:
          type: string
          description: First name of a contact
          example: Charlie
        lastName:
          type: string
          description: Last name of a contact
          example: Williams
        middleName:
          type: string
          description: Middle name of a contact
          example: J
        nickName:
          type: string
          description: Nick name of a contact
          example: The Boss
        company:
          type: string
          description: Company name of a contact
          example: Example, Inc.
        jobTitle:
          type: string
          description: Job title of a contact
          example: CEO
        email:
          type: string
          format: email
          description: Email of a contact
          example: charlie.williams@example.com
        email2:
          type: string
          format: email
          description: Second email of a contact
          example: charlie-example@gmail.com
        email3:
          type: string
          format: email
          description: Third email of a contact
          example: theboss-example@hotmail.com
        birthday:
          type: string
          description: Date of birth of a contact
          format: date-time
        webPage:
          type: string
          format: uri
          description: Contact home page URL
          example: http://www.example.com
        notes:
          type: string
          description: Notes for a contact
          example: "#1 Customer"
        homePhone:
          type: string
          description: Home phone number of a contact in e.164 (with "+") format
          example: "+15551234567"
        homePhone2:
          type: string
          description: Second home phone number of a contact in e.164 (with "+") format
          example: "+15551234567"
        businessPhone:
          type: string
          description: Business phone of a contact in e.164 (with "+") format
          example: "+15551234567"
        businessPhone2:
          type: string
          description: Second business phone of a contact in e.164 (with "+") format
          example: "+15551234567"
        mobilePhone:
          type: string
          description: Mobile phone of a contact in e.164 (with "+") format
          example: "+15551234567"
        businessFax:
          type: string
          description: Business fax number of a contact in e.164 (with "+") format
          example: "+15551234567"
        companyPhone:
          type: string
          description: Company number of a contact in e.164 (with "+") format
          example: "+15551234567"
        assistantPhone:
          type: string
          description: Phone number of a contact assistant in e.164 (with "+") format
          example: "+15551234567"
        carPhone:
          type: string
          description: Car phone number of a contact in e.164 (with "+") format
          example: "+15551234567"
        otherPhone:
          type: string
          description: Other phone number of a contact in e.164 (with "+") format
          example: "+15551234567"
        otherFax:
          type: string
          description: Other fax number of a contact in e.164 (with "+") format
          example: "+15551234567"
        callbackPhone:
          type: string
          description: Callback phone number of a contact in e.164 (with "+") format
          example: "+15551234567"
        homeAddress:
          $ref: "#/components/schemas/ContactAddressInfo"
        businessAddress:
          $ref: "#/components/schemas/ContactAddressInfo"
        otherAddress:
          $ref: "#/components/schemas/ContactAddressInfo"
        ringtoneIndex:
          type: string
          description: Contact ringtone. Max number of symbols is 64
        appInfo:
          type: string
          description: Source of the contact. Up to 64 symbols
    ContactAddressInfo:
      type: object
      properties:
        street:
          type: string
          description: Street address
          example: 20 Davis Dr.
        city:
          type: string
          description: City name
          example: Belmont
        country:
          type: string
          description: Country name
        state:
          type: string
          description: State/province name
          example: CA
        zip:
          type: string
          description: Zip/Postal code
          example: "94002"
    PersonalContactResource:
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Canonical URI of a contact
          example: https://platform.ringcentral.com/restapi/v1.0/account/230919004/extension/230919004/address-book/contact/623045004
        availability:
          type: string
          description: |
            This property has a special meaning only on Address Book Sync
            (e.g. a contact can be `Deleted`). For simple contact list reading it
            has always the default value - `Alive`
          enum:
            - Alive
            - Deleted
            - Purged
        email:
          type: string
          format: email
          description: Email of a contact
          example: charlie.williams@example.com
        id:
          type: integer
          format: int64
          description: Internal identifier of availability contact
          example: 623045004
        notes:
          type: string
          description: Notes for a contact
          example: "#1 Customer"
        company:
          type: string
          description: Company name of a contact
          example: Example, Inc.
        firstName:
          type: string
          description: First name of a contact
          example: Charlie
        lastName:
          type: string
          description: Last name of a contact
          example: Williams
        jobTitle:
          type: string
          description: Job title of a contact
          example: CEO
        birthday:
          type: string
          description: Date of birth of a contact
          format: date-time
        webPage:
          type: string
          format: uri
          description: The contact home page URL
          example: http://www.example.com
        middleName:
          type: string
          description: Middle name of a contact
          example: J
        nickName:
          type: string
          description: Nick name of a contact
          example: The Boss
        email2:
          type: string
          format: email
          description: Second email of a contact
          example: charlie-example@gmail.com
        email3:
          type: string
          format: email
          description: Third email of a contact
          example: theboss-example@hotmail.com
        homePhone:
          type: string
          description: Home phone number of a contact in e.164 (with "+") format
          example: "+15551234567"
        homePhone2:
          type: string
          description: Second home phone number of a contact in e.164 (with "+") format
          example: "+15551234567"
        businessPhone:
          type: string
          description: Business phone of the contact in e.164 (with "+") format
          example: "+15551234567"
        businessPhone2:
          type: string
          description: Second business phone of a contact in e.164 (with "+") format
          example: "+15551234567"
        mobilePhone:
          type: string
          description: Mobile phone of a contact in e.164 (with "+") format
          example: "+15551234567"
        businessFax:
          type: string
          description: Business fax number of a contact in e.164 (with "+") format
          example: "+15551234567"
        companyPhone:
          type: string
          description: Company number of a contact in e.164 (with "+") format
          example: "+15551234567"
        assistantPhone:
          type: string
          description: Phone number of a contact assistant in e.164 (with "+") format
          example: "+15551234567"
        carPhone:
          type: string
          description: Car phone number of a contact in e.164 (with "+") format
          example: "+15551234567"
        otherPhone:
          type: string
          description: Other phone number of a contact in e.164 (with "+") format
          example: "+15551234567"
        otherFax:
          type: string
          description: Other fax number of a contact in e.164 (with "+") format
          example: "+15551234567"
        callbackPhone:
          type: string
          description: Callback phone number of a contact in e.164 (with "+") format
          example: "+15551234567"
        businessAddress:
          $ref: "#/components/schemas/ContactAddressInfo"
        homeAddress:
          $ref: "#/components/schemas/ContactAddressInfo"
        otherAddress:
          $ref: "#/components/schemas/ContactAddressInfo"
        ringtoneIndex:
          type: string
          description: Contact ringtone. Max number of symbols is 64
        appInfo:
          type: string
          description: Source of the contact. Up to 64 symbols
    UserContactsNavigationInfo:
      type: object
      properties:
        firstPage:
          $ref: "#/components/schemas/UserContactsNavigationInfoUri"
        nextPage:
          $ref: "#/components/schemas/UserContactsNavigationInfoUri"
        previousPage:
          $ref: "#/components/schemas/UserContactsNavigationInfoUri"
        lastPage:
          $ref: "#/components/schemas/UserContactsNavigationInfoUri"
      description: Information on navigation
    UserContactsPagingInfo:
      type: object
      properties:
        page:
          type: integer
          description: |
            Current page number. 1-indexed, so the first page is 1
            by default. May be omitted if the result is empty (because non-existent page
            was specified or perPage=0 was requested)
          format: int32
        perPage:
          type: integer
          description: |
            Current page size, describes how many items each page contains.
            Default value is 100. Maximum value is 1000. If perPage value in the request
            is greater than 1000, the maximum value (1000) is applied
          format: int32
        pageStart:
          type: integer
          description: |
            Zero-based number of the first element on the current page.
            Omitted if a page is omitted or the result is empty
          format: int32
        pageEnd:
          type: integer
          description: |
            Zero-based index of the last element on the current page.
            Omitted if a page is omitted or the result is empty
          format: int32
        totalPages:
          type: integer
          description: |
            Total number of pages in a dataset. May be omitted for
            some resources due to performance reasons
          format: int32
        totalElements:
          type: integer
          description: |
            Total number of elements in a dataset. May be omitted for
            some resource due to performance reasons
          format: int32
      description: Information on paging
    SmsRequestCountryInfo:
      type: object
      description: Target number country information. Either `id` or `isoCode` can be specified.
      properties:
        id:
          type: string
          description: Internal identifier of a country
        isoCode:
          $ref: "#/components/schemas/CountryIsoCode"
    GetSMSMessageInfoResponse:
      type: object
      properties:
        id:
          type: integer
          format: int64
          description: Internal identifier of a message
        uri:
          type: string
          format: uri
          description: Canonical URI of a message
        attachments:
          type: array
          description: List of message attachments
          items:
            $ref: "#/components/schemas/MessageAttachmentInfo"
        availability:
          $ref: "#/components/schemas/MessageAvailabilityEnum"
        conversationId:
          type: integer
          format: int64
          description: |
            SMS and Pager only. Identifier of a conversation that the message
            belongs to
        conversation:
          $ref: "#/components/schemas/ConversationInfo"
        creationTime:
          type: string
          description: |
            Message creation date/time in ISO 8601 format including timezone,
            for example 2016-03-10T18:07:52.534Z
          format: date-time
        direction:
          $ref: "#/components/schemas/MessageDirectionEnum"
        from:
          $ref: "#/components/schemas/MessageStoreCallerInfoResponseFrom"
        lastModifiedTime:
          type: string
          description: |
            Date/time when the message was modified on server in ISO
            8601 format including timezone, for example 2016-03-10T18:07:52.534Z
          format: date-time
        messageStatus:
          $ref: "#/components/schemas/MessageStatusEnum"
        priority:
          $ref: "#/components/schemas/MessagePriorityEnum"
        readStatus:
          $ref: "#/components/schemas/MessageReadStatusEnum"
        smsDeliveryTime:
          type: string
          description: |
            SMS only. The date/time when outbound SMS was delivered to
            recipient's handset in ISO 8601 format including timezone,
            for example 2016-03-10T18:07:52.534Z. It is filled only if
            the carrier sends a delivery receipt to RingCentral
          format: date-time
        smsSendingAttemptsCount:
          type: integer
          format: int32
          description: |
            SMS only. Number of attempts made to send an outbound SMS to
            the Gateway (if Gateway is temporary unavailable)
        subject:
          type: string
          description: |
            Message subject. For SMS and Pager messages it replicates message
            text which is also returned as an attachment
        to:
          type: array
          description: Recipient information
          items:
            $ref: "#/components/schemas/MessageStoreCallerInfoResponseTo"
        type:
          type: string
          description: Message type
          enum:
            - Fax
            - SMS
            - VoiceMail
            - Pager
            - Text
    CreateSMSMessage:
      required:
        - from
        - text
        - to
      type: object
      properties:
        from:
          $ref: "#/components/schemas/MessageStoreCallerInfoRequest"
        to:
          type: array
          description: Message receiver(s) information. The `phoneNumber` value is required
          items:
            $ref: "#/components/schemas/MessageStoreCallerInfoRequest"
        text:
          type: string
          description: |
            Text of a message. Max length is 1000 symbols (2-byte UTF-16
            encoded). If a character is encoded in 4 bytes in UTF-16 it is treated
            as 2 characters, thus restricting the maximum message length to 500 symbols
        country:
          $ref: "#/components/schemas/SmsRequestCountryInfo"
    MessageStoreCallerInfoRequest:
      type: object
      required:
        - phoneNumber
      properties:
        phoneNumber:
          type: string
          description: Phone number in E.164 format
      description: |
        Message sender information. The `phoneNumber` value should be one
        the account phone numbers allowed to send the current type of messages
    AssignedRolesResource:
      type: object
      properties:
        uri:
          type: string
          format: uri
        records:
          type: array
          items:
            $ref: "#/components/schemas/AssignedRoleResource"
    SmsRecipientExtensionTypesEnum:
      type: string
      description: |
        Type of the extension assigned as Sms recipient.
      enum:
        - User
        - DigitalUser
        - ApplicationExtension
      example: User
    SmsRecipient:
      type: object
      properties:
        id:
          type: string
          description: ID of extension who is configured as a CQ's SMS recipient.
        extensionNumber:
          type: string
          description: PIN of the extension who is configured as a CQ's SMS recipient.
        extensionType:
          $ref: "#/components/schemas/SmsRecipientExtensionTypesEnum"
        name:
          type: string
          description: Name (first + last) of the extension who is configured as a CQ's SMS recipient.
        assignable:
          type: boolean
          description: Indicates user's ability to become a thread assignee.
        hasLicense:
          type: boolean
          description: Indicates availability of a new MessageThreadsPaid feature status.
    SmsRecipientsResource:
      type: object
      properties:
        smsRecipients:
          type: array
          items:
            $ref: "#/components/schemas/SmsRecipient"
    BulkAssignSmsRecipientsRequest:
      type: object
      description: One of the parameters ('addedExtensionIds', 'removedExtensionIds') must be specified and not empty.
      properties:
        addedExtensionIds:
          type: array
          description: |
            List of added extensions.
            maxItems values depends on MessageThreads feature.
            If the feature is disabled maxItems=1, otherwise 50.
          items:
            type: string
            minItems: 1
            maxItems: 50
            uniqueItems: true
        removedExtensionIds:
          type: array
          description: |
            List of removed extensions.
            maxItems values depends on MessageThreads feature.
            If the feature is disabled maxItems=1, otherwise 50.
          items:
            type: string
            minItems: 1
            maxItems: 50
            uniqueItems: true
    NotificationSettingsUpdateRequest:
      allOf:
        - $ref: "#/components/schemas/BaseNotificationSettings"
        - type: object
          properties:
            uri:
              type: string
              format: uri
              description: Canonical URI of notifications settings resource
            emailAddresses:
              type: array
              description: |
                List of notification recipient email addresses. Should not be empty
                if 'includeManagers' parameter is set to false
              items:
                type: string
            smsEmailAddresses:
              type: array
              description: List of notification recipient email addresses
              items:
                type: string
            includeManagers:
              type: boolean
              description: |
                Specifies if managers' emails are included in the list of emails to
                which notifications are sent. If not specified, then the value is `true`
              default: true
            callNotes:
              $ref: "#/components/schemas/CallNotesInfo"
    InboundFaxesInfo:
      allOf:
        - $ref: "#/components/schemas/SimpleSettings"
        - type: object
          properties:
            advancedEmailAddresses:
              type: array
              description: |
                List of recipient email addresses for inbound fax notifications.
                Returned if specified, in both modes (advanced/basic). Applied in advanced
                mode only
              items:
                type: string
            advancedSmsEmailAddresses:
              type: array
              description: |
                List of recipient phone numbers for inbound fax notifications.
                Returned if specified, in both modes (advanced/basic). Applied in advanced
                mode only
              items:
                type: string
            includeAttachment:
              type: boolean
              description: |
                Indicates whether fax should be attached to email
            markAsRead:
              type: boolean
              description: |
                Indicates whether email should be automatically marked as read
    InboundTextsInfo:
      allOf:
        - $ref: "#/components/schemas/SimpleSettings"
        - type: object
          properties:
            advancedEmailAddresses:
              type: array
              description: |
                List of recipient email addresses for inbound text message
                notifications. Returned if specified, in both modes (advanced/basic).
                Applied in advanced mode only
              items:
                type: string
            advancedSmsEmailAddresses:
              type: array
              description: |
                List of recipient phone numbers for inbound text message notifications.
                Returned if specified, in both modes (advanced/basic). Applied in advanced
                mode only
              items:
                type: string
    MissedCallsInfo:
      allOf:
        - $ref: "#/components/schemas/SimpleSettings"
        - type: object
          properties:
            advancedEmailAddresses:
              type: array
              description: |
                List of recipient email addresses for missed call notifications.
                Returned if specified, in both modes (advanced/basic). Applied in advanced
                mode only
              items:
                type: string
            advancedSmsEmailAddresses:
              type: array
              description: |
                List of recipient phone numbers for missed call notifications.
                Returned if specified, in both modes (advanced/basic). Applied in advanced
                mode only
              items:
                type: string
    BaseNotificationSettings:
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Canonical URI of notifications settings resource
        smsPhoneNumbers:
          type: array
          description: |
            The parameter contains the list of phone Numbers which should be used for SMS notifications sending
            (if advanced mode disabled)
          minItems: 1
          maxItems: 10
          uniqueItems: true
          items:
            type: string
        advancedMode:
          type: boolean
          description: |
            Specifies notifications settings mode. If `true` then advanced
            mode is on, it allows using different emails and/or phone numbers for
            each notification type. If `false` then basic mode is on. Advanced mode
            settings are returned in both modes, if specified once, but if basic mode
            is switched on, they are not applied
        voicemails:
          $ref: "#/components/schemas/VoicemailsInfo"
        inboundFaxes:
          $ref: "#/components/schemas/InboundFaxesInfo"
        outboundFaxes:
          $ref: "#/components/schemas/OutboundFaxesInfo"
        inboundTexts:
          $ref: "#/components/schemas/InboundTextsInfo"
        missedCalls:
          $ref: "#/components/schemas/MissedCallsInfo"
    VoicemailsInfo:
      allOf:
        - $ref: "#/components/schemas/SimpleSettings"
        - type: object
          properties:
            advancedEmailAddresses:
              type: array
              description: |
                List of recipient email addresses for voicemail notifications.
                Returned if specified, in both modes (advanced/basic). Applied in advanced
                mode only
              items:
                type: string
            advancedSmsEmailAddresses:
              type: array
              description: |
                List of recipient phone numbers for voicemail notifications.
                Returned if specified, in both modes (advanced/basic). Applied in advanced
                mode only
              items:
                type: string
            includeAttachment:
              type: boolean
              description: |
                Indicates whether voicemail should be attached to email
            includeTranscription:
              type: boolean
              description: |
                Specifies whether to add voicemail transcription or not
            markAsRead:
              type: boolean
              description: |
                Indicates whether a voicemail should be automatically marked
                as read
    NotificationSettings:
      allOf:
        - $ref: "#/components/schemas/BaseNotificationSettings"
        - type: object
          properties:
            emailRecipients:
              type: array
              description: |
                List of extensions specified as email notification recipients.
                Returned only for call queues where queue managers are assigned as user
                extensions.
              items:
                $ref: "#/components/schemas/EmailRecipientInfo"
            emailAddresses:
              type: array
              description: |
                List of notification recipient email addresses
              items:
                type: string
            includeManagers:
              type: boolean
              description: |
                Specifies if managers' emails are included in the list of emails to which
                notifications are sent
            includeSmsRecipients:
              deprecated: true
              type: boolean
              description: |
                Specifies if sms recipients' emails are included in the list of emails to which
                notifications are sent
            smsRecipients:
              type: array
              description: |
                List of sms recipients specified for call queue. Returned only for call queue extension
              items:
                $ref: "#/components/schemas/EmailRecipientInfo"
            smsEmailAddresses:
              type: array
              description: List of notification recipient email addresses
              items:
                type: string
            callNotes:
              $ref: "#/components/schemas/CallNotesInfo"
    CallNotesInfo:
      type: object
      properties:
        notifyByEmail:
          type: boolean
        notifyBySms:
          type: boolean
        advancedEmailAddresses:
          type: array
          items:
            type: string
        advancedSmsEmailAddresses:
          type: array
          items:
            type: string
    OutboundFaxesInfo:
      allOf:
        - $ref: "#/components/schemas/SimpleSettings"
        - type: object
          properties:
            advancedEmailAddresses:
              type: array
              description: |
                List of recipient email addresses for outbound fax notifications.
                Returned if specified, in both modes (advanced/basic). Applied in advanced
                mode only
              items:
                type: string
            advancedSmsEmailAddresses:
              type: array
              description: |
                List of recipient phone numbers for outbound fax notifications.
                Returned if specified, in both modes (advanced/basic). Applied in advanced
                mode only
              items:
                type: string
    SimpleSettings:
      type: object
      properties:
        notifyByEmail:
          type: boolean
          description: Email notification flag
        notifyBySms:
          type: boolean
          description: SMS notification flag
        advancedSmsPhoneNumbers:
          type: array
          description: |
            The parameter contains the list of phone Numbers which should be used for SMS notifications sending (if advanced mode enabled)
          minItems: 1
          maxItems: 10
          uniqueItems: true
          items:
            $ref: "#/components/schemas/PhoneNumberE164"
    EmailRecipientInfo:
      type: object
      properties:
        extensionId:
          type: string
          description: Internal identifier of an extension
        fullName:
          type: string
          description: User full name
        extensionNumber:
          type: string
          description: User extension number
        status:
          $ref: "#/components/schemas/ExtensionStatusEnumFull"
        emailAddresses:
          type: array
          description: |
            List of user email addresses from extension notification settings.
            By default, main email address from contact information is returned
          items:
            type: string
        permission:
          type: string
          description: Call queue manager permission
          enum:
            - FullAccess
            - Messages
            - MemberManagement
            - None
    CreateMMSMessage:
      required:
        - attachments
        - from
        - to
      type: object
      properties:
        from:
          $ref: "#/components/schemas/MessageStoreCallerInfoRequest"
        to:
          type: array
          description: Message receiver(s) information. The `phoneNumber` value is required
          items:
            $ref: "#/components/schemas/MessageStoreCallerInfoRequest"
        text:
          type: string
          description: |
            Text of a message. Max length is 1000 symbols (2-byte UTF-16
            encoded). If a character is encoded in 4 bytes in UTF-16 it is treated
            as 2 characters, thus restricting the maximum message length to 500 symbols
        country:
          $ref: "#/components/schemas/SmsRequestCountryInfo"
        attachments:
          type: array
          description: Media file(s) to upload
          items:
            type: string
            format: binary
    ReasonInfo:
      type: object
      properties:
        code:
          type: string
          description: Reason code
          enum:
            - ServicePlanLimitation
            - AccountLimitation
            - ExtensionTypeLimitation
            - ExtensionSubTypeLimitation
            - ExtensionLimitation
            - InsufficientPermissions
            - ConfigurationLimitation
            - PermissionLimitation
        message:
          type: string
          description: Reason description
        permission:
          type: string
      description: |
        Reason for the feature unavailability. Returned only if `available`
        is set to `false`
    ParamsInfo:
      type: object
      properties:
        name:
          type: string
          description: Parameter name
        value:
          type: string
          description: Parameter value
    FeatureList:
      type: object
      properties:
        records:
          type: array
          items:
            $ref: "#/components/schemas/FeatureInfo"
    FeatureInfo:
      type: object
      required:
        - id
        - available
      properties:
        id:
          type: string
          description: Internal identifier of a feature
        available:
          type: boolean
          description: |
            Specifies if the feature is available for the current user
            according to services enabled for the account, type, entitlements and
            permissions of the extension. If the authorized user gets features of
            the other extension, only features that can be delegated are returned
            (such as configuration by administrators).
        params:
          type: array
          items:
            $ref: "#/components/schemas/ParamsInfo"
        reason:
          $ref: "#/components/schemas/ReasonInfo"
    MessagingNavigationInfo:
      type: object
      properties:
        firstPage:
          $ref: "#/components/schemas/MessagingNavigationInfoURI"
        nextPage:
          $ref: "#/components/schemas/MessagingNavigationInfoURI"
        previousPage:
          $ref: "#/components/schemas/MessagingNavigationInfoURI"
        lastPage:
          $ref: "#/components/schemas/MessagingNavigationInfoURI"
      description: Information on navigation
    MessagingNavigationInfoURI:
      type: object
      properties:
        uri:
          type: string
          format: uri
      description: Canonical URI for the corresponding page of the list
    AlertInfo:
      type: object
      properties:
        title:
          type: string
          description: Title of a message
        body:
          type: string
          description: Message Description
      description: Alert information
    InboundMessageEvent:
      type: object
      properties:
        aps:
          $ref: "#/components/schemas/NotificationInfo"
        messageId:
          type: string
          description: Internal identifier of a message
        conversationId:
          type: string
          description: Internal identifier of a conversation
        from:
          type: string
          description: Sender phone number. For GCM transport type '_from' property should be used
        to:
          type: string
          description: Receiver phone number
        ownerId:
          type: string
          description: Internal identifier of a subscription owner extension
    NotificationRecipientInfo:
      type: object
      properties:
        phoneNumber:
          type: string
          description: Phone number in E.164 (with '+' sign) format
        extensionNumber:
          type: string
          description: Extension number
        target:
          type: boolean
          description: |
            True specifies that message is sent exactly to this recipient.
            Returned in to field for group MMS. Useful if one extension has several
            phone numbers'
        location:
          type: string
          description: |
            Contains party location (city, state) if one can be determined
            from phoneNumber. This property is filled only when phoneNumber is not
            empty and server can calculate location information from it (for example,
            this information is unavailable for US toll-free numbers)
        name:
          type: string
          description: |
            Symbolic name associated with a caller/callee. If the phone
            does not belong to the known extension, only the location is returned,
            the name is not determined then
    SenderInfo:
      type: object
      properties:
        phoneNumber:
          type: string
          description: Phone number in E.164 (with '+' sign) format
        extensionNumber:
          type: string
          description: Extension number
        location:
          type: string
          description: |
            Contains party location (city, state) if one can be determined
            from phoneNumber. This property is filled only when phoneNumber is not
            empty and server can calculate location information from it (for example,
            this information is unavailable for US toll-free numbers)
        name:
          type: string
          description: |
            Symbolic name associated with a caller/callee. If the phone
            does not belong to the known extension, only the location is returned,
            the name is not determined then
      description: Extension Type. For GCM transport type '_from' property should be used || Message sender information
    InstantMessageEvent:
      type: object
      properties:
        uuid:
          type: string
          description: Universally unique identifier of a notification
        event:
          type: string
          description: Event filter URI
        timestamp:
          type: string
          description: |
            Date/time of sending a notification in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)
            format including timezone, for example *2016-03-10T18:07:52.534Z*
        subscriptionId:
          type: string
          description: Internal identifier of a subscription
        body:
          $ref: "#/components/schemas/InstantMessageEventBody"
    NotificationInfo:
      type: object
      properties:
        alert:
          $ref: "#/components/schemas/AlertInfo"
        badge:
          type: string
          description: Number of incoming messages
        sound:
          type: string
          description: Message sound
        content-available:
          type: string
          description: Content availability
        category:
          type: string
          description: Category of a message
      description: Information on a notification
    GetMessageList:
      required:
        - navigation
        - paging
        - records
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Link to a list of user messages
        records:
          type: array
          description: List of records with message information
          items:
            $ref: "#/components/schemas/GetMessageInfoResponse"
        navigation:
          $ref: "#/components/schemas/MessagingNavigationInfo"
        paging:
          $ref: "#/components/schemas/MessagingPagingInfo"
    InstantMessageEventBody:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a message
        to:
          type: array
          description: Message receiver(s) information
          items:
            $ref: "#/components/schemas/NotificationRecipientInfo"
        from:
          $ref: "#/components/schemas/SenderInfo"
        type:
          type: string
          description: Type of message. The default value is 'SMS'
        creationTime:
          type: string
          description: |
            Message creation date/time in ISO 8601 format including timezone,
            for example 2016-03-10T18:07:52.534Z
          format: date-time
        lastModifiedTime:
          type: string
          description: |
            Date/time when the message was modified in ISO 8601 format including
            timezone, for example 2016-03-10T18:07:52.534Z
          format: date-time
        readStatus:
          $ref: "#/components/schemas/MessageReadStatusEnum"
        priority:
          $ref: "#/components/schemas/MessagePriorityEnum"
        attachments:
          type: array
          description: Message attachment data
          items:
            $ref: "#/components/schemas/MessageAttachmentInfo"
        direction:
          $ref: "#/components/schemas/MessageDirectionEnum"
        availability:
          $ref: "#/components/schemas/MessageAvailabilityEnum"
        subject:
          type: string
          description: |
            Message subject. It replicates message text which is also returned
            as an attachment
        messageStatus:
          $ref: "#/components/schemas/MessageStatusEnum"
        conversationId:
          type: string
          description: |
            Deprecated. Identifier of a conversation the message belongs
            to
        conversation:
          $ref: "#/components/schemas/ConversationInfo"
        ownerId:
          type: string
          description: Internal identifier of a subscription owner extension
      description: Notification payload body
    MessagingPagingInfo:
      type: object
      properties:
        page:
          type: integer
          format: int32
          description: |
            Current page number. 1-indexed, so the first page is 1
            by default. May be omitted if result is empty (because non-existent page
            was specified or perPage=0 was requested)
        perPage:
          type: integer
          format: int32
          description: |
            Current page size, describes how many items are in each page.
            Default value is 100. Maximum value is 1000. If perPage value in the request
            is greater than 1000, the maximum value (1000) is applied
        pageStart:
          type: integer
          format: int32
          description: |
            Zero-based number of the first element on the current page.
            Omitted if the page is omitted or result is empty
        pageEnd:
          type: integer
          format: int32
          description: |
            Zero-based index of the last element on the current page.
            Omitted if the page is omitted or result is empty
        totalPages:
          type: integer
          format: int32
          description: |
            Total number of pages in a dataset. May be omitted for
            some resources due to performance reasons
        totalElements:
          type: integer
          format: int32
          description: |
            Total number of elements in a dataset. May be omitted for
            some resource due to performance reasons
      description: Information on paging
    MessageEventBody:
      type: object
      properties:
        extensionId:
          type: string
          description: Internal identifier of an extension
        lastUpdated:
          type: string
          description: |
            Date/time when the message was last modified in ISO 8601 format
            including timezone, for example 2016-03-10T18:07:52.534Z
          format: date-time
        changes:
          type: array
          description: Message Changes
          items:
            $ref: "#/components/schemas/MessageChanges"
        ownerId:
          type: string
          description: Internal identifier of a subscription owner extension
      description: Notification payload body
    MessageEvent:
      type: object
      properties:
        uuid:
          type: string
          description: Universally unique identifier of a notification
        event:
          type: string
          description: Event filter URI
        timestamp:
          type: string
          description: |
            Date/time of sending a notification in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)
            format including timezone, for example *2016-03-10T18:07:52.534Z*
        subscriptionId:
          type: string
          description: Internal identifier of a subscription
        body:
          $ref: "#/components/schemas/MessageEventBody"
    MessageChanges:
      type: object
      properties:
        type:
          $ref: "#/components/schemas/MessageTypeEnum"
        newCount:
          type: integer
          format: int32
          description: Number of new messages. Can be omitted if the value is zero
        updatedCount:
          type: integer
          format: int32
          description: Number of updated messages. Can be omitted if the value is zero
        newMessageIds:
          description: Identifiers of the new messages, applicable for all message types
          type: array
          items:
            type: integer
            format: int64
    DeleteMessageBulkRequest:
      type: array
      minItems: 1
      items:
        type: string
        description: Internal identifier of a message to be deleted
    PatchMessageBulkRequest:
      type: array
      minItems: 1
      items:
        allOf:
          - $ref: "#/components/schemas/MultipartRequestEntryBase"
          - type: object
            required:
              - body
            properties:
              body:
                $ref: "#/components/schemas/PatchMessageRequest"
    GetMessageInfoMultiResponse:
      allOf:
        - $ref: "#/components/schemas/MultipartResponseEntryBase"
        - type: object
          required:
            - body
          properties:
            body:
              $ref: "#/components/schemas/GetMessageInfoResponse"
    GetSingleMessageInfoResponse:
      allOf:
        - $ref: "#/components/schemas/GetMessageInfoResponse"
        - type: object
          required:
            - vmSideRecipients
          properties:
            vmSideRecipients:
              type: array
              minItems: 1
              description: List of other users (side recipients) who also received the voicemail in case of VM sending to multiple users or VM forwarding to multiple users.
              items:
                $ref: "#/components/schemas/MessageStoreCallerInfoResponseTo"
    UpdateMessageRequest:
      type: object
      required:
        - readStatus
      properties:
        readStatus:
          $ref: "#/components/schemas/MessageReadStatusEnum"
    MultipartResponseEntryBase:
      type: object
      required:
        - resourceId
        - status
      properties:
        resourceId:
          type: string
          description: Internal identifier of a resource
          example: "1724099032020"
        status:
          type: integer
          format: int32
          description: HTTP status code of an operation on given resource
          example: 200
    VoicemailMessageEvent:
      type: object
      properties:
        uuid:
          type: string
          description: Universally unique identifier of a notification
        event:
          type: string
          description: Event filter URI
        timestamp:
          type: string
          description: Date/time of sending a notification in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format including timezone, for example *2016-03-10T18:07:52.534Z*
        subscriptionId:
          type: string
          description: Internal identifier of a subscription
        ownerId:
          type: string
          description: Internal identifier of a subscription owner extension
        body:
          $ref: "#/components/schemas/VoicemailMessageEventBody"
    PatchMessageRequest:
      type: object
      description: Either `readStatus` or `availability` or both are required
      properties:
        readStatus:
          $ref: "#/components/schemas/MessageReadStatusEnum"
        availability:
          $ref: "#/components/schemas/MessageAvailabilityEnum"
    UpdateMessageBulkRequest:
      type: array
      minItems: 1
      items:
        allOf:
          - $ref: "#/components/schemas/MultipartRequestEntryBase"
          - type: object
            required:
              - body
            properties:
              body:
                $ref: "#/components/schemas/UpdateMessageRequest"
    GetMessageMultiResponse:
      type: array
      items:
        $ref: "#/components/schemas/GetMessageInfoMultiResponse"
    VoicemailMessageEventBody:
      type: object
      properties:
        id:
          type: integer
          format: int64
          description: Internal identifier of a message
        to:
          type: array
          description: Message receiver(s) information
          items:
            $ref: "#/components/schemas/NotificationRecipientInfo"
        from:
          $ref: "#/components/schemas/SenderInfo"
        type:
          type: string
          description: Type of message
          enum:
            - Voicemail
        creationTime:
          type: string
          format: date-time
          description: |
            Message creation date/time in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)
            format including timezone, for example *2019-03-10T18:07:52.534Z*
        lastModifiedTime:
          type: string
          format: date-time
          description: |
            Date/time when a message was modified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)
            format including timezone, for example *2019-03-10T18:07:52.534Z*
        readStatus:
          $ref: "#/components/schemas/MessageReadStatusEnum"
        priority:
          $ref: "#/components/schemas/MessagePriorityEnum"
        attachments:
          type: array
          description: Message attachment data
          items:
            $ref: "#/components/schemas/MessageAttachmentInfo"
        direction:
          $ref: "#/components/schemas/MessageDirectionEnum"
        availability:
          $ref: "#/components/schemas/MessageAvailabilityEnum"
        subject:
          type: string
          description: Message subject. It replicates message text which is also returned as an attachment
        messageStatus:
          $ref: "#/components/schemas/MessageStatusEnum"
        vmTranscriptionStatus:
          type: string
          description: |
            Status of a voicemail to text transcription. Specifies if a voicemail message transcription is already completed or not
            If 'VoicemailToText' feature is not activated for account, the 'NotAvailable' value is returned
          enum:
            - NotAvailable
            - InProgress
            - TimedOut
            - Completed
            - CompletedPartially
            - Failed
            - Unknown
      description: Notification payload body
    MultipartRequestEntryBase:
      type: object
      properties:
        resourceId:
          type: string
          description: Internal identifier of a resource (required when alternative syntax with '*' is used)
          example: "1724099032020"
    WebAppDevicesResponse:
      type: object
      properties:
        records:
          type: array
          description: List of Web Phone devices
          items:
            $ref: "#/components/schemas/WebAppDeviceRecord"
    WebAppDeviceRecord:
      type: object
      required:
        - id
        - type
        - status
      properties:
        id:
          type: string
          description: Internal identifier of a device
        type:
          type: string
          description: Device type. Always `WebPhone` for Web Phone (RC App) devices
          enum:
            - WebPhone
        name:
          type: string
          description: Device name
        serial:
          type: string
          description: Endpoint ID of the Web Phone (RC App) instance
        status:
          type: string
          description: |
            Current registration status of the device. Set to `Online` when the device
            has an active registration; otherwise `Offline`.
          default: Offline
          enum:
            - Offline
            - Online
        expiresIn:
          type: integer
          format: int32
          description: |
            Time to live (TTL) of the current registration, in seconds.
            Returned only while the device has an active registration.
    CustomUserGreetingInfo:
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Link to a custom user greeting
        id:
          type: string
          description: Internal identifier of a custom user greeting
        type:
          type: string
          description: Type of custom user greeting
          enum:
            - Introductory
            - Announcement
            - InterruptPrompt
            - ConnectingAudio
            - ConnectingMessage
            - Voicemail
            - Unavailable
            - HoldMusic
            - PronouncedName
            - TemplateGreeting
        contentType:
          type: string
          description: Content media type
          enum:
            - audio/mpeg
            - audio/wav
        contentUri:
          type: string
          format: uri
          description: Link to a greeting content (audio file)
        answeringRule:
          $ref: "#/components/schemas/CustomGreetingAnsweringRuleInfo"
        text:
          $ref: "#/components/schemas/TextForSpeech"
    UpdateUnifiedPresence:
      type: object
      properties:
        glip:
          $ref: "#/components/schemas/UpdateUnifiedPresenceGlip"
        telephony:
          $ref: "#/components/schemas/UpdateUnifiedPresenceTelephony"
    UnifiedPresenceList:
      type: array
      items:
        $ref: "#/components/schemas/UnifiedPresenceListEntry"
    UnifiedPresence:
      type: object
      properties:
        status:
          type: string
          description: Aggregated presence status of the user
          enum:
            - Available
            - Offline
            - DND
            - Busy
        glip:
          $ref: "#/components/schemas/UnifiedPresenceGlip"
        telephony:
          $ref: "#/components/schemas/UnifiedPresenceTelephony"
        meeting:
          $ref: "#/components/schemas/UnifiedPresenceMeeting"
    UnifiedPresenceListEntry:
      type: object
      properties:
        resourceId:
          type: string
          description: Internal identifier of the resource
        status:
          type: integer
          format: int32
          description: Status code of resource retrieval
        body:
          $ref: "#/components/schemas/UnifiedPresence"
    UpdateUnifiedPresenceTelephony:
      type: object
      properties:
        availability:
          type: string
          description: Telephony DND status
          enum:
            - TakeAllCalls
            - DoNotAcceptAnyCalls
            - DoNotAcceptQueueCalls
    UnifiedPresenceGlip:
      type: object
      properties:
        status:
          type: string
          description: Glip connection status calculated from all user's apps. Returned always for the requester's extension; returned for another users if their glip visibility is set to 'Visible'
          enum:
            - Offline
            - Online
        visibility:
          type: string
          description: Visibility setting allowing other users to see the user's Glip presence status; returned only for requester's extension
          enum:
            - Visible
            - Invisible
        availability:
          type: string
          description: Shows whether user wants to receive Glip notifications or not.
          enum:
            - Available
            - DND
      description: Returned if *Glip* feature is switched on
    UnifiedPresenceMeeting:
      type: object
      properties:
        status:
          type: string
          description: Meeting status calculated from all user`s meetings
          enum:
            - NoMeeting
            - InMeeting
      description: Returned if *Meetings* feature is switched on
    UpdateUnifiedPresenceGlip:
      type: object
      properties:
        visibility:
          type: string
          description: Visibility setting allowing other users to see Glip presence status
          enum:
            - Visible
            - Invisible
        availability:
          type: string
          description: Availability setting specifying whether to receive Glip notifications or not
          enum:
            - Available
            - DND
    UnifiedPresenceTelephony:
      type: object
      properties:
        status:
          type: string
          description: Telephony status calculated from all user's phone numbers. Returned always for the requester's extension; returned for another users if their telephony visibility is set to 'Visible'
          enum:
            - NoCall
            - Ringing
            - CallConnected
            - OnHold
            - ParkedCall
        visibility:
          type: string
          description: Specifies if the user's phone presence status is visible to other users; returned only for requester's extension
          enum:
            - Visible
            - Invisible
        availability:
          type: string
          description: Telephony DND status. Returned if *DND* feature is switched on
          enum:
            - TakeAllCalls
            - DoNotAcceptAnyCalls
            - DoNotAcceptQueueCalls
      description: Returned if *BLF* feature is switched on
    BlockedCallerGreetingInfo:
      type: object
      properties:
        type:
          type: string
          description: Type of greeting
        preset:
          $ref: "#/components/schemas/PresetInfo"
    CallerBlockingSettings:
      type: object
      properties:
        mode:
          type: string
          description: "Call blocking options: either specific or all calls and faxes"
          enum:
            - Specific
            - All
        noCallerId:
          type: string
          description: Determines how to handle calls with no caller ID in `Specific` mode
          enum:
            - BlockCallsAndFaxes
            - BlockFaxes
            - Allow
        payPhones:
          type: string
          description: Blocking settings for pay phones
          enum:
            - Block
            - Allow
        greetings:
          type: array
          description: List of greetings played for blocked callers
          items:
            $ref: "#/components/schemas/BlockedCallerGreetingInfo"
      description: Returns the lists of blocked and allowed phone numbers
    CallerBlockingSettingsUpdate:
      type: object
      description: Returns the lists of blocked and allowed phone numbers
      properties:
        mode:
          type: string
          description: "Call blocking options: either specific or all calls and faxes"
          enum:
            - Specific
            - All
        noCallerId:
          type: string
          description: Determines how to handle calls with no caller ID in 'Specific' mode
          enum:
            - BlockCallsAndFaxes
            - BlockFaxes
            - Allow
        payPhones:
          type: string
          description: Blocking settings for pay phones
          enum:
            - Block
            - Allow
        greetings:
          type: array
          description: List of greetings played for blocked callers
          items:
            $ref: "#/components/schemas/BlockedCallerGreetingInfo"
    BlockedNumberStatusEnum:
      type: string
      description: Status of a phone number blocking
      default: Blocked
      enum:
        - Blocked
        - Allowed
    BlockedAllowedPhoneNumberInfo:
      type: object
      description: Information on a blocked/allowed phone number
      properties:
        uri:
          type: string
          format: uri
          description: Link to a blocked/allowed phone number
        id:
          type: string
          description: Internal identifier of a blocked/allowed phone number
        phoneNumber:
          type: string
          description: A blocked/allowed phone number in [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I) format
        label:
          type: string
          description: Custom name of a blocked/allowed phone number
          maxLength: 60
        status:
          $ref: "#/components/schemas/BlockedNumberStatusEnum"
    BlockedAllowedPhoneNumbersList:
      type: object
      description: List of blocked or allowed phone numbers
      properties:
        uri:
          type: string
          format: uri
          description: Link to a list of blocked/allowed phone numbers resource
        records:
          type: array
          items:
            $ref: "#/components/schemas/BlockedAllowedPhoneNumberInfo"
        navigation:
          $ref: "#/components/schemas/PageNavigationModel"
        paging:
          $ref: "#/components/schemas/EnumeratedPagingModel"
    AddBlockedAllowedPhoneNumber:
      type: object
      description: Updates either blocked or allowed phone number list with a new phone number.
      properties:
        phoneNumber:
          type: string
          description: A blocked/allowed phone number in [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I) format
        label:
          type: string
          description: Custom name of a blocked/allowed phone number
          maxLength: 60
        status:
          $ref: "#/components/schemas/BlockedNumberStatusEnum"
    SyncInfo:
      type: object
      properties:
        syncType:
          type: string
          enum:
            - FSync
            - ISync
        syncToken:
          type: string
        syncTime:
          type: string
          format: date-time
        olderRecordsExist:
          type: boolean
          default: false
    AddressBookSync:
      type: object
      properties:
        uri:
          type: string
          format: uri
        records:
          type: array
          items:
            $ref: "#/components/schemas/PersonalContactResource"
        syncInfo:
          $ref: "#/components/schemas/SyncInfo"
        nextPageId:
          type: integer
          format: int64
        nextPageUri:
          type: string
          format: uri
    UserPhoneNumberExtensionInfo:
      type: object
      properties:
        id:
          type: integer
          format: int64
          description: Internal identifier of an extension
        uri:
          type: string
          format: uri
          description: Canonical URI of an extension
        extensionNumber:
          type: string
          description: Extension short number
        partnerId:
          type: string
          description: |
            For Partner Applications Internal identifier of an extension
            created by partner. The RingCentral supports the mapping of accounts and
            stores the corresponding account ID/extension ID for each partner ID of
            a client application. In request URIs partner IDs are accepted instead
            of regular RingCentral native IDs as path parameters using `pid=XXX` clause.
            Though in response URIs contain the corresponding account IDs and extension
            IDs. In all request and response bodies these values are reflected via
            partnerId attributes of account and extension
        type:
          type: string
          description: |
            Extension type. Please note that legacy 'Department' extension type
            corresponds to 'Call Queue' extensions in modern RingCentral product terminology
          enum:
            - Announcement
            - ApplicationExtension
            - DigitalUser
            - DelegatedLinesGroup
            - Department
            - FaxUser
            - IvrMenu
            - PagingOnly
            - ParkLocation
            - SharedLinesGroup
            - Site
            - User
            - VirtualUser
            - Voicemail
        contactCenterProvider:
          $ref: "#/components/schemas/ContactCenterProvider"
        name:
          type: string
          description: |
            Extension name. For user extension types the value is a combination
            of the specified first name and last name
      description: |
        Information on the extension, to which the phone number is assigned.
        Returned only for the request of Account phone number list
    PlatformPaymentType:
      type: string
      description: |
        Payment type. 'External' is returned for forwarded numbers
        which are not terminated in the RingCentral phone system
      enum:
        - External
        - TollFree
        - Local
        - BusinessMobileNumberProvider
        - ExternalNumberProvider
        - ExternalNumberProviderTollFree
        - Mobile
    UserPhoneNumberInfo:
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Link to the user phone number resource
        id:
          type: integer
          format: int64
          description: Internal identifier of a phone number
        country:
          $ref: "#/components/schemas/CountryInfoBasicModel"
        contactCenterProvider:
          $ref: "#/components/schemas/ContactCenterProvider"
        extension:
          $ref: "#/components/schemas/UserPhoneNumberExtensionInfo"
        label:
          type: string
          description: Custom user-defined name of a phone number, if any
        location:
          type: string
          description: Location (City, State). Filled for local US numbers
        paymentType:
          $ref: "#/components/schemas/PlatformPaymentType"
        phoneNumber:
          type: string
          description: Phone number
        primary:
          type: boolean
          description: |
            Indicates if a phone number is primary, i.e. displayed as 'main number' and called by default
          example: false
        status:
          $ref: "#/components/schemas/PhoneNumberStatus"
        type:
          $ref: "#/components/schemas/PhoneNumberType"
        subType:
          $ref: "#/components/schemas/AllExtensionSubtypesEnum"
        usageType:
          $ref: "#/components/schemas/PhoneNumberUsageType"
        features:
          type: array
          description: List of features of a phone number
          items:
            type: string
            enum:
              - CallerId
              - SmsSender
              - A2PSmsSender
              - MmsSender
              - InternationalSmsSender
              - Delegated
        callerIdName:
          type: string
          description: Caller ID Name
    GetExtensionPhoneNumbersResponse:
      required:
        - navigation
        - paging
        - records
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Link to the user phone number list resource
        records:
          type: array
          description: List of phone numbers
          items:
            $ref: "#/components/schemas/UserPhoneNumberInfo"
        navigation:
          $ref: "#/components/schemas/PageNavigationModel"
        paging:
          $ref: "#/components/schemas/EnumeratedPagingModel"
    PhoneNumberUsageType:
      type: string
      description: |
        Usage type of a phone number. Numbers of 'NumberPool' and 'NumberStorage' type are not returned in
        phone number list requests
      enum:
        - MainCompanyNumber
        - AdditionalCompanyNumber
        - CompanyNumber
        - DirectNumber
        - CompanyFaxNumber
        - FmcBusinessMobileNumber
        - InventoryFmcBusinessMobileNumber
        - ForwardedNumber
        - ForwardedCompanyNumber
        - ContactCenterNumber
        - ConferencingNumber
        - MeetingsNumber
        - NumberPool
        - BusinessMobileNumber
        - ELIN
        - PartnerBusinessMobileNumber
        - NumberPoolPartnerBusinessMobileNumber
        - NumberStorage
        - IntegrationNumber
        - InventoryMobileNumber
    ConsentSettingsCoverage:
      type: object
      description: Consent coverage setting for the TCR campaign.
      properties:
        optIn:
          $ref: "#/components/schemas/TcrConsentCoverageType"
        optOut:
          $ref: "#/components/schemas/TcrConsentCoverageType"
    TcrConsentCoverageType:
      type: string
      description: Coverage type.
      enum:
        - PhoneNumber
        - Account
        - Conversational
        - Informational
        - Promotional
    SmsConfigurationResource:
      type: object
      properties:
        phoneNumberId:
          type: string
          description: Internal identifier of a phone number
        phoneNumber:
          type: string
          description: Phone number in [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I) (with '+' sign) format
          example: "+18661234567"
        smsCampaignInfo:
          $ref: "#/components/schemas/SmsCampaignInfo"
        smsBrandInfo:
          $ref: "#/components/schemas/SmsBrandInfo"
    AutomaticConsentCollecting:
      type: object
      description: Settings about automatic reply message sending to collect consent.
      properties:
        enabled:
          type: boolean
          description: Necessity of automatic reply message sending to collect consent.
        replyMessageBody:
          type: string
          description: Reply message which will contain instructions how to grant opt-in or opt-out consent.
    SmsCampaignInfo:
      type: object
      properties:
        id:
          type: string
          description: Identifier of the associated TCR campaign
        status:
          $ref: "#/components/schemas/CampaignStatusInfo"
        registrationTier:
          type: string
          description: Use case of the associated TCR campaign
        useCases:
          type: array
          items:
            type: string
          description: List of sub use cases of the associated TCR campaign
        errors:
          type: array
          items:
            $ref: "#/components/schemas/ApiError"
        consentSettings:
          $ref: "#/components/schemas/ConsentSettings"
        coverageType:
          $ref: "#/components/schemas/TcrConsentCoverageType"
    SmsBrandInfo:
      type: object
      properties:
        id:
          type: string
          description: Identifier of the associated TCR brand
        status:
          $ref: "#/components/schemas/CampaignStatusInfo"
        errors:
          type: array
          items:
            $ref: "#/components/schemas/ApiError"
    ConsentSettings:
      type: object
      description: Info about consent configuration for the TCR campaign.
      properties:
        optInRequired:
          type: boolean
          description: Opt-in necessity for outbound communications.
        coverage:
          $ref: "#/components/schemas/ConsentSettingsCoverage"
        automaticConsentCollecting:
          $ref: "#/components/schemas/AutomaticConsentCollecting"
    CampaignStatusInfo:
      type: string
      description: Status of the associated TCR campaign
      enum:
        - Created
        - Submitted
        - Confirmed
        - SubmitFailed
        - UpdateRequested
        - DeleteRequested
        - CampaignSuspended
        - CampaignExpired
        - Draft
        - PreVetFailed
        - Unconfirmed
    CallQueueOverflowSettingsRequestResource:
      type: object
      properties:
        enabled:
          type: boolean
          description: Call queue overflow status
        items:
          type: array
          items:
            $ref: "#/components/schemas/CallQueueIdResource"
    CallQueueOverflowSettings:
      type: object
      properties:
        enabled:
          type: boolean
          description: Call queue overflow status
        subType:
          $ref: "#/components/schemas/AllExtensionSubtypesEnum"
        items:
          type: array
          items:
            $ref: "#/components/schemas/CallQueueInfo"
    CallQueueIdResource:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a call queue
    AutomaticLocationUpdatesTaskInfo:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a task
        status:
          type: string
          description: Status of a task
          enum:
            - Accepted
            - InProgress
            - Completed
            - Failed
        creationTime:
          type: string
          format: date-time
          description: Task creation time
        lastModifiedTime:
          type: string
          format: date-time
          description: Time of the task latest modification
        type:
          type: string
          description: Type of task
          enum:
            - WirelessPointsBulkCreate
            - WirelessPointsBulkUpdate
            - SwitchesBulkCreate
            - SwitchesBulkUpdate
        result:
          $ref: "#/components/schemas/TaskResultInfo"
    TaskResultRecord:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of the created/updated element - wireless point or network switch
        bssid:
          type: string
          description: Unique 48-bit identifier of the wireless access point complying with MAC address conventions. Returned only for 'Wireless Points Bulk Create' tasks
        chassisId:
          type: string
          description: Unique identifier of a network switch. Returned only for 'Switches Bulk Create' tasks
        port:
          type: string
          description: Switch entity extension for better diversity. Should be used together with chassisId.
        status:
          type: string
          description: Operation status
        errors:
          type: array
          items:
            $ref: "#/components/schemas/TaskResultRecordErrorsInfo"
    TaskResultInfo:
      type: object
      properties:
        records:
          type: array
          description: Detailed task results by elements from initial request
          items:
            $ref: "#/components/schemas/TaskResultRecord"
      description: Task detailed result. Returned for failed and completed tasks
    TaskResultRecordErrorsInfo:
      type: object
      properties:
        errorCode:
          type: string
        message:
          type: string
        parameterName:
          type: string
        description:
          type: string
    AutomaticLocationUpdatesUserList:
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Link to the users list resource
        records:
          type: array
          items:
            $ref: "#/components/schemas/AutomaticLocationUpdatesUserInfo"
        navigation:
          $ref: "#/components/schemas/PageNavigationModel"
        paging:
          $ref: "#/components/schemas/EnumeratedPagingModel"
    AutomaticLocationUpdatesSiteInfo:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a site
        uri:
          type: string
          format: uri
          description: Link to a site resource
        name:
          type: string
          description: Name of a site
        code:
          type: string
          description: Site code value. Returned only if specified
      description: |
        Site data. If multi-site feature is turned on for the account,
        then ID of a site must be specified. In order to assign a wireless
        point to the main site (company) site ID should be set to `main-site`
    AutomaticLocationUpdatesUserInfo:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a device
        fullName:
          type: string
          description: User name
        extensionNumber:
          type: string
        featureEnabled:
          type: boolean
          description: Specifies whether Automatic Location Updates feature is enabled
        type:
          type: string
          description: User extension type
          enum:
            - User
            - Limited
        site:
          $ref: "#/components/schemas/AutomaticLocationUpdatesSiteInfo"
        department:
          type: string
          description: Department name
    EmergencyAddressAutoUpdateUsersBulkAssignResource:
      type: object
      properties:
        enabledUserIds:
          type: array
          items:
            type: string
        disabledUserIds:
          type: array
          items:
            type: string
    EmergencyAddressInfo:
      allOf:
        - $ref: "#/components/schemas/EmergencyLocationAddressResource"
        - type: object
          properties:
            syncStatus:
              type: string
              description: |
                Resulting status of emergency address synchronization. Returned
                for 'Get Device Info' request if `syncEmergencyAddress` parameter is set
                to `true`
              enum:
                - Verified
                - Updated
                - Deleted
                - NotRequired
                - Unsupported
                - Failed
    EmergencyAddressAutoUpdateSiteInfo:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a site
        name:
          type: string
          description: Name pf a site
    CreateMultipleWirelessPointsResponse:
      type: object
      properties:
        task:
          $ref: "#/components/schemas/BulkTaskInfo"
    CreateMultipleWirelessPointsRequest:
      type: object
      properties:
        records:
          type: array
          items:
            $ref: "#/components/schemas/CreateWirelessPoint"
    CreateWirelessPoint:
      required:
        - bssid
        - name
      type: object
      properties:
        bssid:
          type: string
          description: "Unique 48-bit identifier of wireless access point that follows MAC address conventions.  Mask: XX:XX:XX:XX:XX:XX, where X can be a symbol in the range of 0-9 or A-F"
        name:
          type: string
          description: Wireless access point name
        site:
          $ref: "#/components/schemas/EmergencyAddressAutoUpdateSiteInfo"
        emergencyAddress:
          $ref: "#/components/schemas/EmergencyAddressInfo"
        emergencyLocation:
          $ref: "#/components/schemas/EmergencyLocationInfo"
        emergencyLocationId:
          type: string
          deprecated: true
          description: |
            Emergency response location (address) internal identifier. 
            Only one of a pair `emergencyAddress` or `emergencyLocationId`
            can be specified, otherwise the error is returned
    EmergencyLocationInfo:
      type: object
      required:
        - id
      properties:
        id:
          type: string
          description: Internal identifier of an emergency response location
        name:
          type: string
          description: Emergency response location name
        addressFormatId:
          type: string
          description: Address format identifier
        addressStatus:
          type: string
          description: Emergency address status. Only supported for extension-level (personal) endpoints
          enum:
            - Valid
            - Invalid
            - Provisioning
            - Deprovisioned
      description: Emergency response location information
    BulkTaskInfo:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a task for multiple switches creation
        status:
          type: string
          description: Status of a task
          enum:
            - Accepted
            - Failed
        creationTime:
          type: string
          format: date-time
          description: Task creation time
        lastModifiedTime:
          type: string
          format: date-time
          description: Time of the task latest modification
    PublicIpRangeInfo:
      type: object
      properties:
        id:
          type: string
        startIp:
          type: string
        endIp:
          type: string
        matched:
          type: boolean
    PrivateIpRangeInfo:
      type: object
      properties:
        id:
          type: string
        startIp:
          type: string
        endIp:
          type: string
        name:
          type: string
          description: Network name
        emergencyAddress:
          $ref: "#/components/schemas/EmergencyLocationAddressResource"
        emergencyLocationId:
          type: string
          deprecated: true
          description: |
            Emergency response location (address) internal identifier. 
            Only one of a pair `emergencyAddress` or `emergencyLocationId`
            can be specified, otherwise the error is returned
        matched:
          type: boolean
        emergencyLocation:
          $ref: "#/components/schemas/EmergencyLocationInfo"
    NetworkInfo:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a network
        uri:
          type: string
          format: uri
          description: Link to a network resource
        name:
          type: string
        site:
          $ref: "#/components/schemas/AutomaticLocationUpdatesSiteInfo"
        publicIpRanges:
          type: array
          items:
            $ref: "#/components/schemas/PublicIpRangeInfo"
        privateIpRanges:
          type: array
          items:
            $ref: "#/components/schemas/PrivateIpRangeInfo"
    CreateNetworkRequest:
      type: object
      required:
        - name
        - publicIpRanges
        - privateIpRanges
      properties:
        name:
          type: string
        site:
          $ref: "#/components/schemas/AutomaticLocationUpdatesSiteInfo"
        publicIpRanges:
          type: array
          items:
            $ref: "#/components/schemas/PublicIpRangeInfo"
        privateIpRanges:
          type: array
          items:
            $ref: "#/components/schemas/PrivateIpRangeInfoRequest"
    NetworksList:
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Link to a networks resource
        records:
          type: array
          items:
            $ref: "#/components/schemas/NetworkInfo"
        navigation:
          $ref: "#/components/schemas/PageNavigationModel"
        paging:
          $ref: "#/components/schemas/EnumeratedPagingModel"
    PrivateIpRangeInfoRequest:
      type: object
      properties:
        id:
          type: string
        startIp:
          type: string
        endIp:
          type: string
        name:
          type: string
          description: Network name
        emergencyAddress:
          $ref: "#/components/schemas/LocationUpdatesEmergencyAddressInfoRequest"
        emergencyLocationId:
          type: string
          description: |
            Emergency response location (address) internal identifier.
            Only one of a pair `emergencyAddress` or `emergencyLocationId` should
            be specified, otherwise the error is returned
        emergencyLocation:
          $ref: "#/components/schemas/EmergencyLocationInfo"
    LocationUpdatesEmergencyAddressInfoRequest:
      type: object
      properties:
        country:
          type: string
          description: Country name
        countryId:
          type: string
          description: Internal identifier of a country
        countryIsoCode:
          $ref: "#/components/schemas/CountryIsoCode"
        countryName:
          type: string
          description: Full name of a country
        customerName:
          type: string
          description: Customer name
        state:
          type: string
          description: State/Province name. Mandatory for the USA, the UK and Canada
        stateId:
          type: string
          description: Internal identifier of a state
        stateIsoCode:
          type: string
          description: ISO code of a state
        stateName:
          type: string
          description: Full name of a state
        city:
          type: string
          description: City name
        street:
          type: string
          description: First line address
        street2:
          type: string
          description: |
            Second line address (apartment, suite, unit, building, floor,
            etc.)
        zip:
          type: string
          description: Postal (Zip) code
      description: |
        Emergency address assigned to the switch. Only one of a pair `emergencyAddress`
        or `emergencyLocationId` can be specified, otherwise the error is returned
    UpdateNetworkRequest:
      type: object
      required:
        - name
        - publicIpRanges
        - privateIpRanges
      properties:
        id:
          type: string
          example: "2874044"
          description: Internal identifier of a network
        name:
          type: string
        site:
          $ref: "#/components/schemas/AutomaticLocationUpdatesSiteInfo"
        publicIpRanges:
          type: array
          items:
            $ref: "#/components/schemas/PublicIpRangeInfo"
        privateIpRanges:
          type: array
          items:
            $ref: "#/components/schemas/PrivateIpRangeInfoRequest"
    ValidateMultipleSwitchesRequest:
      type: object
      properties:
        records:
          type: array
          items:
            $ref: "#/components/schemas/SwitchInfo"
    SwitchSiteInfo:
      type: object
      properties:
        id:
          type: string
          description: |
            Internal identifier of a site. The company identifier value
            is 'main-site'
        name:
          type: string
          description: Name of a site
    ValidateMultipleSwitchesResponse:
      type: object
      properties:
        records:
          type: array
          items:
            $ref: "#/components/schemas/SwitchValidated"
    SwitchInfo:
      required:
        - chassisId
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Link to the network switch resource
          readOnly: true
        id:
          type: string
          description: Internal identifier of a network switch
          readOnly: true
        chassisId:
          type: string
          description: |
            Unique identifier of a network switch. The supported formats
            are: XX:XX:XX:XX:XX:XX (symbols 0-9 and A-F) for MAC address and X.X.X.X
            for IP address (symbols 0-255)
        port:
          type: string
          description: |
            Switch entity extension for better diversity. 
            Should be used together with chassisId
        name:
          type: string
          description: Name of a network switch
        site:
          $ref: "#/components/schemas/SwitchSiteInfo"
        emergencyAddress:
          $ref: "#/components/schemas/EmergencyAddressInfo"
        emergencyLocation:
          $ref: "#/components/schemas/EmergencyLocationInfo"
        emergencyLocationId:
          type: string
          deprecated: true
          description: |
            Emergency response location (address) internal identifier. 
            Only one of a pair `emergencyAddress` or `emergencyLocationId`
            can be specified, otherwise the error is returned
    ValidationError:
      type: object
      properties:
        errorCode:
          type: string
          description: Error code
        message:
          type: string
          description: Error message
        parameterName:
          type: string
          description: Name of invalid parameter
    SwitchValidated:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a switch
        chassisId:
          type: string
          description: Unique identifier of a network switch
        port:
          type: string
          description: Switch entity extension for better diversity. Should be used together with chassisId.
        status:
          type: string
          description: Validation result status
          enum:
            - Valid
            - Invalid
        errors:
          type: array
          items:
            $ref: "#/components/schemas/ValidationError"
    SwitchesList:
      type: object
      properties:
        records:
          type: array
          description: Switches map
          items:
            $ref: "#/components/schemas/SwitchInfo"
        navigation:
          $ref: "#/components/schemas/PageNavigationModel"
        paging:
          $ref: "#/components/schemas/EnumeratedPagingModel"
    WirelessPointInfo:
      required:
        - bssid
        - emergencyAddress
        - name
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Link to the wireless point resource
        id:
          type: string
          description: Internal identifier of a wireless point
        bssid:
          type: string
          description: Unique 48-bit identifier of the wireless access point that follows MAC address conventions
        name:
          type: string
          description: Wireless access point name
        site:
          $ref: "#/components/schemas/EmergencyAddressAutoUpdateSiteInfo"
        emergencyAddress:
          $ref: "#/components/schemas/EmergencyAddressInfo"
        emergencyLocation:
          $ref: "#/components/schemas/EmergencyLocationInfo"
        emergencyLocationId:
          type: string
          deprecated: true
          description: |
            Emergency response location (address) internal identifier. 
            Only one of a pair `emergencyAddress` or `emergencyLocationId`
            can be specified, otherwise the error is returned
    ValidateMultipleWirelessPointsRequest:
      type: object
      properties:
        records:
          type: array
          items:
            $ref: "#/components/schemas/WirelessPointInfo"
    ValidateMultipleWirelessPointsResponse:
      type: object
      properties:
        records:
          type: array
          items:
            $ref: "#/components/schemas/WirelessPointValidated"
    WirelessPointValidated:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a wireless point
        bssid:
          type: string
          description: |
            Unique 48-bit identifier of the wireless access point that
            follows MAC address conventions
        status:
          type: string
          description: Validation result status
          enum:
            - Valid
            - Invalid
        errors:
          type: array
          items:
            $ref: "#/components/schemas/ValidationError"
    WirelessPointsList:
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Link to a wireless points resource
        records:
          type: array
          description: List of wireless points with assigned emergency addresses
          items:
            $ref: "#/components/schemas/WirelessPointInfo"
        navigation:
          $ref: "#/components/schemas/PageNavigationModel"
        paging:
          $ref: "#/components/schemas/EnumeratedPagingModel"
    UpdateWirelessPoint:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a wireless point
        bssid:
          type: string
          description: |
            Unique 48-bit identifier of wireless access point that follows
            MAC address conventions. Mask: XX:XX:XX:XX:XX:XX, where X can be a symbol
            in the range of 0-9 or A-F
        name:
          type: string
          description: Name of a wireless access point
        site:
          $ref: "#/components/schemas/EmergencyAddressAutoUpdateSiteInfo"
        emergencyAddress:
          $ref: "#/components/schemas/EmergencyAddressInfo"
        emergencyLocationId:
          type: string
          deprecated: true
          description: |
            Emergency response location (address) internal identifier. 
            Only one of a pair `emergencyAddress` or `emergencyLocationId`
            can be specified, otherwise the error is returned
        emergencyLocation:
          $ref: "#/components/schemas/EmergencyLocationInfo"
    ListDevicesAutomaticLocationUpdates:
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Link to a devices resource
        records:
          type: array
          description: |
            List of the user(s) devices with the current status of Emergency
            Address Auto Update Feature
          items:
            $ref: "#/components/schemas/AutomaticLocationUpdatesDeviceInfo"
        navigation:
          $ref: "#/components/schemas/PageNavigationModel"
        paging:
          $ref: "#/components/schemas/EnumeratedPagingModel"
    AutomaticLocationUpdatesDeviceType:
      type: string
      description: Device type
      default: HardPhone
      enum:
        - HardPhone
        - SoftPhone
        - OtherPhone
    AutomaticLocationUpdatesDeviceInfo:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a device
        type:
          $ref: "#/components/schemas/AutomaticLocationUpdatesDeviceType"
        serial:
          type: string
          description: Serial number for HardPhone (is returned only when the phone is shipped and provisioned)
        featureEnabled:
          type: boolean
          description: Specifies if Automatic Location Updates feature is enabled
        name:
          type: string
          description: Device name
        model:
          $ref: "#/components/schemas/AutomaticLocationUpdatesModelInfo"
        site:
          $ref: "#/components/schemas/AutomaticLocationUpdatesSiteInfo"
        phoneLines:
          type: array
          description: Phone lines information
          items:
            $ref: "#/components/schemas/AutomaticLocationUpdatesPhoneLine"
    AutomaticLocationUpdatesPhoneLine:
      type: object
      properties:
        lineType:
          $ref: "#/components/schemas/AutomaticLocationUpdatesPhoneLineType"
        phoneInfo:
          $ref: "#/components/schemas/AutomaticLocationUpdatesPhoneNumberInfo"
    AutomaticLocationUpdatesPhoneLineType:
      type: string
      enum:
        - Unknown
        - Standalone
        - StandaloneFree
        - BlaPrimary
        - BlaSecondary
        - BLF
    AutomaticLocationUpdatesModelFeature:
      type: string
      enum:
        - BLA
        - Intercom
        - Paging
        - HELD
    AutomaticLocationUpdatesModelInfo:
      type: object
      properties:
        id:
          type: string
          description: Device model identifier
        name:
          type: string
          description: Device name
        features:
          type: array
          description: Device feature or multiple features supported
          items:
            $ref: "#/components/schemas/AutomaticLocationUpdatesModelFeature"
      description: HardPhone model information
    AutomaticLocationUpdatesPhoneNumberInfo:
      type: object
      properties:
        id:
          type: integer
          format: int64
          description: Internal identifier of a phone number
        phoneNumber:
          type: string
          description: Phone number
    AssignMultipleDevicesAutomaticLocationUpdates:
      type: object
      properties:
        enabledDeviceIds:
          type: array
          items:
            type: string
            description: List of common devices for feature activation
        disabledDeviceIds:
          type: array
          items:
            type: string
            description: List of common devices for feature disabling
    CreateMultipleSwitchesResponse:
      type: object
      properties:
        task:
          type: array
          items:
            $ref: "#/components/schemas/BulkTaskInfo"
      description: Information on a task for multiple switches creation
    CreateMultipleSwitchesRequest:
      type: object
      properties:
        records:
          type: array
          items:
            $ref: "#/components/schemas/SwitchInfo"
    UpdateMultipleWirelessPointsResponse:
      type: object
      properties:
        task:
          $ref: "#/components/schemas/BulkTaskInfo"
    UpdateMultipleWirelessPointsRequest:
      type: object
      properties:
        records:
          type: array
          items:
            $ref: "#/components/schemas/UpdateWirelessPoint"
    UpdateMultipleSwitchesRequest:
      type: object
      properties:
        records:
          type: array
          items:
            $ref: "#/components/schemas/SwitchInfo"
    UpdateMultipleSwitchesResponse:
      type: object
      properties:
        task:
          $ref: "#/components/schemas/BulkTaskInfo"
    CompanyPhoneNumberInfo:
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Link to a company phone number resource
        id:
          type: integer
          format: int64
          description: Internal identifier of a phone number
        extension:
          $ref: "#/components/schemas/ExtensionInfo"
        label:
          type: string
          description: Custom user-defined name of a phone number, if any
        location:
          type: string
          description: Location (City, State). Filled for local US numbers
        paymentType:
          $ref: "#/components/schemas/PlatformPaymentType"
        phoneNumber:
          type: string
          description: Phone number
        status:
          $ref: "#/components/schemas/PhoneNumberStatus"
        type:
          $ref: "#/components/schemas/PhoneNumberType"
        usageType:
          $ref: "#/components/schemas/PhoneNumberUsageType"
        temporaryNumber:
          $ref: "#/components/schemas/TemporaryNumberInfo"
        contactCenterProvider:
          $ref: "#/components/schemas/ContactCenterProvider"
        vanityPattern:
          type: string
          description: Vanity pattern for this number. Returned only when vanity search option is requested. Vanity pattern corresponds to request parameters `nxx` plus `line` or `numberPattern`
        primary:
          type: boolean
          description: Specifies if a phone number is primary, i.e. displayed as 'main number' and called by default
        activationStatus:
          $ref: "#/components/schemas/PhoneNumberActivationStatus"
        callerIdName:
          type: string
          description: Caller ID Name
    TemporaryNumberInfo:
      type: object
      properties:
        id:
          type: string
          description: Temporary phone number identifier
        phoneNumber:
          type: string
          description: |
            Temporary phone number in [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I)
            (with '+' sign) format
      description: |
        Temporary phone number, if any. Returned for phone numbers in `Pending` porting status only
    AccountPhoneNumbers:
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Link to a list of account phone numbers
        records:
          type: array
          description: List of account phone numbers
          items:
            $ref: "#/components/schemas/CompanyPhoneNumberInfo"
        navigation:
          $ref: "#/components/schemas/PageNavigationModel"
        paging:
          $ref: "#/components/schemas/EnumeratedPagingModel"
    NotificationDeliveryModeRequest:
      anyOf:
        - $ref: "#/components/schemas/AnyPublicDeliveryModeRequest"
    CreateSubscriptionRequest:
      allOf:
        - $ref: "#/components/schemas/UpdateSubscriptionRequest"
        - type: object
          required:
            - deliveryMode
          properties:
            deliveryMode:
              $ref: "#/components/schemas/NotificationDeliveryModeRequest"
    AnyPublicDeliveryModeRequest:
      x-docs-level-fragment: Public
      title: Notification Delivery Modes
      description: Notification delivery transport information
      anyOf:
        - $ref: "#/components/schemas/WebhookDeliveryModeRequest"
      discriminator:
        propertyName: transportType
        mapping:
          WebHook: "#/components/schemas/WebhookDeliveryModeRequest"
    GetCountryInfoNumberParser:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a country
        uri:
          type: string
          format: uri
          description: Canonical URI of a country resource
        callingCode:
          $ref: "#/components/schemas/CountryCallingCode"
        isoCode:
          $ref: "#/components/schemas/CountryIsoCode"
        name:
          type: string
          description: The official name of the country.
          example: United States
    ParsePhoneNumberResponse:
      required:
        - phoneNumbers
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Canonical URI of a resource
        homeCountry:
          $ref: "#/components/schemas/GetCountryInfoNumberParser"
        phoneNumbers:
          type: array
          description: Parsed phone numbers information
          items:
            $ref: "#/components/schemas/PhoneNumberInfoNumberParser"
    PhoneNumberInfoNumberParser:
      type: object
      properties:
        originalString:
          type: string
          description: Original phone number string as it was passed in the request
          example: (650) 722-1621
        country:
          $ref: "#/components/schemas/GetCountryInfoNumberParser"
        areaCode:
          type: string
          description: |
            Area code of location. The portion of the [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I)
            number that identifies a specific geographic region/numbering area of
            the national numbering plan (NANP); that can be summarized as `NPA-NXX-xxxx`
            and covers Canada, the United States, parts of the Caribbean Sea, and
            some Atlantic and Pacific islands.
            See [North American Numbering Plan](https://en.wikipedia.org/wiki/North_American_Numbering_Plan)
            for details
          example: "650"
        dialable:
          type: string
          description: Dialing format of a phone number
        e164:
          type: string
          description: Phone number in [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I) format
        formattedInternational:
          type: string
          description: The formatted phone number string in international format
        formattedNational:
          type: string
          description: The formatted phone number string in domestic format
        special:
          type: boolean
          description: Indicates if the number is in a special format (for example N11 code)'
        normalized:
          type: string
          description: Phone number in [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I) format without plus sign ('+')
        tollFree:
          type: boolean
          description: Indicates if the number is toll free
        subAddress:
          type: string
          description: Sub-Address. The portion of the number that identifies a subscriber into the subscriber internal (non-public) network.
        subscriberNumber:
          type: string
          description: Subscriber number. The portion of the [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I) number that identifies a subscriber in a network or numbering area.
        dtmfPostfix:
          type: string
          description: DTMF (Dual Tone Multi-Frequency) postfix
    ParsePhoneNumberRequest:
      type: object
      properties:
        originalStrings:
          type: array
          description: The list of phone numbers passed as an array of strings (not more than 64 items). The maximum size of each string is 64 characters
          maxItems: 64
          items:
            type: string
            maxLength: 64
            example: (650) 722-1621
    ContractedCountryListResponse:
      type: object
      required:
        - records
      properties:
        records:
          type: array
          description: List of countries with the country data
          items:
            type: object
            properties:
              id:
                type: string
                description: Internal identifier of a country
              name:
                type: string
                description: Official name of a country
    CountryListDictionaryModel:
      required:
        - navigation
        - paging
        - records
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Link to the list of countries supported
        records:
          type: array
          description: List of countries with the country data
          items:
            $ref: "#/components/schemas/CountryInfoDictionaryModel"
        navigation:
          $ref: "#/components/schemas/PageNavigationModel"
        paging:
          $ref: "#/components/schemas/EnumeratedPagingModel"
    CountryInfoDictionaryModel:
      allOf:
        - $ref: "#/components/schemas/CountryInfoShortModel"
        - type: object
          properties:
            emergencyCalling:
              type: boolean
              description: |
                Emergency calling feature availability/emergency address requirement indicator
            isoCode:
              $ref: "#/components/schemas/CountryIsoCode"
            name:
              type: string
              description: The official name of a country
            numberSelling:
              type: boolean
              description: Indicates that phone numbers are available for this country
            loginAllowed:
              type: boolean
              description: Indicates that login with the phone number of this country is allowed
            signupAllowed:
              type: boolean
              description: Indicates that signup/billing is allowed for this country
            freeSoftphoneLine:
              type: boolean
              description: Indicates that free phone line for softphone is available for this country
            localDialing:
              type: boolean
              description: Indicates that the local dialing is supported in this country and default area code can be set
    GetStateInfoResponse:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a state
        uri:
          type: string
          format: uri
          description: Canonical URI of a state
        country:
          $ref: "#/components/schemas/CountryInfoMinimalModel"
        isoCode:
          type: string
          description: Short code for a state (2-letter usually)
        name:
          type: string
          description: Official name of a state
    GetStateListResponse:
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Link to a states list resource
        records:
          type: array
          description: List of states
          items:
            $ref: "#/components/schemas/GetStateInfoResponse"
        navigation:
          $ref: "#/components/schemas/PageNavigationModel"
        paging:
          $ref: "#/components/schemas/EnumeratedPagingModel"
    GetLocationListResponse:
      required:
        - navigation
        - paging
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Link to the location list resource
        records:
          type: array
          description: List of locations
          items:
            $ref: "#/components/schemas/LocationInfo"
        navigation:
          $ref: "#/components/schemas/PageNavigationModel"
        paging:
          $ref: "#/components/schemas/EnumeratedPagingModel"
    LocationStateInfo:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a state
        uri:
          type: string
          format: uri
          description: Link to a state resource
      description: Information on a state this location belongs to
    LocationInfo:
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Canonical URI of a location
        areaCode:
          type: string
          description: Area code of the location
        city:
          type: string
          description: |
            Official name of the city, belonging to the certain state
        npa:
          type: string
          description: |
            Area code of the location (3-digit usually), according to the
            NANP number format, that can be summarized as NPA-NXX-xxxx and covers
            Canada, the United States, parts of the Caribbean Sea, and some Atlantic
            and Pacific islands. See for details North American Numbering Plan
        nxx:
          type: string
          description: |
            Central office code of the location, according to the NANP
            number format, that can be summarized as NPA-NXX-xxxx and covers Canada,
            the United States, parts of the Caribbean Sea, and some Atlantic and Pacific
            islands. See for details North American Numbering Plan
        state:
          $ref: "#/components/schemas/LocationStateInfo"
    PermissionCollectionResource:
      type: object
      properties:
        uri:
          type: string
          format: uri
        records:
          type: array
          items:
            $ref: "#/components/schemas/PermissionResource"
        paging:
          $ref: "#/components/schemas/EnumeratedPagingModel"
        navigation:
          $ref: "#/components/schemas/PageNavigationModel"
    PermissionCategoryIdResource:
      type: object
      properties:
        uri:
          type: string
          format: uri
        id:
          type: string
    PermissionResource:
      type: object
      properties:
        uri:
          type: string
          format: uri
        id:
          type: string
        displayName:
          type: string
        description:
          type: string
        assignable:
          type: boolean
          default: false
        readOnly:
          type: boolean
          default: false
        siteCompatible:
          type: string
          description: Site compatibility flag set for permission
          enum:
            - Incompatible
            - Compatible
            - Independent
        category:
          $ref: "#/components/schemas/PermissionCategoryIdResource"
        includedPermissions:
          type: array
          items:
            $ref: "#/components/schemas/PermissionIdResource"
    LanguageList:
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Canonical URI of the language list resource
        records:
          type: array
          description: Language data
          items:
            $ref: "#/components/schemas/LanguageInfo"
        navigation:
          $ref: "#/components/schemas/PageNavigationModel"
        paging:
          $ref: "#/components/schemas/EnumeratedPagingModel"
    LanguageInfo:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a language
        uri:
          type: string
          format: uri
          description: Canonical URI of a language
        greeting:
          type: boolean
          description: |
            Indicates whether a language is available as
            greeting language
        formattingLocale:
          type: boolean
          description: |
            Indicates whether a language is available as
            formatting locale
        localeCode:
          type: string
          description: Localization code of a language
        isoCode:
          $ref: "#/components/schemas/CountryIsoCode"
        name:
          type: string
          description: Official name of a language
        ui:
          type: boolean
          description: |
            Indicates whether a language is available as UI language
        timeFormat:
          type: string
          description: Time format
        dateFormat:
          type: string
          description: Date format
      description: User interface language data
    PermissionCategoryResource:
      type: object
      properties:
        uri:
          type: string
          format: uri
        id:
          type: string
        displayName:
          type: string
        description:
          type: string
    PermissionCategoryCollectionResource:
      type: object
      properties:
        uri:
          type: string
          format: uri
        records:
          type: array
          items:
            $ref: "#/components/schemas/PermissionCategoryResource"
        paging:
          $ref: "#/components/schemas/EnumeratedPagingModel"
        navigation:
          $ref: "#/components/schemas/PageNavigationModel"
    DictionaryGreetingList:
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Canonical URI of greetings list resource
        records:
          type: array
          description: List of greetings
          items:
            $ref: "#/components/schemas/DictionaryGreetingInfo"
        navigation:
          $ref: "#/components/schemas/PageNavigationModel"
        paging:
          $ref: "#/components/schemas/EnumeratedPagingModel"
    DictionaryGreetingInfo:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a greeting
        uri:
          type: string
          format: uri
          description: Link to a greeting
        name:
          type: string
          description: Name of a greeting
        usageType:
          type: string
          description: Usage type of greeting, specifying if the greeting is applied for user extension or department (call queue) extension.
          enum:
            - UserExtensionAnsweringRule
            - ExtensionAnsweringRule
            - DepartmentExtensionAnsweringRule
            - BlockedCalls
            - CallRecording
            - CompanyAnsweringRule
            - CompanyAfterHoursAnsweringRule
            - LimitedExtensionAnsweringRule
            - VoicemailExtensionAnsweringRule
            - AnnouncementExtensionAnsweringRule
            - SharedLinesGroupAnsweringRule
        text:
          type: string
          description: Text of a greeting, if any
        contentUri:
          type: string
          format: uri
          description: Link to a greeting content (audio file), if any
        type:
          $ref: "#/components/schemas/GreetingTypeEnum"
        category:
          type: string
          description: Category of a greeting, specifying data form. The category value 'None' specifies that greetings of a certain type ('Introductory', 'ConnectingAudio', etc.) are switched off for an extension = ['Music', 'Message', 'RingTones', 'None']
          enum:
            - Music
            - Message
            - RingTones
            - None
        navigation:
          $ref: "#/components/schemas/PageNavigationModel"
        paging:
          $ref: "#/components/schemas/EnumeratedPagingModel"
    GetTimezoneListResponse:
      required:
        - navigation
        - paging
        - records
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Link to the timezone list resource
        records:
          type: array
          description: List of timezones
          items:
            $ref: "#/components/schemas/TimezoneInfoBase"
        navigation:
          $ref: "#/components/schemas/PageNavigationModel"
        paging:
          $ref: "#/components/schemas/EnumeratedPagingModel"
    FaxCoverPageInfo:
      type: object
      properties:
        id:
          type: string
          description: |
            Internal identifier of a fax cover page. The supported value
            range is 0-13 (for language setting en-US) and 0, 15-28
            (for all other languages)
        name:
          type: string
          description: Name of a fax cover page pattern
    ListFaxCoverPagesResponse:
      type: object
      properties:
        uri:
          type: string
          format: uri
        records:
          type: array
          items:
            $ref: "#/components/schemas/FaxCoverPageInfo"
        navigation:
          $ref: "#/components/schemas/PageNavigationModel"
        paging:
          $ref: "#/components/schemas/EnumeratedPagingModel"
    SipRegistrationDeviceInfo:
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Canonical URI of the resource
        id:
          type: string
          description: Internal identifier of a device
        type:
          type: string
          description: Device type
          enum:
            - HardPhone
            - MobileDevice
            - OtherPhone
            - Paging
            - Room
            - SoftPhone
            - WebPhone
        sku:
          type: string
          description: |
            Device identification number (SKU, Stock Keeping Unit) in the format
            TP-ID [-AT-AC], where TP is device type (HP for RC desk phones, DV for all
            other devices including soft phones); ID - device model ID; AT - add-on type
            ID; AC - add-on count (if any). For example 'HP-56-2-2'
        status:
          type: string
          enum:
            - Online
            - Offline
        name:
          type: string
          description: |
            Device name. Mandatory if ordering  SoftPhone or OtherPhone.
            Optional for HardPhone. If not specified for HardPhone, then device  model  name
            is used as device  name
        serial:
          type: string
          description: |
            Serial number for HardPhone (is returned only when the phone
            is shipped and provisioned); endpoint_id for Softphone and mobile applications
        computerName:
          type: string
          description: Computer name (for devices of `SoftPhone` type only)
        model:
          $ref: "#/components/schemas/DeviceModelInfo"
        extension:
          $ref: "#/components/schemas/DeviceExtensionInfo"
        emergencyServiceAddress:
          $ref: "#/components/schemas/DeviceEmergencyServiceAddressResource"
        emergency:
          $ref: "#/components/schemas/SipRegistrationDeviceEmergencyInfo"
        shipping:
          $ref: "#/components/schemas/ShippingInfo"
        phoneLines:
          type: array
          description: Phone lines information
          items:
            $ref: "#/components/schemas/DevicePhoneLinesInfo"
        boxBillingId:
          type: integer
          format: int64
          description: |
            Box billing identifier of a device. Applicable only for devices of `HardPhone` type.
        useAsCommonPhone:
          type: boolean
          description: Supported only for devices assigned to Limited extensions. If true, enables users to log in to this phone as a common phone.
        linePooling:
          $ref: "#/components/schemas/LinePoolingEnum"
        inCompanyNet:
          type: boolean
          description: |
            Network location status. `true` if the device is located in
            the configured corporate network (On-Net); `false` for Off-Net location.
            Parameter is not returned if `EmergencyAddressAutoUpdate` feature is not
            enabled for the account/user, or if device network location is not determined
        site:
          $ref: "#/components/schemas/DeviceSiteInfo"
        lastLocationReportTime:
          type: string
          format: date-time
          description: |
            Timestamp of receiving last location report in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)
            format including timezone, for example *2016-03-10T18:07:52.534Z
        hotDeskDevice:
          type: boolean
          description: |
            Indicates whether this device is used for hot desking or not.
            Returned if `useAsCommonPhone` is set to false
    DevicePhoneNumberInfo:
      type: object
      properties:
        id:
          type: integer
          format: int64
          description: Internal identifier of a phone number
        country:
          $ref: "#/components/schemas/DevicePhoneNumberCountryInfo"
        paymentType:
          type: string
          description: Payment type. 'External' is returned for forwarded numbers which are not terminated in the RingCentral phone system = ['External', 'TollFree', 'Local']
          enum:
            - External
            - TollFree
            - Local
            - ExternalNumberProvider
        phoneNumber:
          maxLength: 128
          minLength: 0
          type: string
          description: Phone number
        usageType:
          type: string
          enum:
            - CompanyNumber
            - MainCompanyNumber
            - AdditionalCompanyNumber
            - DirectNumber
            - CompanyFaxNumber
            - ForwardedNumber
            - ForwardedCompanyNumber
            - ContactCenterNumber
        type:
          type: string
          description: Type of phone number
          enum:
            - VoiceFax
            - FaxOnly
            - VoiceOnly
      description: Phone number information
    SipInfoResponse:
      type: object
      properties:
        username:
          type: string
          description: User credentials
        password:
          type: string
          format: password
          description: User password. Not returned if SipDigest is not enabled
        authorizationTypes:
          type: array
          description: Supported authorization types and their priority for clients
          items:
            $ref: "#/components/schemas/AuthorizationType"
        authorizationId:
          type: string
          description: Identifier for SIP authorization
        domain:
          type: string
          description: SIP domain
        outboundProxy:
          type: string
          description: SIP outbound proxy server address (in the format <host:port>)
        outboundProxyIPv6:
          type: string
          description: SIP outbound IPv6 proxy server address (in the format <host:port>)
        outboundProxyBackup:
          type: string
          description: SIP outbound proxy server backup address (in the format <host:port>)
        outboundProxyIPv6Backup:
          type: string
          description: SIP outbound IPv6 proxy server backup address (in the format <host:port>)
        transport:
          type: string
          description: Preferred transport. SIP info will be returned for this transport if supported
          enum:
            - UDP
            - TCP
            - TLS
            - WSS
        certificate:
          type: string
          description: For TLS transport only, Base64 encoded certificate
        switchBackInterval:
          type: integer
          format: int32
          description: |
            The interval in seconds after which the app must try to switch
            back to primary proxy if it was previously switched to backup. If this
            parameter is not returned, the app must stay on backup proxy and try to
            switch to primary proxy after the next SIP-provision call.
        stunServers:
          type: array
          description: List of stun servers in the format <host:port>
          items:
            type: string
    DevicePhoneNumberCountryInfo:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a home country
        uri:
          type: string
          format: uri
          description: Canonical URI of a home country
        name:
          type: string
          description: Official name of a home country
      description: Brief information on a phone number country
    DevicePhoneLinesEmergencyAddressInfo:
      type: object
      properties:
        required:
          type: boolean
          description: Indicates that emergency address is required
        localOnly:
          type: boolean
          description: Indicates that only local emergency address can be specified
        lineProvisioningStatus:
          type: string
          description: Digital line provisioning status
          enum:
            - Invalid
            - Provisioning
            - Valid
    SipRegistrationDeviceEmergencyInfo:
      type: object
      description: Emergency response location settings of a device
      properties:
        address:
          $ref: "#/components/schemas/DeviceEmergencyServiceAddressResource"
        location:
          $ref: "#/components/schemas/SipRegistrationDeviceLocationInfo"
        outOfCountry:
          type: boolean
          description: Specifies if emergency address is out of country
        addressStatus:
          $ref: "#/components/schemas/EmergencyAddressStatus"
        visibility:
          type: string
          description: |
            Specifies whether to return only private or only public (company) ERLs (Emergency Response Locations)
          enum:
            - Private
            - Public
        syncStatus:
          type: string
          description: |
            Resulting status of emergency address synchronization. Returned
            if `syncEmergencyAddress` parameter is set to `true`
          enum:
            - Verified
            - Updated
            - Deleted
            - NotRequired
            - Unsupported
            - Failed
        addressEditableStatus:
          type: string
          description: |
            Ability to register new emergency address for a phone line
            using devices sharing this line or only main device (line owner)
          enum:
            - MainDevice
            - AnyDevice
        addressRequired:
          type: boolean
          description: Indicates if emergency address is required for the country of a phone line
        addressLocationOnly:
          type: boolean
          description: Indicates if out of country emergency address is not allowed for the country of a phone line
    CreateSipRegistrationResponse:
      allOf:
        - $ref: "#/components/schemas/CreateDeviceRegistrationResponse"
        - type: object
          properties:
            persistGatewayConfigured:
              type: boolean
              description: Indicates whether the user has an RC App device configured in a PSTN gateway
    SIPInfoRequest:
      type: object
      properties:
        transport:
          type: string
          description: Supported transport. SIP info will be returned for this transport if supported
          enum:
            - UDP
            - TCP
            - TLS
            - WSS
    SipFlagsResponse:
      type: object
      description: SIP flags information
      properties:
        voipFeatureEnabled:
          type: boolean
          description: Indicates that VoIP calling feature is enabled
        voipCountryBlocked:
          type: boolean
          description: |
            Indicates that the request is sent from IP address of a country where VoIP calling is disallowed
        outboundCallsEnabled:
          type: boolean
          description: Indicates that outbound calls are enabled
        dscpEnabled:
          type: boolean
        dscpSignaling:
          type: integer
          format: int32
        dscpVoice:
          type: integer
          format: int32
        dscpVideo:
          type: integer
          format: int32
    SipRegistrationDeviceLocationInfo:
      type: object
      description: Company emergency response location details
      properties:
        id:
          type: string
          description: Internal identifier of an emergency response location
        name:
          type: string
          description: Emergency response location name
        addressFormatId:
          type: string
          description: Address format ID
        addressFormatStatus:
          $ref: "#/components/schemas/AddressFormatStatus"
        trusted:
          $ref: "#/components/schemas/TrustedFlag"
    DevicePhoneLinesInfo:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a phone line
        lineType:
          type: string
          description: Type of phone line
          enum:
            - Standalone
            - StandaloneFree
            - BlaPrimary
            - BlaSecondary
        emergencyAddress:
          $ref: "#/components/schemas/DevicePhoneLinesEmergencyAddressInfo"
        phoneInfo:
          $ref: "#/components/schemas/DevicePhoneNumberInfo"
    AuthorizationType:
      type: string
      enum:
        - SipDigest
        - BearerToken
    DeviceAddonInfo:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        count:
          type: integer
          format: int32
    DeviceExtensionInfo:
      type: object
      properties:
        id:
          type: integer
          format: int64
          description: Internal identifier of an extension
        uri:
          type: string
          format: uri
          description: Canonical URL of an extension resource
        extensionNumber:
          type: string
          description: Short extension number
    DeviceModelInfo:
      required:
        - addons
      type: object
      description: HardPhone model information
      properties:
        id:
          type: string
          description: Addon identifier. For HardPhones of certain types, which are compatible with this add-on identifier
        name:
          type: string
          description: Device name
        addons:
          type: array
          description: Add-ons description
          items:
            $ref: "#/components/schemas/DeviceAddonInfo"
        features:
          type: array
          description: Device feature or multiple features supported
          items:
            type: string
            enum:
              - BLA
              - Intercom
              - Paging
              - HELD
    CreateSipRegistrationRequest:
      type: object
      properties:
        device:
          $ref: "#/components/schemas/DeviceInfoRequest"
        sipInfo:
          type: array
          description: SIP settings for device
          items:
            $ref: "#/components/schemas/SIPInfoRequest"
        softPhoneLineReassignment:
          type: string
          description: |
            Supported for Softphone clients only. If 'SoftphoneLineReassignment' feature is enabled
            the reassignment process can be initialized, however if there is no DL for the given user's device
            then SPR-131 error code will be returned.
          default: None
          enum:
            - None
            - Initialize
            - Reassign
    DeviceInfoRequest:
      type: object
      description: Device information
      properties:
        id:
          type: string
          description: Device unique identifier, retrieved at previous session (if any)
        appExternalId:
          type: string
          description: |
            Supported for iOS devices only. Certificate name (used by iOS
            applications for APNS subscription)
        computerName:
          type: string
          description: Computer name (for devices of `SoftPhone` type only)
        serial:
          type: string
          description: |
            Endpoint/device instance identifier for Softphone and mobile applications
    CreateDeviceRegistrationResponse:
      required:
        - device
        - sipFlags
        - sipInfo
      type: object
      properties:
        device:
          $ref: "#/components/schemas/SipRegistrationDeviceInfo"
        sipInfo:
          type: array
          description: SIP settings for device
          items:
            $ref: "#/components/schemas/SipInfoResponse"
        sipInfoPstn:
          type: array
          description: SIP PSTN settings for device
          items:
            $ref: "#/components/schemas/SipInfoResponse"
        sipFlags:
          $ref: "#/components/schemas/SipFlagsResponse"
        sipErrorCodes:
          type: array
          items:
            type: string
        pollingInterval:
          type: integer
          format: int32
          description: |
            Suggested interval in seconds to periodically call SIP-provision API and update the local cache
    UtteranceInsightsObject:
      required:
        - end
        - start
        - text
      type: object
      properties:
        start:
          type: number
          format: float
          example: 0.3
        end:
          type: number
          format: float
          example: 5.1
        text:
          type: string
          example: Hello! This is John.
        confidence:
          type: number
          format: float
          example: 0.97
        speakerId:
          type: string
          example: JohnDoe
        wordTimings:
          type: array
          items:
            $ref: "#/components/schemas/WordTimingsUnit"
    WordSegment:
      required:
        - end
        - start
        - word
      type: object
      properties:
        speakerId:
          type: string
          example: JohnDoe
        start:
          type: number
          format: float
          example: 0.3
        end:
          type: number
          format: float
          example: 5.1
        confidence:
          type: number
          format: float
          example: 0.97
        word:
          type: string
          example: hello
    UtteranceObject:
      required:
        - end
        - start
        - text
      type: object
      properties:
        start:
          type: number
          format: float
          example: 0.3
        end:
          type: number
          format: float
          example: 5.1
        text:
          type: string
          example: Hello! This is John.
        confidence:
          type: number
          format: float
          example: 0.97
        speakerId:
          type: string
          example: JohnDoe
        wordTimings:
          type: array
          items:
            $ref: "#/components/schemas/WordTimingsUnit"
    DiarizeApiResponse:
      type: object
      properties:
        status:
          type: string
          enum:
            - Success
            - Fail
        response:
          oneOf:
            - $ref: "#/components/schemas/DiarizedObject"
            - $ref: "#/components/schemas/CaiErrorResponse"
    SummaryOutput:
      type: object
      properties:
        summaries:
          type: array
          items:
            $ref: "#/components/schemas/SummaryOutputUnit"
    WordTimingsUnit:
      type: object
      properties:
        start:
          type: number
          format: float
          example: 0.3
        end:
          type: number
          format: float
          example: 5.1
        word:
          type: string
          example: Hello
    CaiErrorResponse:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: "#/components/schemas/CaiErrorCodeResponse"
    PunctuateApiOutput:
      type: object
      properties:
        status:
          type: string
          enum:
            - Success
            - Fail
        response:
          $ref: "#/components/schemas/PunctuateApiResponse"
    JobStatusResponse:
      allOf:
        - type: object
          properties:
            jobId:
              type: string
            creationTime:
              type: string
              format: date-time
            completionTime:
              type: string
              format: date-time
            expirationTime:
              type: string
              format: date-time
        - oneOf:
            - $ref: "#/components/schemas/SummaryApiOutput"
            - $ref: "#/components/schemas/PunctuateApiOutput"
            - $ref: "#/components/schemas/DiarizeApiResponse"
            - $ref: "#/components/schemas/AsrApiResponse"
            - $ref: "#/components/schemas/InteractionApiResponse"
    InteractionObject:
      type: object
      properties:
        utteranceInsights:
          type: array
          items:
            $ref: "#/components/schemas/UtteranceInsightsObject"
        speakerInsights:
          $ref: "#/components/schemas/SpeakerInsightsObject"
        conversationalInsights:
          type: array
          items:
            $ref: "#/components/schemas/ConversationalInsightsUnit"
    SummaryApiResponse:
      oneOf:
        - $ref: "#/components/schemas/SummaryOutput"
        - $ref: "#/components/schemas/CaiErrorResponse"
    PunctuateApiResponse:
      oneOf:
        - $ref: "#/components/schemas/PunctuateOutput"
        - $ref: "#/components/schemas/CaiErrorResponse"
    CaiErrorCodeResponse:
      required:
        - errorCode
        - message
      type: object
      properties:
        errorCode:
          type: string
          enum:
            - CAI-101
            - CAI-102
            - CAI-103
            - CAI-104
            - CAI-105
            - CAI-106
            - CAI-107
            - CAI-108
            - CAI-109
            - CAI-110
        message:
          type: string
          description: Helpful description of the errorCode
        parameterName:
          type: string
          description: Name of parameter if specified in the message
    PunctuateOutput:
      required:
        - texts
      type: object
      properties:
        texts:
          type: array
          items:
            type: string
    AsrApiResponse:
      type: object
      properties:
        status:
          type: string
          enum:
            - Success
            - Fail
        response:
          oneOf:
            - $ref: "#/components/schemas/TranscribedObject"
            - $ref: "#/components/schemas/CaiErrorResponse"
    InteractionApiResponse:
      type: object
      properties:
        status:
          type: string
          enum:
            - Success
            - Fail
        response:
          oneOf:
            - $ref: "#/components/schemas/InteractionObject"
            - $ref: "#/components/schemas/CaiErrorResponse"
    DiarizeSegment:
      required:
        - end
        - speakerId
        - start
      type: object
      properties:
        speakerId:
          type: string
          example: JohnDoe
        start:
          type: number
          format: float
          example: 0.3
        end:
          type: number
          format: float
          example: 5.1
        confidence:
          type: number
          format: float
          example: 0.97
    SummaryTimingsUnit:
      required:
        - value
      type: object
      properties:
        confidence:
          type: number
          format: float
          example: 0.97
        value:
          type: string
          example: This meeting is focussed on rise of on demand marketplaces, online marketplaces and regulated services
        start:
          type: number
          format: float
          example: 0.3
        end:
          type: number
          format: float
          example: 3600.1
    TranscribedObject:
      required:
        - transcript
        - words
      type: object
      properties:
        speakerCount:
          type: integer
          description: The number of speakers detected. Field is set only when enableSpeakerDiarization is true.
          format: int32
          example: 2
        utterances:
          type: array
          description: Speaker wise utterances. Field is set only when enableSpeakerDiarization is true.
          items:
            $ref: "#/components/schemas/UtteranceObject"
        words:
          type: array
          items:
            $ref: "#/components/schemas/WordSegment"
        confidence:
          type: number
          description: Overall transcription confidence.
          format: float
        transcript:
          type: string
          description: The entire transcript with/without punctuations according to the input.
    DiarizedObject:
      required:
        - speakerCount
        - utterances
      type: object
      properties:
        speakerCount:
          type: integer
          format: int32
          example: 2
        utterances:
          type: array
          items:
            $ref: "#/components/schemas/DiarizeSegment"
    ConversationalInsightsUnitValues:
      required:
        - end
        - start
        - value
      type: object
      properties:
        confidence:
          type: number
          format: float
          example: 0.97
        value:
          type: string
          example: RingCentral
        start:
          type: number
          format: float
          example: 4.7
        end:
          type: number
          format: float
          example: 5.1
        groupId:
          type: string
          example: "0"
          description: Paragraph index of the long summary.
        speakerId:
          type: string
          example: JohnDoe
        assignee:
          type: string
          example: Speaker
        category:
          type: string
          example: NextStep
        text:
          type: string
          example: All right, now let us go down to a CD settings.
        question:
          type: string
          example: So so you want me to add it to the B D as well?
        answer:
          type: string
          example: Or or you can add another tab and have it resigned.
      additionalProperties:
        type: string
    ConversationalInsightsUnit:
      required:
        - name
        - values
      type: object
      properties:
        name:
          type: string
          example: KeyPhrases
          enum:
            - ExtractiveSummary
            - AbstractiveSummaryLong
            - AbstractiveSummaryShort
            - KeyPhrases
            - QuestionsAsked
            - OverallSentiment
            - Topics
        values:
          type: array
          items:
            $ref: "#/components/schemas/ConversationalInsightsUnitValues"
    SpeakerInsightsValuesItems:
      required:
        - speakerId
        - value
      type: object
      properties:
        speakerId:
          type: string
          example: JohnDoe
        value:
          type: string
          description: The value corresponding to the insight for the speaker
          example: 20:80
      additionalProperties:
        type: string
    SummaryApiOutput:
      type: object
      properties:
        status:
          type: string
          enum:
            - Success
            - Fail
        response:
          $ref: "#/components/schemas/SummaryApiResponse"
    SpeakerInsightsObject:
      type: object
      properties:
        speakerCount:
          type: integer
          format: int32
          example: 2
        insights:
          type: array
          items:
            $ref: "#/components/schemas/SpeakerInsightsUnit"
    SummaryOutputUnit:
      type: object
      properties:
        name:
          type: string
          example: AbstractiveShort
          enum:
            - Extractive
            - AbstractiveLong
            - AbstractiveShort
            - All
        values:
          type: array
          description: Summary output units sorted by their occurrence in the conversation
          items:
            $ref: "#/components/schemas/SummaryTimingsUnit"
    SpeakerInsightsUnit:
      required:
        - name
        - values
      type: object
      properties:
        name:
          type: string
          example: TalkToListenRatio
          enum:
            - Pace
            - TalkToListenRatio
            - QuestionsAsked
        values:
          type: array
          items:
            $ref: "#/components/schemas/SpeakerInsightsValuesItems"
    SummaryUnit:
      required:
        - text
        - speakerId
        - start
        - end
      type: object
      properties:
        speakerId:
          type: string
          example: JohnDoe
        text:
          type: string
          example: Hello! This is John.
        start:
          type: number
          format: float
          example: 0.3
        end:
          type: number
          format: float
          example: 5.1
    CaiAsyncApiResponse:
      type: object
      properties:
        jobId:
          type: string
    SummaryInput:
      required:
        - summaryType
        - utterances
      type: object
      properties:
        summaryType:
          type: string
          description: Type of summary to be computed
          example: AbstractiveShort
          enum:
            - Extractive
            - AbstractiveShort
            - AbstractiveLong
            - AbstractiveAll
            - All
        utterances:
          type: array
          items:
            $ref: "#/components/schemas/SummaryUnit"
    PunctuateInput:
      required:
        - texts
      type: object
      properties:
        texts:
          type: array
          items:
            type: string
    AudioInput:
      required:
        - encoding
        - languageCode
      allOf:
        - $ref: "#/components/schemas/ContentInput"
        - type: object
          properties:
            encoding:
              type: string
              description: The encoding of the original audio
              example: Wav
              enum:
                - Mpeg
                - Mp4
                - Wav
                - Webm
                - Webp
                - Aac
                - Avi
                - Ogg
            languageCode:
              type: string
              description: Language spoken in the audio file.
              example: en-US
            source:
              type: string
              description: "Source of the audio file eg: Phone, RingCentral, GoogleMeet, Zoom etc"
              example: RingCentral
            audioType:
              type: string
              description: Type of the audio
              example: CallCenter
              enum:
                - CallCenter
                - Meeting
                - EarningsCalls
                - Interview
                - PressConference
                - Voicemail
    SpeechContextPhrasesInput:
      required:
        - phrases
      type: object
      minItems: 1
      maxItems: 50
      properties:
        phrases:
          type: array
          description: Words or Phrases to boost
          example:
            - Mohit
            - Sushant
            - RingCentral
          items:
            type: string
    DiarizeInput:
      allOf:
        - $ref: "#/components/schemas/AudioInput"
        - type: object
          properties:
            separateSpeakerPerChannel:
              type: boolean
              description: Set to True if the input audio is multi-channel and each channel has a separate speaker.
              example: false
            speakerCount:
              type: integer
              description: Number of speakers in the file, omit parameter if unknown
              format: int32
              example: 2
            enableVoiceActivityDetection:
              type: boolean
              description: Apply voice activity detection.
    AsrInput:
      allOf:
        - $ref: "#/components/schemas/DiarizeInput"
        - type: object
          properties:
            enablePunctuation:
              type: boolean
              description: Enables Smart Punctuation API.
            enableSpeakerDiarization:
              type: boolean
              description: Tags each word corresponding to the speaker.
              default: false
            separateSpeakerPerChannel:
              type: boolean
              description: Indicates that the input audio is multi-channel and each channel has a separate speaker.
              default: false
            speechContexts:
              type: array
              description: Indicates the words/phrases that will be used for boosting the transcript. This can help to boost accuracy for cases like Person Names, Company names etc.
              items:
                $ref: "#/components/schemas/SpeechContextPhrasesInput"
    ContentInput:
      type: object
      properties:
        contentUri:
          type: string
          description: Publicly facing uri
          format: uri
    RecordingInsights:
      type: object
      required:
        - title
        - domain
        - sourceRecordId
        - sourceSessionId
        - ownerExtensionId
        - recordingDurationMs
        - recordingStartTime
        - creationTime
        - lastModifiedTime
        - speakerInfo
        - insights
      properties:
        title:
          type: string
          example: Call from 1234567890 to 0987654321
          description: Title of the call
        rsRecordUri:
          type: string
          example: https://ringsense.ringcentral.com/calls/2e67979e-ff82-4171-ae30-20c0c1f19b27
          description: URI of the call recording
        domain:
          $ref: "#/components/schemas/RecordingDomain"
        sourceRecordId:
          $ref: "#/components/schemas/SourceRecordId"
        sourceSessionId:
          $ref: "#/components/schemas/SourceSessionId"
        callDirection:
          $ref: "#/components/schemas/AIInsightsCallDirection"
        ownerExtensionId:
          type: string
          description: Extension id of the call recording owner
          example: "123456789"
        recordingDurationMs:
          type: integer
          format: int32
          description: Duration of the call recording (in ms)
          example: 112000
        recordingStartTime:
          type: string
          format: date-time
          description: Start time of the call recording
        creationTime:
          type: string
          format: date-time
          description: Creation time of the call insights
        lastModifiedTime:
          type: string
          format: date-time
          description: Last modified time of the call insights
        speakerInfo:
          $ref: "#/components/schemas/AIInsightsSpeakerInfo"
        insights:
          $ref: "#/components/schemas/AIInsights"
    SummaryInsights:
      type: array
      items:
        $ref: "#/components/schemas/SummaryInsightUnit"
    SentimentInsights:
      type: array
      minItems: 0
      items:
        $ref: "#/components/schemas/SentimentInsightUnit"
    AIInsights:
      type: object
      properties:
        Transcript:
          $ref: "#/components/schemas/TranscriptInsights"
        Summary:
          $ref: "#/components/schemas/SummaryInsights"
        Highlights:
          $ref: "#/components/schemas/HighlightsInsights"
        NextSteps:
          $ref: "#/components/schemas/NextStepsInsights"
        BulletedSummary:
          $ref: "#/components/schemas/BulletedSummaryInsights"
        AIScore:
          $ref: "#/components/schemas/AIScoreInsights"
        CallNotes:
          $ref: "#/components/schemas/CallNotesInsights"
        Sentiment:
          $ref: "#/components/schemas/SentimentInsights"
    AIScoreInsightUnit:
      type: object
      required:
        - value
      properties:
        value:
          type: string
          description: Value of the score
          example: "7"
    AIScoreInsights:
      type: array
      items:
        $ref: "#/components/schemas/AIScoreInsightUnit"
    AIInsightsSpeakerInfo:
      type: array
      description: List of the participants in the call
      items:
        type: object
        required:
          - speakerId
        properties:
          speakerId:
            type: string
            example: p-32423
            description: Participant ID as in the source recording
          name:
            type: string
            example: John Doe
            description: Name of the participant
          accountId:
            type: string
            example: "123456789"
            description: RingCentral account ID of the participant
          extensionId:
            type: string
            example: "123456789"
            description: RingCentral extension ID of the participant
          phoneNumber:
            type: string
            example: "+1234567890"
            description: Optional phone number of the participant in case of phone call recording
    BulletedSummaryInsights:
      type: array
      items:
        $ref: "#/components/schemas/BulletedSummaryInsightUnit"
    SummaryInsightUnit:
      type: object
      required:
        - value
        - start
        - end
      properties:
        value:
          type: string
          description: Value of the summary
          example: conversational insights text
        start:
          type: number
          format: float
          description: Start time of the insight (in sec)
          example: 1.2
        end:
          type: number
          format: float
          description: End time of the insight (in sec)
          example: 4.2
    BulletedSummaryInsightUnit:
      type: object
      required:
        - value
      properties:
        value:
          type: string
          description: Value of the summary
          example: conversational insights text
        section:
          type: string
          description: Section of the summary
          example: section name
    HighlightsInsightUnit:
      $ref: "#/components/schemas/RSConversationalInsightsUnit"
    AIInsightsCallDirection:
      type: string
      description: Optional call direction in case of phone call recording
      example: Inbound
      enum:
        - Inbound
        - Outbound
    TranscriptInsights:
      type: array
      items:
        $ref: "#/components/schemas/TranscriptInsightUnit"
    AIInsightsTypes:
      type: array
      description: AI Insight Types
      items:
        type: string
        enum:
          - NextSteps
          - Transcript
          - Summary
          - Highlights
          - BulletedSummary
          - AIScore
          - CallNotes
          - Sentiment
    RecordingDomain:
      type: string
      description: Source rc application of the recording
      example: pbx
      enum:
        - pbx
        - rcv
        - rcx
        - nice-incontact
        - ms-teams
    HighlightsInsights:
      type: array
      items:
        $ref: "#/components/schemas/HighlightsInsightUnit"
    RSConversationalInsightsUnit:
      type: object
      required:
        - speakerId
        - value
        - start
        - end
      properties:
        speakerId:
          type: string
          description: Participant ID
          example: p-32423
        value:
          type: string
          description: Value of the insight
          example: conversational insights text
        start:
          type: number
          format: float
          description: Start time of the insight (in sec)
          example: 1.2
        end:
          type: number
          format: float
          description: End time of the insight (in sec)
          example: 4.2
    TranscriptInsightUnit:
      type: object
      description: One utterance of a call. Each utterance is a speakerId, text, start and end time
      required:
        - speakerId
        - text
        - start
        - end
      properties:
        speakerId:
          type: string
          description: Participant ID
          example: p-32423
        text:
          type: string
          description: Text of the utterance
          example: Hello user!
        start:
          type: number
          format: float
          description: Start time of the utterance (in sec)
          example: 1.2
        end:
          type: number
          format: float
          description: End time of the utterance (in sec)
          example: 4.2
    SentimentInsightUnit:
      type: object
      required:
        - value
      properties:
        value:
          type: string
          description: Sentiment value
          example: Positive
          enum:
            - Positive
            - Negative
            - Neutral
    NextStepsInsightUnit:
      $ref: "#/components/schemas/RSConversationalInsightsUnit"
    CallNotesInsights:
      type: array
      items:
        $ref: "#/components/schemas/CallNotesInsightUnit"
    SourceRecordId:
      type: string
      description: Recording ID of the domain
      example: 4b57_384543
    NextStepsInsights:
      type: array
      items:
        $ref: "#/components/schemas/NextStepsInsightUnit"
    CallNotesInsightUnit:
      type: object
      required:
        - value
      properties:
        value:
          type: string
          description: Value of the call notes
          example: call notes text
    SourceSessionId:
      type: string
      description: Session ID of the domain
      example: cbac2b78-6f74-4257-8167-dff864de2263!us-10-dca09@us-10
    RSPagingModel:
      allOf:
        - $ref: "#/components/schemas/EnumeratedPagingModel"
        - type: object
          required:
            - page
            - perPage
            - pageStart
            - pageEnd
            - totalElements
            - sortableFields
          properties:
            sortableFields:
              type: array
              items:
                type: string
    SessionsInsightsResource:
      type: object
      required:
        - records
        - paging
      properties:
        records:
          type: array
          items:
            $ref: "#/components/schemas/RecordingInsights"
        paging:
          $ref: "#/components/schemas/RSPagingModel"
    InteractionInput:
      allOf:
        - $ref: "#/components/schemas/DiarizeInput"
        - type: object
          properties:
            insights:
              type: array
              items:
                $ref: "#/components/schemas/InsightsEnum"
            speechContexts:
              type: array
              description: Indicates the words/phrases that will be used for boosting the transcript. This can help to boost accuracy for cases like Person Names, Company names etc.
              items:
                $ref: "#/components/schemas/SpeechContextPhrasesInput"
    InsightsEnum:
      type: string
      enum:
        - All
        - KeyPhrases
        - AbstractiveSummaryLong
        - AbstractiveSummaryShort
        - ExtractiveSummary
        - Topics
        - TalkToListenRatio
        - Pace
        - QuestionsAsked
    ScimErrorResponse:
      type: object
      properties:
        detail:
          type: string
          description: Detailed error message
        schemas:
          type: array
          items:
            type: string
            enum:
              - urn:ietf:params:scim:api:messages:2.0:Error
        scimType:
          type: string
          description: Bad request type when status code is 400
          enum:
            - uniqueness
            - tooMany
            - mutability
            - sensitive
            - invalidSyntax
            - invalidFilter
            - invalidPath
            - invalidValue
            - invalidVers
            - noTarget
        status:
          type: string
          description: Same as HTTP status code, e.g. 400, 401, etc.
    ScimSchemaAttribute:
      required:
        - name
        - type
        - multiValued
        - required
        - mutability
        - returned
        - uniqueness
      type: object
      properties:
        name:
          type: string
          description: The name of the attribute
        type:
          type: string
          enum:
            - string
            - boolean
            - decimal
            - integer
            - dateTime
            - reference
            - complex
        subAttributes:
          type: array
          items:
            $ref: "#/components/schemas/ScimSchemaAttribute"
        multiValued:
          type: boolean
          description: A Boolean value indicating the attribute's plurality
          default: false
        description:
          type: string
          description: The description of the attribute
        required:
          type: boolean
          default: false
        canonicalValues:
          type: array
          items:
            type: string
          description: A collection of suggested canonical values
        caseExact:
          type: boolean
          default: false
        mutability:
          type: string
          enum:
            - readOnly
            - readWrite
            - immutable
            - writeOnly
          description: Indicates the circumstances under which the value of the attribute can be (re)defined
        returned:
          type: string
          enum:
            - always
            - never
            - default
            - request
          description: Indicates when an attribute and associated values are returned
        uniqueness:
          type: string
          enum:
            - none
            - server
            - global
          description: Specifies how the service provider enforces uniqueness of attribute values
        referenceTypes:
          type: array
          items:
            type: string
          description: Indicates the SCIM resource types that be referenced
    ScimMeta:
      type: object
      properties:
        created:
          type: string
          format: date-time
        lastModified:
          type: string
          format: date-time
        location:
          type: string
          description: Resource location URI
        resourceType:
          type: string
          enum:
            - User
            - Group
            - ResourceType
            - Schema
      description: Resource metadata
    ScimSchemaSearchResponse:
      type: object
      properties:
        Resources:
          type: array
          description: Resource type list
          items:
            $ref: "#/components/schemas/ScimSchemaResponse"
        itemsPerPage:
          type: integer
          format: int64
        schemas:
          type: array
          items:
            type: string
            enum:
              - urn:ietf:params:scim:api:messages:2.0:ListResponse
        startIndex:
          type: integer
          format: int64
        totalResults:
          type: integer
          format: int64
    ScimSchemaResponse:
      required:
        - id
      type: object
      properties:
        id:
          type: string
          description: The unique URI of the schema
        name:
          type: string
          description: The name of the schema
        description:
          type: string
          description: The description of the schema
        attributes:
          type: array
          items:
            $ref: "#/components/schemas/ScimSchemaAttribute"
        meta:
          $ref: "#/components/schemas/ScimMeta"
    ScimUserShortInfo:
      required:
        - emails
        - name
        - schemas
        - userName
      type: object
      properties:
        active:
          type: boolean
          description: User status
          default: false
        emails:
          type: array
          items:
            $ref: "#/components/schemas/ScimEmail"
        externalId:
          type: string
          description: External unique resource ID defined by provisioning client
        id:
          type: string
          description: Unique resource ID defined by RingCentral
        name:
          $ref: "#/components/schemas/ScimName"
        photos:
          type: array
          items:
            $ref: "#/components/schemas/ScimPhoto"
        schemas:
          type: array
          items:
            type: string
            enum:
              - urn:ietf:params:scim:schemas:core:2.0:User
        title:
          type: string
          description: User title
        urn:ietf:params:scim:schemas:extension:enterprise:2.0:User:
          $ref: "#/components/schemas/ScimEnterpriseUser"
        userName:
          type: string
          description: MUST be same as work type email address
        meta:
          $ref: "#/components/schemas/ScimMeta"
    ScimEnterpriseUser:
      type: object
      properties:
        department:
          type: string
    ScimUserAddress:
      required:
        - type
      type: object
      properties:
        country:
          type: string
        locality:
          type: string
        postalCode:
          type: string
        region:
          type: string
        streetAddress:
          type: string
        type:
          type: string
          enum:
            - work
    ScimUserSearchResponse:
      type: object
      properties:
        Resources:
          type: array
          description: User list
          items:
            $ref: "#/components/schemas/ScimUserShortInfo"
        itemsPerPage:
          type: integer
          format: int64
        schemas:
          type: array
          items:
            type: string
            enum:
              - urn:ietf:params:scim:api:messages:2.0:ListResponse
        startIndex:
          type: integer
          format: int64
        totalResults:
          type: integer
          format: int64
    ScimEmail:
      required:
        - type
        - value
      type: object
      properties:
        type:
          type: string
          enum:
            - work
        value:
          type: string
    ScimPhoto:
      required:
        - type
        - value
      type: object
      properties:
        type:
          type: string
          enum:
            - photo
        value:
          type: string
    ScimUser:
      required:
        - emails
        - name
        - schemas
        - userName
      type: object
      properties:
        active:
          type: boolean
          description: User status
          default: false
        addresses:
          type: array
          items:
            $ref: "#/components/schemas/ScimUserAddress"
        emails:
          type: array
          items:
            $ref: "#/components/schemas/ScimEmail"
        externalId:
          type: string
          description: External unique resource ID defined by provisioning client
        id:
          type: string
          description: Unique resource ID defined by RingCentral
        name:
          $ref: "#/components/schemas/ScimName"
        phoneNumbers:
          type: array
          items:
            $ref: "#/components/schemas/ScimPhoneNumber"
        photos:
          type: array
          items:
            $ref: "#/components/schemas/ScimPhoto"
        schemas:
          type: array
          items:
            type: string
            enum:
              - urn:ietf:params:scim:schemas:core:2.0:User
        title:
          type: string
          description: User title
        urn:ietf:params:scim:schemas:extension:enterprise:2.0:User:
          $ref: "#/components/schemas/ScimEnterpriseUser"
        userName:
          type: string
          description: MUST be same as work type email address
    ScimPhoneNumber:
      required:
        - type
        - value
      type: object
      properties:
        type:
          type: string
          enum:
            - work
            - mobile
            - other
        value:
          type: string
    ScimUserResponse:
      required:
        - emails
        - name
        - schemas
        - userName
      type: object
      properties:
        active:
          type: boolean
          description: User status
          default: false
        addresses:
          type: array
          items:
            $ref: "#/components/schemas/ScimUserAddress"
        emails:
          type: array
          items:
            $ref: "#/components/schemas/ScimEmail"
        externalId:
          type: string
          description: External unique resource ID defined by provisioning client
        id:
          type: string
          description: Unique resource ID defined by RingCentral
        name:
          $ref: "#/components/schemas/ScimName"
        phoneNumbers:
          type: array
          items:
            $ref: "#/components/schemas/ScimPhoneNumber"
        photos:
          type: array
          items:
            $ref: "#/components/schemas/ScimPhoto"
        schemas:
          type: array
          items:
            type: string
            enum:
              - urn:ietf:params:scim:schemas:core:2.0:User
        title:
          type: string
          description: User title
        urn:ietf:params:scim:schemas:extension:enterprise:2.0:User:
          $ref: "#/components/schemas/ScimEnterpriseUser"
        userName:
          type: string
          description: MUST be same as work type email address
        meta:
          $ref: "#/components/schemas/ScimMeta"
    ScimName:
      required:
        - familyName
        - givenName
      type: object
      properties:
        familyName:
          type: string
        givenName:
          type: string
    ScimSearchRequest:
      type: object
      properties:
        count:
          type: integer
          description: Page size
          format: int32
        filter:
          type: string
          description: Only support 'userName' or 'email' filter expressions for now
        schemas:
          type: array
          items:
            type: string
            enum:
              - urn:ietf:params:scim:api:messages:2.0:SearchRequest
        startIndex:
          type: integer
          description: Start index (1-based)
          format: int32
    ScimUserPatch:
      required:
        - Operations
        - schemas
      type: object
      properties:
        Operations:
          type: array
          description: Patch operations list
          items:
            $ref: "#/components/schemas/ScimPatchOperation"
        schemas:
          type: array
          items:
            type: string
            enum:
              - urn:ietf:params:scim:api:messages:2.0:PatchOp
    ScimPatchOperation:
      required:
        - op
      type: object
      properties:
        op:
          type: string
          enum:
            - add
            - replace
            - remove
        path:
          type: string
        value:
          type: string
          description: Corresponding 'value' of that field specified by 'path'
    ScimProviderConfig:
      type: object
      properties:
        authenticationSchemes:
          type: array
          items:
            $ref: "#/components/schemas/ScimAuthenticationScheme"
        bulk:
          $ref: "#/components/schemas/ScimBulkSupported"
        changePassword:
          $ref: "#/components/schemas/ScimSupported"
        etag:
          $ref: "#/components/schemas/ScimSupported"
        filter:
          $ref: "#/components/schemas/ScimFilterSupported"
        patch:
          $ref: "#/components/schemas/ScimSupported"
        schemas:
          type: array
          items:
            type: string
            enum:
              - urn:ietf:params:scim:schemas:core:2.0:ServiceProviderConfig
        sort:
          $ref: "#/components/schemas/ScimSupported"
        xmlDataFormat:
          $ref: "#/components/schemas/ScimSupported"
    ScimFilterSupported:
      type: object
      properties:
        maxResults:
          type: integer
          format: int32
        supported:
          type: boolean
          default: false
    ScimAuthenticationScheme:
      type: object
      properties:
        description:
          type: string
        documentationUri:
          type: string
          format: uri
        name:
          type: string
        specUri:
          type: string
          format: uri
        primary:
          type: boolean
    ScimBulkSupported:
      type: object
      properties:
        maxOperations:
          type: integer
          format: int32
        maxPayloadSize:
          type: integer
          format: int32
        supported:
          type: boolean
          default: false
    ScimSupported:
      type: object
      properties:
        supported:
          type: boolean
          default: false
    ScimSchemaExtension:
      required:
        - schema
        - required
      type: object
      properties:
        schema:
          type: string
          enum:
            - urn:ietf:params:scim:schemas:extension:enterprise:2.0:User
        required:
          type: boolean
          default: false
    ScimResourceTypeSearchResponse:
      type: object
      properties:
        Resources:
          type: array
          description: Resource type list
          items:
            $ref: "#/components/schemas/ScimResourceTypeResponse"
        itemsPerPage:
          type: integer
          format: int64
        schemas:
          type: array
          items:
            type: string
            enum:
              - urn:ietf:params:scim:api:messages:2.0:ListResponse
        startIndex:
          type: integer
          format: int64
        totalResults:
          type: integer
          format: int64
    ScimResourceTypeResponse:
      required:
        - name
        - endpoint
        - schema
      type: object
      properties:
        id:
          type: string
          description: Unique resource type ID, same value as the "name" attribute
        name:
          type: string
          description: Resource type name
        endpoint:
          type: string
          description: The resource type's HTTP-addressable endpoint
        description:
          type: string
          description: Description of the resource type
        schema:
          type: string
          enum:
            - urn:ietf:params:scim:schemas:core:2.0:User
        schemaExtensions:
          type: array
          items:
            $ref: "#/components/schemas/ScimSchemaExtension"
        meta:
          $ref: "#/components/schemas/ScimMeta"
    QueueOpportunities:
      title: QueueOpportunities
      description: Queue opportunities data for the specified grouping
      type: object
      required:
        - valueType
        - values
      properties:
        valueType:
          $ref: "#/components/schemas/ValueType"
        values:
          description: Value for queue opportunities
          type: number
          format: double
    QueueSlaOptions:
      title: QueueSlaOptions
      type: string
      enum:
        - InSla
        - OutSla
    CallsByDirection:
      title: CallsByDirection
      description: Data for calls with breakdown by direction (Inbound, Outbound)
      type: object
      required:
        - valueType
        - values
      properties:
        valueType:
          $ref: "#/components/schemas/ValueType"
        values:
          $ref: "#/components/schemas/CallsByDirectionBreakdown"
    CallsByQueueHours:
      title: CallsByQueueHours
      description: Data for calls with breakdown by queue hours (BusinessHours, AfterHours)
      type: object
      required:
        - valueType
        - values
      properties:
        valueType:
          $ref: "#/components/schemas/ValueType"
        values:
          $ref: "#/components/schemas/CallsByQueueHoursBreakdown"
    DirectGrouping:
      title: DirectGrouping
      description: This grouping allows to specify the `groupBy` option by which the data in the response will be grouped
      type: object
      required:
        - groupBy
      properties:
        groupBy:
          $ref: "#/components/schemas/GroupingOptions"
        keys:
          description: This field can be used to specify unique identifiers of entities selected in `groupBy` field. The response data will be limited to these entities only
          type: array
          items:
            type: string
    CallsByOriginBreakdown:
      title: CallsByOriginBreakdown
      description: Result breakdown by origin
      type: object
      required:
        - internal
        - external
      properties:
        internal:
          description: Value for Internal origin
          type: number
          format: double
        external:
          description: Value for External origin
          type: number
          format: double
    AggregationType:
      title: AggregationType
      description: Counter aggregation type. Can be `Sum`, `Average`, `Min`, `Max` or `Percent`
      type: string
      enum:
        - Sum
        - Average
        - Max
        - Min
        - Percent
    AggregationInterval:
      title: AggregationInterval
      description: Time interval which will be used for aggregation. Can be `Hour`, `Day`, `Week` or `Month`
      type: string
      enum:
        - Hour
        - Day
        - Week
        - Month
    AdvancedTimeSettings:
      title: AdvancedTimeSettings
      description: Allows more granular control over time included in the report
      type: object
      properties:
        includeDays:
          description: Days of the week for which the report is calculated
          type: array
          items:
            $ref: "#/components/schemas/DayOfWeek"
        includeHours:
          description: Hours of the day for which the report is calculated
          type: array
          items:
            $ref: "#/components/schemas/HoursInterval"
    CallsByActions:
      title: CallsByActions
      description: Data for calls with breakdown by action (HoldOff, HoldOn, ParkOn, ParkOff, BlindTransfer, WarmTransfer, DTMFTransfer)
      type: object
      required:
        - valueType
        - values
      properties:
        valueType:
          $ref: "#/components/schemas/ValueType"
        values:
          $ref: "#/components/schemas/CallsByActionsBreakdown"
    CallsByResult:
      title: CallsByResult
      description: Data for calls with breakdown by result (Completed, Abandoned, Voicemail, Unknown, Missed, Accepted)
      type: object
      required:
        - valueType
        - values
      properties:
        valueType:
          $ref: "#/components/schemas/ValueType"
        values:
          $ref: "#/components/schemas/CallsByResultBreakdown"
    CallsByResponse:
      title: CallsByResponse
      description: Data for calls with breakdown by response (Answered, NotAnswered, Connected, NotConnected)
      type: object
      required:
        - valueType
        - values
      properties:
        valueType:
          $ref: "#/components/schemas/ValueType"
        values:
          $ref: "#/components/schemas/CallsByResponseBreakdown"
    Origin:
      title: Origin
      type: string
      enum:
        - Internal
        - External
    CallResult:
      title: CallResult
      type: string
      enum:
        - Completed
        - Abandoned
        - Voicemail
        - Unknown
        - Missed
        - Accepted
        - Transferred
        - PickedUp
        - Forwarded
        - AnsweredElsewhere
    CallsCounters:
      title: CallsCounters
      description: Call volume data for the specified grouping
      type: object
      properties:
        allCalls:
          $ref: "#/components/schemas/AllCalls"
        callsByDirection:
          $ref: "#/components/schemas/CallsByDirection"
        callsByOrigin:
          $ref: "#/components/schemas/CallsByOrigin"
        callsByResponse:
          $ref: "#/components/schemas/CallsByResponse"
        callsSegments:
          $ref: "#/components/schemas/CallsBySegments"
        callsByResult:
          $ref: "#/components/schemas/CallsByResult"
        callsByEndingParty:
          $ref: "#/components/schemas/CallsByEndingParty"
        callsActions:
          $ref: "#/components/schemas/CallsByActions"
        callsByCompanyHours:
          $ref: "#/components/schemas/CallsByCompanyHours"
        callsByQueueSla:
          $ref: "#/components/schemas/CallsByQueueSla"
        callsByType:
          $ref: "#/components/schemas/CallsByType"
        queueOpportunities:
          $ref: "#/components/schemas/QueueOpportunities"
        callsByQueueHours:
          $ref: "#/components/schemas/CallsByQueueHours"
    TimeSettings:
      title: TimeSettings
      description: Date-time range for the calls. The call is considered to be within time range if it started within time range. Both borders are inclusive
      type: object
      required:
        - timeZone
        - timeRange
      properties:
        timeZone:
          description: Name of the timezone that will be used for `includeDays` and `includeHours` filters and aggregation intervals. For example 'America/Los_Angeles', 'Europe/Zurich'. See also *[Time Zones](https://www.iana.org/time-zones)*. Value in this field doesn't affect interpretation of time in `timeRange`, as it already includes offset from UTC
          type: string
        timeRange:
          $ref: "#/components/schemas/TimeRange"
        advancedTimeSettings:
          $ref: "#/components/schemas/AdvancedTimeSettings"
    CallsByQueueHoursBreakdown:
      title: CallsByQueueHoursBreakdown
      description: Result breakdown by queue hours
      type: object
      required:
        - businessHours
        - afterHours
      properties:
        businessHours:
          description: Value for BusinessHours queue hours
          type: number
          format: double
        afterHours:
          description: Value for AfterHours queue hours
          type: number
          format: double
    AllCalls:
      title: AllCalls
      description: Data for all calls
      type: object
      required:
        - valueType
        - values
      properties:
        valueType:
          $ref: "#/components/schemas/ValueType"
        values:
          description: Value for all calls
          type: number
          format: double
    CallsByEndingPartyBreakdown:
      title: CallsByEndingPartyBreakdown
      type: object
      required:
        - caller
        - callee
        - system
      properties:
        caller:
          description: Value for Caller ending party
          type: number
          format: double
        callee:
          description: Value for Callee ending party
          type: number
          format: double
        system:
          description: Value for System ending party
          type: number
          format: double
    Grouping:
      title: Grouping
      description: This field specifies the dimensions by which the response should be grouped and specific keys to narrow the response. See also [Call Aggregate reports](https://developers.ringcentral.com/guide/analytics/aggregate) or [Call Timeline reports](https://developers.ringcentral.com/guide/analytics/timeline) pages in the developer guide for more information
      oneOf:
        - $ref: "#/components/schemas/DirectGrouping"
        - $ref: "#/components/schemas/GroupingByMembers"
    GroupingOptions:
      title: GroupingOptions
      description: The selected grouping option
      type: string
      enum:
        - Company
        - CompanyNumbers
        - Users
        - Queues
        - IVRs
        - IVAs
        - SharedLines
        - UserGroups
        - Sites
        - Departments
    AggregationResponseOptionsCounters:
      title: AggregationResponseOptionsCounters
      description: |-
        The formula is defined by `aggregationType` and `aggregationInterval` for every counter individually.
        If `aggregationType` is `Sum` or `Percent`, `aggregationInterval` is not supported.
        If `aggregationType` is `Min`, `Max` or `Average`, `aggregationInterval` is required
      type: object
      properties:
        allCalls:
          description: Aggregation of all calls count
          type: object
          required:
            - aggregationType
          properties:
            aggregationType:
              $ref: "#/components/schemas/AggregationType"
            aggregationInterval:
              $ref: "#/components/schemas/AggregationInterval"
        callsByDirection:
          description: Aggregation of calls count by direction (Inbound, Outbound)
          type: object
          required:
            - aggregationType
          properties:
            aggregationType:
              $ref: "#/components/schemas/AggregationType"
            aggregationInterval:
              $ref: "#/components/schemas/AggregationInterval"
        callsByOrigin:
          description: Aggregation of calls count by origin (Internal, External)
          type: object
          required:
            - aggregationType
          properties:
            aggregationType:
              $ref: "#/components/schemas/AggregationType"
            aggregationInterval:
              $ref: "#/components/schemas/AggregationInterval"
        callsByResponse:
          description: Aggregation of calls count by response (Answered, NotAnswered, Connected, NotConnected)
          type: object
          required:
            - aggregationType
          properties:
            aggregationType:
              $ref: "#/components/schemas/AggregationType"
            aggregationInterval:
              $ref: "#/components/schemas/AggregationInterval"
        callsSegments:
          description: Aggregation of calls count by segments (Ringing, LiveTalk, Hold, Park, Transfer, IvrPrompt, Voicemail, VmGreeting, Setup)
          type: object
          required:
            - aggregationType
          properties:
            aggregationType:
              $ref: "#/components/schemas/AggregationType"
            aggregationInterval:
              $ref: "#/components/schemas/AggregationInterval"
        callsByResult:
          description: Aggregation of calls count by result (Completed, Abandoned, Voicemail, Unknown, Missed, Accepted, Transferred, PickedUp, AnsweredElsewhere)
          type: object
          required:
            - aggregationType
          properties:
            aggregationType:
              $ref: "#/components/schemas/AggregationType"
            aggregationInterval:
              $ref: "#/components/schemas/AggregationInterval"
        callsByCompanyHours:
          description: Aggregation of calls count by company hours (BusinessHours, AfterHours)
          type: object
          required:
            - aggregationType
          properties:
            aggregationType:
              $ref: "#/components/schemas/AggregationType"
            aggregationInterval:
              $ref: "#/components/schemas/AggregationInterval"
        callsByQueueSla:
          description: Aggregation of calls count by queue SLA (InSLA, OutSLA). This counter is only applicable to Queues grouping
          type: object
          required:
            - aggregationType
          properties:
            aggregationType:
              $ref: "#/components/schemas/AggregationType"
            aggregationInterval:
              $ref: "#/components/schemas/AggregationInterval"
        callsByActions:
          description: Aggregation of calls count by action (HoldOff, HoldOn, ParkOn, ParkOff, BlindTransfer, WarmTransfer, DTMFTransfer)
          type: object
          required:
            - aggregationType
          properties:
            aggregationType:
              $ref: "#/components/schemas/AggregationType"
            aggregationInterval:
              $ref: "#/components/schemas/AggregationInterval"
        callsByType:
          description: Aggregation of calls count by type (Direct, FromQueue, ParkRetrieval, Transferred, Outbound, QueueCallPickup)
          type: object
          required:
            - aggregationType
          properties:
            aggregationType:
              $ref: "#/components/schemas/AggregationType"
            aggregationInterval:
              $ref: "#/components/schemas/AggregationInterval"
        callsByEndingParty:
          description: Aggregation of calls count by party that ended the call (Caller, Callee, System)
          type: object
          required:
            - aggregationType
          properties:
            aggregationType:
              $ref: "#/components/schemas/AggregationType"
            aggregationInterval:
              $ref: "#/components/schemas/AggregationInterval"
        queueOpportunities:
          description: "Aggregation of calls count by the total number of times a Queue call was presented to the user. It is limited to `groupBy` Users and `groupByMembers` (Department, Queue, Site, UserGroup) grouping. Only the listed below options for call filters are applicable to `queueOpportunities` and provide meaningful results: `queues` (selected queue extension ids), `callResults` (Missed, Abandoned), `callResponses` (Answered, NotAnswered), `origins` (Internal, External)"
          type: object
          required:
            - aggregationType
          properties:
            aggregationType:
              $ref: "#/components/schemas/QueueOpportunitiesAggregationType"
        callsByQueueHours:
          description: Aggregation of calls count by queue hours (BusinessHours, AfterHours)
          type: object
          required:
            - aggregationType
          properties:
            aggregationType:
              $ref: "#/components/schemas/AggregationType"
            aggregationInterval:
              $ref: "#/components/schemas/AggregationInterval"
    AggregationResponseOptionsTimers:
      title: AggregationResponseOptionsTimers
      description: |-
        The formula is defined by `aggregationType` and `aggregationInterval` for every timer individually.
        If `aggregationType` is `Sum` or `Percent`, `aggregationInterval` is not supported.
        If `aggregationType` is `Min`, `Max` or `Average`, `aggregationInterval` is supported, but not required.
        If left empty, aggregation will be performed on per-call basis
      type: object
      properties:
        allCallsDuration:
          description: Aggregation of all calls duration
          type: object
          required:
            - aggregationType
          properties:
            aggregationType:
              $ref: "#/components/schemas/AggregationType"
            aggregationInterval:
              $ref: "#/components/schemas/AggregationInterval"
        callsDurationByDirection:
          description: Aggregation of calls duration by direction (Inbound, Outbound)
          type: object
          required:
            - aggregationType
          properties:
            aggregationType:
              $ref: "#/components/schemas/AggregationType"
            aggregationInterval:
              $ref: "#/components/schemas/AggregationInterval"
        callsDurationByOrigin:
          description: Aggregation of calls duration by origin (Internal, External)
          type: object
          required:
            - aggregationType
          properties:
            aggregationType:
              $ref: "#/components/schemas/AggregationType"
            aggregationInterval:
              $ref: "#/components/schemas/AggregationInterval"
        callsDurationByResponse:
          description: Aggregation of calls duration by response (Answered, NotAnswered, Connected, NotConnected)
          type: object
          required:
            - aggregationType
          properties:
            aggregationType:
              $ref: "#/components/schemas/AggregationType"
            aggregationInterval:
              $ref: "#/components/schemas/AggregationInterval"
        callsSegmentsDuration:
          description: Aggregation of calls duration by segments (Ringing, LiveTalk, Hold, Park, Transfer, IvrPrompt, Voicemail, VmGreeting, Setup)
          type: object
          required:
            - aggregationType
          properties:
            aggregationType:
              $ref: "#/components/schemas/AggregationType"
            aggregationInterval:
              $ref: "#/components/schemas/AggregationInterval"
        callsDurationByResult:
          description: Aggregation of calls duration by result (Completed, Abandoned, Voicemail, Unknown, Missed, Accepted, Transferred, PickedUp, AnsweredElsewhere)
          type: object
          required:
            - aggregationType
          properties:
            aggregationType:
              $ref: "#/components/schemas/AggregationType"
            aggregationInterval:
              $ref: "#/components/schemas/AggregationInterval"
        callsDurationByCompanyHours:
          description: Aggregation of calls duration by company hours (BusinessHours, AfterHours)
          type: object
          required:
            - aggregationType
          properties:
            aggregationType:
              $ref: "#/components/schemas/AggregationType"
            aggregationInterval:
              $ref: "#/components/schemas/AggregationInterval"
        callsDurationByQueueSla:
          description: Aggregation of calls duration by queue SLA (InSLA, OutSLA). This timer is only applicable to Queues grouping
          type: object
          required:
            - aggregationType
          properties:
            aggregationType:
              $ref: "#/components/schemas/AggregationType"
            aggregationInterval:
              $ref: "#/components/schemas/AggregationInterval"
        callsDurationByType:
          description: Aggregation of calls duration by type (Direct, FromQueue, ParkRetrieval, Transferred, Outbound, QueueCallPickup)
          type: object
          required:
            - aggregationType
          properties:
            aggregationType:
              $ref: "#/components/schemas/AggregationType"
            aggregationInterval:
              $ref: "#/components/schemas/AggregationInterval"
        callsDurationByEndingParty:
          description: Aggregation of calls duration by party that ended the call (Callee, Caller, System)
          type: object
          required:
            - aggregationType
          properties:
            aggregationType:
              $ref: "#/components/schemas/AggregationType"
            aggregationInterval:
              $ref: "#/components/schemas/AggregationInterval"
        callsDurationByQueueHours:
          description: Aggregation of calls duration by queue hours (BusinessHours, AfterHours)
          type: object
          required:
            - aggregationType
          properties:
            aggregationType:
              $ref: "#/components/schemas/AggregationType"
            aggregationInterval:
              $ref: "#/components/schemas/AggregationInterval"
    ValueType:
      title: ValueType
      description: Unit of the result value
      type: string
      enum:
        - Percent
        - Seconds
        - Instances
    TimeSpentFilter:
      title: TimeSpentFilter
      description: Filtering of calls based on the time spent by specified mailbox(es) on call
      type: object
      properties:
        minSeconds:
          description: Minimum duration in seconds
          type: integer
          format: int64
        maxSeconds:
          description: Maximum duration in seconds
          type: integer
          format: int64
    DayOfWeek:
      title: DayOfWeek
      type: string
      enum:
        - Sunday
        - Monday
        - Tuesday
        - Wednesday
        - Thursday
        - Friday
        - Saturday
    CompanyHoursOptions:
      title: CompanyHoursOptions
      type: string
      enum:
        - BusinessHours
        - AfterHours
    AggregationResponse:
      title: AggregationResponse
      type: object
      required:
        - paging
        - data
      properties:
        paging:
          $ref: "#/components/schemas/ResponsePaging"
        data:
          $ref: "#/components/schemas/AggregationResponseData"
    Direction:
      title: Direction
      type: string
      enum:
        - Inbound
        - Outbound
    CallResponse:
      title: CallResponse
      type: string
      enum:
        - Answered
        - NotAnswered
        - Connected
        - NotConnected
    CallsByOrigin:
      title: CallsByOrigin
      description: Data for calls with breakdown by origin (Internal, External)
      type: object
      required:
        - valueType
        - values
      properties:
        valueType:
          $ref: "#/components/schemas/ValueType"
        values:
          $ref: "#/components/schemas/CallsByOriginBreakdown"
    QueueOpportunitiesAggregationType:
      title: QueueOpportunitiesAggregationType
      description: Counter aggregation type for queue opportunities, limited to `Sum` only.
      type: string
      enum:
        - Sum
    CallType:
      title: CallType
      type: string
      enum:
        - Direct
        - FromQueue
        - ParkRetrieval
        - Transferred
        - Outbound
        - Overflow
        - QueueCallPickup
    EndingParty:
      title: EndingParty
      type: string
      enum:
        - Caller
        - Callee
        - System
    CallFilters:
      title: CallFilters
      description: Optional filters that limit the scope of calls (joined via AND)
      type: object
      properties:
        extensionFilters:
          $ref: "#/components/schemas/ExtensionFilters"
        queues:
          description: List of queues extension ids which allows to get data only for calls that were routed through any of these queues
          type: array
          items:
            type: string
        calledNumbers:
          description: The direct company numbers the caller called (joined via OR)
          type: array
          items:
            type: string
        directions:
          description: Specifies the call directions relative to the scope specified in grouping object (joined via OR). Not applicable to internal origin calls with company scope
          type: array
          items:
            $ref: "#/components/schemas/Direction"
        origins:
          description: Specifies whether an external party was present in the initial segment of the call (joined via OR)
          type: array
          items:
            $ref: "#/components/schemas/Origin"
        callResponses:
          description: Filtering of calls by first response (joined via OR)
          type: array
          items:
            $ref: "#/components/schemas/CallResponse"
        callResults:
          description: Filtering of calls by the nature of call result (joined via OR)
          type: array
          items:
            $ref: "#/components/schemas/CallResult"
        callSegments:
          description: Filtering of calls by presence of specific segment (joined via OR)
          type: array
          items:
            $ref: "#/components/schemas/CallSegmentFilter"
        callActions:
          description: Filtering of calls by presence of specific action (joined via OR)
          type: array
          items:
            $ref: "#/components/schemas/CallAction"
        companyHours:
          description: Filtering of calls by company's business hours or after hours (joined via OR)
          type: array
          items:
            $ref: "#/components/schemas/CompanyHoursOptions"
        callDuration:
          $ref: "#/components/schemas/CallDurationFilter"
        timeSpent:
          $ref: "#/components/schemas/TimeSpentFilter"
        queueSla:
          description: Filtering calls that were within or out of queue SLA (joined via OR). Only applicable to Queues grouping
          type: array
          items:
            $ref: "#/components/schemas/QueueSlaOptions"
        callTypes:
          description: Filtering of calls based on how the call started from the callee perspective (joined via OR). If the call is outbound relative to the grouping scope, CallType is Outbound
          type: array
          items:
            $ref: "#/components/schemas/CallType"
        endingParties:
          description: Filtering of calls based on the party that ended that call (joined via OR)
          type: array
          items:
            $ref: "#/components/schemas/EndingParty"
        queueHours:
          description: Filtering of calls by queue's business hours or after hours (joined via OR). Only applicable to Queues grouping
          type: array
          items:
            $ref: "#/components/schemas/QueueHoursOptions"
    CallsByEndingParty:
      title: CallsByEndingParty
      type: object
      required:
        - valueType
        - values
      properties:
        valueType:
          $ref: "#/components/schemas/ValueType"
        values:
          $ref: "#/components/schemas/CallsByEndingPartyBreakdown"
    AggregationResponseOptions:
      title: AggregationResponseOptions
      description: This field provides mapping of possible breakdown options for call aggregation and aggregation formula
      type: object
      properties:
        counters:
          $ref: "#/components/schemas/AggregationResponseOptionsCounters"
        timers:
          $ref: "#/components/schemas/AggregationResponseOptionsTimers"
    CallsByDirectionBreakdown:
      title: CallsByDirectionBreakdown
      description: Result breakdown by direction
      type: object
      required:
        - inbound
        - outbound
      properties:
        inbound:
          description: Value for Inbound direction
          type: number
          format: double
        outbound:
          description: Value for Outbound direction
          type: number
          format: double
    AggregationRequest:
      title: AggregationRequest
      type: object
      required:
        - grouping
        - timeSettings
        - responseOptions
      properties:
        grouping:
          $ref: "#/components/schemas/Grouping"
        timeSettings:
          $ref: "#/components/schemas/TimeSettings"
        callFilters:
          $ref: "#/components/schemas/CallFilters"
        responseOptions:
          $ref: "#/components/schemas/AggregationResponseOptions"
    CallSegmentLengthFilter:
      title: CallSegmentLengthFilter
      description: Duration bounds for the segment
      type: object
      properties:
        minSeconds:
          description: Minimum duration of segment in seconds
          type: integer
          format: int64
        maxSeconds:
          description: Maximum duration of segment in seconds
          type: integer
          format: int64
    CallsByQueueSla:
      title: CallsByQueueSla
      description: Data for calls with breakdown by queue SLA (InSLA, OutSLA). This counter is only applicable to Queues grouping
      type: object
      required:
        - valueType
        - values
      properties:
        valueType:
          $ref: "#/components/schemas/ValueType"
        values:
          $ref: "#/components/schemas/CallsByQueueSlaBreakdown"
    HoursInterval:
      title: HoursInterval
      type: object
      required:
        - from
        - to
      properties:
        from:
          description: Time in format hh:mm
          type: string
        to:
          description: Time in format hh:mm
          type: string
    AggregationResponseData:
      title: AggregationResponseData
      description: Aggregation result
      type: object
      required:
        - groupedBy
      properties:
        groupedBy:
          $ref: "#/components/schemas/GroupingOptions"
        records:
          description: A list of call aggregations as per the grouping and filtering options specified in the request
          type: array
          items:
            $ref: "#/components/schemas/AggregationResponseRecord"
    ResponsePaging:
      title: ResponsePaging
      description: Paging information
      type: object
      required:
        - page
        - perPage
        - totalPages
        - totalElements
      properties:
        page:
          description: The current page number
          type: integer
          format: int64
        perPage:
          description: How many items are displayed on the page
          type: integer
          format: int64
        totalPages:
          description: The total number of pages
          type: integer
          format: int64
        totalElements:
          description: The total number of items in the dataset
          type: integer
          format: int64
    CallAction:
      title: CallAction
      type: string
      enum:
        - HoldOff
        - HoldOn
        - ParkOn
        - ParkOff
        - BlindTransfer
        - WarmTransfer
        - DTMFTransfer
    CallsByActionsBreakdown:
      title: CallsByActionsBreakdown
      description: Result breakdown by actions
      type: object
      required:
        - parkOn
        - parkOff
        - holdOn
        - holdOff
        - blindTransfer
        - warmTransfer
        - dtmfTransfer
      properties:
        parkOn:
          description: Value for ParkOn action
          type: number
          format: double
        parkOff:
          description: Value for ParkOff action
          type: number
          format: double
        holdOn:
          description: Value for HoldOn action
          type: number
          format: double
        holdOff:
          description: Value for HoldOff action
          type: number
          format: double
        blindTransfer:
          description: Value for BlindTransfer action
          type: number
          format: double
        warmTransfer:
          description: Value for WarmTransfer action
          type: number
          format: double
        dtmfTransfer:
          description: Value for DTMFTransfer action
          type: number
          format: double
    QueueHoursOptions:
      title: QueueHoursOptions
      type: string
      enum:
        - BusinessHours
        - AfterHours
    ExtensionFilters:
      title: ExtensionFilters
      description: Specifies filtering based on extension ids
      type: object
      properties:
        fromIds:
          description: List of extension ids to match against incoming calls, joined via OR condition. Only applicable for `groupByMembers` options and Users, IVRs, SharedLines and Queues in `groupBy`
          type: array
          items:
            type: string
        toIds:
          description: List of extension ids to match against outgoing calls, joined via OR condition. Limited to the extension id that first accepted the call. Only applicable for `groupByMembers` options and Users, IVRs and SharedLines in `groupBy`
          type: array
          items:
            type: string
    CallsByResponseBreakdown:
      title: CallsByResponseBreakdown
      description: Result breakdown by response
      type: object
      required:
        - answered
        - notAnswered
        - connected
        - notConnected
      properties:
        answered:
          description: Value for Answered response
          type: number
          format: double
        notAnswered:
          description: Value for NotAnswered response
          type: number
          format: double
        connected:
          description: Value for Connected response
          type: number
          format: double
        notConnected:
          description: Value for NotConnected response
          type: number
          format: double
    CallSegmentOptions:
      title: CallSegmentOptions
      description: Call segment for filtering
      type: string
      enum:
        - Ringing
        - LiveTalk
        - Hold
        - Park
        - Transfer
        - IvrPrompt
        - Voicemail
        - VmGreeting
        - Setup
        - Forwarding
    CallSegmentFilter:
      title: CallSegmentFilter
      type: object
      required:
        - segment
      properties:
        segment:
          $ref: "#/components/schemas/CallSegmentOptions"
        length:
          $ref: "#/components/schemas/CallSegmentLengthFilter"
    GroupingByMembers:
      title: GroupingByMembers
      description: This grouping allows to specify the `groupByMembers` option. The response data will be grouped by users and will only include users that belong to the scope selected in `groupByMembers` field
      type: object
      required:
        - groupByMembers
      properties:
        groupByMembers:
          $ref: "#/components/schemas/MembersGroupingOptions"
        keys:
          description: This field can be used to further limit the users selection by specifying unique identifiers of corresponding entities. For example, providing unique queue ids along with `Queue` in `groupByMembers` field will limit the response to users that are queue agents in at least one of these queues
          type: array
          items:
            type: string
    MembersGroupingOptions:
      title: MembersGroupingOptions
      description: The selected data scope
      type: string
      enum:
        - Department
        - UserGroup
        - Queue
        - Site
    CallsByResultBreakdown:
      title: CallsByResultBreakdown
      description: Result breakdown by call result
      type: object
      required:
        - completed
        - abandoned
        - voicemail
        - missed
        - accepted
        - unknown
        - transferred
        - pickedUp
        - answeredElsewhere
        - forwarded
      properties:
        completed:
          description: Value for Completed result
          type: number
          format: double
        abandoned:
          description: Value for Abandoned result
          type: number
          format: double
        voicemail:
          description: Value for Voicemail result
          type: number
          format: double
        missed:
          description: Value for Missed result
          type: number
          format: double
        accepted:
          description: Value for Accepted result
          type: number
          format: double
        unknown:
          description: Value for Unknown result
          type: number
          format: double
        transferred:
          description: Value for Transferred result
          type: number
          format: double
        pickedUp:
          description: Value for PickedUp result
          type: number
          format: double
        answeredElsewhere:
          description: Value for AnsweredElsewhere result
          type: number
          format: double
        forwarded:
          description: Value for Forwarded result
          type: number
          format: double
    CallsByCompanyHours:
      title: CallsByCompanyHours
      description: Data for calls with breakdown by company hours (BusinessHours, AfterHours)
      type: object
      required:
        - valueType
        - values
      properties:
        valueType:
          $ref: "#/components/schemas/ValueType"
        values:
          $ref: "#/components/schemas/CallsByCompanyHoursBreakdown"
    CallsByCompanyHoursBreakdown:
      title: CallsByCompanyHoursBreakdown
      description: Result breakdown by company hours
      type: object
      required:
        - businessHours
        - afterHours
      properties:
        businessHours:
          description: Value for BusinessHours company hours
          type: number
          format: double
        afterHours:
          description: Value for AfterHours company hours
          type: number
          format: double
    CallDurationFilter:
      title: CallDurationFilter
      description: Filtering of calls based on the overall call length
      type: object
      properties:
        minSeconds:
          description: Minimum duration of call in seconds
          type: integer
          format: int64
        maxSeconds:
          description: Maximum duration of call in seconds
          type: integer
          format: int64
    CallsByQueueSlaBreakdown:
      title: CallsByQueueSlaBreakdown
      description: Result breakdown by queue SLA
      type: object
      required:
        - inSla
        - outOfSla
      properties:
        inSla:
          description: Value for InSla queue SLA
          type: number
          format: double
        outOfSla:
          description: Value for OutSla queue SLA
          type: number
          format: double
    CallsBySegments:
      title: CallsBySegments
      description: Data for calls with breakdown by segments (Ringing, LiveTalk, Hold, Park, Transfer, IvrPrompt, Voicemail, VmGreeting, Setup)
      type: object
      required:
        - valueType
        - values
      properties:
        valueType:
          $ref: "#/components/schemas/ValueType"
        values:
          $ref: "#/components/schemas/CallsBySegmentsBreakdown"
    CallsByTypeBreakdown:
      title: CallsByTypeBreakdown
      description: Result breakdown by type
      type: object
      required:
        - direct
        - fromQueue
        - parkRetrieval
        - transferred
        - outbound
        - overflow
        - queueCallPickup
      properties:
        direct:
          description: Value for Direct type
          type: number
          format: double
        fromQueue:
          description: Value for FromQueue type
          type: number
          format: double
        parkRetrieval:
          description: Value for ParkRetrieval type
          type: number
          format: double
        transferred:
          description: Value for Transferred type
          type: number
          format: double
        outbound:
          description: Value for Outbound type
          type: number
          format: double
        overflow:
          description: Value for Overflow type
          type: number
          format: double
        queueCallPickup:
          description: Value for QueueCallPickup type
          type: number
          format: double
    CallsByType:
      title: CallsByType
      description: Data for calls with breakdown by type (Direct, FromQueue, ParkRetrieval, Transferred, Outbound, Overflow)
      type: object
      required:
        - valueType
        - values
      properties:
        valueType:
          $ref: "#/components/schemas/ValueType"
        values:
          $ref: "#/components/schemas/CallsByTypeBreakdown"
    CallsBySegmentsBreakdown:
      title: CallsBySegmentsBreakdown
      description: Result breakdown by segments
      type: object
      required:
        - ringing
        - liveTalk
        - hold
        - park
        - transfer
        - ivrPrompt
        - voicemail
        - vmGreeting
        - setup
        - forwarding
      properties:
        ringing:
          description: Value for Ringing segment
          type: number
          format: double
        liveTalk:
          description: Value for LiveTalk segment
          type: number
          format: double
        hold:
          description: Value for Hold segment
          type: number
          format: double
        park:
          description: Value for Park segment
          type: number
          format: double
        transfer:
          description: Value for Transfer segment
          type: number
          format: double
        ivrPrompt:
          description: Value for IVRPrompt segment
          type: number
          format: double
        voicemail:
          description: Value for Voicemail segment
          type: number
          format: double
        vmGreeting:
          description: Value for VMGreeting segment
          type: number
          format: double
        setup:
          description: Value for Setup segment
          type: number
          format: double
        forwarding:
          description: Value for Forwarding segment
          type: number
          format: double
    AggregationResponseRecord:
      title: AggregationResponseRecord
      type: object
      required:
        - key
      properties:
        key:
          description: Grouping key
          type: string
        info:
          $ref: "#/components/schemas/KeyInfo"
        timers:
          $ref: "#/components/schemas/CallsTimers"
        counters:
          $ref: "#/components/schemas/CallsCounters"
    KeyInfo:
      title: KeyInfo
      description: Additional info about the key
      type: object
      properties:
        extensionNumber:
          description: Extension's number
          type: string
        name:
          description: Extension's name
          type: string
    CallsTimers:
      title: CallsTimers
      description: Call length data for the specified grouping
      type: object
      properties:
        allCalls:
          $ref: "#/components/schemas/AllCalls"
        callsByDirection:
          $ref: "#/components/schemas/CallsByDirection"
        callsByOrigin:
          $ref: "#/components/schemas/CallsByOrigin"
        callsByResponse:
          $ref: "#/components/schemas/CallsByResponse"
        callsSegments:
          $ref: "#/components/schemas/CallsBySegments"
        callsByResult:
          $ref: "#/components/schemas/CallsByResult"
        callsByEndingParty:
          $ref: "#/components/schemas/CallsByEndingParty"
        callsByCompanyHours:
          $ref: "#/components/schemas/CallsByCompanyHours"
        callsByQueueSla:
          $ref: "#/components/schemas/CallsByQueueSla"
        callsByType:
          $ref: "#/components/schemas/CallsByType"
        callsByQueueHours:
          $ref: "#/components/schemas/CallsByQueueHours"
    TimeRange:
      title: TimeRange
      description: Time range for the request
      type: object
      required:
        - timeFrom
        - timeTo
      properties:
        timeFrom:
          description: The start date-time for resulting records in RFC 3339 format including offset between local time and UTC, for example 2016-03-15T18:07:52.534Z
          type: string
          format: date-time
        timeTo:
          description: The end date-time for resulting records in RFC 3339 format including offset between local time and UTC, for example 2016-03-15T18:07:52.534Z
          type: string
          format: date-time
    TimelineResponsePoint:
      title: TimelineResponsePoint
      type: object
      required:
        - time
      properties:
        time:
          description: Time point in RFC 3339 format
          type: string
          format: date-time
        timers:
          $ref: "#/components/schemas/CallsTimers"
        counters:
          $ref: "#/components/schemas/CallsCounters"
    TimelineResponse:
      title: TimelineResponse
      type: object
      required:
        - paging
        - data
      properties:
        paging:
          $ref: "#/components/schemas/ResponsePaging"
        data:
          $ref: "#/components/schemas/TimelineResponseData"
    Interval:
      title: Interval
      type: string
      enum:
        - Hour
        - Day
        - Week
        - Month
    TimelineResponseOptions:
      title: TimelineResponseOptions
      description: Counters and timers options for calls breakdown
      type: object
      properties:
        counters:
          $ref: "#/components/schemas/TimelineResponseOptionsCounters"
        timers:
          $ref: "#/components/schemas/TimelineResponseOptionsTimers"
    TimelineResponseOptionsTimers:
      title: TimelineResponseOptionsTimers
      description: Options for selecting breakdown for calls duration
      type: object
      properties:
        allCallsDuration:
          description: Include data for all calls duration
          type: boolean
        callsDurationByDirection:
          description: Include breakdown of calls duration by direction (Inbound, Outbound)
          type: boolean
        callsDurationByOrigin:
          description: Include breakdown of calls duration by origin (Internal, External)
          type: boolean
        callsDurationByResponse:
          description: Include breakdown of calls duration by response (Answered, NotAnswered, Connected, NotConnected)
          type: boolean
        callsSegmentsDuration:
          description: Include breakdown of calls duration by segments (Ringing, LiveTalk, Hold, Park, Transfer, IvrPrompt, Voicemail, VmGreeting, Setup)
          type: boolean
        callsDurationByResult:
          description: Include breakdown of calls duration by result (Completed, Abandoned, Voicemail, Unknown, Missed, Accepted)
          type: boolean
        callsDurationByEndingParty:
          description: Include breakdown of calls duration by party that ended the call (Caller, Callee, System)
          type: boolean
        callsDurationByCompanyHours:
          description: Include breakdown of calls duration by company hours (BusinessHours, AfterHours)
          type: boolean
        callsDurationByQueueSla:
          description: Include breakdown of calls duration by queue SLA (InSLA, OutSLA). This timer is only applicable to Queues grouping
          type: boolean
        callsDurationByType:
          description: Include breakdown of calls duration by type (Direct, FromQueue, ParkRetrieval, Transferred, Outbound)
          type: boolean
        callsDurationByQueueHours:
          description: Include breakdown of calls duration by queue hours (BusinessHours, AfterHours)
          type: boolean
    TimelineResponseRecord:
      title: TimelineResponseRecord
      type: object
      required:
        - key
      properties:
        key:
          description: Grouping key
          type: string
        info:
          $ref: "#/components/schemas/KeyInfo"
        points:
          description: List of requested call data time-value points
          type: array
          items:
            $ref: "#/components/schemas/TimelineResponsePoint"
    TimelineResponseOptionsCounters:
      title: TimelineResponseOptionsCounters
      description: Options for selecting breakdown for calls count
      type: object
      properties:
        allCalls:
          description: Include data for total calls count
          type: boolean
        callsByDirection:
          description: Include breakdown of calls count by direction (Inbound, Outbound)
          type: boolean
        callsByOrigin:
          description: Include breakdown of calls count by origin (Internal, External)
          type: boolean
        callsByResponse:
          description: Include breakdown of calls count by response (Answered, NotAnswered, Connected, NotConnected)
          type: boolean
        callsSegments:
          description: Include breakdown of calls count by segments (Ringing, LiveTalk, Hold, Park, Transfer, IvrPrompt, Voicemail, VmGreeting, Setup)
          type: boolean
        callsByResult:
          description: Include breakdown of calls count by result (Completed, Abandoned, Voicemail, Unknown, Missed, Accepted)
          type: boolean
        callsByEndingParty:
          description: Include breakdown of calls count by party that ended the call (Caller, Callee, System)
          type: boolean
        callsByCompanyHours:
          description: Include breakdown of calls count by company hours (BusinessHours, AfterHours)
          type: boolean
        callsByQueueSla:
          description: Include breakdown of calls count by queue SLA (InSLA, OutSLA). This counter is only applicable to Queues grouping
          type: boolean
        callsByActions:
          description: Include breakdown of calls count by action (HoldOff, HoldOn, ParkOn, ParkOff, BlindTransfer, WarmTransfer, DTMFTransfer)
          type: boolean
        callsByType:
          description: Include breakdown of calls count by type (Direct, FromQueue, ParkRetrieval, Transferred, Outbound)
          type: boolean
        queueOpportunities:
          description: "Include breakdown of calls count by the total number of times a Queue call was presented to the user. It is limited to `groupBy` Users and `groupByMembers` (Department, Queue, Site, UserGroup) grouping. Only the listed below options for call filters are applicable to `queueOpportunities` and provide meaningful results: `queues` (selected queue extension ids), `callResults` (Missed, Abandoned), `callResponses` (Answered, NotAnswered), `origins` (Internal, External)"
          type: boolean
        callsByQueueHours:
          description: Include breakdown of calls count by queue hours (BusinessHours, AfterHours)
          type: boolean
    TimelineRequest:
      title: TimelineRequest
      type: object
      required:
        - grouping
        - timeSettings
        - responseOptions
      properties:
        grouping:
          $ref: "#/components/schemas/Grouping"
        timeSettings:
          $ref: "#/components/schemas/TimeSettings"
        callFilters:
          $ref: "#/components/schemas/CallFilters"
        responseOptions:
          $ref: "#/components/schemas/TimelineResponseOptions"
    TimelineResponseData:
      title: TimelineResponseData
      description: A list of time-value points of call data as per the grouping and filtering options specified in the request
      type: object
      required:
        - groupedBy
      properties:
        groupedBy:
          $ref: "#/components/schemas/GroupingOptions"
        records:
          description: List of call data as per the grouping and filtering options specified in the request
          type: array
          items:
            $ref: "#/components/schemas/TimelineResponseRecord"
    TaskRecurrenceInfo:
      type: object
      description: Task information
      properties:
        schedule:
          type: string
          description: Recurrence settings of a task. None for non-periodic tasks
          default: None
          enum:
            - None
            - Daily
            - Weekdays
            - Weekly
            - Monthly
            - Yearly
        endingCondition:
          type: string
          description: Ending condition of a task
          default: None
          enum:
            - None
            - Count
            - Date
        endingAfter:
          maximum: 10
          minimum: 1
          type: integer
          format: int32
          description: Count of iterations of periodic tasks
        endingOn:
          type: string
          description: |
            End date of a periodic task in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)
            format, UTC time zone
          format: date-time
    TMUpdateTaskRequest:
      type: object
      properties:
        subject:
          type: string
          description: Task name/subject. Max allowed length is 250 characters.
        assignees:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                description: Internal identifier of an assignee
        completenessCondition:
          type: string
          enum:
            - Simple
            - AllAssignees
            - Percentage
        startDate:
          type: string
          description: Task start date in UTC time zone
          format: date-time
        dueDate:
          type: string
          description: Task due date/time in UTC time zone
          format: date-time
        color:
          type: string
          enum:
            - Black
            - Red
            - Orange
            - Yellow
            - Green
            - Blue
            - Purple
            - Magenta
        section:
          type: string
          description: Task section to group / search by. Max allowed length is 100 characters.
        description:
          type: string
          description: Task details. Max allowed length is 102400 characters (100kB)
        recurrence:
          $ref: "#/components/schemas/TaskRecurrenceInfo"
        attachments:
          type: array
          items:
            $ref: "#/components/schemas/TMAttachmentInfo"
    TMTaskList:
      type: object
      properties:
        records:
          type: array
          items:
            $ref: "#/components/schemas/TMTaskInfo"
        navigation:
          $ref: "#/components/schemas/TMNavigationInfo"
    TMAttachmentInfo:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of an attachment
        type:
          type: string
          description: Type of an attachment
          enum:
            - File
            - Note
            - Event
            - Card
    TMTaskInfo:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a task
        creationTime:
          type: string
          description: Task creation date/time in UTC time zone
          format: date-time
        lastModifiedTime:
          type: string
          description: Task the last modified time in UTC time zone
          format: date-time
        type:
          type: string
          description: Task type
          enum:
            - Task
        creator:
          type: object
          properties:
            id:
              type: string
              description: Internal identifier of a task creator
        chatIds:
          type: array
          description: Internal identifiers of the chats where the task is posted or shared
          items:
            type: string
        status:
          type: string
          description: Task execution status
          enum:
            - Pending
            - InProgress
            - Completed
        subject:
          type: string
          description: Task name/subject
        assignees:
          type: array
          description: Task name/subject
          items:
            type: object
            properties:
              id:
                type: string
                description: Internal identifier of an assignee
              status:
                type: string
                description: Task execution status by assignee
                enum:
                  - Pending
                  - Completed
        completenessCondition:
          type: string
          description: How the task completeness should be determined
          enum:
            - Simple
            - AllAssignees
            - Percentage
        completenessPercentage:
          maximum: 100
          minimum: 0
          type: integer
          format: int32
          description: Current completeness percentage of the task with the specified percentage completeness condition
        startDate:
          type: string
          description: Task start date
          format: date-time
        dueDate:
          type: string
          description: Task due date/time
          format: date-time
        color:
          type: string
          description: Font color of a post with the current task
          enum:
            - Black
            - Red
            - Orange
            - Yellow
            - Green
            - Blue
            - Purple
            - Magenta
        section:
          type: string
          description: Task section to group / search by
        description:
          type: string
          description: Task details
        recurrence:
          $ref: "#/components/schemas/TaskRecurrenceInfo"
        attachments:
          type: array
          items:
            $ref: "#/components/schemas/TaskAttachment"
    TaskAttachment:
      type: object
      properties:
        id:
          type: string
          description: File ID.
        type:
          type: string
          description: Possible value - File. Attachment type (currently, only File is possible)
          enum:
            - File
        name:
          type: string
          description: Name of the attached file (incl. extension name)
        contentUri:
          type: string
          format: uri
          description: URI
    TMNavigationInfo:
      type: object
      properties:
        prevPageToken:
          type: string
          description: Previous page token. To get previous page, user should pass one of returned token in next request and, in turn, required page will be returned with new tokens
        nextPageToken:
          type: string
          description: Next page token. To get next page, user should pass one of returned token in next request and, in turn, required page will be returned with new tokens
    TMCompleteTaskRequest:
      type: object
      properties:
        status:
          type: string
          description: Completeness status
          enum:
            - Incomplete
            - Complete
        assignees:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                description: Internal identifier of an assignee
        completenessPercentage:
          maximum: 100
          minimum: 0
          type: integer
          format: int32
    EventRecurrenceInfo:
      type: object
      properties:
        schedule:
          type: string
          description: |
            Event recurrence settings. For non-periodic events the value
            is `None`. Must be greater or equal to event duration: 1- Day/Weekday;
            7 - Week; 28 - Month; 365 - Year
          enum:
            - None
            - Day
            - Weekday
            - Week
            - Month
            - Year
        endingCondition:
          type: string
          description: Condition of ending an event
          enum:
            - None
            - Count
            - Date
        endingAfter:
          type: integer
          format: int32
          description: |
            Count of event iterations. For periodic events only. Value range is 1 - 10.
            Must be specified if `endingCondition` is `Count`
        endingOn:
          type: string
          description: |
            Iterations ending datetime for periodic events in
            [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format
          format: date-time
    TMEventInfo:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of an event
        creatorId:
          type: string
          description: Internal identifier of a person created an event
        title:
          type: string
          description: Event title
        startTime:
          type: string
          format: date-time
          description: Datetime of starting an event
        endTime:
          type: string
          format: date-time
          description: Datetime of ending an event
        allDay:
          type: boolean
          description: Indicates whether an event has some specific time slot or lasts for the whole day(s)
          default: false
        recurrence:
          $ref: "#/components/schemas/EventRecurrenceInfo"
        color:
          type: string
          description: Color of Event title (including its presentation in Calendar)
          default: Black
          enum:
            - Black
            - Red
            - Orange
            - Yellow
            - Green
            - Blue
            - Purple
            - Magenta
        location:
          type: string
          description: Event location
        description:
          type: string
          description: Event details
    TMEventList:
      type: object
      properties:
        records:
          type: array
          description: List of events created by the current user
          items:
            $ref: "#/components/schemas/TMEventInfo"
        navigation:
          $ref: "#/components/schemas/TMNavigationInfo"
    TMCreateEventRequest:
      required:
        - endTime
        - startTime
        - title
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of an event
        creatorId:
          type: string
          description: Internal identifier of a person created an event
        title:
          type: string
          description: Event title
        startTime:
          type: string
          format: date-time
          description: Datetime of starting an event
        endTime:
          type: string
          format: date-time
          description: Datetime of ending an event
        allDay:
          type: boolean
          description: Indicates whether event has some specific time slot or lasts for whole day(s)
          default: false
        recurrence:
          $ref: "#/components/schemas/EventRecurrenceInfo"
        color:
          type: string
          description: Color of Event title (including its presentation in Calendar)
          default: Black
          enum:
            - Black
            - Red
            - Orange
            - Yellow
            - Green
            - Blue
            - Purple
            - Magenta
        location:
          type: string
          description: Event location
        description:
          type: string
          description: Event details
    TMChatListWithoutNavigation:
      required:
        - records
      type: object
      properties:
        records:
          type: array
          description: List of chats
          items:
            $ref: "#/components/schemas/TMChatInfo"
    TMChatInfo:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a chat
        type:
          type: string
          description: Type of chat
          enum:
            - Everyone
            - Team
            - Group
            - Direct
            - Personal
        public:
          type: boolean
          description: For 'Team' chat type only. Team access level.
        name:
          type: string
          description: For 'Team','Everyone' chats types only. Chat name.
        description:
          type: string
          description: For 'Team','Everyone' chats types only. Chat description.
        status:
          type: string
          description: For 'Team' chat type only. Team status.
          enum:
            - Active
            - Archived
        creationTime:
          type: string
          description: Chat creation datetime in ISO 8601 format
          format: date-time
        lastModifiedTime:
          type: string
          description: Chat last change datetime in ISO 8601 format
          format: date-time
        members:
          type: array
          items:
            $ref: "#/components/schemas/TMChatMemberInfo"
    TMChatMemberInfo:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a user
    TMAddFile:
      required:
        - contentUri
        - id
      type: object
      description: File information
      properties:
        id:
          type: string
          description: Internal identifier of a file
        contentUri:
          type: string
          format: uri
          description: Link to a binary content
        name:
          type: string
          description: Name of a file
    TMAddFileResponse:
      type: array
      items:
        $ref: "#/components/schemas/TMAddFile"
    TMChatList:
      required:
        - records
      type: object
      properties:
        records:
          type: array
          description: List of chats
          items:
            $ref: "#/components/schemas/TMChatInfo"
        navigation:
          $ref: "#/components/schemas/TMNavigationInfo"
    TMCreateTaskRequest:
      required:
        - assignees
        - subject
      type: object
      properties:
        subject:
          type: string
          description: Task name/subject. Max allowed length is 250 characters
        assignees:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                description: Internal identifier of an assignee
        completenessCondition:
          type: string
          default: Simple
          enum:
            - Simple
            - AllAssignees
            - Percentage
        startDate:
          type: string
          description: Task start date in UTC time zone.
          format: date-time
        dueDate:
          type: string
          description: Task due date/time in UTC time zone.
          format: date-time
        color:
          type: string
          default: Black
          enum:
            - Black
            - Red
            - Orange
            - Yellow
            - Green
            - Blue
            - Purple
            - Magenta
        section:
          type: string
          description: Task section to group / search by. Max allowed length is 100 characters.
        description:
          type: string
          description: Task details. Max allowed length is 102400 characters (100kB).
        recurrence:
          $ref: "#/components/schemas/TaskRecurrenceInfo"
        attachments:
          type: array
          items:
            $ref: "#/components/schemas/TaskAttachment"
    TMMessageAttachmentInfo:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of an attachment
        type:
          type: string
          description: Type of an attachment
          default: Card
          enum:
            - Card
            - Event
            - File
            - Note
            - Task
        contentUri:
          type: string
          format: uri
          description: Link to a binary content
        name:
          type: string
          description: Name of a file
        fallback:
          type: string
          description: A string of default text that will be rendered in the case that the client does not support Interactive Messages
        intro:
          type: string
          description: A pretext to the message
        author:
          $ref: "#/components/schemas/TMAttachmentAuthorInfo"
        title:
          type: string
          description: Message title
        text:
          type: string
          description: A large string field (up to 1000 chars) to be displayed as the body of a message (Supports GlipDown)
        imageUri:
          type: string
          format: uri
          description: Link to an image displayed at the bottom of a message
        thumbnailUri:
          type: string
          format: uri
          description: Link to an image preview displayed to the right of a message (82x82)
        fields:
          type: array
          description: Information on navigation
          items:
            $ref: "#/components/schemas/TMAttachmentFieldsInfo"
        footnote:
          $ref: "#/components/schemas/TMAttachmentFootnoteInfo"
        creatorId:
          type: string
          description: Internal identifier of a person created an event
        startTime:
          type: string
          format: date-time
          description: Datetime of starting an event
        endTime:
          type: string
          format: date-time
          description: Datetime of ending an event
        allDay:
          type: boolean
          description: Indicates whether an event has some specific time slot or lasts for the whole day(s)
          default: false
        recurrence:
          $ref: "#/components/schemas/EventRecurrenceInfo"
        color:
          type: string
          description: Color of Event title, including its presentation in Calendar; or the color of the side border of an interactive message of a Card
          default: Black
          enum:
            - Black
            - Red
            - Orange
            - Yellow
            - Green
            - Blue
            - Purple
            - Magenta
        location:
          type: string
          description: Event location
        description:
          type: string
          description: Event details
    TMMentionsInfo:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a user
        type:
          type: string
          description: Type of mention
          enum:
            - Person
            - Team
            - File
            - Link
            - Event
            - Task
            - Note
            - Card
        name:
          type: string
          description: Name of a user
    TMAttachmentFieldsInfo:
      type: object
      properties:
        title:
          type: string
          description: Title of an individual field
        value:
          type: string
          description: Value of an individual field (supports Markdown)
        style:
          type: string
          description: Style of width span applied to a field
          default: Short
          enum:
            - Short
            - Long
    TMCreatePostRequest:
      type: object
      description: Post data. At least one attribute should be provided (text or attachments)
      properties:
        text:
          type: string
          description: Text of a post. Maximum length is 10000 symbols. Mentions can be added in .md format `![:Type](id)`
        parentPostId:
          type: string
          description: Internal identifier of a parent post, in case post is a part of a thread
        threadId:
          type: string
          description: Internal identifier of a thread, in case post is a part of a thread
        attachments:
          type: array
          description: Identifier(s) of attachments. Maximum number of attachments is 25
          items:
            $ref: "#/components/schemas/TMAttachmentInfo"
    TMPostInfo:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a post
        groupId:
          type: string
          description: Internal identifier of a group a post belongs to
        isParent:
          type: boolean
          description: Boolean flag indicating that current post is a parent post of a thread. Populated only for parent posts
        parentPostId:
          type: string
          description: Internal identifier of a parent post, in case post is a part of a thread
        threadId:
          type: string
          description: Internal identifier of a thread, in case post is a part of a thread
        type:
          type: string
          description: Type of post
          enum:
            - TextMessage
            - PersonJoined
            - PersonsAdded
        text:
          type: string
          description: For 'TextMessage' post type only. Text of a message
        creatorId:
          type: string
          description: Internal identifier of a user - author of a post
        addedPersonIds:
          type: array
          description: For 'PersonsAdded' post type only. Identifiers of persons added to a group
          items:
            type: string
        creationTime:
          type: string
          description: Post creation datetime in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format
          format: date-time
        lastModifiedTime:
          type: string
          description: Post last modification datetime in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format
          format: date-time
        attachments:
          type: array
          description: List of posted attachments
          items:
            $ref: "#/components/schemas/TMMessageAttachmentInfo"
        mentions:
          type: array
          items:
            $ref: "#/components/schemas/TMMentionsInfo"
        activity:
          type: string
          description: Label of activity type
        title:
          type: string
          description: Title of a message. (Can be set for bot's messages only)
        iconUri:
          type: string
          format: uri
          description: Link to an image used as an icon for this message
        iconEmoji:
          type: string
          description: Emoji used as an icon for this message
    TMAttachmentFootnoteInfo:
      type: object
      properties:
        text:
          type: string
          description: Text of a footer
        iconUri:
          type: string
          format: uri
          description: Link to an icon displayed to the left of a footer; sized 32x32px
        time:
          type: string
          description: Message creation datetime in ISO 8601 format including timezone
          format: date-time
          example: 2016-03-10T18:07:52.534Z
    TMPostsList:
      required:
        - records
      type: object
      properties:
        records:
          type: array
          description: List of posts
          items:
            $ref: "#/components/schemas/TMPostInfo"
        navigation:
          $ref: "#/components/schemas/TMNavigationInfo"
    TMAttachmentAuthorInfo:
      type: object
      properties:
        name:
          type: string
          description: Name of a message author
        uri:
          type: string
          format: uri
          description: Link to an author's name
        iconUri:
          type: string
          format: uri
          description: Link to an image displayed to the left of an author's name; sized 82x82px
    TMUpdatePostRequest:
      type: object
      properties:
        text:
          type: string
          description: Post text.
    AdaptiveCardInfoRequest:
      type: object
      properties:
        type:
          type: string
          enum:
            - Container
        items:
          type: array
          items:
            $ref: "#/components/schemas/AdaptiveCardInfoRequestItem"
    VerticalAlignment:
      description: Describes how the image should be aligned if it must be cropped or if using repeat fill mode
      anyOf:
        - type: string
          enum:
            - top
            - center
            - bottom
        - type: string
          pattern: ^([t|T][o|O][p|P])|([c|C][e|E][n|N][t|T][e|E][r|R])|([b|B][o|O][t|T][t|T][o|O][m|M])$
    AdaptiveCardSelectAction:
      type: object
      description: An action that will be invoked when the card is tapped or selected. `Action.ShowCard` is not supported
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - Action.Submit
            - Action.OpenUrl
            - Action.ToggleVisibility
    HorizontalAlignment:
      description: Describes how the image should be aligned if it must be cropped or if using repeat fill mode
      anyOf:
        - type: string
          enum:
            - left
            - center
            - right
        - type: string
          pattern: ^([l|L][e|E][f|F][t|T])|([c|C][e|E][n|N][t|T][e|E][r|R])|([r|R][i|I][g|G][h|H][t|T])$
    AdaptiveCardAction:
      type: object
      properties:
        type:
          type: string
          enum:
            - Action.ShowCard
            - Action.Submit
            - Action.OpenUrl
            - Action.ToggleVisibility
        title:
          type: string
        card:
          $ref: "#/components/schemas/ActionAdaptiveCardInfo"
        url:
          type: string
          format: uri
    ActionAdaptiveCardInfo:
      type: object
      properties:
        type:
          type: string
          enum:
            - AdaptiveCard
        body:
          type: array
          items:
            $ref: "#/components/schemas/ActionCardBody"
    ImageFillMode:
      description: Describes how the image should fill the area
      anyOf:
        - type: string
          enum:
            - cover
            - repeatHorizontally
            - repeatVertically
            - repeat
        - type: string
          pattern: ^([c|C][o|O][v|V][e|E][r|R])|([r|R][e|E][p|P][e|E][a|A][t|T][h|H][o|O][r|R][i|I][z|Z][o|O][n|N][t|T][a|A][l|L][l|L][y|Y])|([r|R][e|E][p|P][e|E][a|A][t|T][v|V][e|E][r|R][t|T][i|I][c|C][a|A][l|L][l|L][y|Y])|([r|R][e|E][p|P][e|E][a|A][t|T])$
    AdaptiveCardColumnInfo:
      type: object
      properties:
        type:
          type: string
        width:
          type: string
        items:
          type: array
          items:
            $ref: "#/components/schemas/AdaptiveCardColumnItemInfo"
    ActionCardBody:
      type: object
      properties:
        type:
          type: string
          enum:
            - Input.Text
        id:
          type: string
        isMultiline:
          type: boolean
          description: If set to `true`, allows multiple lines of input
          default: false
        placeholder:
          type: string
          description: Description of the input desired. Displayed when no text has been input
    BackgroundImage:
      type: object
      required:
        - url
      description: Specifies a background image oa a card. Acceptable formats are PNG, JPEG, and GIF
      properties:
        type:
          type: string
          enum:
            - BackgroundImage
          description: Must be `BackgroundImage`
        url:
          type: string
          format: uri
          description: The URL/data URL of an image to be used as a background of a card. Acceptable formats are PNG, JPEG, and GIF
        fillMode:
          $ref: "#/components/schemas/ImageFillMode"
        horizontalAlignment:
          $ref: "#/components/schemas/HorizontalAlignment"
        verticalAlignment:
          $ref: "#/components/schemas/VerticalAlignment"
    AdaptiveCardCreator:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a creator
    AdaptiveCardColumnItemInfo:
      type: object
      properties:
        type:
          type: string
        url:
          type: string
          format: uri
        size:
          type: string
        style:
          type: string
        wrap:
          type: boolean
        spacing:
          type: string
        text:
          type: string
        isSubtle:
          type: boolean
    AdaptiveCardRequest:
      type: object
      required:
        - type
        - version
      properties:
        type:
          type: string
          description: |
            Type of attachment. This field is mandatory and filled on server side -
            will be ignored if set in request body
          enum:
            - AdaptiveCard
        version:
          type: string
          default: "1.3"
          description: |
            Version. This field is mandatory and filled on server side -
            will be ignored if set in request body
        body:
          type: array
          description: List of adaptive cards with the detailed information
          items:
            $ref: "#/components/schemas/AdaptiveCardInfoRequest"
        actions:
          type: array
          items:
            $ref: "#/components/schemas/AdaptiveCardAction"
        selectAction:
          $ref: "#/components/schemas/AdaptiveCardSelectAction"
        fallbackText:
          type: string
        backgroundImage:
          description: Specifies the background image of a card
          oneOf:
            - type: string
            - $ref: "#/components/schemas/BackgroundImage"
        minHeight:
          type: string
          description: Specifies the minimum height of the card in pixels
          example: 50px
        speak:
          type: string
          description: Specifies what should be spoken for this entire card. This is simple text or SSML fragment
        lang:
          type: string
          description: The 2-letter ISO-639-1 language used in the card. Used to localize any date/time functions
          enum:
            - en
            - fr
            - es
        verticalContentAlignment:
          $ref: "#/components/schemas/VerticalContentAlignment"
    AdaptiveCardShortInfo:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of an adaptive card
        creationTime:
          type: string
          description: Adaptive Card creation datetime in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format
          format: date-time
        lastModifiedTime:
          type: string
          description: Post last modification datetime in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format
          format: date-time
        $schema:
          type: string
          description: Schema of an adaptive card
        type:
          type: string
          enum:
            - AdaptiveCard
        version:
          type: string
          description: Version of an adaptive card. Filled on server-side
        creator:
          $ref: "#/components/schemas/AdaptiveCardCreator"
        chatIds:
          type: array
          description: Chat IDs where an adaptive card is posted or shared.
          items:
            type: string
    VerticalContentAlignment:
      description: Defines how the content should be aligned vertically within the container. Only relevant for fixed-height cards, or cards with a `minHeight` specified
      anyOf:
        - type: string
          enum:
            - top
            - center
            - bottom
        - type: string
          pattern: ^([t|T][o|O][p|P])|([c|C][e|E][n|N][t|T][e|E][r|R])|([b|B][o|O][t|T][t|T][o|O][m|M])$
    AdaptiveCardInfoRequestItem:
      type: object
      properties:
        type:
          type: string
          enum:
            - TextBlock
            - ColumnSet
            - Column
            - FactSet
        text:
          type: string
        weight:
          type: string
        size:
          type: string
        columns:
          type: array
          items:
            $ref: "#/components/schemas/AdaptiveCardColumnInfo"
    TMCreatorInfo:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a user who created a note/task
      description: Note creator information
    TMNoteList:
      type: object
      properties:
        records:
          type: array
          items:
            $ref: "#/components/schemas/TMNoteInfo"
        navigation:
          $ref: "#/components/schemas/TMNavigationInfo"
    TMCreateNoteRequest:
      required:
        - title
      type: object
      properties:
        title:
          type: string
          description: Title of a note. Max allowed length is 250 characters
        body:
          type: string
          description: Contents of a note; HTML markup text. Max allowed length is 1048576 characters (1 Mb).
    TMNoteInfo:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a note
        title:
          type: string
          description: Title of a note
        chatIds:
          type: array
          description: Internal identifiers of the chat(s) where the note is posted or shared.
          items:
            type: string
        preview:
          type: string
          description: Preview of a note (first 150 characters of a body)
        creator:
          $ref: "#/components/schemas/TMCreatorInfo"
        lastModifiedBy:
          $ref: "#/components/schemas/LastModifiedByInfo"
        lockedBy:
          $ref: "#/components/schemas/LockedByInfo"
        status:
          type: string
          description: Note publishing status. Any note is created in 'Draft' status. After it is posted it becomes 'Active'
          enum:
            - Active
            - Draft
        creationTime:
          type: string
          format: date-time
          description: Creation time
        lastModifiedTime:
          type: string
          format: date-time
          description: Datetime of the note last update
        type:
          type: string
          enum:
            - Note
    LockedByInfo:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of the user editing the note
      description: Returned for the note being edited (locked) at the current moment. Information on the user editing the note
    LastModifiedByInfo:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of the user who last updated the note
      description: Note last modification information
    AdaptiveCardInfo:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of an adaptive card
        creationTime:
          type: string
          description: Adaptive Card creation datetime in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format
          format: date-time
        lastModifiedTime:
          type: string
          description: Post last modification datetime in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format
          format: date-time
        $schema:
          type: string
          format: uri
          description: Schema of an adaptive card
        type:
          type: string
          enum:
            - AdaptiveCard
        version:
          type: string
          description: Version of an adaptive card
        creator:
          $ref: "#/components/schemas/AdaptiveCardCreator"
        chatIds:
          type: array
          description: Chat IDs where an adaptive card is posted or shared.
          items:
            type: string
        body:
          type: array
          description: List of card elements to show in the primary card region
          items:
            $ref: "#/components/schemas/AdaptiveCardInfoRequest"
        actions:
          type: array
          items:
            $ref: "#/components/schemas/AdaptiveCardAction"
        selectAction:
          $ref: "#/components/schemas/AdaptiveCardSelectAction"
        fallbackText:
          type: string
          description: Text shown when the client doesn't support the version specified (may contain markdown)
        backgroundImage:
          oneOf:
            - $ref: "#/components/schemas/BackgroundImage"
            - type: string
          description: Specifies the background image of a card
        minHeight:
          type: string
          description: Specifies the minimum height of the card in pixels
          example: 50px
        speak:
          type: string
          description: Specifies what should be spoken for this entire card. This is simple text or SSML fragment
        lang:
          type: string
          description: The 2-letter ISO-639-1 language used in the card. Used to localize any date/time functions
          enum:
            - en
            - fr
            - es
        verticalContentAlignment:
          $ref: "#/components/schemas/VerticalContentAlignment"
    TMWebhookList:
      type: object
      properties:
        records:
          type: array
          items:
            $ref: "#/components/schemas/TMWebhookInfo"
    TMWebhookInfo:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a webhook
        creatorId:
          type: string
          description: Internal identifier of the user who created a webhook
        groupIds:
          type: array
          description: Internal identifiers of groups where a webhook has been created
          items:
            type: string
        creationTime:
          type: string
          description: Webhook creation time in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format
          format: date-time
        lastModifiedTime:
          type: string
          description: Webhook last update time in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format
          format: date-time
        uri:
          type: string
          format: uri
          description: Public link to send a webhook payload
        status:
          type: string
          description: Current status of a webhook
          enum:
            - Active
            - Suspended
            - Deleted
    TMCompanyInfo:
      required:
        - creationTime
        - id
        - lastModifiedTime
      type: object
      properties:
        id:
          description: Internal identifier of a company (RingCentral account ID)
          type: string
        name:
          type: string
          description: Name of a company
        domain:
          type: string
          description: Domain name of a company
        creationTime:
          type: string
          description: Datetime of creation in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)
          format: date-time
        lastModifiedTime:
          type: string
          description: Datetime of last modification in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)
          format: date-time
    TMPersonInfo:
      required:
        - id
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a user
        firstName:
          type: string
          description: First name of a user
        lastName:
          type: string
          description: Last name of a user
        email:
          type: string
          format: email
          description: Email of a user
        avatar:
          type: string
          description: Photo of a user
        companyId:
          type: string
          description: Internal identifier of a company
        creationTime:
          type: string
          description: Time of creation in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format
          format: date-time
        lastModifiedTime:
          type: string
          description: Time of the last modification in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format
          format: date-time
    TMConversationList:
      required:
        - records
      type: object
      properties:
        records:
          type: array
          description: List of conversations
          items:
            $ref: "#/components/schemas/TMConversationInfo"
        navigation:
          $ref: "#/components/schemas/TMNavigationInfo"
    TMConversationInfo:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a conversation
        type:
          type: string
          description: Type of conversation
          enum:
            - Direct
            - Personal
            - Group
        creationTime:
          type: string
          description: Conversation creation datetime in ISO 8601 format
          format: date-time
        lastModifiedTime:
          type: string
          description: Conversation last change datetime in ISO 8601 format
          format: date-time
        members:
          type: array
          items:
            $ref: "#/components/schemas/TMChatMemberInfo"
    CreateConversationRequest:
      required:
        - members
      type: object
      properties:
        members:
          type: array
          description: |
            Identifier(s) of chat member(s). The maximum supported number
            of IDs is 15. User's own ID is optional. If `members` section is omitted
            then "Personal" chat will be returned
          items:
            type: object
            properties:
              id:
                type: string
                description: Internal identifier of a person
              email:
                type: string
                format: email
                description: Email of a person
    GlipDataExportNavigationInfo:
      type: object
      properties:
        firstPage:
          $ref: "#/components/schemas/GlipDataExportNavigationInfoUri"
        nextPage:
          $ref: "#/components/schemas/GlipDataExportNavigationInfoUri"
        previousPage:
          $ref: "#/components/schemas/GlipDataExportNavigationInfoUri"
        lastPage:
          $ref: "#/components/schemas/GlipDataExportNavigationInfoUri"
    SpecificInfo:
      type: object
      properties:
        timeFrom:
          type: string
          format: date-time
          description: Starting time for data collection
        timeTo:
          type: string
          format: date-time
          description: Ending time for data collection
        contacts:
          type: array
          items:
            $ref: "#/components/schemas/DataExportTaskContactInfo"
        chatIds:
          type: array
          description: List of chats from which the data (posts, files, tasks, events, notes, etc.) will be collected
          items:
            type: string
      description: Information specified in request
    ExportTaskResultInfo:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a dataset
        uri:
          type: string
          format: uri
          description: Link for downloading a dataset
        size:
          type: integer
          format: int64
          description: Size of ta dataset in bytes
    GlipDataExportPagingInfo:
      type: object
      properties:
        page:
          type: integer
          format: int32
          description: The current page number. 1-indexed, so the first page is 1 by default. May be omitted if result is empty (because non-existent page was specified or perPage=0 was requested)
        perPage:
          type: integer
          format: int32
          description: Current page size, describes how many items are in each page. Default value is 100. Maximum value is 1000. If perPage value in the request is greater than 1000, the maximum value (1000) is applied
        pageStart:
          type: integer
          format: int32
          description: The zero-based number of the first element on the current page. Omitted if the page is omitted or result is empty
        pageEnd:
          type: integer
          format: int32
          description: The zero-based index of the last element on the current page. Omitted if the page is omitted or result is empty
        totalPages:
          type: integer
          format: int32
          description: The total number of pages in a dataset. May be omitted for some resources due to performance reasons
        totalElements:
          type: integer
          format: int32
          description: The total number of elements in a dataset. May be omitted for some resource due to performance reasons
    DataExportTaskList:
      type: object
      properties:
        tasks:
          type: array
          items:
            $ref: "#/components/schemas/DataExportTask"
        navigation:
          $ref: "#/components/schemas/GlipDataExportNavigationInfo"
        paging:
          $ref: "#/components/schemas/GlipDataExportPagingInfo"
    CreatorInfo:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a user
        firstName:
          type: string
          description: First name of a user
        lastName:
          type: string
          description: Last name of a user
      description: Task creator information
    GlipDataExportNavigationInfoUri:
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Canonical URI for the corresponding page of the list
    DataExportTask:
      type: object
      properties:
        uri:
          type: string
          description: Canonical URI of a task
        id:
          type: string
          description: Internal identifier of a task
        creationTime:
          type: string
          format: date-time
          description: Task creation timestamp
        lastModifiedTime:
          type: string
          format: date-time
          description: Task last modification timestamp
        status:
          type: string
          description: Task status
          enum:
            - Accepted
            - InProgress
            - Completed
            - Failed
            - Expired
        creator:
          $ref: "#/components/schemas/CreatorInfo"
        specific:
          $ref: "#/components/schemas/SpecificInfo"
        datasets:
          type: array
          description: Data collection archives. Returned by task ID
          items:
            $ref: "#/components/schemas/ExportTaskResultInfo"
    DataExportTaskContactInfo:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a contact
        email:
          type: string
          format: email
          description: Email address of a contact
      description: "List of users whose data is collected. The following data will be exported: posts, tasks, events, etc. posted by the user(s); posts addressing the user(s) via direct and @Mentions; tasks assigned to the listed user(s). The list of 10 users per request is supported."
    CreateDataExportTaskRequest:
      type: object
      properties:
        timeFrom:
          type: string
          format: date-time
          description: Starting time for data collection. The default value is `timeTo` minus 24 hours. Max allowed time frame between `timeFrom` and `timeTo` is 6 months
        timeTo:
          type: string
          format: date-time
          description: Ending time for data collection. The default value is current time. Max allowed time frame between `timeFrom` and `timeTo` is 6 months
        contacts:
          type: array
          description: "List of contacts which data is collected. The following data will be exported: posts, tasks, events, etc. posted by the user(s); posts addressing the user(s) via direct and @Mentions; tasks assigned to the listed user(s). The list of 30 users per request is supported."
          items:
            $ref: "#/components/schemas/DataExportTaskContactInfo"
        chatIds:
          type: array
          description: List of chats from which the data (posts, files, tasks, events, notes, etc.) will be collected. Maximum number of chats supported is 10
          items:
            type: string
    UpdateEveryoneTeamRequest:
      type: object
      properties:
        name:
          type: string
          description: Everyone chat name. Maximum number of characters supported is 250
        description:
          type: string
          description: Everyone chat description. Maximum number of characters supported is 1000
    EveryoneTeamInfo:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a chat
        type:
          type: string
          description: Type of chat
          enum:
            - Everyone
        name:
          type: string
          description: Chat name
        description:
          type: string
          description: Chat description
        creationTime:
          type: string
          description: Chat creation datetime in ISO 8601 format
          format: date-time
        lastModifiedTime:
          type: string
          description: Chat last change datetime in ISO 8601 format
          format: date-time
    TMCreateTeamRequest:
      required:
        - name
      type: object
      properties:
        public:
          type: boolean
          description: Team access level.
        name:
          type: string
          description: Team name.
        description:
          type: string
          description: Team description.
        members:
          type: array
          description: Identifier(s) of team members.
          items:
            type: object
            properties:
              id:
                type: string
                description: Internal identifier of a person
              email:
                type: string
                format: email
                description: Email of a person
    TMTeamList:
      required:
        - records
      type: object
      properties:
        records:
          type: array
          description: List of teams
          items:
            $ref: "#/components/schemas/TMTeamInfo"
        navigation:
          $ref: "#/components/schemas/TMNavigationInfo"
    TMTeamInfo:
      type: object
      properties:
        id:
          type: string
          description: Internal identifier of a team
        type:
          type: string
          description: Type of chat
          enum:
            - Team
        public:
          type: boolean
          description: Team access level
        name:
          type: string
          description: Team name
        description:
          type: string
          description: Team description
        status:
          type: string
          description: Team status
          enum:
            - Active
            - Archived
        creationTime:
          type: string
          description: Team creation datetime in ISO 8601 format
          format: date-time
        lastModifiedTime:
          type: string
          description: Team last change datetime in ISO 8601 format
          format: date-time
    TMUpdateTeamRequest:
      type: object
      properties:
        public:
          type: boolean
          description: Team access level
        name:
          type: string
          description: Team name. Maximum number of characters supported is 250
        description:
          type: string
          description: Team description. Maximum number of characters supported is 1000
    TMRemoveTeamMembersRequest:
      required:
        - members
      type: object
      properties:
        members:
          type: array
          description: Identifier(s) of chat members.
          items:
            type: object
            properties:
              id:
                type: string
                description: Internal identifier of a person
    TMAddTeamMembersRequest:
      required:
        - members
      type: object
      properties:
        members:
          type: array
          description: Identifier(s) of chat member(s)
          items:
            type: object
            properties:
              id:
                type: string
                description: Internal identifier of a person
              email:
                type: string
                format: email
                description: Email of a person
            description: Conversation is opened
    TMNoteWithBodyInfo:
      allOf:
        - $ref: "#/components/schemas/TMNoteInfo"
        - type: object
          properties:
            body:
              type: string
              description: Text of a note
  parameters:
    SubscriptionId:
      name: subscriptionId
      in: path
      description: Internal identifier of a subscription
      required: true
      schema:
        type: string
        minLength: 1
        maxLength: 20
      example: "12345678"
    RcwWebinarId:
      name: webinarId
      in: path
      description: Identifier of the Webinar.
      required: true
      style: simple
      explode: false
      schema:
        type: string
        minLength: 1
        maxLength: 20
      example: "98989898"
    RcwSessionId:
      name: sessionId
      in: path
      description: Identifier of the Session.
      required: true
      style: simple
      explode: false
      schema:
        type: string
        minLength: 1
        maxLength: 20
      example: "353535353"
    PageToken:
      name: pageToken
      in: query
      description: |
        The token indicating the particular page of the result set to be retrieved.
        If omitted the first page will be returned.
      required: false
      explode: false
      schema:
        type: string
    OriginalRole:
      name: originalRole
      in: query
      description: The original role of the invitee/participant.
      required: false
      style: form
      explode: true
      schema:
        type: array
        items:
          $ref: "#/components/schemas/RcwRoleEnum"
    PerPage:
      name: perPage
      in: query
      description: |
        The number of items per page. If the provided value in the request
        is greater than a maximum, the maximum value is applied
      required: false
      explode: false
      schema:
        type: integer
        format: int32
        minimum: 1
        maximum: 1000
        default: 100
      example: 100
    RcwRole:
      name: role
      in: query
      description: The role of the participant.
      required: false
      style: form
      explode: true
      schema:
        type: array
        items:
          $ref: "#/components/schemas/RcwRoleEnum"
    RcwInviteeId:
      name: inviteeId
      in: path
      description: Identifier of the Session Invitee.
      required: true
      style: simple
      explode: false
      schema:
        type: string
        minLength: 1
        maxLength: 20
      example: "77777777"
    HostUserId:
      name: hostUserId
      in: query
      description: Identifier of the user who hosts a webinar (if omitted, webinars hosted by all company users will be returned)
      required: false
      explode: false
      schema:
        type: array
        maxItems: 10
        minItems: 0
        items:
          type: string
          minLength: 1
          maxLength: 20
      example:
        - "77777777"
    CreationTimeTo:
      name: creationTimeTo
      in: query
      description: The end of the time window by 'creationTime' .
      required: true
      explode: false
      schema:
        type: string
        format: date-time
    RecordingStatus:
      name: status
      in: query
      description: The status of the recording.
      required: false
      style: form
      explode: true
      schema:
        type: array
        items:
          $ref: "#/components/schemas/RecordingStatusModel"
    CreationTimeFrom:
      name: creationTimeFrom
      in: query
      description: The beginning of the time window by 'creationTime' .
      required: true
      explode: false
      schema:
        type: string
        format: date-time
    RecordingId:
      name: recordingId
      in: path
      description: Identifier of the Webinar recording.
      required: true
      style: simple
      explode: false
      schema:
        type: string
      example: "7637637682"
    EndTimeFrom:
      name: endTimeFrom
      in: query
      description: The beginning of the time window by 'endTime' .
      required: true
      explode: false
      schema:
        type: string
        format: date-time
    EndTimeTo:
      name: endTimeTo
      in: query
      description: The end of the time window by 'endTime' .
      required: true
      explode: false
      schema:
        type: string
        format: date-time
    SessionStatus:
      name: status
      in: query
      description: Filter to return only webinar sessions in certain status. Multiple values are supported.
      required: false
      explode: true
      schema:
        type: array
        items:
          $ref: "#/components/schemas/RcwSessionStatusModel"
      example:
        - Active
        - Finished
    RecordingMediaType:
      schema:
        $ref: "#/components/schemas/RecordingMediaType"
      in: query
      name: recordingMediaType
      description: |
        Download file media type.
        - Type 'Video' refers to a multiplexed audio and video file.
        - Type 'Audio' refers to an audio only file.
        - Unless specified by this query parameter, a video file is returned by default when a recording is downloaded.
      required: false
    IncludeQuestionnaire:
      name: includeQuestionnaire
      in: query
      description: Indicates if registrant's "questionnaire" should be returned
      required: false
      explode: false
      schema:
        type: boolean
        default: false
    RegistrantId:
      name: registrantId
      in: path
      description: Identifier of the Session Registrant
      required: true
      style: simple
      explode: false
      schema:
        type: string
        minLength: 1
        maxLength: 20
      example: "77777777"
    WcsCreationTimeFrom:
      name: creationTimeFrom
      in: query
      description: The beginning of the time window by 'creationTime' .
      required: true
      explode: false
      schema:
        type: string
        format: date-time
    WcsEndTimeFrom:
      name: endTimeFrom
      in: query
      description: The beginning of the time window by 'endTime' (it is calculated as scheduledStartTime+scheduledDuration)
      required: true
      explode: false
      schema:
        type: string
        format: date-time
    ContentDisposition:
      name: contentDisposition
      in: query
      description: Whether the content is expected to be displayed in the browser, or downloaded and saved locally
      required: false
      schema:
        type: string
        enum:
          - Inline
          - Attachment
    ContentDispositionFilename:
      name: contentDispositionFilename
      in: query
      description: The default filename of the file to be downloaded
      required: false
      schema:
        type: string
    AccountId:
      name: accountId
      in: path
      description: |
        Internal identifier of the RingCentral account
        (can be set to "~" to indicate that the account associated with current authorization session should be used)
      required: true
      style: simple
      explode: false
      schema:
        type: string
        default: "~"
      example: "~"
    CallRecordingId:
      name: recordingId
      in: path
      description: Internal identifier of a call recording (returned in Call Log)
      required: true
      schema:
        type: string
        example: "625387632786"
    CallHandlingGreetingId:
      name: greetingId
      in: path
      description: Internal identifier of a greeting
      required: true
      schema:
        type: string
    ExtensionId:
      name: extensionId
      in: path
      description: |
        Internal identifier of the RingCentral extension/user
        (can be set to "~" to indicate that the extension associated with current authorization session should be used)
      required: true
      style: simple
      explode: false
      schema:
        type: string
        default: "~"
      example: "~"
    ProfileImageScale:
      name: scaleSize
      in: path
      description: |
        Dimensions of a profile image which will be returned in response.
      required: true
      schema:
        type: string
        enum:
          - original
          - 90x90
          - 195x195
          - 584x584
    MessageId:
      name: messageId
      in: path
      required: true
      style: simple
      explode: false
      description: Internal identifier of a message
      schema:
        type: string
        example: "43245367"
    MessageAttachmentId:
      name: attachmentId
      in: path
      description: Internal identifier of a message attachment
      required: true
      style: simple
      explode: false
      schema:
        type: string
        example: "9839074435"
    IvrPromptId:
      name: promptId
      in: path
      description: Internal identifier of an IVR prompt
      required: true
      schema:
        type: string
    RcvBridgePassword:
      name: pw
      in: query
      required: false
      schema:
        type: string
      description: Bridge hash password
    RcvBridgePin:
      name: pin
      in: path
      description: Bridge short identifier (Web PIN) or alias (personal meeting name)
      required: true
      schema:
        type: string
    RcvBridgeId:
      name: bridgeId
      in: path
      description: Bridge identifier
      required: true
      schema:
        type: string
    RcvPerPage:
      name: perPage
      in: query
      description: |
        The number of items per page. If provided value in the request
        is greater than a maximum, the maximum value is applied
      required: false
      schema:
        type: integer
        format: int32
    MeetingOrderBy:
      name: orderBy
      in: query
      description: |
        Comma-separated list of fields with optional sort direction. Use a '+' prefix for ascending order or '-' for descending order. E.g., orderBy=+startTime
      required: false
      schema:
        type: string
        default: -startTime
    MeetingStartTo:
      name: startTimeTo
      in: query
      description: |
        ISO 8601 datetime value used to filter meetings that represents the end of the range for `startTime`
      required: false
      schema:
        type: string
        format: date-time
    MeetingsPerPage:
      name: perPage
      in: query
      description: Number of meeting records requested
      required: false
      schema:
        type: integer
        format: int32
        default: 25
        minimum: 10
        maximum: 100
    MeetingStartFrom:
      name: startTimeFrom
      in: query
      description: |
        ISO 8601 datetime value used to filter meetings that represents the beginning of the range for `startTime`
      required: false
      schema:
        type: string
        format: date-time
    RcvMeetingId:
      name: meetingId
      in: path
      description: Meeting id
      required: true
      schema:
        type: string
    OauthBrandId:
      name: brand_id
      in: query
      required: false
      description: |
        RingCentral Brand identifier. If it is not provided in the request,
        server will try to determine brand from the client application profile.
      schema:
        type: string
        example: "1210"
    OauthClientId:
      name: client_id
      in: query
      required: true
      description: The registered identifier of a client application
      schema:
        type: string
        example: AZwEVwGEcfGet2PCouA7K6
    Page:
      name: page
      in: query
      description: The result set page number (1-indexed) to return
      required: false
      explode: false
      schema:
        type: integer
        format: int32
        minimum: 1
        maximum: 1000
        default: 1
      example: 1
    PhoneNumberId:
      name: phoneNumberId
      in: path
      required: true
      description: Internal identifier of a phone number
      schema:
        $ref: "#/components/schemas/PhoneNumberId"
      example: "1162820004"
    CommUpdateStateId:
      name: stateId
      description: Internal identifier of a state
      in: path
      required: true
      schema:
        type: string
        enum:
          - work-hours
          - forward-all-calls
          - agent
          - dnd
    CommStateId:
      name: stateId
      description: Internal identifier of a state
      in: path
      required: true
      schema:
        type: string
        enum:
          - after-hours
          - work-hours
          - dnd
          - forward-all-calls
          - agent
    CommDeviceId:
      name: deviceId
      in: path
      description: |
        Internal identifier of a device
      required: true
      style: simple
      explode: false
      schema:
        type: string
      example: "1234556"
    CommRuleId:
      name: ruleId
      description: Internal identifier of a rule
      in: path
      required: true
      schema:
        type: string
        example: "43214"
    DeviceId:
      name: deviceId
      in: path
      description: Internal identifier of a device
      required: true
      schema:
        type: string
    MessageThreadCreationTimeTo:
      name: creationTimeTo
      in: query
      description: |
        End date/time for resulting message threads or messages (depending on path resource)
        in [RFC-3339](https://datatracker.ietf.org/doc/html/rfc3339) format including timezone.
        This parameter is supported if `creationTimeFrom` is specified
      required: false
      schema:
        type: string
    MessageThreadStatusFilter:
      name: threadStatus
      in: query
      description: Thread status to filter the list of results
      required: false
      schema:
        $ref: "#/components/schemas/ThreadStatusEnum"
    ThreadOwnerExtensionIdsFilter:
      name: ownerExtensionIds
      in: query
      description: Thread owner extension IDs to filter the list of results
      required: false
      schema:
        description: Thread owner extension IDs
        type: array
        uniqueItems: true
        minItems: 1
        maxItems: 10
        items:
          type: string
    MessageThreadCreationTimeFrom:
      name: creationTimeFrom
      in: query
      description: |
        Start date/time for resulting message threads or messages (depending on path resource)
        in [RFC-3339](https://datatracker.ietf.org/doc/html/rfc3339) format including timezone.
        This parameter is supported if `creationTimeTo` is specified
      required: false
      schema:
        type: string
    MessageOrThreadAvailabilityFilter:
      name: availability
      in: query
      required: false
      description: |
        Availability filter (by default only `Alive` records are returned)
      schema:
        type: array
        uniqueItems: true
        minItems: 1
        items:
          $ref: "#/components/schemas/ThreadAvailabilityEnum"
        default:
          - Alive
    SyncToken:
      name: syncToken
      in: query
      description: Sync token (for "ISync" only)
      required: false
      schema:
        type: string
    SyncType:
      name: syncType
      in: query
      description: Type of message synchronization
      required: false
      schema:
        allOf:
          - $ref: "#/components/schemas/SyncTypeEnum"
          - default: FSync
    ThreadIdsFilter:
      name: threadIds
      in: query
      description: Thread ID(s) to filter messages
      required: false
      explode: true
      schema:
        type: array
        uniqueItems: true
        minItems: 0
        maxItems: 10
        items:
          type: string
    ThreadMessageIdsFilter:
      name: messageIds
      in: query
      description: Message IDs to filter the list of results
      required: false
      schema:
        type: array
        uniqueItems: true
        minItems: 1
        maxItems: 10
        items:
          type: string
    MessageThreadId:
      name: threadId
      in: path
      required: true
      description: Message thread ID
      schema:
        type: string
    FieldId:
      name: fieldId
      in: path
      description: Custom field identifier
      required: true
      schema:
        type: string
    TelephonySessionId:
      name: telephonySessionId
      in: path
      description: Internal identifier of a call session
      required: true
      schema:
        type: string
    TelephonySessionPartyId:
      name: partyId
      in: path
      description: Internal identifier of a call party
      required: true
      schema:
        type: string
    MessageTemplateId:
      name: templateId
      in: path
      description: Internal identifier of a text message template
      required: true
      schema:
        type: string
    CallLogExtensionNumber:
      name: extensionNumber
      in: query
      description: |
        Short extension number of a user. If specified, returns call log for this particular extension only.
        Cannot be combined with `phoneNumber` filter
      schema:
        type: string
      example: "101"
    CallDirection:
      name: direction
      in: query
      description: |
        The direction of call records to be included in the result. If omitted, both
        inbound and outbound calls are returned. Multiple values are supported
      style: form
      explode: true
      schema:
        type: array
        items:
          $ref: "#/components/schemas/CallDirectionEnum"
    CallMetadataCategory:
      name: metadataCategory
      in: query
      description: |
        Category of metadata to be returned. If omitted, all call records are returned.
        Multiple values are supported
      style: form
      explode: true
      schema:
        type: array
        minItems: 0
        items:
          type: string
    CallLogDateFrom:
      name: dateFrom
      in: query
      description: |
        The beginning of the time range to return call records in ISO 8601 format including timezone,
        for example 2016-03-10T18:07:52.534Z. The default value is `dateTo` minus 24 hours
      schema:
        type: string
        format: date-time
    CallLogSessionId:
      name: sessionId
      in: query
      description: Internal identifier of a call session
      schema:
        type: string
    CallLogView:
      name: view
      in: query
      description: |
        Defines the level of details for returned call records
      schema:
        type: string
        default: Simple
        enum:
          - Simple
          - Detailed
    PerPageWithMax:
      name: perPage
      in: query
      description: |
        The number of items per page. Accepts a positive integer (1–1000) or
        the special value `"max"` which returns up to 1000 records.
        If the provided integer value exceeds 1000, the maximum value of 1000 is applied.
      required: false
      explode: false
      schema:
        oneOf:
          - type: integer
            format: int32
            minimum: 1
            maximum: 1000
            default: 100
          - type: string
            enum:
              - max
      example: 100
    CallType:
      name: type
      in: query
      description: |
        The type of call records to be included in the result.
        If omitted, all call types are returned. Multiple values are supported
      style: form
      explode: true
      schema:
        type: array
        items:
          $ref: "#/components/schemas/CallTypeEnum"
    CallLogWithRecording:
      name: withRecording
      in: query
      deprecated: true
      description: |
        Deprecated, replaced with `recordingType` filter, still supported for compatibility reasons.
        Indicates if only recorded calls should be returned.

        If both `withRecording` and `recordingType` parameters are specified, then `withRecording` is ignored
      schema:
        type: boolean
        default: false
    CallLogDateTo:
      name: dateTo
      in: query
      description: |
        The end of the time range to return call records in ISO 8601 format including timezone,
        for example 2016-03-10T18:07:52.534Z. The default value is current time
      schema:
        type: string
        format: date-time
    CallRecordingType:
      name: recordingType
      in: query
      description: |
        Indicates that call records with recordings of particular type should be returned.
        If omitted, then calls with and without recordings are returned
      schema:
        type: string
        enum:
          - Automatic
          - OnDemand
          - All
    CallLogTelephonySessionId:
      name: telephonySessionId
      in: query
      description: Internal identifier of a telephony session
      schema:
        type: string
    CallLogPhoneNumber:
      name: phoneNumber
      in: query
      description: |
        Phone number of a caller/callee in e.164 format without a '+' sign. If specified, all incoming/outgoing calls
        from/to this phone number are returned.
      schema:
        type: string
      example: "12053320032"
    CallRecordId:
      name: callRecordId
      in: path
      description: |
        Internal identifier of a call log record. Multiple comma-separated values are supported
        (up to 50). For alternative bulk delete syntax, use asterisk `*` and pass IDs in the request body.
      required: true
      style: simple
      explode: false
      schema:
        type: array
        maxItems: 50
        items:
          type: string
          minLength: 1
    CallLogSyncType:
      name: syncType
      in: query
      description: Type of call log synchronization request - full or incremental sync
      schema:
        type: string
        enum:
          - FSync
          - ISync
        default: FSync
    CallLogStatusGroup:
      name: statusGroup
      in: query
      description: Type of calls to be returned
      style: form
      explode: true
      schema:
        type: array
        items:
          type: string
          enum:
            - Missed
            - All
    CallTransportType:
      name: transport
      in: query
      description: |
        The type of call transport. Multiple values are supported. By default, this filter is disabled
      style: form
      explode: true
      schema:
        type: array
        items:
          $ref: "#/components/schemas/CallTransportEnum"
    ConferenceCallType:
      name: conferenceType
      in: query
      description: |
        Conference call type: RCC or RC Meetings. If not specified, no conference call filter applied
      style: form
      explode: true
      schema:
        type: array
        items:
          type: string
          enum:
            - AudioConferencing
            - Meetings
    ExtensionIds:
      name: extensionIds
      in: query
      required: true
      schema:
        type: array
        minItems: 1
        maxItems: 25
        items:
          type: string
      style: form
      explode: true
      description: List of extension IDs to filter the list of Microsoft Teams Direct Routing users
    TcrBrandId:
      name: tcrBrandId
      description: Identifier of a TCR brand
      in: path
      required: true
      schema:
        type: integer
        format: int64
    TcrCampaignId:
      name: tcrCampaignId
      in: path
      description: Identifier of a TCR campaign
      required: true
      schema:
        type: integer
        format: int64
    SmsDirection:
      name: direction
      in: query
      required: false
      description: |
        Direction of a message to filter the message list result.
        By default, there is no filter applied - both Inbound and Outbound messages are returned
      schema:
        type: array
        items:
          $ref: "#/components/schemas/SmsDirectionEnum"
      example:
        - Inbound
    QueryBatchId:
      name: batchId
      in: query
      required: false
      description: Internal identifier of a message batch to filter the response
      example: "55577"
      schema:
        type: string
    SmsDateTo:
      name: dateTo
      in: query
      required: false
      description: |
        The end of the time range to filter the results in ISO 8601 format including timezone.
        Default is the current time
      schema:
        type: string
        format: date-time
      example: 2020-11-25T16:07:52.597Z
    SmsDateFrom:
      name: dateFrom
      in: query
      required: false
      description: |
        The beginning of the time range to filter the results in ISO 8601 format including timezone.
        Default is the `dateTo` minus 24 hours
      schema:
        type: string
        format: date-time
      example: 2020-11-09T16:07:52.597Z
    BatchId:
      name: batchId
      in: path
      required: true
      description: Internal identifier of a message batch to be retrieved
      example: "55577"
      schema:
        type: string
    CallHandlingRuleId:
      name: ruleId
      in: path
      description: Internal identifier of a call handling rule
      required: true
      schema:
        type: string
    SiteIdQuery:
      name: siteId
      in: query
      description: |
        Internal identifier of a site for filtering. To indicate company main
        site `main-site` value should be specified. Supported only if multi-site feature
        is enabled for the account. Multiple values are supported.
      style: form
      explode: true
      schema:
        type: array
        items:
          type: string
    EmergencyLocationId:
      name: locationId
      in: path
      description: Internal identifier of an emergency response location
      required: true
      schema:
        type: string
    IvrMenuId:
      name: ivrMenuId
      description: Internal identifier of an IVR menu
      in: path
      required: true
      schema:
        type: string
    PicTaskId:
      name: taskId
      in: path
      description: Internal identifier of a task
      required: true
      schema:
        type: string
      example: 400142200026-400142200026-bd162f24028442489385eb3f44c18354
    AccessibleSitesOnly:
      name: accessibleSitesOnly
      in: query
      required: false
      description: |
        Allows to make lookups across a whole directory skipping a filtering logic of Cross-Site access management feature.
      schema:
        type: boolean
        default: true
    IfNoneMatch:
      name: If-None-Match
      in: header
      required: false
      description: |
        User in GET requests to skip retrieving the data if the provided value matches current `ETag` associated with this resource.
        The server checks the current resource ETag and returns the data only if mismatches the `If-None-Match` value,
        otherwise `HTTP 304 Not Modified` status is returned.
      schema:
        type: string
    AdvancedPermissions:
      name: advancedPermissions
      required: false
      in: query
      description: |
        Specifies whether to return advanced permissions capabilities within `permissionsCapabilities` resource.
        The default value is false
      schema:
        type: boolean
        default: false
    DeviceFeature:
      name: feature
      in: query
      description: Device feature or multiple features supported
      required: false
      style: form
      explode: true
      schema:
        type: array
        items:
          $ref: "#/components/schemas/DeviceFeatureEnum"
    OwnerInfo:
      name: owner
      in: query
      description: |
        Filters shared messages based on the owner extension. 
        Supported if the 'SharedVoicemail' or 'CallQueueSmsRecipient' feature is enabled
      required: false
      schema:
        oneOf:
          - type: string
            default: Personal
            enum:
              - Any
              - Personal
              - Shared
          - type: array
            items:
              type: string
              description: Internal identifier of an extension
    CallLogShowBlocked:
      name: showBlocked
      in: query
      description: Indicates then calls from/to blocked numbers are returned
      schema:
        type: boolean
        default: true
    ForwardingNumberId:
      name: forwardingNumberId
      in: path
      description: Internal identifier of a forwarding number (returned in response in the 'id' field)
      required: true
      schema:
        type: string
    ContactId:
      name: contactId
      in: path
      description: |
        Internal identifier of a contact record in the RingCentral database
      required: true
      schema:
        type: integer
        format: int64
    ContactIds:
      name: contactId
      in: path
      description: The list of contact identifiers (comma-separated)
      required: true
      style: simple
      explode: false
      schema:
        type: array
        minItems: 1
        items:
          type: integer
          format: int64
    BlockedNumberId:
      name: blockedNumberId
      description: Internal identifier of a blocked number entry
      in: path
      required: true
      schema:
        type: string
    OrderByInfo:
      name: orderBy
      in: query
      description: |
        Comma-separated list of fields to order results prefixed by plus sign '+' (ascending order),
        or minus sign '-' (descending order).
        Supported values: 'name', 'modelName', 'siteName', 'featureEnabled'.
        The default sorting is by `name`
      style: form
      explode: false
      schema:
        type: array
        items:
          type: string
    JobId:
      name: jobId
      in: path
      description: The job id to which status will be fetched
      required: true
      style: simple
      explode: false
      schema:
        type: string
        format: uuid
    Webhook:
      name: webhook
      in: query
      description: The webhook URI to which the job response will be returned
      required: true
      style: form
      explode: true
      schema:
        type: string
        format: uri
    CallbackRequestId:
      name: RCRequestId
      deprecated: true
      in: header
      description: |
        Input RequestId corresponding to this response.\
        DEPRECATED. "jobId" body attribute should be used for tracking.
      required: true
      style: simple
      explode: false
      schema:
        type: string
    RecordingDomain:
      name: domain
      in: path
      description: |
        The product domain from which a particular recording was originated
      required: true
      schema:
        $ref: "#/components/schemas/RecordingDomain"
    RecordingInsightTypes:
      name: insightTypes
      in: query
      description: Specifies the types of insight objects to be returned in the response. If omitted, all insight types will be returned. Multiple values are supported
      required: false
      style: form
      explode: false
      schema:
        $ref: "#/components/schemas/AIInsightsTypes"
    SourceRecordId:
      name: sourceRecordId
      in: path
      required: true
      description: Recording ID of the domain
      schema:
        $ref: "#/components/schemas/SourceRecordId"
    SourceSessionId:
      name: sourceSessionId
      in: path
      required: true
      description: Session ID of the domain
      schema:
        $ref: "#/components/schemas/SourceSessionId"
    ScimUserId:
      name: scimUserId
      in: path
      description: User ID
      required: true
      schema:
        type: string
    ChatId:
      name: chatId
      in: path
      description: Internal identifier of a chat
      required: true
      schema:
        type: string
    PostId:
      name: postId
      in: path
      description: Internal identifier of a post
      required: true
      schema:
        type: string
    ThreadId:
      name: threadId
      in: path
      description: Identifier of a thread, in case post is a part of a thread
      required: true
      schema:
        type: string
  headers:
    ETag:
      description: |
        Entity tag associated with the returned version of the resource.
        Can be used with subsequent conditional requests to the same resource.
        See also: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag
      required: true
      schema:
        type: string
  examples:
    DeletePhoneNumbersRequest:
      value:
        records:
          - phoneNumber: "+18002024080"
          - phoneNumber: "+18332456789"
    DeletePhoneNumbersResponse:
      value:
        records:
          - bulkItemSuccessful: true
            id: "1162820004"
            phoneNumber: "+18002024080"
          - bulkItemSuccessful: false
            id: "1162820005"
            phoneNumber: "+18332456789"
            bulkItemErrors:
              - errorCode: CMN-1000
                message: Some error msg
    ListAccountPhoneNumbersResponse:
      value:
        records:
          - id: "1162821004"
            phoneNumber: "+18002024080"
            tollType: TollFree
            usageType: Inventory
            byocNumber: false
            status: Normal
          - id: "1162822004"
            phoneNumber: "+18332023665"
            tollType: Toll
            usageType: DirectNumber
            type: VoiceFax
            byocNumber: false
            hotDeskNumber: false
            status: Normal
            extension:
              id: "697477005"
              extensionNumber: "10022"
          - id: "1272824004"
            phoneNumber: "+18332023678"
            tollType: Toll
            usageType: MainCompanyNumber
            byocNumber: false
            type: VoiceOnly
            status: Normal
        paging:
          page: 1
          perPage: 1
          pageStart: 1
          pageEnd: 1
          totalPages: 1
          totalElements: 3
    AssignPhoneNumberRequest:
      value:
        usageType: DirectNumber
        extension:
          id: "20498230948"
        type: VoiceFax
    AssignPhoneNumberResponse:
      value:
        id: "1162822004"
        phoneNumber: "+18332023665"
        tollType: Toll
        usageType: DirectNumber
        type: VoiceFax
        status: Normal
        extension:
          id: "20498230948"
          extensionNumber: "10022"
    AddPhoneNumbersRequest:
      value:
        records:
          - phoneNumber: "+18002024080"
            usageType: Inventory
          - phoneNumber: "+16501234567"
            usageType: Inventory
            activationStatus: Active
          - phoneNumber: "+16501234568"
            usageType: Inventory
            activationStatus: Inactive
    AddPhoneNumbersResponse:
      value:
        records:
          - bulkItemSuccessful: true
            id: "1162820004"
            phoneNumber: "+18002024080"
          - bulkItemSuccessful: false
            phoneNumber: "+16501234567"
            bulkItemErrors:
              - errorCode: CMN-1000
                message: Some error msg
    RequestExample1:
      description: |-
        Parsing phone numbers with the default context.

        **Context to be used**:
        Context                       | Value |
         :--------------------------- | :-------:
        `brandId`                     |`null`
        `country`                     |`null`
        `defaultAreaCode`             |`null`
        `vanityPhoneNumbersAllowed`   |`false`
        `maxExtensionNumberLength`    |_5_
        `shortCodesAllowed`           |`false`
        `siteCode`                    |`null`
        `shortExtensionNumberLength`  |_3_
        `outboundCallPrefix`          |`null`
        `maskedPhoneNumbersAllowed`   |`false`
        `conflictHandling`            |`Default"
      value:
        originalStrings:
          - "+16505558275"
          - "*6716505558275*303@sip.ringcentral.com"
    RequestExample2:
      description: |-
        Parsing phone numbers with the server-side context and additionally overriding Brand context, Country context and the logic of conflicts resolving.

        **Context to be used**:
        Context                     |Value      |Note
         :--------------------------| :-------: | :--------------------------------------------
        `brandId`                   |`null`     |Brand from the context source is overridden with the explicitly set value `null`.
        `country`                   |`null`     |Country from the context source is overridden with the explicitly set value `null`.
        `defaultAreaCode`           |`null`     |
        `vanityPhoneNumbersAllowed` |`true`     |
        `maxExtensionNumberLength`  |`7`        |
        `shortCodesAllowed`         |`false`    |
        `siteCode`                  |`null`     |
        `shortExtensionNumberLength`|`3`        |
        `outboundCallPrefix`        |`null`     |
        `maskedPhoneNumbersAllowed` |`false`    |
        `conflictHandling`          |`Default`  | The logic of conflicts resolving from the context source is overridden with the explicitly set value `Default`.
      value:
        originalStrings:
          - "+16505558275"
          - "911"
        contextSource: Account
        context:
          brandId: null
          country: null
          conflictHandling: Default
    ResponseExample3Success:
      description: The feature "Smart Dial Plan Routing" is turned on, the ambiguity between extension and Australian PSTN number.
      value:
        context:
          brandId: "1210"
          country:
            isoCode: AU
            name: Australia
            callingCode: "61"
          defaultAreaCode: "2"
          vanityPhoneNumbersAllowed: true
          maxExtensionNumberLength: 6
          shortCodesAllowed: false
          maskedPhoneNumbersAllowed: false
          conflictHandling: Client
        results:
          - originalString: "137777"
            category: Ambiguous
            numberDetails:
              extensionNumber: "137777"
              country:
                isoCode: AU
                name: Australia
                callingCode: "61"
              nationalDestinationCode: "13"
              areaCode: "13"
              subscriberNumber: "7777"
              status: Valid
            formats:
              - category: Extension
                dialable: "137777"
                dialableExtended: "137777"
              - category: TollFree
                e164: "+61137777"
                e164Extended: "+61137777"
                national: 13 7777
                nationalExtended: 13 7777
                international: +61 (13) 7777
                internationalExtended: +61 (13) 7777
                dialable: "137777"
                dialableExtended: "137777"
    ResponseExampleCMN-151:
      description: |-
        Group of errors with the code: `CMN-151`, More than [parameterMaxItemCount] unique values
        for parameter [parameterName] should not be specified.

        Reasons: Specified more than _64_ values for `originalStrings` array.
      value:
        errors:
          - errorCode: CNM-151
            message: More than [64] unique values for parameter [originalStrings] should not be specified.
            parameterMaxItemCount: 64
            parameterName: originalStrings
    ResponseExample1Success:
      description: US phone number dialed via service code with followed extension number and SIP postfix.
      value:
        context:
          vanityPhoneNumbersAllowed: false
          maxExtensionNumberLength: 6
          shortCodesAllowed: false
          maskedPhoneNumbersAllowed: false
          conflictHandling: Default
        results:
          - originalString: "*6716505558275*303@sip.ringcentral.com"
            category: Regular
            dialingSpecifics:
              serviceCode:
                dialing: "*67"
                pattern: "*67"
            numberDetails:
              country:
                isoCode: US
                name: United States of America
                callingCode: "1"
              nationalDestinationCode: "650"
              areaCode: "650"
              regionalDestinationCode: "555"
              subscriberNumber: "8275"
              subAddress: "303"
              sipPostfix: "@sip.ringcentral.com"
              status: Valid
            formats:
              - e164: "+16505558275"
                e164Extended: +16505558275*303
                national: (650) 555-8275
                nationalExtended: (650) 555-8275 * 303
                international: +1 (650) 5558275
                internationalExtended: +1 (650) 5558275 * 303
                dialable: "*67*6505558275"
                dialableExtended: "*67*6505558275*303"
    ResponseExample2Success:
      description: Extension number.
      value:
        context:
          brandId: "1210"
          country:
            isoCode: US
            name: United States of America
            callingCode: "1"
          defaultAreaCode: "650"
          vanityPhoneNumbersAllowed: true
          maxExtensionNumberLength: 6
          shortCodesAllowed: false
          outboundCallPrefix: "9"
          maskedPhoneNumbersAllowed: false
          conflictHandling: Default
        results:
          - originalString: "303"
            category: Extension
            numberDetails:
              extensionNumber: "303"
            formats:
              - dialable: "303"
                dialableExtended: "303"
    ResponseExampleCMN-411:
      description: |-
        Group of errors with the code: `CMN-411`, The parameter [parameterName] has to be in the range: [parameterRange].

        Reasons: one of body parameters has invalid value:
        - `maxExtensionNumberLength` is not `null` and out of range _1-9_;
        - `shortExtensionNumberLength` is not `null` and out of range _1-8_;
        - `outboundCallPrefix` is not `null` and out of range _2-9_.
      value:
        errors:
          - errorCode: CNM-411
            message: "The parameter [maxExtensionNumberLength] has to be in the range: [1-10]."
            parameterName: maxExtensionNumberLength
            parameterRange: 1-9
    ResponseExampleCMN-409:
      description: |-
        Group of errors with the code: `CMN-409`, The parameter [parameterName] cannot be longer than
        [parameterValueLength] characters.

        Reasons: one of body parameters has invalid value:

        - `originalString` length is longer than _64_ characters;
        - `brandId` length is longer than _4_ characters;
        - `defaultAreaCode` length is longer than _6_ characters;
        - `siteCode` length is longer than _8_ characters.
      value:
        errors:
          - errorCode: CNM-409
            message: The parameter [originalStrings.originalString] cannot be longer than [64] characters.
            parameterName: originalStrings.originalString
            parameterValueLength: 64
    ResponseExampleCMN-101:
      description: |-
        Group of errors with the code: `CMN-101`, Parameter [parameterName] value is invalid.

        Reasons: one of body parameters has invalid value:

        - `contextSource` is not one of the possible enum value;
        - `brandId` is an empty string or not `null` and contains not only digits;
        - `isoCode` is an empty string or not `null` and not of the existing ones;
        - `defaultAreaCode` is an empty string or not null and contains not only digits;
        - `vanityPhoneNumbersAllowed` is not one of the possible boolean value;
        - `maxExtensionNumberLength` is not `null` and not an integer value;
        - `shortCodesAllowed` is not one of the possible boolean value;
        - `siteCode` is an empty string or not `null` and contains not only digits;
        - `shortExtensionNumberLength` is not an integer value;
        - `outboundCallPrefix` is an empty string or not `null` and contains not only digits;
        - `maskedPhoneNumbersAllowed` is not one of the possible boolean value;
        - `conflictHandling` is not one of the possible enum value;
        - `includeDialingDetails` is not one of the possible boolean value;
        - `includeNumberDetails` is not one of the possible boolean value;
        - `includeFormats` is not one of the possible boolean value.
      value:
        errors:
          - errorCode: CNM-101
            message: Parameter [contextSource] value is invalid.
            parameterName: contextSource
    ResponseExampleCMN-100:
      description: |-
        Group of errors with the code: `CMN-100`, Mandatory parameter [parameterName] not specified.

        Reasons: One of body mandatory parameters is not specified:

        - `originalString`, e.g. the request body is empty or `originalStrings` array is empty or `null`.
      value:
        errors:
          - errorCode: CNM-100
            message: Mandatory parameter [originalStrings.originalString] not specified.
            parameterName: originalStrings.originalString
    ResponseExampleNPC-001:
      value:
        errors:
          - errorCode: NPC-001
            message: Service temporary unavailable.
    ResponseExampleNPC-000:
      value:
        errors:
          - errorCode: NPC-000
            message: Service internal error. Consult RC support.
    ResponseExampleCMN-103:
      description: |-
        Group of errors with the code: `CMN-103`, JSON can't be parsed.

        Reasons: request body's json can't be parsed.
      value:
        errors:
          - errorCode: CMN-103
            message: JSON can't be parsed.
    CreateSubscriptionRequestWebhook:
      summary: Webhook
      value:
        eventFilters:
          - /restapi/v1.0/account/~/extension/~/presence
          - /restapi/v1.0/account/~/extension/~/message-store
        deliveryMode:
          transportType: WebHook
          address: https://consumer-host.example.com/consumer/path
    CreateSubscriptionResponseWebhook:
      summary: Webhook
      value:
        uri: https://platform.ringcentral.com/restapi/v1.0/subscription/dd2f0ff2-580e-4581-a277-76f9c9a54bc9
        id: dd2f0ff2-580e-4581-a277-76f9c9a54bc9
        creationTime: 2016-03-30T11:16:23.162Z
        status: Active
        eventFilters:
          - /restapi/v1.0/account/10366034004/extension/10366034004/presence
          - /restapi/v1.0/account/10366034004/extension/10366034004/message-store
        expirationTime: 2016-04-06T11:16:23.177Z
        expiresIn: 604799
        deliveryMode:
          transportType: WebHook
          encryption: false
          address: https://consumer-host.example.com/consumer/path
    CreateSubscriptionReminderSet:
      summary: ReminderSet
      value:
        uri: https://platform.ringcentral.com/restapi/v1.0/subscription/dd2f0ff2-580e-4581-a277-76f9c9a54bc11
        id: dd2f0ff2-580e-4581-a277-76f9c9a54bc11
        creationTime: 2024-03-30T11:16:23.162Z
        status: Active
        eventFilters:
          - /restapi/v1.0/account/~/extension/~/presence
          - /restapi/v1.0/subscription/~?threshold=259200&interval=43200
        expiresIn: 5000000
        deliveryMode:
          transportType: WebHook
          address: https://consumer-host.example.com/consumer/path
  requestBodies:
    SummaryCallbackRequest:
      description: Summary Callback Output
      content:
        application/json:
          schema:
            allOf:
              - type: object
                properties:
                  jobId:
                    type: string
                  creationTime:
                    type: string
                    format: date-time
                  completionTime:
                    type: string
                    format: date-time
                  expirationTime:
                    type: string
                    format: date-time
              - $ref: "#/components/schemas/SummaryApiOutput"
      required: true
    SummaryRequest:
      description: Summary Input Format
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/SummaryInput"
      required: true
    PunctuateCallbackRequest:
      description: Punctuate Callback Output
      content:
        application/json:
          schema:
            allOf:
              - type: object
                properties:
                  jobId:
                    type: string
                  creationTime:
                    type: string
                    format: date-time
                  completionTime:
                    type: string
                    format: date-time
                  expirationTime:
                    type: string
                    format: date-time
              - $ref: "#/components/schemas/PunctuateApiOutput"
      required: true
    PunctuateRequest:
      description: Punctuation API Input Format
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/PunctuateInput"
      required: true
    SpeechToTextCallbackRequest:
      description: Speech to Text API Callback Output
      content:
        application/json:
          schema:
            allOf:
              - type: object
                properties:
                  jobId:
                    type: string
                  creationTime:
                    type: string
                    format: date-time
                  completionTime:
                    type: string
                    format: date-time
                  expirationTime:
                    type: string
                    format: date-time
              - $ref: "#/components/schemas/AsrApiResponse"
      required: true
    AsrRequest:
      description: Speech to Text API Input Format
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/AsrInput"
      required: true
    DiarizeCallbackRequest:
      description: Speaker Diarization API Callback Output
      content:
        application/json:
          schema:
            allOf:
              - type: object
                properties:
                  jobId:
                    type: string
                  creationTime:
                    type: string
                    format: date-time
                  completionTime:
                    type: string
                    format: date-time
                  expirationTime:
                    type: string
                    format: date-time
              - $ref: "#/components/schemas/DiarizeApiResponse"
      required: true
    DiarizeRequest:
      description: Speaker Diarization API Input Format
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/DiarizeInput"
      required: true
    InteractionAnalyticsRequest:
      description: Interaction Analytics API Input Format
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/InteractionInput"
      required: true
    InteractionAnalyticsCallbackRequest:
      description: Interaction Analytics Callback Output
      content:
        application/json:
          schema:
            allOf:
              - type: object
                properties:
                  jobId:
                    type: string
                  creationTime:
                    type: string
                    format: date-time
                  completionTime:
                    type: string
                    format: date-time
                  expirationTime:
                    type: string
                    format: date-time
              - $ref: "#/components/schemas/InteractionApiResponse"
      required: true
