SMS-Host API Documentation
API Documentation
API v1.0

API Documentation

Integrate SMS-Host virtual numbers directly into your application using our simple and powerful API.

All API requests should be sent using HTTPS. Keep your API key private and never expose it inside client-side code.

Authentication

Every API request requires your API key.

Request Header
Authorization: Bearer YOUR_API_KEY

Get Number

Purchase a virtual number for the selected service and country.

GET/api/get-number
ParameterTypeRequiredDescription
api_keystringRequiredYour API key
servicestringRequiredService name
countrystringRequiredCountry code
Example Request
GET /api/get-number?api_key=YOUR_API_KEY
&service=whatsapp
&country=92
JSON Response
{
    "status": "success",
    "id": "123456",
    "number": "+923001234567",
    "country": "Pakistan",
    "service": "whatsapp"
}

Get SMS

Retrieve the latest SMS received on an active number.

GET/api/get-sms
ParameterTypeRequiredDescription
api_keystringRequiredYour API key
idstringRequiredActivation ID
Example Request
GET /api/get-sms?api_key=YOUR_API_KEY
&id=123456

Cancel Number

Cancel an active number and release the activation.

POST/api/cancel
Example Request
POST /api/cancel
api_key=YOUR_API_KEY
id=123456

Balance

Check your current account balance.

GET/api/balance
Example Request
GET /api/balance?api_key=YOUR_API_KEY
JSON Response
{
    "status": "success",
    "balance": 25.50,
    "currency": "USD"
}

Response Codes

CodeStatusDescription
200SuccessRequest completed successfully.
400Bad RequestInvalid parameters.
401UnauthorizedInvalid API key.
404Not FoundRequested resource was not found.
429Too Many RequestsRate limit exceeded.
500Server ErrorInternal server error.