Skip to main content
POST
/
api
/
v1
/
customer
/
purchase
Purchase a phone number
curl --request POST \
  --url https://virtualsms.io/api/v1/customer/purchase \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "service": "tg",
  "country": "ID"
}
'
{
  "success": true,
  "order_id": "550e8400-e29b-41d4-a716-446655440000",
  "phone_number": "628123456789",
  "service": "tg",
  "country": "ID",
  "price": 0.4,
  "status": "waiting",
  "provider": "herosms",
  "expires_at": "2026-03-14T16:00:00+08:00"
}

Documentation Index

Fetch the complete documentation index at: https://virtualsms.io/docs/llms.txt

Use this file to discover all available pages before exploring further.

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"