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 AutoRechargePreferences 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: V2 Auto Recharge Preferences API
name: AutoRechargePreferences
paths:
/payment/auto_recharge_prefs:
get:
description: Returns the payment auto recharge preferences.
operationId: GetAutoRechargePrefs
responses:
'200':
$ref: '#/components/responses/AutoRechargePrefResponse'
'400':
description: Bad request
'401':
description: Unauthorized
'404':
description: Resource not found
summary: List auto recharge preferences
tags:
- AutoRechargePreferences
x-endpoint-cost: medium
x-latency-category: responsive
patch:
description: Update payment auto recharge preferences.
operationId: UpdateAutoRechargePrefs
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AutoRechargePrefRequest'
description: Details to update auto recharge preferences
required: true
responses:
'200':
$ref: '#/components/responses/AutoRechargePrefResponse'
'401':
description: Unauthorized
'404':
description: Resource not found
'422':
description: Bad request
summary: Update auto recharge preferences
tags:
- AutoRechargePreferences
x-endpoint-cost: medium
x-latency-category: responsive
components:
responses:
AutoRechargePrefResponse:
content:
application/json:
schema:
properties:
data:
$ref: '#/components/schemas/AutoRechargePref'
type: object
description: Successful response
schemas:
AutoRechargePref:
properties:
enabled:
description: Whether auto recharge is enabled.
example: true
type: boolean
id:
description: The unique identifier for the auto recharge preference.
example: '1524126400473204723'
type: string
invoice_enabled:
example: true
type: boolean
preference:
description: The payment preference for auto recharge.
enum:
- credit_paypal
- ach
example: credit_paypal
type: string
recharge_amount:
description: The amount to recharge the account, the actual recharge amount will be the amount necessary to reach the threshold amount plus the recharge amount.
example: '104.00'
type: string
x-format: decimal
record_type:
description: The record type.
example: auto_recharge_pref
type: string
threshold_amount:
description: The threshold amount at which the account will be recharged.
example: '104.00'
type: string
x-format: decimal
type: object
AutoRechargePrefRequest:
properties:
enabled:
description: Whether auto recharge is enabled.
example: true
type: boolean
invoice_enabled:
example: true
type: boolean
preference:
description: The payment preference for auto recharge.
enum:
- credit_paypal
- ach
example: credit_paypal
type: string
recharge_amount:
description: The amount to recharge the account, the actual recharge amount will be the amount necessary to reach the threshold amount plus the recharge amount.
example: '104.00'
type: string
x-format: decimal
threshold_amount:
description: The threshold amount at which the account will be recharged.
example: '104.00'
type: string
x-format: decimal
type: object
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