Skip to main content
POST
Purchase a phone number

Authorizations

X-API-Key
string
header
required

API key from virtualsms.io dashboard (Settings -> API tab). Prefix: vsms_

Body

application/json
service
string
required

Service code (e.g. tg, wa, ig)

Example:

"tg"

country
string
required

ISO country code (e.g. ID, PH, US)

Example:

"ID"

Response

Number purchased successfully

success
boolean
Example:

true

order_id
string<uuid>
Example:

"550e8400-e29b-41d4-a716-446655440000"

phone_number
string
Example:

"628123456789"

service
string
Example:

"tg"

country
string
Example:

"ID"

price
number<float>
Example:

0.4

status
string
Example:

"waiting"

provider
string
Example:

"herosms"

expires_at
string<date-time>
Example:

"2026-03-14T16:00:00+08:00"