v1.0
Live
daisysim.com/api/v1/virtual
REST API · v1.0 · Live

Virtual Numbers API

Purchase real non-VoIP phone numbers from 120+ countries, receive OTP/SMS codes, and manage orders programmatically with a simple REST API.

Bearer Auth JSON 120+ Countries Real-time SMS USD Pricing
Authentication

All requests require your API key as a Bearer token in the Authorization header.

🔑 Bearer Token Authentication

Your API key is in your dashboard under Profile → API Key. Include it in every request.

HTTP Header
Authorization: Bearer your_api_key_here
Quick Flow

Follow these steps to get a verification code in minutes.

1
Get Countries
GET /countries
2
Get Services
GET /services/{id}
3
Get Prices
POST /prices
4
Purchase
POST /purchase
5
Poll for Code
GET /check/{id}
Pass price from /prices directly to /purchase. Poll /check every 3–5 seconds until status = "Completed".
Balance

Check your wallet balance, loyalty tier, and discount progress.

GET https://daisysim.com/api/v1/virtual/balance Returns wallet balance, account info, and loyalty discount status
200 OK 401 Unauthorized
JSON Response
{
  "success": true,
  "data": {
    "balance":     12.5000,
    "currency":    "USD",
    "email":       "user@example.com",
    "total_spent": 45.2000,
    "discount": {
      "tier":      "Silver",
      "percent":   10,
      "next_tier": "Gold",
      "next_at":   100,
      "needed":    54.8000
    }
  }
}
Countries

Get all supported countries. Use the id to fetch services and prices.

GET https://daisysim.com/api/v1/virtual/countries Returns full list of countries sorted alphabetically
200 OK502 Provider Error
JSON Response
{
  "success": true,
  "data": {
    "countries": [
      { "id": 4,  "name": "Afghanistan" },
      { "id": 36, "name": "Canada" },
      { "id": 6,  "name": "Russia" }
      // ...
    ]
  }
}
Services

Get available services for a specific country.

GET https://daisysim.com/api/v1/virtual/services/{country_id} Returns all services available in a country
URL Parameters
ParameterTypeRequiredDescription
country_id integer Required Country ID from /countries — e.g. 6 for Russia
Example Request
cURL
curl https://daisysim.com/api/v1/virtual/services/6 \
  -H "Authorization: Bearer your_api_key"
JSON Response
{
  "success": true,
  "data": {
    "country_id": 6,
    "services": [
      { "code": "go", "name": "Google" },
      { "code": "wa", "name": "WhatsApp" },
      { "code": "tg", "name": "Telegram" }
    ]
  }
}
Prices

Get price tiers for a country + service. Pass the price value directly to /purchase.

POST https://daisysim.com/api/v1/virtual/prices Returns price tiers with availability — rate limited to 30 req/min
Request Body (JSON)
FieldTypeRequiredDescription
countryintegerRequiredCountry ID (1–999)
servicestringRequiredService code from /services — e.g. "wa"
💡 price is the final amount deducted from your wallet. Pass it as-is to /purchase. Discount cashback is credited automatically after each code.
JSON Response
{
  "success": true,
  "data": {
    "total_numbers": 12702,
    "discount_tier": "Silver",
    "discount_pct":  10,
    "tiers": [
      {
        "tier":         1,
        "price":        1.1400,  // ← pass this to /purchase
        "discount_pct": 10,
        "available":    483
      }
    ]
  }
}
Purchase

Buy a virtual number. Send the price from /prices exactly — server validates it against live pricing.

POST https://daisysim.com/api/v1/virtual/purchase Purchase a number — rate limited to 10 req/min
Request Body (JSON)
FieldTypeRequiredDescription
countryintegerRequiredCountry ID (1–999)
servicestringRequiredService code — e.g. "wa"
pricefloatRequiredExact price from /prices — do not modify
service_namestringOptionalHuman-readable label e.g. "WhatsApp"
⚠️ Do not modify the price value. Any tampered or stale price returns INVALID_PRICE.
Example Request
cURL
curl -X POST https://daisysim.com/api/v1/virtual/purchase \
  -H "Authorization: Bearer your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "country":      6,
    "service":      "wa",
    "service_name": "WhatsApp",
    "price":        1.1400
  }'
