npx claudepluginhub team-telnyx/ai --plugin telnyxThis skill uses the workspace's default tool permissions.
<!-- Auto-generated from Telnyx OpenAPI specs. Do not edit. -->
Provides curl examples for Telnyx SIP trunking: manage custom storage credentials (GCS, S3, Azure), call recordings, media storage, Dialogflow integration, external connections.
Provides JavaScript SDK examples for Telnyx SIP integrations: manage custom storage credentials for call recordings/media (GCS, S3, Azure) and external connections.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Share bugs, ideas, or general feedback.
# curl is pre-installed on macOS, Linux, and Windows 10+
export TELNYX_API_KEY="YOUR_API_KEY_HERE"
All examples below use $TELNYX_API_KEY for authentication.
All API calls can fail with network errors, rate limits (429), validation errors (422), or authentication errors (401). Always handle errors in production code:
# Check HTTP status code in response
response=$(curl -s -w "\n%{http_code}" \
-X POST "https://api.telnyx.com/v2/messages" \
-H "Authorization: Bearer $TELNYX_API_KEY" \
-H "Content-Type: application/json" \
-d '{"to": "+13125550001", "from": "+13125550002", "text": "Hello"}')
http_code=$(echo "$response" | tail -1)
body=$(echo "$response" | sed '$d')
case $http_code in
2*) echo "Success: $body" ;;
422) echo "Validation error — check required fields and formats" ;;
429) echo "Rate limited — retry after delay"; sleep 1 ;;
401) echo "Authentication failed — check TELNYX_API_KEY" ;;
*) echo "Error $http_code: $body" ;;
esac
Common error codes: 401 invalid API key, 403 insufficient permissions,
404 resource not found, 422 validation error (check field formats),
429 rate limited (retry with exponential backoff).
page[number] and page[size] query parameters to navigate pages. Check meta.total_pages in the response.Returns the information about custom storage credentials.
GET /custom_storage_credentials/{connection_id}
curl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/custom_storage_credentials/{connection_id}"
Returns: backend (enum: gcs, s3, azure), configuration (object)
Creates a custom storage credentials configuration.
POST /custom_storage_credentials/{connection_id}
curl \
-X POST \
-H "Authorization: Bearer $TELNYX_API_KEY" \
-H "Content-Type: application/json" \
"https://api.telnyx.com/v2/custom_storage_credentials/{connection_id}"
Returns: backend (enum: gcs, s3, azure), configuration (object)
Updates a stored custom credentials configuration.
PUT /custom_storage_credentials/{connection_id}
curl \
-X PUT \
-H "Authorization: Bearer $TELNYX_API_KEY" \
-H "Content-Type: application/json" \
"https://api.telnyx.com/v2/custom_storage_credentials/{connection_id}"
Returns: backend (enum: gcs, s3, azure), configuration (object)
Deletes a stored custom credentials configuration.
DELETE /custom_storage_credentials/{connection_id}
curl \
-X DELETE \
-H "Authorization: Bearer $TELNYX_API_KEY" \
"https://api.telnyx.com/v2/custom_storage_credentials/{connection_id}"
Return details of the Dialogflow connection associated with the given CallControl connection.
GET /dialogflow_connections/{connection_id}
curl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/dialogflow_connections/{connection_id}"
Returns: connection_id (string), conversation_profile_id (string), environment (string), record_type (string), service_account (string)
Save Dialogflow Credentiails to Telnyx, so it can be used with other Telnyx services.
POST /dialogflow_connections/{connection_id}
curl \
-X POST \
-H "Authorization: Bearer $TELNYX_API_KEY" \
-H "Content-Type: application/json" \
"https://api.telnyx.com/v2/dialogflow_connections/{connection_id}"
Returns: connection_id (string), conversation_profile_id (string), environment (string), record_type (string), service_account (string)
Updates a stored Dialogflow Connection.
PUT /dialogflow_connections/{connection_id}
curl \
-X PUT \
-H "Authorization: Bearer $TELNYX_API_KEY" \
-H "Content-Type: application/json" \
"https://api.telnyx.com/v2/dialogflow_connections/{connection_id}"
Returns: connection_id (string), conversation_profile_id (string), environment (string), record_type (string), service_account (string)
Deletes a stored Dialogflow Connection.
DELETE /dialogflow_connections/{connection_id}
curl \
-X DELETE \
-H "Authorization: Bearer $TELNYX_API_KEY" \
"https://api.telnyx.com/v2/dialogflow_connections/{connection_id}"
This endpoint returns a list of your External Connections inside the 'data' attribute of the response. External Connections are used by Telnyx customers to seamless configure SIP trunking integrations with Telnyx Partners, through External Voice Integrations in Mission Control Portal.
GET /external_connections
curl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/external_connections"
Returns: active (boolean), created_at (string), credential_active (boolean), external_sip_connection (enum: zoom, operator_connect), id (string), inbound (object), outbound (object), record_type (string), tags (array[string]), updated_at (string), webhook_api_version (enum: 1, 2), webhook_event_failover_url (uri), webhook_event_url (uri), webhook_timeout_secs (integer | null)
Creates a new External Connection based on the parameters sent in the request. The external_sip_connection and outbound voice profile id are required. Once created, you can assign phone numbers to your application using the /phone_numbers endpoint.
POST /external_connections — Required: external_sip_connection, outbound
Optional: active (boolean), inbound (object), tags (array[string]), webhook_event_failover_url (uri), webhook_event_url (uri), webhook_timeout_secs (integer | null)
curl \
-X POST \
-H "Authorization: Bearer $TELNYX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"external_sip_connection": "zoom",
"outbound": {}
}' \
"https://api.telnyx.com/v2/external_connections"
Returns: active (boolean), created_at (string), credential_active (boolean), external_sip_connection (enum: zoom, operator_connect), id (string), inbound (object), outbound (object), record_type (string), tags (array[string]), updated_at (string), webhook_api_version (enum: 1, 2), webhook_event_failover_url (uri), webhook_event_url (uri), webhook_timeout_secs (integer | null)
Retrieve a list of log messages for all external connections associated with your account.
GET /external_connections/log_messages
curl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/external_connections/log_messages"
Returns: log_messages (array[object]), meta (object)
Retrieve a log message for an external connection associated with your account.
GET /external_connections/log_messages/{id}
curl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/external_connections/log_messages/1293384261075731499"
Returns: log_messages (array[object])
Dismiss a log message for an external connection associated with your account.
DELETE /external_connections/log_messages/{id}
curl \
-X DELETE \
-H "Authorization: Bearer $TELNYX_API_KEY" \
"https://api.telnyx.com/v2/external_connections/log_messages/1293384261075731499"
Returns: success (boolean)
Return the details of an existing External Connection inside the 'data' attribute of the response.
GET /external_connections/{id}
curl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/external_connections/1293384261075731499"
Returns: active (boolean), created_at (string), credential_active (boolean), external_sip_connection (enum: zoom, operator_connect), id (string), inbound (object), outbound (object), record_type (string), tags (array[string]), updated_at (string), webhook_api_version (enum: 1, 2), webhook_event_failover_url (uri), webhook_event_url (uri), webhook_timeout_secs (integer | null)
Updates settings of an existing External Connection based on the parameters of the request.
PATCH /external_connections/{id} — Required: outbound
Optional: active (boolean), inbound (object), tags (array[string]), webhook_event_failover_url (uri), webhook_event_url (uri), webhook_timeout_secs (integer | null)
curl \
-X PATCH \
-H "Authorization: Bearer $TELNYX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"outbound": {}
}' \
"https://api.telnyx.com/v2/external_connections/1293384261075731499"
Returns: active (boolean), created_at (string), credential_active (boolean), external_sip_connection (enum: zoom, operator_connect), id (string), inbound (object), outbound (object), record_type (string), tags (array[string]), updated_at (string), webhook_api_version (enum: 1, 2), webhook_event_failover_url (uri), webhook_event_url (uri), webhook_timeout_secs (integer | null)
Permanently deletes an External Connection. Deletion may be prevented if the application is in use by phone numbers, is active, or if it is an Operator Connect connection. To remove an Operator Connect integration please contact Telnyx support.
DELETE /external_connections/{id}
curl \
-X DELETE \
-H "Authorization: Bearer $TELNYX_API_KEY" \
"https://api.telnyx.com/v2/external_connections/1293384261075731499"
Returns: active (boolean), created_at (string), credential_active (boolean), external_sip_connection (enum: zoom, operator_connect), id (string), inbound (object), outbound (object), record_type (string), tags (array[string]), updated_at (string), webhook_api_version (enum: 1, 2), webhook_event_failover_url (uri), webhook_event_url (uri), webhook_timeout_secs (integer | null)
Returns the civic addresses and locations from Microsoft Teams.
GET /external_connections/{id}/civic_addresses
curl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/external_connections/1293384261075731499/civic_addresses"
Returns: city_or_town (string), city_or_town_alias (string), company_name (string), country (string), country_or_district (string), default_location_id (uuid), description (string), house_number (string), house_number_suffix (string), id (uuid), locations (array[object]), postal_or_zip_code (string), record_type (string), state_or_province (string), street_name (string), street_suffix (string)
Return the details of an existing Civic Address with its Locations inside the 'data' attribute of the response.
GET /external_connections/{id}/civic_addresses/{address_id}
curl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/external_connections/1293384261075731499/civic_addresses/318fb664-d341-44d2-8405-e6bfb9ced6d9"
Returns: city_or_town (string), city_or_town_alias (string), company_name (string), country (string), country_or_district (string), default_location_id (uuid), description (string), house_number (string), house_number_suffix (string), id (uuid), locations (array[object]), postal_or_zip_code (string), record_type (string), state_or_province (string), street_name (string), street_suffix (string)
PATCH /external_connections/{id}/locations/{location_id} — Required: static_emergency_address_id
curl \
-X PATCH \
-H "Authorization: Bearer $TELNYX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"static_emergency_address_id": "550e8400-e29b-41d4-a716-446655440000"
}' \
"https://api.telnyx.com/v2/external_connections/550e8400-e29b-41d4-a716-446655440000/locations/{location_id}"
Returns: accepted_address_suggestions (boolean), location_id (uuid), static_emergency_address_id (uuid)
Returns a list of all active phone numbers associated with the given external connection.
GET /external_connections/{id}/phone_numbers
curl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/external_connections/1293384261075731499/phone_numbers"
Returns: acquired_capabilities (array[string]), civic_address_id (uuid), displayed_country_code (string), location_id (uuid), number_id (string), telephone_number (string), ticket_id (uuid)
Return the details of a phone number associated with the given external connection.
GET /external_connections/{id}/phone_numbers/{phone_number_id}
curl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/external_connections/1293384261075731499/phone_numbers/1234567889"
Returns: acquired_capabilities (array[string]), civic_address_id (uuid), displayed_country_code (string), location_id (uuid), number_id (string), telephone_number (string), ticket_id (uuid)
Asynchronously update settings of the phone number associated with the given external connection.
PATCH /external_connections/{id}/phone_numbers/{phone_number_id}
Optional: location_id (uuid)
curl \
-X PATCH \
-H "Authorization: Bearer $TELNYX_API_KEY" \
-H "Content-Type: application/json" \
"https://api.telnyx.com/v2/external_connections/1293384261075731499/phone_numbers/1234567889"
Returns: acquired_capabilities (array[string]), civic_address_id (uuid), displayed_country_code (string), location_id (uuid), number_id (string), telephone_number (string), ticket_id (uuid)
Returns a list of your Releases for the given external connection. These are automatically created when you change the connection_id of a phone number that is currently on Microsoft Teams.
GET /external_connections/{id}/releases
curl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/external_connections/1293384261075731499/releases"
Returns: created_at (string), error_message (string), status (enum: pending_upload, pending, in_progress, complete, failed, expired, unknown), telephone_numbers (array[object]), tenant_id (uuid), ticket_id (uuid)
Return the details of a Release request and its phone numbers.
GET /external_connections/{id}/releases/{release_id}
curl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/external_connections/1293384261075731499/releases/7b6a6449-b055-45a6-81f6-f6f0dffa4cc6"
Returns: created_at (string), error_message (string), status (enum: pending_upload, pending, in_progress, complete, failed, expired, unknown), telephone_numbers (array[object]), tenant_id (uuid), ticket_id (uuid)
Returns a list of your Upload requests for the given external connection.
GET /external_connections/{id}/uploads
curl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/external_connections/1293384261075731499/uploads"
Returns: available_usages (array[string]), error_code (string), error_message (string), location_id (uuid), status (enum: pending_upload, pending, in_progress, partial_success, success, error), tenant_id (uuid), ticket_id (uuid), tn_upload_entries (array[object])
Creates a new Upload request to Microsoft teams with the included phone numbers. Only one of civic_address_id or location_id must be provided, not both. The maximum allowed phone numbers for the numbers_ids array is 1000.
POST /external_connections/{id}/uploads — Required: number_ids
Optional: additional_usages (array[string]), civic_address_id (uuid), location_id (uuid), usage (enum: calling_user_assignment, first_party_app_assignment)
curl \
-X POST \
-H "Authorization: Bearer $TELNYX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"number_ids": [
"550e8400-e29b-41d4-a716-446655440000"
]
}' \
"https://api.telnyx.com/v2/external_connections/1293384261075731499/uploads"
Returns: success (boolean), ticket_id (uuid)
Forces a recheck of the status of all pending Upload requests for the given external connection in the background.
POST /external_connections/{id}/uploads/refresh
curl \
-X POST \
-H "Authorization: Bearer $TELNYX_API_KEY" \
-H "Content-Type: application/json" \
"https://api.telnyx.com/v2/external_connections/1293384261075731499/uploads/refresh"
Returns: success (boolean)
Returns the count of all pending upload requests for the given external connection.
GET /external_connections/{id}/uploads/status
curl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/external_connections/1293384261075731499/uploads/status"
Returns: pending_numbers_count (integer), pending_orders_count (integer)
Return the details of an Upload request and its phone numbers.
GET /external_connections/{id}/uploads/{ticket_id}
curl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/external_connections/1293384261075731499/uploads/7b6a6449-b055-45a6-81f6-f6f0dffa4cc6"
Returns: available_usages (array[string]), error_code (string), error_message (string), location_id (uuid), status (enum: pending_upload, pending, in_progress, partial_success, success, error), tenant_id (uuid), ticket_id (uuid), tn_upload_entries (array[object])
If there were any errors during the upload process, this endpoint will retry the upload request. In some cases this will reattempt the existing upload request, in other cases it may create a new upload request. Please check the ticket_id in the response to determine if a new upload request was created.
POST /external_connections/{id}/uploads/{ticket_id}/retry
curl \
-X POST \
-H "Authorization: Bearer $TELNYX_API_KEY" \
-H "Content-Type: application/json" \
"https://api.telnyx.com/v2/external_connections/1293384261075731499/uploads/7b6a6449-b055-45a6-81f6-f6f0dffa4cc6/retry"
Returns: available_usages (array[string]), error_code (string), error_message (string), location_id (uuid), status (enum: pending_upload, pending, in_progress, partial_success, success, error), tenant_id (uuid), ticket_id (uuid), tn_upload_entries (array[object])
Returns a list of stored media files.
GET /media
curl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/media"
Returns: content_type (string), created_at (string), expires_at (string), media_name (string), updated_at (string)
Upload media file to Telnyx so it can be used with other Telnyx services
POST /media — Required: media_url
Optional: media_name (string), ttl_secs (integer)
curl \
-X POST \
-H "Authorization: Bearer $TELNYX_API_KEY" \
-F "media=@/path/to/file" \
-F "ttl_secs=86400" \
-F "media_name=my_file" \
"https://api.telnyx.com/v2/media"
Returns: content_type (string), created_at (string), expires_at (string), media_name (string), updated_at (string)
Returns the information about a stored media file.
GET /media/{media_name}
curl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/media/{media_name}"
Returns: content_type (string), created_at (string), expires_at (string), media_name (string), updated_at (string)
Updates a stored media file.
PUT /media/{media_name}
Optional: media_url (string), ttl_secs (integer)
curl \
-X PUT \
-H "Authorization: Bearer $TELNYX_API_KEY" \
-F "media=@/path/to/file" \
-F "ttl_secs=86400" \
"https://api.telnyx.com/v2/media/{media_name}"
Returns: content_type (string), created_at (string), expires_at (string), media_name (string), updated_at (string)
Deletes a stored media file.
DELETE /media/{media_name}
curl \
-X DELETE \
-H "Authorization: Bearer $TELNYX_API_KEY" \
"https://api.telnyx.com/v2/media/{media_name}"
Downloads a stored media file.
GET /media/{media_name}/download
curl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/media/{media_name}/download"
This endpoint will make an asynchronous request to refresh the Operator Connect integration with Microsoft Teams for the current user. This will create new external connections on the user's account if needed, and/or report the integration results as log messages.
POST /operator_connect/actions/refresh
curl \
-X POST \
-H "Authorization: Bearer $TELNYX_API_KEY" \
-H "Content-Type: application/json" \
"https://api.telnyx.com/v2/operator_connect/actions/refresh"
Returns: message (string), success (boolean)
Returns a list of your recording transcriptions.
GET /recording_transcriptions
curl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/recording_transcriptions"
Returns: created_at (string), duration_millis (int32), id (string), record_type (enum: recording_transcription), recording_id (string), status (enum: in-progress, completed), transcription_text (string), updated_at (string)
Retrieves the details of an existing recording transcription.
GET /recording_transcriptions/{recording_transcription_id}
curl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/recording_transcriptions/6a09cdc3-8948-47f0-aa62-74ac943d6c58"
Returns: created_at (string), duration_millis (int32), id (string), record_type (enum: recording_transcription), recording_id (string), status (enum: in-progress, completed), transcription_text (string), updated_at (string)
Permanently deletes a recording transcription.
DELETE /recording_transcriptions/{recording_transcription_id}
curl \
-X DELETE \
-H "Authorization: Bearer $TELNYX_API_KEY" \
"https://api.telnyx.com/v2/recording_transcriptions/6a09cdc3-8948-47f0-aa62-74ac943d6c58"
Returns: created_at (string), duration_millis (int32), id (string), record_type (enum: recording_transcription), recording_id (string), status (enum: in-progress, completed), transcription_text (string), updated_at (string)
Returns a list of your call recordings.
GET /recordings
curl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/recordings"
Returns: call_control_id (string), call_leg_id (string), call_session_id (string), channels (enum: single, dual), conference_id (string), connection_id (string), created_at (string), download_urls (object), duration_millis (int32), from (string), id (string), initiated_by (string), record_type (enum: recording), recording_ended_at (string), recording_started_at (string), source (enum: conference, call), status (enum: completed), to (string), updated_at (string)
Permanently deletes a list of call recordings.
POST /recordings/actions/delete
curl \
-X POST \
-H "Authorization: Bearer $TELNYX_API_KEY" \
-H "Content-Type: application/json" \
"https://api.telnyx.com/v2/recordings/actions/delete"
Returns: status (enum: ok)
Retrieves the details of an existing call recording.
GET /recordings/{recording_id}
curl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/recordings/{recording_id}"
Returns: call_control_id (string), call_leg_id (string), call_session_id (string), channels (enum: single, dual), conference_id (string), connection_id (string), created_at (string), download_urls (object), duration_millis (int32), from (string), id (string), initiated_by (string), record_type (enum: recording), recording_ended_at (string), recording_started_at (string), source (enum: conference, call), status (enum: completed), to (string), updated_at (string)
Permanently deletes a call recording.
DELETE /recordings/{recording_id}
curl \
-X DELETE \
-H "Authorization: Bearer $TELNYX_API_KEY" \
"https://api.telnyx.com/v2/recordings/{recording_id}"
Returns: call_control_id (string), call_leg_id (string), call_session_id (string), channels (enum: single, dual), conference_id (string), connection_id (string), created_at (string), download_urls (object), duration_millis (int32), from (string), id (string), initiated_by (string), record_type (enum: recording), recording_ended_at (string), recording_started_at (string), source (enum: conference, call), status (enum: completed), to (string), updated_at (string)
Creates a new SIPREC connector configuration.
POST /siprec_connectors
curl \
-X POST \
-H "Authorization: Bearer $TELNYX_API_KEY" \
-H "Content-Type: application/json" \
"https://api.telnyx.com/v2/siprec_connectors"
Returns: app_subdomain (string), created_at (string), host (string), name (string), port (integer), record_type (string), updated_at (string)
Returns details of a stored SIPREC connector.
GET /siprec_connectors/{connector_name}
curl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/siprec_connectors/{connector_name}"
Returns: app_subdomain (string), created_at (string), host (string), name (string), port (integer), record_type (string), updated_at (string)
Updates a stored SIPREC connector configuration.
PUT /siprec_connectors/{connector_name}
curl \
-X PUT \
-H "Authorization: Bearer $TELNYX_API_KEY" \
-H "Content-Type: application/json" \
"https://api.telnyx.com/v2/siprec_connectors/{connector_name}"
Returns: app_subdomain (string), created_at (string), host (string), name (string), port (integer), record_type (string), updated_at (string)
Deletes a stored SIPREC connector.
DELETE /siprec_connectors/{connector_name}
curl \
-X DELETE \
-H "Authorization: Bearer $TELNYX_API_KEY" \
"https://api.telnyx.com/v2/siprec_connectors/{connector_name}"