Conversion rates
Compare SMS reception quality indicators for a service across countries.
Authentication
| Name | Location | Type | Required | Description |
|---|---|---|---|---|
apikey | header | string | Yes | Your API key |
Parameters
| Name | Location | Type | Required | Description |
|---|---|---|---|---|
service | path | string | Yes | Service code |
No request body is required.
How to use this method
Compare how likely a service is to receive an SMS in each country. Send its service code to get country-level conversion rates. These are quality indicators, not a guarantee that a particular SMS will arrive.
Request examples
Runtime requirements and environment setup. cURL uses a POSIX shell. JavaScript and TypeScript run in Node.js. Java uses the standard HTTP client and prints raw JSON; use your application’s JSON library to inspect the body.
: "${SMSPVA_API_KEY:?Set SMSPVA_API_KEY}"
curl --fail-with-body --max-time 30 --request GET \
--url "https://api.smspva.com/activation/conversions/opt1" \
--header "apikey: $SMSPVA_API_KEY"Responses
The examples below show the response format. Prices, stock and account values are sample data; use the API response for current values.
| HTTP | Description |
|---|---|
| 200 | Successful operation |
| 400 | No ApiKey found |
HTTP 200
Successful operation
Illustrative response
{
"statusCode": 200,
"data": {
"service": "opt1",
"conversions": {
"UA": 3,
"KZ": 2,
"RU": 3
}
}
}Response fields
| Name | Type | Description |
|---|---|---|
statusCode | integer | Result status code |
data | object | Response data |
data.service | string | Service code |
data.conversions | object | Map of countries to conversion rates |
data.conversions.* | integer | Quality indicator (0-3, where 3 is the best quality) |
HTTP 400
No ApiKey found
Illustrative response
{
"statusCode": 400,
"error": {
"type": "APIKEY_NOT_SET",
"description": "No ApiKey found"
}
}Response fields
| Name | Type | Description |
|---|---|---|
statusCode | integer | Result status code |
error | object | Error data |
error.type | string | Error type |
error.description | string | Error description |
Related guides
If a connection fails during an order-changing request, check the order before trying again.