Skip to content

Check Phone Number

Endpoint

GET {base_url}/api/v1/whatsapp/check_phone_number/{phone_number}

Authentication

This API requires authentication using the auth:api middleware. The request must include a Bearer Token for authorization.

Description

This API is used to verify whether a given phone number is valid and registered on WhatsApp. It returns the validation status along with the corresponding WhatsApp chat ID if the number is registered.

Request Parameters

{phone_number} (Path Parameter) – The phone number to be verified, provided in international format without the + sign.

Response

The API returns a JSON response containing the verification status of the phone number. Successful Response (200 OK)

{
  "isSuccessful": true,
  "hasContent": true,
  "code": 200,
  "message": null,
  "detailed_error": null,
  "data": {
    "status": "valid",
    "chatId": "963997846199@c.us"
  }
}

Response Fields

  • isSuccessful (boolean) – Indicates whether the API call was successful.
  • hasContent(boolean) – Specifies whether the response contains data.
  • code (integer) – HTTP response status code (e.g., 200 for success).
  • message (string | null) – Additional response message (usually null in successful cases).
  • detailed_error (string | null) – Provides detailed error information if applicable.
  • data (object) – Contains the verification result:
  • status (string) – Indicates whether the phone number is valid (valid or invalid).
  • chatId (string) – The corresponding WhatsApp chat ID if the number is registered.

Error Responses

If the request fails due to invalid authentication, missing parameters, or an invalid phone number, the response may include an appropriate error message.