SmsBuyz API Documentation
The SmsBuyz API allows you to programmatically purchase virtual phone numbers, receive SMS verification codes, and manage your orders. All responses are in JSON format.
Base URL: https://smsbuyz.com/v1
/v1/user/profile
Authentication
All user endpoints require a Bearer token in the Authorization header. Get your API key from Settings → API. Guest endpoints do not require authentication.
# Include in every authenticated request
Authorization: Bearer YOUR_API_KEY
Accept: application/json
GET /v1/user/profile
Get current user profile information including balance.
Headers
| Name | Value |
|---|---|
| Authorization | Bearer YOUR_API_KEY |
| Accept | application/json |
cURL Example
curl "https://smsbuyz.com/v1/user/profile" \ -H "Authorization: Bearer $TOKEN" \ -H "Accept: application/json"
Response 200
{
"id": 1,
"email": "[email protected]",
"balance": 10.50,
"rating": 0,
"default_operator": "any"
}
GET /v1/user/orders
Get order history for authenticated user.
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| category | string | No | Filter by category (activation) |
| limit | int | No | Max 100, default 50 |
| offset | int | No | Pagination offset |
curl "https://smsbuyz.com/v1/user/orders?category=activation&limit=10" \ -H "Authorization: Bearer $TOKEN" \ -H "Accept: application/json"
Response 200
[
{
"id": 123,
"phone": "79001234567",
"operator": "Virtual1",
"product": "microsoft",
"price": 0.4118,
"status": "FINISHED",
"country": "ru",
"created_at": "2026-01-15T12:00:00",
"sms": [
{
"created_at": "2026-01-15T12:01:30",
"code": "123456",
"text": "Your code is 123456"
}
]
}
]
GET /v1/user/payments
Get payment / transaction history.
curl "https://smsbuyz.com/v1/user/payments" \ -H "Authorization: Bearer $TOKEN" \ -H "Accept: application/json"
GET /v1/guest/products/{country}/{operator}
Get available products for a specific country and operator. No authentication required.
Path Parameters
| Name | Description | Example |
|---|---|---|
| country | Country name or ISO code | russia |
| operator | Operator (or "any") | any |
curl "https://smsbuyz.com/v1/guest/products/russia/any" \ -H "Accept: application/json"
Response 200
{
"microsoft": {
"Category": "activation",
"Qty": 45832,
"Price": 0.4118
},
"amazon": {
"Category": "activation",
"Qty": 12004,
"Price": 0.5147
}
}
GET /v1/guest/prices
Get prices by product, country, and operator. No authentication required.
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| product | string | No | Product name or PID |
| country | string | No | Country ISO code |
curl "https://smsbuyz.com/v1/guest/prices?product=microsoft&country=ru"
Response 200
{
"ru": {
"Virtual1": {
"cost": 0.4118,
"count": 45832
}
}
}
GET /v1/user/buy/activation/{country}/{operator}/{product}
Purchase a virtual number for SMS activation. Deducts the price from your balance.
Path Parameters
| Name | Required | Description | Example |
|---|---|---|---|
| country | Yes | Country ISO code | ru |
| operator | Yes | Operator name or "any" | Virtual1 |
| product | Yes | Product name or PID | microsoft |
curl "https://smsbuyz.com/v1/user/buy/activation/ru/Virtual1/microsoft" \ -H "Authorization: Bearer $TOKEN" \ -H "Accept: application/json"
Response 200
{
"id": 123,
"phone": "79001234567",
"operator": "Virtual1",
"product": "microsoft",
"price": 0.4118,
"status": "PENDING",
"expires": "2026-01-15T12:20:00",
"sms": [],
"created_at": "2026-01-15T12:00:00",
"country": "ru"
}
GET /v1/user/check/{id}
Check order status and receive SMS code. Poll this endpoint every 3-5 seconds until SMS arrives.
curl "https://smsbuyz.com/v1/user/check/123" \ -H "Authorization: Bearer $TOKEN" \ -H "Accept: application/json"
Response 200 (SMS received)
{
"id": 123,
"phone": "79001234567",
"operator": "Virtual1",
"product": "microsoft",
"price": 0.4118,
"status": "RECEIVED",
"country": "ru",
"sms": [
{
"created_at": "2026-01-15T12:01:30",
"code": "123456",
"text": "Your code is 123456",
"sender": "Microsoft"
}
]
}
GET /v1/user/finish/{id}
Mark order as finished after successfully using the SMS code. Only works on RECEIVED orders.
curl "https://smsbuyz.com/v1/user/finish/123" \ -H "Authorization: Bearer $TOKEN" \ -H "Accept: application/json"
GET /v1/user/cancel/{id}
Cancel a PENDING order. The full price will be refunded to your balance.
curl "https://smsbuyz.com/v1/user/cancel/123" \ -H "Authorization: Bearer $TOKEN" \ -H "Accept: application/json"
GET /v1/user/ban/{id}
Ban the phone number from being assigned to you again. Works on PENDING or RECEIVED orders.
curl "https://smsbuyz.com/v1/user/ban/123" \ -H "Authorization: Bearer $TOKEN" \ -H "Accept: application/json"
Error Codes & Order Statuses
HTTP Status Codes
| Code | Description |
|---|---|
| 200 | Success |
| 400 | Bad request — missing parameters, insufficient balance, invalid state transition |
| 401 | Missing or malformed Authorization header |
| 403 | Invalid API token |
| 404 | Resource not found |
| 503 | No numbers available right now |
Order Statuses
| Status | Description |
|---|---|
| PENDING | Number assigned, waiting for SMS |
| RECEIVED | SMS code received |
| FINISHED | Order completed successfully |
| CANCELED | Order canceled, balance refunded |
| BANNED | Number blacklisted |
| TIMEOUT | Order expired (20 min), balance auto-refunded |