app2email API מחירים

תיעוד

Check phone numbers before you send

Validate up to 100 phone numbers in one call, get their +E.164 form, and see what your own WhatsApp number knows about each: opt-in, Do Not Call, last message, the 24-hour window, and whether there is evidence the number uses WhatsApp.

Before a send, a form or an import, check the numbers in one call: is each one a real phone number format, what is its international form, and what does your WhatsApp number already know about it.

curl -X POST "https://api.app2email.com/v1/YOUR_NUMBER/numbers/check" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"numbers": ["+61 412 345 678", "0412 345 679", "+999 1234"], "default_country": "AU"}'
{
  "success": true,
  "request_id": "nchk1",
  "count": 3,
  "results": [
    { "input": "+61 412 345 678", "valid": true, "e164": "+61412345678", "country": "AU", "known": true, "opted_in": true, "opted_out": false,
      "last_inbound_at": "2026-11-23T08:12:00.000Z", "window_state": "open", "window_closes_at": "2026-11-24T07:57:00.000Z", "on_whatsapp": "yes" },
    { "input": "0412 345 679", "valid": true, "e164": "+61412345679", "country": "AU", "known": false, "opted_in": false, "opted_out": false,
      "window_state": "closed", "on_whatsapp": "unknown" },
    { "input": "+999 1234", "valid": false, "reason": "no country uses the calling code this number starts with" }
  ]
}

The key needs the messages:read scope. Up to 100 numbers per call. Nothing is changed or sent.

How numbers are read

  • With their country code: +61 412 345 678, 0061412345678 or 61412345678. Spaces, dashes, dots, brackets and slashes are ignored.
  • Without it, give default_country (a two-letter code such as AU, GB, US): 0412 345 678 becomes +61412345678. The leading trunk 0 is dropped for the countries that use one.
  • valid means the calling code exists and the number has a length that country uses. It does not prove that the number is in service: that would need a phone-number database, which this check does not use.
  • country is the country of the calling code. +1 numbers say NANP: the US, Canada and the Caribbean share it.

What each field means

FieldFrom
knownYour number has a conversation or a contact record with this number.
opted_inYou recorded an opt-in (POST /v1/{number}/optins) or marketing consent for it.
opted_outIt is on your Do Not Call list (GET /v1/{number}/donotcall).
last_inbound_at, window_state, window_closes_atThe last message it sent you. While the window is open you can send normal messages; after that, only templates.
on_whatsappSee below.

on_whatsapp: what we can and cannot know

WhatsApp's Cloud API has no lookup that says whether a phone number uses WhatsApp. So on_whatsapp only reports your own number's evidence:

  • yes: the number wrote to you, or a message you sent it was delivered or read.
  • unlikely: the newest message you sent it failed as undeliverable (WhatsApp error 131026: not on WhatsApp, an old app, or the person blocked you).
  • unknown: no evidence either way. Unknown is not no: most new numbers are unknown until the first message.

Everything in the answer comes from your number's own records. The check never says whether any other app2email customer knows a number.

AI agents use the hosted MCP tool check_numbers.

Errors

CodeStatusMeaning
missing_numbers400numbers is missing or empty.
invalid_numbers400numbers is not a list, or the body is not JSON.
too_many_numbers400More than 100 numbers: split the list.
invalid_country400default_country is not a two-letter country code the check knows.

The complete list is on the errors page.