Loading...
Loading...
Look up phone number information (carrier, type, caller name) and verify users via SMS/voice OTP. Use for phone verification and data enrichment. This skill provides REST API (curl) examples.
npx skill4agent add team-telnyx/skills telnyx-verify-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" ;;
esac401403404422429+13125550001+page[number]page[size]meta.total_pagesGET /number_lookup/{phone_number}curl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/number_lookup/+18665552368"caller_namecarriercountry_codefraudnational_formatphone_numberportabilityrecord_typeGET /verifications/by_phone_number/{phone_number}curl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/verifications/by_phone_number/+13035551234"created_atcustom_codeidphone_numberrecord_typestatustimeout_secstypeupdated_atverify_profile_idPOST /verifications/by_phone_number/{phone_number}/actions/verifycodeverify_profile_idcurl \
-X POST \
-H "Authorization: Bearer $TELNYX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"code": "17686",
"verify_profile_id": "12ade33a-21c0-473b-b055-b3c836e1c292"
}' \
"https://api.telnyx.com/v2/verifications/by_phone_number/+13035551234/actions/verify"phone_numberresponse_codePOST /verifications/callphone_numberverify_profile_idcustom_codeextensiontimeout_secscurl \
-X POST \
-H "Authorization: Bearer $TELNYX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"phone_number": "+13035551234",
"verify_profile_id": "12ade33a-21c0-473b-b055-b3c836e1c292"
}' \
"https://api.telnyx.com/v2/verifications/call"created_atcustom_codeidphone_numberrecord_typestatustimeout_secstypeupdated_atverify_profile_idPOST /verifications/flashcallphone_numberverify_profile_idtimeout_secscurl \
-X POST \
-H "Authorization: Bearer $TELNYX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"phone_number": "+13035551234",
"verify_profile_id": "12ade33a-21c0-473b-b055-b3c836e1c292"
}' \
"https://api.telnyx.com/v2/verifications/flashcall"created_atcustom_codeidphone_numberrecord_typestatustimeout_secstypeupdated_atverify_profile_idPOST /verifications/smsphone_numberverify_profile_idcustom_codetimeout_secscurl \
-X POST \
-H "Authorization: Bearer $TELNYX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"phone_number": "+13035551234",
"verify_profile_id": "12ade33a-21c0-473b-b055-b3c836e1c292"
}' \
"https://api.telnyx.com/v2/verifications/sms"created_atcustom_codeidphone_numberrecord_typestatustimeout_secstypeupdated_atverify_profile_idGET /verifications/{verification_id}curl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/verifications/12ade33a-21c0-473b-b055-b3c836e1c292"created_atcustom_codeidphone_numberrecord_typestatustimeout_secstypeupdated_atverify_profile_idPOST /verifications/{verification_id}/actions/verifycodestatuscurl \
-X POST \
-H "Authorization: Bearer $TELNYX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"code": "12345"
}' \
"https://api.telnyx.com/v2/verifications/12ade33a-21c0-473b-b055-b3c836e1c292/actions/verify"phone_numberresponse_codeGET /verify_profilescurl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/verify_profiles"callcreated_atflashcallidlanguagenamercsrecord_typesmsupdated_atwebhook_failover_urlwebhook_urlPOST /verify_profilesnamecallflashcalllanguagercssmswebhook_failover_urlwebhook_urlcurl \
-X POST \
-H "Authorization: Bearer $TELNYX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Test Profile"
}' \
"https://api.telnyx.com/v2/verify_profiles"callcreated_atflashcallidlanguagenamercsrecord_typesmsupdated_atwebhook_failover_urlwebhook_urlGET /verify_profiles/templatescurl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/verify_profiles/templates"idtextPOST /verify_profiles/templatestextcurl \
-X POST \
-H "Authorization: Bearer $TELNYX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"text": "Your {{app_name}} verification code is: {{code}}."
}' \
"https://api.telnyx.com/v2/verify_profiles/templates"idtextPATCH /verify_profiles/templates/{template_id}textcurl \
-X PATCH \
-H "Authorization: Bearer $TELNYX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"text": "Your {{app_name}} verification code is: {{code}}."
}' \
"https://api.telnyx.com/v2/verify_profiles/templates/12ade33a-21c0-473b-b055-b3c836e1c292"idtextGET /verify_profiles/{verify_profile_id}curl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/verify_profiles/12ade33a-21c0-473b-b055-b3c836e1c292"callcreated_atflashcallidlanguagenamercsrecord_typesmsupdated_atwebhook_failover_urlwebhook_urlPATCH /verify_profiles/{verify_profile_id}callflashcalllanguagenamercssmswebhook_failover_urlwebhook_urlcurl \
-X PATCH \
-H "Authorization: Bearer $TELNYX_API_KEY" \
-H "Content-Type: application/json" \
"https://api.telnyx.com/v2/verify_profiles/12ade33a-21c0-473b-b055-b3c836e1c292"callcreated_atflashcallidlanguagenamercsrecord_typesmsupdated_atwebhook_failover_urlwebhook_urlDELETE /verify_profiles/{verify_profile_id}curl \
-X DELETE \
-H "Authorization: Bearer $TELNYX_API_KEY" \
"https://api.telnyx.com/v2/verify_profiles/12ade33a-21c0-473b-b055-b3c836e1c292"callcreated_atflashcallidlanguagenamercsrecord_typesmsupdated_atwebhook_failover_urlwebhook_url