Quick Start
Endpoints
API Documentation
Welcome to the VirtualNumberOTP Developer API! Our high-performance HTTP REST API allows you to programmatically automate virtual number purchases, check SMS delivery codes, and manage account balance resources from your own systems and QA frameworks.
Base Endpoint:
http://localhost/api
Authentication
Authenticate your requests by passing your generated API key in the `Authorization` header as a Bearer token, or as a query parameter.
Header Example:
Authorization: Bearer votp_YOUR_API_KEY
Query Parameter Example:
http://localhost/api/balance?api_key=votp_YOUR_API_KEY
GET
/balance
Fetch wallet balance
cURL Request
curl -X GET "http://localhost/api/balance" \
-H "Authorization: Bearer votp_YOUR_API_KEY"
Response (200 OK)
{
"success": true,
"balance": 150.0000,
"currency": "INR"
}
POST
/buy-number
Rent a virtual number
Parameters
| Field | Type | Presence | Description |
|---|---|---|---|
| service_id | integer | required | Service identification ID (e.g. 1) |
| country_id | integer | required | Country identification ID (e.g. 1) |
cURL Request
curl -X POST "http://localhost/api/buy-number" \
-H "Authorization: Bearer votp_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"service_id": 1,
"country_id": 1
}'
Response (200 OK)
{
"success": true,
"order_id": 15,
"number": "+91 98765 43210",
"price": 5.0000,
"expires_at": "2026-05-31T15:24:00+05:30",
"status": "waiting_sms"
}
GET
/status/{id}
Retrieve SMS code results
cURL Request
curl -X GET "http://localhost/api/status/15" \
-H "Authorization: Bearer votp_YOUR_API_KEY"
Response (OTP Delivered)
{
"success": true,
"order_id": 15,
"status": "otp_received",
"otp_code": "847293",
"number": "+91 98765 43210",
"price": 5.0000,
"sms_message": "Your WhatsApp verification code is: 847293.",
"seconds_remaining": 1182
}