Telnyx Voicemail API

Voicemail API

OpenAPI Specification

telnyx-voicemail-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  contact:
    email: support@telnyx.com
  description: Telnyx provides global communications and connectivity APIs for developers — including SIP trunking, programmable voice, SMS, MMS, WhatsApp Business Messaging, Call Control, Fax, Wireless (IoT & eSIM), Phone Numbers (DID provisioning & porting), Emergency Services, and Network APIs for private interconnects and edge connectivity. Build, scale, and manage voice, messaging, and data networks with Telnyx's carrier-grade global infrastructure and API-first platform.
  title: Telnyx Access Tokens Voicemail API
  version: 2.0.0
  x-endpoint-cost: light
servers:
- description: Version 2.0.0 of the Telnyx API
  url: https://api.telnyx.com/v2
security:
- bearerAuth: []
tags:
- description: Voicemail API
  name: Voicemail
paths:
  /phone_numbers/{phone_number_id}/voicemail:
    parameters:
    - description: The ID of the phone number.
      example: '123455678900'
      in: path
      name: phone_number_id
      required: true
      schema:
        type: string
    get:
      description: Returns the voicemail settings for a phone number
      operationId: GetVoicemail
      responses:
        '200':
          $ref: '#/components/responses/VoicemailResponse'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '404':
          description: Resource not found
      summary: Get voicemail
      tags:
      - Voicemail
      x-latency-category: responsive
    patch:
      description: Update voicemail settings for a phone number
      operationId: UpdateVoicemail
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VoicemailRequest'
        description: Details to update
        required: true
      responses:
        '200':
          $ref: '#/components/responses/VoicemailResponse'
        '401':
          description: Unauthorized
        '404':
          description: Resource not found
        '422':
          description: Bad request
      summary: Update voicemail
      tags:
      - Voicemail
      x-latency-category: responsive
    post:
      description: Create voicemail settings for a phone number
      operationId: CreateVoicemail
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VoicemailRequest'
        description: Details to create
        required: true
      responses:
        '200':
          $ref: '#/components/responses/VoicemailResponse'
        '401':
          description: Unauthorized
        '404':
          description: Resource not found
        '422':
          description: Bad request
      summary: Create voicemail
      tags:
      - Voicemail
      x-latency-category: responsive
components:
  schemas:
    VoicemailPrefResponse:
      example:
        enabled: true
        pin: '1234'
      properties:
        enabled:
          description: Whether voicemail is enabled.
          example: true
          type: boolean
        pin:
          description: The pin used for the voicemail.
          example: '1234'
          type: string
      type: object
    VoicemailRequest:
      properties:
        enabled:
          description: Whether voicemail is enabled.
          example: true
          type: boolean
        pin:
          description: The pin used for voicemail
          example: '1234'
          type: string
      type: object
  responses:
    VoicemailResponse:
      content:
        application/json:
          schema:
            properties:
              data:
                $ref: '#/components/schemas/VoicemailPrefResponse'
            type: object
      description: Successful response
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http
    branded-calling_bearerAuth:
      description: API key passed as a Bearer token in the Authorization header
      scheme: bearer
      type: http
    oauthClientAuth:
      description: OAuth 2.0 authentication for Telnyx API and MCP integrations
      flows:
        authorizationCode:
          authorizationUrl: https://api.telnyx.com/v2/oauth/authorize
          refreshUrl: https://api.telnyx.com/v2/oauth/token
          scopes:
            admin: Administrative access to Telnyx resources
          tokenUrl: https://api.telnyx.com/v2/oauth/token
        clientCredentials:
          scopes:
            admin: Administrative access to Telnyx resources
          tokenUrl: https://api.telnyx.com/v2/oauth/token
      type: oauth2
    outbound-voice-profiles_bearerAuth:
      bearerFormat: JWT
      scheme: bearer
      type: http
    pronunciation-dicts_bearerAuth:
      description: Telnyx API v2 key. Obtain from https://portal.telnyx.com
      scheme: bearer
      type: http
    stored-payment-transactions_bearerAuth:
      bearerFormat: JWT
      scheme: bearer
      type: http