← Twilio Developer KitCONTENT HISTORYWHAT CHANGED · RULE-BASED ANALYSIS
Update to Twilio Developer Kit
Snapshot Sep 30, 2026 · 22:50 UTC · version 0.2.2
Collection source: not recorded for this historical snapshot.
First saved snapshot
No earlier snapshot is available to establish a change.
Compare saved observations
Download comparison JSONFull technical diff · 0 changed fields
Full snapshot data
{
"name": "twilio-lookup-phone-intelligence",
"description": "Look up phone number intelligence via Twilio Lookup v2 API. Covers number validation, line type detection (mobile/landline/VoIP), SIM swap detection, caller name, identity match, and SMS pumping risk scoring. Use this skill to validate numbers or assess fraud risk before sending messages or calls.",
"included_files": [
{
"relative_path": "agents/openai.yaml",
"size_in_bytes": 245
}
],
"skill_md_contents": "---\nname: twilio-lookup-phone-intelligence\ndescription: >\n Look up phone number intelligence via Twilio Lookup v2 API. Covers number\n validation, line type detection (mobile/landline/VoIP), SIM swap detection,\n caller name, identity match, and SMS pumping risk scoring. Use this skill\n to validate numbers or assess fraud risk before sending messages or calls.\n---\n\n## Overview\n\nTwilio Lookup validates phone numbers and provides optional intelligence packages. Basic validation is free; data packages (line type, SIM swap, etc.) are paid per lookup.\n\n---\n\n## Prerequisites\n\n- Twilio account (free trial works for basic lookups)\n — New to Twilio? See `twilio-account-setup`\n- Environment variables:\n - `TWILIO_ACCOUNT_SID`\n - `TWILIO_AUTH_TOKEN`\n — See `twilio-iam-auth-setup` for credential setup and best practices\n- SDK: `pip install twilio` / `npm install twilio`\n\n---\n\n## Quickstart\n\n**Python**\n```python\nimport os\nfrom twilio.rest import Client\n\nclient = Client(os.environ[\"TWILIO_ACCOUNT_SID\"], os.environ[\"TWILIO_AUTH_TOKEN\"])\n\nphone = client.lookups.v2.phone_numbers(\"+15108675310\").fetch()\n\nprint(phone.valid) # True / False\nprint(phone.phone_number) # +15108675310 (E.164)\nprint(phone.national_format) # (510) 867-5310\nprint(phone.country_code) # US\n```\n\n**Node.js**\n```node\nconst twilio = require(\"twilio\");\nconst client = twilio(process.env.TWILIO_ACCOUNT_SID, process.env.TWILIO_AUTH_TOKEN);\n\nconst phone = await client.lookups.v2.phoneNumbers(\"+15108675310\").fetch();\n\nconsole.log(phone.valid);\nconsole.log(phone.phoneNumber);\nconsole.log(phone.nationalFormat);\n```\n\nIf `valid` is `false`, check `phone.validationErrors` for the reason.\n\n---\n\n## Key Patterns\n\n### Line Type Intelligence (paid)\n\nIdentifies mobile, landline, VoIP, toll-free, etc.\n\n**Python**\n```python\nphone = client.lookups.v2.phone_numbers(\"+15108675310\").fetch(\n fields=\"line_type_intelligence\"\n)\nprint(phone.line_type_intelligence)\n# {'type': 'mobile', 'carrier_name': 'T-Mobile USA', ...}\n```\n\n**Node.js**\n```node\nconst phone = await client.lookups.v2.phoneNumbers(\"+15108675310\").fetch({\n fields: \"line_type_intelligence\",\n});\nconsole.log(phone.lineTypeIntelligence);\n```\n\nLine types: `mobile`, `landline`, `voip`, `toll-free`, `fixedVoip`, `nonFixedVoip`, `personal`, `payphone`, `unknown`\n\n### Multiple Packages in One Request\n\n**Python**\n```python\nphone = client.lookups.v2.phone_numbers(\"+15108675310\").fetch(\n fields=\"line_type_intelligence,sim_swap,caller_name\"\n)\n```\n\n**Node.js**\n```node\nconst phone = await client.lookups.v2.phoneNumbers(\"+15108675310\").fetch({\n fields: \"line_type_intelligence,sim_swap,caller_name\",\n});\n```\n\n### Validate Before Sending\n\n**Python**\n```python\nphone = client.lookups.v2.phone_numbers(\"+invalid\").fetch()\nif not phone.valid:\n print(f\"Invalid number: {phone.validation_errors}\")\n # Handle gracefully — do not attempt to send\n```\n\n**Node.js**\n```node\nconst phone = await client.lookups.v2.phoneNumbers(\"+invalid\").fetch();\nif (!phone.valid) {\n console.log(\"Invalid number:\", phone.validationErrors);\n}\n```\n\n### Available Data Packages\n\n| Package | `fields` value | Coverage | Use case |\n|---------|---------------|----------|----------|\n| Line Type Intelligence | `line_type_intelligence` | Worldwide | Route by line type; block VoIP |\n| Caller Name | `caller_name` | US only | Show caller ID |\n| SIM Swap | `sim_swap` | Select regions | Fraud detection |\n| Identity Match | `identity_match` | Select regions | Verify ownership |\n| SMS Pumping Risk | `sms_pumping_risk` | Worldwide | Fraud prevention |\n| Reassigned Number | `reassigned_number` | US only | Check if recycled |\n\n---\n\n## Common Errors\n\n| Code | Meaning | Fix |\n|------|---------|-----|\n| 20404 | Phone number not found | Number may be invalid or unsupported format |\n| 60601 | Data package not available for this region | Check regional coverage before requesting package |\n\n---\n\n## CANNOT\n\n- **Cannot look up by name or address** — Input is always a phone number. No reverse search.\n- **Cannot get caller_name for non-US numbers** — Returns error 60600 (out of coverage).\n- **Cannot detect conditional call forwarding** — Only unconditional forwarding is detected, and only for UK carriers.\n- **Cannot guarantee SIM swap data without carrier registration** — Returns error 60606 until carrier approval is in place.\n- **Cannot use Reassigned Number outside the US** — US-only dataset with monthly update cadence.\n- **Cannot get real-time SMS pumping scores** — Scores are statistical models, not live traffic analysis.\n- **Cannot write data** — Lookup v2 is read-only (GET only). The one exception is Line Type Override (POST/DELETE).\n- **Cannot batch multiple phone numbers in one request** — One number per API call. Loop for bulk lookups.\n- **Cannot avoid billing on caller_name requests that return no data** — Billed per request regardless of whether data is returned.\n- **Cannot use Phone Number Quality Score or Pre-fill without provisioning** — Returns 60606. Contact Twilio sales to enable.\n- **Cannot guarantee deliverability from a valid lookup** — A valid number may still be unreachable (carrier issues, ported, etc.)\n\n---\n\n## Next Steps\n\n- **Send SMS after validation:** `twilio-sms-send-message`\n- **Send OTP after validation:** `twilio-verify-send-otp`\n"
}SHA-256: 034db5e4a31b68bf41bd823f6616dfb4f5c1e0d68b82fa293893dae354ff8362