# Validate phone numbers with Twilio Lookup before paying to send
Sending to a bad number costs the same as sending to a good one, then fails. Lookup v2 checks the number first, and the basic check is free.
## Procedure
1. When you collect a phone number (signup, import, form), call GET lookups.twilio.com/v2/PhoneNumbers/[number] with your credentials. Do it at collection time, not at send time.
2. Read the valid flag. False means do not send, full stop. The validation_errors field tells you why: TOO_SHORT, TOO_LONG, INVALID_COUNTRY_CODE, NOT_A_NUMBER, and friends.
3. Note the difference from v1: v2 returns HTTP 200 with valid=false for bad numbers. v1 returned 404 with code 20404. If your code treats 404 as invalid, it breaks on v2.
4. Add the line type intelligence field when it matters: landlines cannot receive SMS (error 30006), and VoIP numbers behave differently by country. Filter or reroute before spending.
5. Store the normalized E.164 phone_number from the response and use it everywhere downstream. Never re-derive formatting from user input at send time.
## Gotchas
- valid=true means the number is in an assignable range, not that it is in service. It catches typos and fakes, not disconnected lines.
- Lookup itself is cheap or free at basic level, but do it once per number and cache the result. Looking up the same list before every campaign is waste.
- SMS pumping fraud targets verification flows: a sudden burst of lookups on premium ranges is a signal, not just bad data.