Loading...
Loading...
Configure account addresses, authentication providers, IP access controls, billing groups, and integration secrets. This skill provides REST API (curl) examples.
npx skill4agent add team-telnyx/skills telnyx-account-access-curl# curl is pre-installed on macOS, Linux, and Windows 10+export TELNYX_API_KEY="YOUR_API_KEY_HERE"$TELNYX_API_KEY# 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" ;;
esac401403404422429page[number]page[size]meta.total_pagesGET /access_ip_addresscurl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/access_ip_address"created_atdescriptionidip_addresssourcestatusupdated_atuser_idPOST /access_ip_addressip_addressdescriptioncurl \
-X POST \
-H "Authorization: Bearer $TELNYX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"ip_address": "203.0.113.10"
}' \
"https://api.telnyx.com/v2/access_ip_address"created_atdescriptionidip_addresssourcestatusupdated_atuser_idGET /access_ip_address/{access_ip_address_id}curl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/access_ip_address/{access_ip_address_id}"created_atdescriptionidip_addresssourcestatusupdated_atuser_idDELETE /access_ip_address/{access_ip_address_id}curl \
-X DELETE \
-H "Authorization: Bearer $TELNYX_API_KEY" \
"https://api.telnyx.com/v2/access_ip_address/{access_ip_address_id}"created_atdescriptionidip_addresssourcestatusupdated_atuser_idGET /addressescurl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/addresses?sort=street_address"address_bookadministrative_areaboroughbusiness_namecountry_codecreated_atcustomer_referenceextended_addressfirst_nameidlast_namelocalityneighborhoodphone_numberpostal_coderecord_typestreet_addressupdated_atvalidate_addressPOST /addressesfirst_namelast_namebusiness_namestreet_addresslocalitycountry_codeaddress_bookadministrative_areaboroughcustomer_referenceextended_addressneighborhoodphone_numberpostal_codevalidate_addresscurl \
-X POST \
-H "Authorization: Bearer $TELNYX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"first_name": "Alfred",
"last_name": "Foster",
"business_name": "Toy-O'Kon",
"street_address": "600 Congress Avenue",
"locality": "Austin",
"country_code": "US"
}' \
"https://api.telnyx.com/v2/addresses"address_bookadministrative_areaboroughbusiness_namecountry_codecreated_atcustomer_referenceextended_addressfirst_nameidlast_namelocalityneighborhoodphone_numberpostal_coderecord_typestreet_addressupdated_atvalidate_addressPOST /addresses/actions/validatecountry_codestreet_addresspostal_codeadministrative_areaextended_addresslocalitycurl \
-X POST \
-H "Authorization: Bearer $TELNYX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"street_address": "600 Congress Avenue",
"postal_code": "78701",
"country_code": "US"
}' \
"https://api.telnyx.com/v2/addresses/actions/validate"errorsrecord_typeresultsuggestedGET /addresses/{id}curl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/addresses/550e8400-e29b-41d4-a716-446655440000"address_bookadministrative_areaboroughbusiness_namecountry_codecreated_atcustomer_referenceextended_addressfirst_nameidlast_namelocalityneighborhoodphone_numberpostal_coderecord_typestreet_addressupdated_atvalidate_addressDELETE /addresses/{id}curl \
-X DELETE \
-H "Authorization: Bearer $TELNYX_API_KEY" \
"https://api.telnyx.com/v2/addresses/550e8400-e29b-41d4-a716-446655440000"address_bookadministrative_areaboroughbusiness_namecountry_codecreated_atcustomer_referenceextended_addressfirst_nameidlast_namelocalityneighborhoodphone_numberpostal_coderecord_typestreet_addressupdated_atvalidate_addressPOST /addresses/{id}/actions/accept_suggestionsidcurl \
-X POST \
-H "Authorization: Bearer $TELNYX_API_KEY" \
-H "Content-Type: application/json" \
"https://api.telnyx.com/v2/addresses/550e8400-e29b-41d4-a716-446655440000/actions/accept_suggestions"acceptedidrecord_typeGET /authentication_providerscurl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/authentication_providers?sort=name"activated_atactivecreated_atidnameorganization_idrecord_typesettingsshort_nameupdated_atPOST /authentication_providersnameshort_namesettingsactivesettings_urlcurl \
-X POST \
-H "Authorization: Bearer $TELNYX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Okta",
"short_name": "myorg",
"settings": {}
}' \
"https://api.telnyx.com/v2/authentication_providers"activated_atactivecreated_atidnameorganization_idrecord_typesettingsshort_nameupdated_atGET /authentication_providers/{id}curl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/authentication_providers/550e8400-e29b-41d4-a716-446655440000"activated_atactivecreated_atidnameorganization_idrecord_typesettingsshort_nameupdated_atPATCH /authentication_providers/{id}activenamesettingssettings_urlshort_namecurl \
-X PATCH \
-H "Authorization: Bearer $TELNYX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Okta",
"short_name": "myorg",
"active": true,
"settings": {
"idp_entity_id": "https://myorg.myidp.com/saml/metadata",
"idp_sso_target_url": "https://myorg.myidp.com/trust/saml2/http-post/sso",
"idp_cert_fingerprint": "13:38:C7:BB:C9:FF:4A:70:38:3A:E3:D9:5C:CD:DB:2E:50:1E:80:A7",
"idp_cert_fingerprint_algorithm": "sha1"
}
}' \
"https://api.telnyx.com/v2/authentication_providers/550e8400-e29b-41d4-a716-446655440000"activated_atactivecreated_atidnameorganization_idrecord_typesettingsshort_nameupdated_atDELETE /authentication_providers/{id}curl \
-X DELETE \
-H "Authorization: Bearer $TELNYX_API_KEY" \
"https://api.telnyx.com/v2/authentication_providers/550e8400-e29b-41d4-a716-446655440000"activated_atactivecreated_atidnameorganization_idrecord_typesettingsshort_nameupdated_atGET /billing_groupscurl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/billing_groups"created_atdeleted_atidnameorganization_idrecord_typeupdated_atPOST /billing_groupsnamecurl \
-X POST \
-H "Authorization: Bearer $TELNYX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "my-resource"
}' \
"https://api.telnyx.com/v2/billing_groups"created_atdeleted_atidnameorganization_idrecord_typeupdated_atGET /billing_groups/{id}curl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/billing_groups/f5586561-8ff0-4291-a0ac-84fe544797bd"created_atdeleted_atidnameorganization_idrecord_typeupdated_atPATCH /billing_groups/{id}namecurl \
-X PATCH \
-H "Authorization: Bearer $TELNYX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "my-resource"
}' \
"https://api.telnyx.com/v2/billing_groups/f5586561-8ff0-4291-a0ac-84fe544797bd"created_atdeleted_atidnameorganization_idrecord_typeupdated_atDELETE /billing_groups/{id}curl \
-X DELETE \
-H "Authorization: Bearer $TELNYX_API_KEY" \
"https://api.telnyx.com/v2/billing_groups/f5586561-8ff0-4291-a0ac-84fe544797bd"created_atdeleted_atidnameorganization_idrecord_typeupdated_atGET /integration_secretscurl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/integration_secrets"created_atididentifierrecord_typeupdated_atPOST /integration_secretsidentifiertypepasswordtokenusernamecurl \
-X POST \
-H "Authorization: Bearer $TELNYX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"identifier": "user@example.com",
"type": "bearer"
}' \
"https://api.telnyx.com/v2/integration_secrets"created_atididentifierrecord_typeupdated_atDELETE /integration_secrets/{id}curl \
-X DELETE \
-H "Authorization: Bearer $TELNYX_API_KEY" \
"https://api.telnyx.com/v2/integration_secrets/550e8400-e29b-41d4-a716-446655440000"POST /telephony_credentials/{id}/tokencurl \
-X POST \
-H "Authorization: Bearer $TELNYX_API_KEY" \
-H "Content-Type: application/json" \
"https://api.telnyx.com/v2/telephony_credentials/550e8400-e29b-41d4-a716-446655440000/token"