API v1
Connect SMSCodex to Your Stack in One Sprint
REST and Webhook API with clear authorization scheme, SDKs, and detailed logs. We support up to 1,500 requests per second per account without SLA degradation.
How Integration Works
- 1. Authorization. Get your API key in the dashboard (Settings → API). Pass it in the X-API-Key header with every request.
- 2. Number Purchase. Send POST /api/v1/marketplace/fast-purchase/api specifying service, country, and price limit. The response contains the number, status, and expiration time.
- 3. Code Retrieval. Poll GET /api/v1/marketplace/orders/{id} or wait for a Webhook. Once the SMS arrives, the code appears in the last_code field.
- 4. Completion. Confirm the order via POST .../complete or cancel via .../cancel. Unused numbers are automatically released after TTL.
Interactive Documentation
The full OpenAPI specification is available in Swagger UI inside your dashboard. You can test every endpoint right in the browser.
Swagger (OpenAPI) →Compatible Protocol (Legacy GET API)
In addition to the primary REST API, we support a compatible GET-style protocol — 14 actions via a single endpoint. If your software already uses this format, switching takes minutes.
Base URL: smscodex.com/api/v1/stubs/handler_api.php, auth via api_key parameter. Available: getBalance, getNumberV2, getStatus, setStatus, getCountries, getPrices, and more.
Full specification is available in Swagger → "Legacy GET API" section.
Request Example (Native API)
curl -X POST https://smscodex.com/api/v1/marketplace/fast-purchase/api \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{
"service_code": "telegram",
"country": "RU",
"price_limit": 1.5,
"currency": "USD"
}'Legacy GET API
# Legacy GET API — один URL, 14 действий curl "https://smscodex.com/api/v1/stubs/handler_api.php\ ?api_key=YOUR_API_KEY&action=getBalance"