contact

get formatted number

Format a phone number into standardized format

post/instances/{id}/client/action/get-formatted-number

Request

  • Base URL: https://waapi.app/api/v1
  • URL: https://waapi.app/api/v1/instances/{id}/client/action/get-formatted-number
  • Auth: HTTP bearer

Path parameters

idinteger required

Instance ID

Request body

numberstring required

Phone number to format

Example request

{
  "number": "+1234567890"
}

Response

Request reached the instance. data.status reports whether the action was carried out; on error data carries message and explanation. Payload: Number formatting result.

status'success' | 'error'

Whether the request reached the instance. success here does not mean the action was carried out — that is reported by data.status, which is the authoritative one. A malformed input arrives as status: success with data.status: error.

Example response

{
  "status": "success",
  "data": {
    "status": "success",
    "data": {
      "formattedNumber": "12345678901@c.us",
      "number": "1234567890"
    }
  },
  "links": {
    "self": "https://waapi.app/api/v1/instances/1/client/action/get-formatted-number"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.