> ## Documentation Index
> Fetch the complete documentation index at: https://help.commbox.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Validate WhatsApp account

> ### Validate WhatsApp Account
As a business, you must provide customers with the option to opt in and receive WhatsApp communications, as well as stating your business name in a clear opt-in flow process.<br>After the customer opts in, use the contacts node to validate the registered number.<br><br> For more information, visit: <https://developers.facebook.com/docs/whatsapp/guides/opt-in/><br><br><b>Note: Checking too many phone numbers without sending them messages will lead to WA banning you.</b><br>Only verify phone numbers critical to your business that you have already received opt-in for.

## OpenAPI

````json GET /whatsapp/validatecontact/{ENCRYPTED_STREAM_ID}/{PHONE_NUMBER}
{
  "openapi": "3.0.3",
  "info": {
    "title": "CommBox API",
    "x-logo": {
      "url": "https://www.commbox.io/logo/commbox_logo_large.png"
    },
    "version": "2.07",
    "termsOfService": "https://www.commbox.io/end-user-license-agreement-eula/",
    "contact": {
      "name": "commbox",
      "url": "https://www.commbox.io",
      "email": "contactus@commbox.io"
    }
  },
  "servers": [
    {
      "url": "https://api.commbox.io/",
      "description": "Production server"
    }
  ],
  "paths": {
    "/whatsapp/validatecontact/{ENCRYPTED_STREAM_ID}/{PHONE_NUMBER}": {
      "get": {
        "tags": [
          "WhatsApp"
        ],
        "summary": "Validate WhatsApp account",
        "description": "### Validate WhatsApp Account\nAs a business, you must provide customers with the option to opt in and receive WhatsApp communications, as well as stating your business name in a clear opt-in flow process.<br>After the customer opts in, use the contacts node to validate the registered number.<br><br> For more information, visit: <https://developers.facebook.com/docs/whatsapp/guides/opt-in/><br><br><b>Note: Checking too many phone numbers without sending them messages will lead to WA banning you.</b><br>Only verify phone numbers critical to your business that you have already received opt-in for.",
        "operationId": "Validate_WhatsApp_Acoount",
        "parameters": [
          {
            "name": "ENCRYPTED_STREAM_ID",
            "in": "path",
            "description": "CommBox generated encryption for the channel",
            "required": true,
            "schema": {
              "$ref": "#/components/parameters/ENCRYPTED_STREAM_ID/schema"
            }
          },
          {
            "name": "PHONE_NUMBER",
            "in": "path",
            "description": "Valid PHONE_NUMBER",
            "required": true,
            "schema": {
              "$ref": "#/components/parameters/PHONE_NUMBER/schema"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "example": 200
                    },
                    "description": {
                      "type": "string",
                      "example": "Operation successful"
                    },
                    "response_time": {
                      "type": "string",
                      "example": "2024-08-06T07:51:52.2581942Z"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "valid": {
                          "type": "boolean",
                          "example": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request, could not process the input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "status": "400",
                  "description": "Missing parameter templateName",
                  "response_time": "2024-08-06T07:51:52.2581942Z",
                  "data": [
                    {
                      "recipient": "9725551234",
                      "status": 400,
                      "failed": "Missing required parameter"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - The supplied credentials, if any, are not sufficient to access the resource",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "integer",
                      "example": 401
                    },
                    "description": {
                      "type": "string",
                      "example": "Unauthorized"
                    },
                    "response_time": {
                      "type": "string",
                      "format": "date-time",
                      "example": "2025-02-06T07:51:52.2581942Z"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not found - The requested resource is not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "integer",
                      "example": 404
                    },
                    "description": {
                      "type": "string",
                      "example": "Not Found"
                    },
                    "response_time": {
                      "type": "string",
                      "format": "date-time",
                      "example": "2025-02-06T07:51:52.2581942Z"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests - Too many requests have been made in a short period of time (Throttling)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "integer",
                      "example": 429
                    },
                    "description": {
                      "type": "string",
                      "example": "Too Many Requests"
                    },
                    "response_time": {
                      "type": "string",
                      "format": "date-time",
                      "example": "2025-02-06T07:51:52.2581942Z"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server Error - The server could not return the representation due to an internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "integer",
                      "example": 500
                    },
                    "description": {
                      "type": "string",
                      "example": "Internal Server Error"
                    },
                    "response_time": {
                      "type": "string",
                      "format": "date-time",
                      "example": "2025-02-06T07:51:52.2581942Z"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "description": "Error status code as string",
            "example": "400"
          },
          "description": {
            "type": "string",
            "description": "Human-readable description of the error",
            "example": "Missing parameter templateName"
          },
          "response_time": {
            "type": "string",
            "description": "Timestamp of the response",
            "example": "2024-08-06T07:51:52.2581942Z"
          },
          "data": {
            "type": "array",
            "description": "Array of recipient error details",
            "items": {
              "type": "object",
              "properties": {
                "recipient": {
                  "type": "string",
                  "description": "Recipient's phone number",
                  "example": "9725551234"
                },
                "status": {
                  "type": "integer",
                  "description": "Error status code",
                  "example": 400
                },
                "failed": {
                  "type": "string",
                  "description": "Failure reason",
                  "example": "Missing required parameter"
                }
              }
            }
          }
        },
        "required": [
          "status",
          "description",
          "response_time"
        ]
      }
    }
  }
}
````

