Skip to main content

JSON API request structure

All requests to API are sent in JSON format using the POST method.

Requests must contain header Content-Type: application/json, otherwise, the request will be considered invalid even if it has valid JSON.

OpenAPI specification

A machine-readable contract for this API is published alongside the documentation:

Import it into Postman, Insomnia or an OpenAPI client generator. It covers the JSON transport described on these pages: the request envelope, every documented operation selected by data[].type, the response shape, and the delivery-status webhook.

Endpoint

Base URL for synchronous API requests: https://alphasms.net

Authorization

Each request must contain an auth string with your API key obtained from your personal cabinet as an addition to the main parameters of the method:

Request example

{
"auth": "bb56a4369eb19***cfec6d1776bd25"
}

Request structure

All request parameters are passed as objects inside the data array. The set of request parameters depends on the specified request type (see API method description for more details).

The data array can contain several objects with request parameters, for example:

Request example

{
"auth": "bb56a4369eb19***cfec6d1776bd25",
"data": [
{
MESSAGE 1
},
{
MESSAGE 2
},
{
MESSAGE 3
}
]
}