201 Created 400 Insufficient Balance 422 Invalid Price 503 No Numbers Available
JSON Response
{
  "success": true,
  "data": {
    "activation_id":  "123456789",
    "phone_number":   "+79001234567",
    "amount_charged": 1.1400,
    "balance_after":  11.3600
  }
}
Check SMS

Poll every 3–5 seconds until you receive the verification code.

GET https://daisysim.com/api/v1/virtual/check/{activation_id} Poll for SMS code — rate limited to 60 req/min
⏱️ Poll every 3–5 seconds. Stop after 20 minutes. Consider cancelling if no code arrives within 5 minutes.
JSON — Waiting
{ "data": { "status": "Waiting", "code": null } }
JSON — Completed
{ "data": { "status": "Completed", "code": "483921", "phone_number": "+79001234567" } }
Cancel

Cancel a pending number and receive a full refund to your wallet.

POST https://daisysim.com/api/v1/virtual/cancel/{activation_id} Cancel pending number — full wallet refund — rate limited to 10 req/min
⚠️ Can only cancel after 60 seconds from purchase. Cannot cancel if a code has already been received.
200 OK 422 Too Early / Code Received 404 Not Found
JSON Response
{
  "success": true,
  "data": {
    "activation_id": "123456789",
    "refund":        1.1400,
    "balance_after": 12.5000
  }
}
Webhooks

Receive instant push notifications when an SMS code is received — no polling required.

🔔 Set your webhook URL in Settings → Webhook URL. Every code received triggers an immediate HTTP POST to your endpoint.
POST https://your-server.com/your-webhook-endpoint Called by DaisySIM when a code is received
Payload Fields
FieldTypeDescription
eventstringAlways "code.received"
activation_idstringActivation ID of the number
phone_numberstringPhone number that received the SMS
servicestringe.g. "WhatsApp"
codestringThe extracted OTP/verification code
received_atstringISO 8601 timestamp
Node.js / Express
Node.js
app.post('/webhook', express.json(), (req, res) => {
  const { event, code, activation_id, phone_number } = req.body;
  if (event === 'code.received') {
    console.log(`Code ${code} received for ${phone_number}`);
  }
  res.json({ ok: true });
});
⚠️ Your endpoint must respond with HTTP 2xx within 10 seconds. Webhooks fire once per activation on the first code received.
History

Retrieve your paginated order history with optional status filtering.

GET https://daisysim.com/api/v1/virtual/history Returns paginated list of all your orders
Query Parameters
ParameterTypeDefaultDescription
pageinteger1Page number
per_pageinteger20Items per page (max 100)
statusstringwaiting · completed · cancelled
Error Codes

All errors return a consistent envelope with a machine-readable code field.

Error Envelope
{ "success": false, "error": "Human-readable message", "code": "MACHINE_CODE" }
CodeHTTPMeaning
MISSING_TOKEN401No API key in Authorization header
INVALID_TOKEN401API key does not match any user
ACCOUNT_SUSPENDED403Account blocked by admin
ACCOUNT_LOCKED403Account temporarily locked
INSUFFICIENT_BALANCE400Wallet balance too low for purchase
INVALID_PRICE422Price does not match current pricing — refresh /prices and retry
NO_NUMBERS_AVAILABLE503Provider has no numbers in stock — try a different country
NOT_FOUND404Activation ID not found or doesn't belong to your account
TOO_EARLY422Cannot cancel — 60 seconds haven't elapsed since purchase
CODE_RECEIVED422Cannot cancel — SMS code already received
ALREADY_REFUNDED422Refund already processed for this activation
RATE_LIMITED429Too many requests — purchase 10/min · check 60/min · cancel 10/min
PROVIDER_ERROR502Upstream provider returned unexpected response
SERVER_ERROR500Internal server error — contact support