OpenAPI Specification
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 Credentials 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: Credentials operations
name: Credentials
paths:
/telephony_credentials:
get:
description: List all On-demand Credentials.
operationId: FindTelephonyCredentials
parameters:
- $ref: '#/components/parameters/telephony-credentials_PageConsolidated'
- $ref: '#/components/parameters/telephony-credentials_FilterConsolidated'
responses:
'200':
$ref: '#/components/responses/GetAllTelephonyCredentialResponse'
'400':
description: Bad request
'401':
description: Unauthorized
'404':
description: Resource not found
summary: List all credentials
tags:
- Credentials
x-group-parameters: 'true'
x-latency-category: responsive
post:
description: Create a credential.
operationId: CreateTelephonyCredential
parameters: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/TelephonyCredentialCreateRequest'
description: Parameters that can be defined during credential creation
required: true
responses:
'201':
$ref: '#/components/responses/TelephonyCredentialResponse'
'422':
description: Bad request
summary: Create a credential
tags:
- Credentials
x-latency-category: responsive
/telephony_credentials/{id}:
delete:
description: Delete an existing credential.
operationId: DeleteTelephonyCredential
parameters:
- description: Identifies the resource.
in: path
name: id
required: true
schema:
type: string
responses:
'200':
$ref: '#/components/responses/TelephonyCredentialResponse'
'401':
description: Unauthorized
'404':
description: Resource not found
'422':
description: Bad request
summary: Delete a credential
tags:
- Credentials
x-latency-category: responsive
get:
description: Get the details of an existing On-demand Credential.
operationId: GetTelephonyCredential
parameters:
- description: Identifies the resource.
in: path
name: id
required: true
schema:
type: string
responses:
'200':
$ref: '#/components/responses/TelephonyCredentialResponse'
'400':
description: Bad request
'401':
description: Unauthorized
'404':
description: Resource not found
summary: Get a credential
tags:
- Credentials
x-latency-category: responsive
patch:
description: Update an existing credential.
operationId: UpdateTelephonyCredential
parameters:
- description: Identifies the resource.
in: path
name: id
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/TelephonyCredentialUpdateRequest'
description: Parameters that can be updated in a credential
required: true
responses:
'200':
$ref: '#/components/responses/TelephonyCredentialResponse'
'401':
description: Unauthorized
'404':
description: Resource not found
'422':
description: Bad request
summary: Update a credential
tags:
- Credentials
x-latency-category: responsive
components:
responses:
TelephonyCredentialResponse:
content:
application/json:
schema:
properties:
data:
$ref: '#/components/schemas/TelephonyCredential'
title: Telephony Credential Response
type: object
description: Successful response with details about a credential
GetAllTelephonyCredentialResponse:
content:
application/json:
schema:
properties:
data:
items:
$ref: '#/components/schemas/TelephonyCredential'
type: array
meta:
$ref: '#/components/schemas/PaginationMeta'
title: Get All Telephony Credential Response
type: object
description: Successful response with multiple credentials
schemas:
PaginationMeta:
properties:
page_number:
example: 2
type: integer
page_size:
example: 25
type: integer
total_pages:
example: 3
type: integer
total_results:
example: 55
type: integer
type: object
TelephonyCredentialUpdateRequest:
example:
connection_id: '987654321'
name: My-new-updated-credential
properties:
connection_id:
description: Identifies the Credential Connection this credential is associated with.
example: '987654321'
type: string
expires_at:
description: ISO-8601 formatted date indicating when the credential will expire.
example: '2018-02-02T22:25:27.521Z'
type: string
name:
type: string
tag:
description: Tags a credential. A single tag can hold at maximum 1000 credentials.
example: some_tag
type: string
title: TelephonyCredentialUpdateRequest
type: object
TelephonyCredentialCreateRequest:
example:
connection_id: '1234567890'
name: My-new-credential
properties:
connection_id:
description: Identifies the Credential Connection this credential is associated with.
example: '1234567890'
type: string
expires_at:
description: ISO-8601 formatted date indicating when the credential will expire.
example: '2018-02-02T22:25:27.521Z'
type: string
name:
type: string
tag:
description: Tags a credential. A single tag can hold at maximum 1000 credentials.
example: some_tag
type: string
required:
- connection_id
title: TelephonyCredentialCreateRequest
type: object
TelephonyCredential:
example:
created_at: '2020-06-18T21:32:38'
expired: false
expires_at: '2042-06-18T21:32:38'
id: c215ade3-0d39-418e-94be-c5f780760199
name: '2020-06-18 21:32:38.917732Z'
record_type: credential
resource_id: connection:804252963366242252
sip_password: a92dbcfb60184a8cb330b0acb2f7617b
sip_username: gencrednCvHU5IYpSBPPsXI2iQsDX
updated_at: '2020-06-18T21:32:38.000Z'
user_id: user-id
properties:
created_at:
description: ISO-8601 formatted date indicating when the resource was created.
example: '2018-02-02T22:25:27.521Z'
type: string
expired:
description: Defaults to false
type: boolean
expires_at:
description: ISO-8601 formatted date indicating when the resource will expire.
example: '2018-02-02T22:25:27.521Z'
type: string
id:
description: Identifies the resource.
example: c215ade3-0d39-418e-94be-c5f780760199
type: string
name:
type: string
record_type:
description: Identifies the type of the resource.
example: credential
type: string
resource_id:
description: Identifies the resource this credential is associated with.
example: connection:1234567890
type: string
sip_password:
description: The randomly generated SIP password for the credential.
example: a92dbcfb60184a8cb330b0acb2f7617b
type: string
sip_username:
description: The randomly generated SIP username for the credential.
example: gencrednCvHU5IYpSBPPsXI2iQsDX
type: string
updated_at:
description: ISO-8601 formatted date indicating when the resource was updated.
example: '2018-02-02T22:25:27.521Z'
type: string
user_id:
description: Identifies the user this credential is associated with.
example: user-id
type: string
title: On-demand Credential
type: object
parameters:
telephony-credentials_FilterConsolidated:
description: 'Consolidated filter parameter (deepObject style). Originally: filter[tag], filter[name], filter[status], filter[resource_id], filter[sip_username]'
explode: true
in: query
name: filter
schema:
properties:
name:
description: Filter by name
type: string
resource_id:
description: Filter by resource_id
type: string
sip_username:
description: Filter by sip_username
type: string
status:
description: Filter by status
type: string
tag:
description: Filter by tag
type: string
type: object
style: deepObject
telephony-credentials_PageConsolidated:
description: 'Consolidated page parameter (deepObject style). Originally: page[number], page[size]'
explode: true
in: query
name: page
schema:
properties:
number:
default: 1
description: The page number to load
minimum: 1
type: integer
size:
default: 50
description: The size of the page
maximum: 250
minimum: 1
type: integer
type: object
style: deepObject
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