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 Billing Groups 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: Billing groups operations
name: Billing Groups
paths:
/billing_groups:
get:
deprecated: false
description: ''
operationId: ListBillingGroups
parameters:
- 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: 20
description: The size of the page
maximum: 250
minimum: 1
type: integer
type: object
style: deepObject
responses:
'200':
content:
application/json:
schema:
properties:
data:
items:
$ref: '#/components/schemas/BillingGroup'
type: array
meta:
$ref: '#/components/schemas/PaginationMeta'
type: object
description: A paginated array of billing groups
headers: {}
'400':
$ref: '#/components/responses/BadRequestErrorResponse'
default:
$ref: '#/components/responses/GenericErrorResponse'
summary: List all billing groups
tags:
- Billing Groups
x-latency-category: responsive
post:
deprecated: false
description: ''
operationId: CreateBillingGroup
requestBody:
content:
application/json:
example:
name: string
schema:
$ref: '#/components/schemas/NewBillingGroup'
required: true
responses:
'200':
content:
application/json:
schema:
properties:
data:
$ref: '#/components/schemas/BillingGroup'
type: object
description: Expected billing group response to a valid request
headers: {}
'409':
$ref: '#/components/responses/ConflictErrorResponse'
'422':
$ref: '#/components/responses/UnprocessableEntityErrorResponse'
default:
$ref: '#/components/responses/GenericErrorResponse'
summary: Create a billing group
tags:
- Billing Groups
x-latency-category: responsive
/billing_groups/{id}:
delete:
deprecated: false
description: ''
operationId: DeleteBillingGroup
parameters:
- description: The id of the billing group
example: f5586561-8ff0-4291-a0ac-84fe544797bd
in: path
name: id
required: true
schema:
format: uuid
type: string
responses:
'200':
content:
application/json:
schema:
properties:
data:
$ref: '#/components/schemas/BillingGroup'
type: object
description: Expected billing group response to a valid request
headers: {}
'403':
$ref: '#/components/responses/ForbiddenErrorResponse'
'404':
$ref: '#/components/responses/NotFoundErrorResponse'
'409':
$ref: '#/components/responses/ConflictErrorResponse'
'422':
$ref: '#/components/responses/UnprocessableEntityErrorResponse'
default:
$ref: '#/components/responses/GenericErrorResponse'
summary: Delete a billing group
tags:
- Billing Groups
x-latency-category: responsive
get:
deprecated: false
description: ''
operationId: GetBillingGroup
parameters:
- description: The id of the billing group
example: f5586561-8ff0-4291-a0ac-84fe544797bd
in: path
name: id
required: true
schema:
format: uuid
type: string
responses:
'200':
content:
application/json:
schema:
properties:
data:
$ref: '#/components/schemas/BillingGroup'
type: object
description: Expected billing group response to a valid request
headers: {}
'403':
$ref: '#/components/responses/ForbiddenErrorResponse'
'404':
$ref: '#/components/responses/NotFoundErrorResponse'
default:
$ref: '#/components/responses/GenericErrorResponse'
summary: Get a billing group
tags:
- Billing Groups
x-latency-category: responsive
patch:
deprecated: false
description: ''
operationId: UpdateBillingGroup
parameters:
- description: The id of the billing group
example: f5586561-8ff0-4291-a0ac-84fe544797bd
in: path
name: id
required: true
schema:
format: uuid
type: string
requestBody:
content:
application/json:
example:
name: string
schema:
$ref: '#/components/schemas/UpdateBillingGroup'
required: true
responses:
'200':
content:
application/json:
schema:
properties:
data:
$ref: '#/components/schemas/BillingGroup'
type: object
description: Expected billing group response to a valid request
headers: {}
'403':
$ref: '#/components/responses/ForbiddenErrorResponse'
'404':
$ref: '#/components/responses/NotFoundErrorResponse'
'422':
$ref: '#/components/responses/UnprocessableEntityErrorResponse'
default:
$ref: '#/components/responses/GenericErrorResponse'
summary: Update a billing group
tags:
- Billing Groups
x-latency-category: responsive
components:
schemas:
billing-group_Error:
properties:
code:
format: int32
type: integer
detail:
type: string
meta:
additionalProperties: true
properties: {}
type: object
source:
properties:
parameter:
description: Indicates which query parameter caused the error.
type: string
pointer:
description: JSON pointer (RFC6901) to the offending entity.
type: string
type: object
title:
type: string
required:
- code
- title
type: object
Errors:
properties:
errors:
items:
$ref: '#/components/schemas/billing-group_Error'
type: array
type: object
billing_Errors:
properties:
errors:
items:
$ref: '#/components/schemas/billing_Error'
type: array
type: object
invoice_Error:
properties:
code:
type: string
detail:
type: string
meta:
additionalProperties: true
type: object
source:
properties:
parameter:
description: Indicates which query parameter caused the error.
type: string
pointer:
description: JSON pointer (RFC6901) to the offending entity.
type: string
type: object
title:
type: string
required:
- code
- title
type: object
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
UpdateBillingGroup:
example:
name: string
properties:
name:
description: A name for the billing group
type: string
type: object
BillingGroup:
example:
created_at: '2019-10-15T10:07:15.527Z'
deleted_at: null
id: f5586561-8ff0-4291-a0ac-84fe544797bd
name: My billing group name
organization_id: f1486bae-f067-460c-ad43-73a92848f902
record_type: billing_group
updated_at: '2019-10-15T10:07:15.527Z'
properties:
created_at:
description: ISO 8601 formatted date indicating when the resource was created.
example: '2019-10-15T10:07:15.527Z'
format: date-time
type: string
deleted_at:
description: ISO 8601 formatted date indicating when the resource was removed.
example: null
format: date-time
type:
- string
- 'null'
id:
description: Identifies the type of resource.
example: f5586561-8ff0-4291-a0ac-84fe544797bd
format: uuid
type: string
name:
description: A user-specified name for the billing group
example: My billing group name
type: string
organization_id:
description: Identifies the organization that owns the resource.
example: f1486bae-f067-460c-ad43-73a92848f902
format: uuid
type: string
record_type:
description: Identifies the type of the resource.
enum:
- billing_group
example: billing_group
type: string
updated_at:
description: ISO 8601 formatted date indicating when the resource was updated.
example: '2019-10-15T10:07:15.527Z'
format: date-time
type: string
type: object
billing_Error:
properties:
code:
type: string
detail:
type: string
meta:
additionalProperties: true
type: object
source:
properties:
parameter:
description: Indicates which query parameter caused the error.
type: string
pointer:
description: JSON pointer (RFC6901) to the offending entity.
type: string
type: object
title:
type: string
required:
- code
- title
type: object
NewBillingGroup:
example:
name: string
properties:
name:
description: A name for the billing group
type: string
type: object
invoice_Errors:
properties:
errors:
items:
$ref: '#/components/schemas/invoice_Error'
type: array
type: object
responses:
ForbiddenErrorResponse:
content:
application/json:
schema:
$ref: '#/components/schemas/Errors'
description: Insufficient permissions to access billing group
BadRequestErrorResponse:
content:
application/json:
schema:
$ref: '#/components/schemas/invoice_Errors'
description: Invalid request parameters
GenericErrorResponse:
content:
application/json:
schema:
$ref: '#/components/schemas/billing_Errors'
description: Unexpected error
NotFoundErrorResponse:
content:
application/json:
schema:
$ref: '#/components/schemas/Errors'
description: Billing group not found
ConflictErrorResponse:
content:
application/json:
schema:
$ref: '#/components/schemas/Errors'
description: Resource conflict or in use
UnprocessableEntityErrorResponse:
content:
application/json:
schema:
$ref: '#/components/schemas/Errors'
description: Invalid request data
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