Input & Output

Validate a phone number

The /phone/validate endpoint verifies phone numbers by checking their format, structure, and validity. It ensures that numbers adhere to international standards and returns a validated phone number along with a status message.

Authentication

The validatePhone endpoint requires authentication via Salesforce OAuth 2.0. Requests must include a valid OAuth access token in the Authorization header.

Method Signature

Request Method: POST

POST /services/apexrest/recordval/v1/phone/validate

Parameters

TypeVariableDescription
PhoneValidationInput_v1phoneInputThe structured input object containing phone number validation data.

Example Request

{
  "phoneNumber": "+14155552671",
  "country": "US",
  "note": "Validating phone input",
  "format": "E164"
}

Output

Return type: PhoneValidationOutput_v1

Example Response

{
    "status": {
        "message": "Correct phone number.",
        "credit": true,
        "code": "100"
    },
    "phoneType": "FIXED_LINE_OR_MOBILE",
    "phoneNumber": "+14155552671",
    "countryCode": null,
    "advice": "GREEN"
}