Message type settings
Check which message types are enabled for a country, service and operator.
Authentication
| Name | Location | Type | Required | Description |
|---|---|---|---|---|
apikey | header | string | Yes | Your API key |
Parameters
No path or query parameters. No request body.
How to use this method
Check which message types are allowed for your combination of country, service and operator. Send the apikey header; no path or query parameters are needed. The response contains all rules in ascending setting-ID order, without the IDs themselves.
Each non-empty condition must match your combination; an empty string matches any value. A matching rule with more non-empty conditions takes priority. For example, a country-and-service rule overrides a country-only rule, and a matching operator condition makes it more specific still. Use all three flags from the selected rule together: sms, caller and voice use 1 for enabled and 0 for disabled.
If no rule matches, all three types are enabled. An empty data array is a successful response with no configured rules. These permissions do not guarantee available numbers.
The voice query parameter used for prices and number requests has a separate meaning: 0 SMS, 1 caller-ID, 2 voice call. Use the same type when comparing prices and ordering. Check number counts for stock.
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/countryservicesettings" \
--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 | Message-type settings. An empty list is a successful result. |
| 400 | The apikey header is missing, empty or shorter than 30 characters. |
| 401 | No user was found for the supplied API key. |
| 402 | The request rate limit was exceeded. This API uses HTTP 402 for this error. |
| 403 | The user is banned. |
| 500 | Internal server error. The description may contain a specific exception message when error details are enabled. |
HTTP 200
Message-type settings. An empty list is a successful result.
Service-wide and country-specific rules
{
"statusCode": 200,
"data": [
{
"country": "",
"service": "opt20",
"operator": "",
"voice": 0,
"caller": 0,
"sms": 1
},
{
"country": "FR",
"service": "opt20",
"operator": "",
"voice": 1,
"caller": 0,
"sms": 1
}
]
}No configured rules
{
"statusCode": 200,
"data": []
}Response fields
| Name | Type | Description |
|---|---|---|
statusCode | integer | (enum: [200]) |
data | array<object> | |
data[].country | string | Country code to match, or an empty string for any country. |
data[].service | string | Service code to match, or an empty string for any service. |
data[].operator | string | Operator code to match, or an empty string for any operator. |
data[].voice | integer | Voice calls: 1 = enabled, 0 = disabled. (enum: [0,1]) |
data[].caller | integer | Caller-ID: 1 = enabled, 0 = disabled. (enum: [0,1]) |
data[].sms | integer | SMS: 1 = enabled, 0 = disabled. (enum: [0,1]) |
HTTP 400
The apikey header is missing, empty or shorter than 30 characters.
Illustrative response
{
"statusCode": 400,
"error": {
"type": "APIKEY_NOT_SET",
"description": "No ApiKey found"
}
}Response fields
| Name | Type | Description |
|---|---|---|
statusCode | integer | (enum: [400]) |
error | object | |
error.type | string | |
error.description | string |
HTTP 401
No user was found for the supplied API key.
Illustrative response
{
"statusCode": 401,
"error": {
"type": "USER_NOT_FOUND",
"description": "Not found"
}
}Response fields
| Name | Type | Description |
|---|---|---|
statusCode | integer | (enum: [401]) |
error | object | |
error.type | string | |
error.description | string |
HTTP 402
The request rate limit was exceeded. This API uses HTTP 402 for this error.
Illustrative response
{
"statusCode": 402,
"error": {
"type": "RATELIMIT_EXCEED",
"description": "Request ratelimit exeeded"
}
}Response fields
| Name | Type | Description |
|---|---|---|
statusCode | integer | (enum: [402]) |
error | object | |
error.type | string | |
error.description | string |
HTTP 403
The user is banned.
Illustrative response
{
"statusCode": 403,
"error": {
"type": "USER_BANNED",
"description": "User banned"
}
}Response fields
| Name | Type | Description |
|---|---|---|
statusCode | integer | (enum: [403]) |
error | object | |
error.type | string | |
error.description | string |
HTTP 500
Internal server error. The description may contain a specific exception message when error details are enabled.
Illustrative response
{
"statusCode": 500,
"error": {
"type": "SERVER_ERROR",
"description": "An internal error has occurred while processing your request."
}
}Response fields
| Name | Type | Description |
|---|---|---|
statusCode | integer | (enum: [500]) |
error | object | |
error.type | string | |
error.description | string |
Related guides
If a connection fails during an order-changing request, check the order before trying again.