Only this pageAll pages
Powered by GitBook
1 of 10

API

Loading...

SMS API

Loading...

Loading...

Loading...

Loading...

Flash Call API

Loading...

Statistics API

Loading...

Send Flash Call

Endpoint

https://sms-hub.miatel.ru:4849/sendsms?

Request Parameters

Name
Type
Description

username

string

Username or account name

password

string

The password associated with the given username

from

string

The transmitted PIN/SRC number (optional)

to

string

Recipient's phone number (DST-number)

text

string

The PIN code for the transfer. You can specify the value of the ring duration rt (ring time), since the time when the call is turned on differs in different directions, and you can adjust it.

rt5 means 5 seconds of the call.

(example: rt 5_1234, where 1234 is the transmitted PIN code with a call time limit of up to 5 seconds).

Request Example

https://sms-hub.miatel.ru:4849/sendsms?username=client&password=98765&to=6585911223&text=1234

API

Welcome to Miatel API documentation ✨

If you wish to send Flash Call via HTTP API, please contact us at stating your Miatel account and the IP addresses to whitelist.

This documentation contains all the information you need to start using the Miatel API to send SMS or Flash Call and receive statistics

support@miatel.com

Send SMS

Endpoint

https://sms-hub.miatel.ru:4849/sendsms?

Parameters

username

string

Username or account name

password

string

The password associated with the given username

from

string

Sender ID (SRC-number)

to

string

Recipient's phone number (DST-number).

text

string

comment

string

(optional) The name of the communication or other comment about the sent SMS

Request Example

https://sms-hub.miatel.ru:4849/sendsms?username=client&password=98765&to=	6585911223&text=Hello

Response

You will get HTTP 202 response if the request was sent successfully, and HTTP 404 if there was an error.

Response template

<html><body>request_code: request_description. id:message_id. count:dlvrd_count. code:code_number</body></html>
<html><body>request_code: request_description. status:status_code. code:-code_number</body></html>

Used response parameters:

Name
Type
Description

request_code

number

The code of the delivery message (0 - Accepted; 4 - Failed)

request_description

string

Description of the delivery message code

message_id

string

The unique identifier of the send message

dlvrd_count

number

Number of short messages delivered. The value may be padded with leading zeros.

status_code

number

code_number

number

Example responses

<html><body>0: Accepted for delivery. id:1111e111-2d22-3c33-4b44-55555a555555. count:1. code:0</body></html>
<html><body>4: Failed to send sms. status:255. code:-5002</body></html>

Response codes & errors

List with all response codes and errors

Table with all response codes and errors

If you wish to send SMS via HTTP API, please contact us at stating your Miatel account and the IP addresses to whitelist.

Text of SMS. If the content does not fit into the maximum message size according to the currently set , the message will be split into multiple messages.

Response code
Response error status code
Response code description
support@miatel.com

0

0

No errors (Message has been successfully sent)

10

10

Wrong source number

88

88

Limit on messages per second has been exceeded

1009

20

Limit on messages per second has been exceeded

1019

255

Limit on messages per day has been exceeded

5003

255

Account is disabled

5010

255

Direction is blocked

5011

255

Сountry is blocked

5036

255

Text of the message is blocked

5037

255

Destination number is blocked

5038

255

Source number is blocked

5048

255

Account is disabled

5050

255

Account balance is too low

5060

255

Сountry is blocked

5061

255

Сountry is blocked

5063

255

Сountry is blocked

69

69

Message sending error

98

98

Message sending error

255

255

Message sending error

1001

255

Message sending error

1002

255

Message sending error

1003

100

Message sending error

1004

255

Message sending error

1005

102

Message sending error

1006

100

Message sending error

1007

102

Message sending error

1008

255

Message sending error

1010

100

Message sending error

1011

100

Message sending error

1012

255

Message sending error

1013

255

Message sending error

1014

255

Message sending error

1015

255

Message sending error

1016

255

Message sending error

1017

255

Message sending error

1018

255

Message sending error

1020

255

Message sending error

1021

97

Message sending error

1022

98

Message sending error

1023

255

Message sending error

1024

255

Message sending error

1025

255

Message sending error

1025

255

Message sending error

1026

255

Message sending error

1027

255

Message sending error

1028

255

Message sending error

5001

255

Message sending error

5002

255

Message sending error

5004

255

Message sending error

5005

255

Message sending error

5006

255

Message sending error

5007

255

Message sending error

5008

255

Message sending error

5009

255

Message sending error

5012

255

Message sending error

5013

255

Message sending error

5014

255

Message sending error

5015

255

Message sending error

5016

255

Message sending error

5017

255

Message sending error

5018

255

Message sending error

5019

255

Message sending error

5020

255

Message sending error

5021

255

Message sending error

5022

255

Message sending error

5023

255

Message sending error

5024

255

Message sending error

5025

255

Message sending error

5026

255

Message sending error

5027

255

Message sending error

5028

255

Message sending error

5029

255

Message sending error

5030

255

Message sending error

5031

255

Message sending error

5032

255

Message sending error

5033

255

Message sending error

5034

255

Message sending error

5035

255

Message sending error

5039

255

Message sending error

5040

255

Message sending error

5041

255

Message sending error

5042

255

Message sending error

5043

255

Message sending error

5044

255

Message sending error

5045

255

Message sending error

5046

255

Message sending error

5047

255

Message sending error

5049

255

Message sending error

5051

255

Message sending error

5052

255

Message sending error

5053

255

Message sending error

5054

255

Message sending error

5055

255

Message sending error

5056

255

Message sending error

5057

255

Message sending error

5058

255

Message sending error

5059

255

Message sending error

5062

255

Message sending error

5064

255

Message sending error

5065

255

Message sending error

5066

255

Message sending error

5067

255

Message sending error

5068

255

Message sending error

5069

255

Message sending error

5070

255

Message sending error

5071

255

Message sending error

5072

255

Message sending error

5073

255

Message sending error

5074

255

Message sending error

5075

255

Message sending error

5076

255

Message sending error

5077

255

Message sending error

5078

255

Message sending error

5079

255

Message sending error

5080

255

Message sending error

5081

255

Message sending error

5082

255

Message sending error

5083

255

Message sending error

5084

255

Message sending error

5085

255

Message sending error

Response error status code of Miatel platform
Response code of Miatel platform

Receive SMS

HTTP request

Link example

HTTP

http://partnersmsservice.com/send.php?login={{username}}&password={{password}}&phone={{destination}}&source={{source}}&mes={{message}}

HTTPS

https://partnersmsservice.com/send.php?login={{username}}&password={{password}}&phone={{destination}}&source={{source}}&mes={{message}}

Link parameters

The link you provided must support the following parameters:

Parameter Name
Type
Description

{{username}}

string

Username for authentication on your side

{{password}}

string

Password for authentication on your side

{{src}}

string

Sender ID

{{dst}}

string

Recipient's number

{{message}}

string

Body message

SMS to email

You can receive SMS messages from our platform. We generate an HTTP or HTTPS request from our side and send it to your system. To receive SMS messages, please contact us at and provide a link that we can use to send incoming messages.

Also, our platform's functionality allows you to receive SMS messages as email. If you would like to receive SMS messages by email, please contact us at .

support@miatel.com
support@miatel.com

Receive SMS status

There are two ways to get SMS status:

Refer to our link

It is required to refer to our link https://sms-hub.miatel.ru:8008/sms_status?id={{message_id}} where {{message_id}} is the received message id when sending the request.

Response Headers

Name
Value

Content-Type

application/json

Authorization

Bearer <token>

Response body

Name
Type
Description

currency

string

Currency of use

rate

string

Used rate plan if set

segments

number

Number of short messages delivered. The value may be padded with leading zeros.

status

number

The final code status of the message

Possible code statuses of the message

Status
Status name
Description

1

ENROUTE

The message is in enroute state

2

DELIVERED

Message is delivered to destination

3

EXPIRED

Message validity period has expired

4

DELETED

Message has been deleted

5

UNDELIVERABLE

Message is undeliverable

6

ACCEPTED

Message is in accepted state (i.e. has been manually read on behalf of the subscriber by customer service)

7

UNKNOWN

Message is in invalid state

8

REJECTED

Message is in a rejected state

Response example

200400{"currency": "EUR","rate": "0.1","segments": 1,"status": 2}

Provide a link

You provide a link to which we will refer to inform the status of the subscriber.

Link example

https://api.client.com/miatel/res.php?id={{id}}&dlvr={{dlvrd}}&status={{status}}&{{statusname}}

Supported parameters

The URI string can contain these keywords to be replaced by real values.

Field
Type
Description

{{id}}

string

The message ID allocated to the message by the SMSC when originally submitted.

{{from}}

string

Source side

{{to}}

string

Destination side

{{status}}

number

The final code status of the message.

{{sub}}

number

Number of short messages originally submitted. The value may be padded with leading zeros.

{{dlvrd}}

number

Number of short messages delivered. The value may be padded with leading zeros.

{{statusname}}

string

The final status of the message.

encoding

Apache Kafka Bridge

The Apache Kafka Bridge is designed to duplicate all messages sent through the Miatel platform into the Apache Kafka message bus. Duplication is performed using the Change Data Capture (CDC) mechanism. Messages are serialized in JSON format.

Access to the Apache Kafka Bridge

Message Fields

operation

Operation Type (INSERT, UPDATE, DELETE)

sms_hub_mccmnc_id

MCC/MNC code of the recipient

sms_hub_mccmnc_name

Decryption of the MCC/MNC code of the recipient (country and mobile operator name)

sms_hub_sms_time

The time the message was received on the Miatel platform

sms_hub_switch_id

The ordinal number of the Miatel Platform node (form 1 to 4)

src_num

Sender ID

username

Username of the Miatel Platform API

message_body

Message body

segment_num

Segment number

segment_total

Segment total

segment_id

Segment ID (in case of composite message)

dlr_code

Delivery code of the message

dlr_time

Time of message delivery to the recipient

message_id

Message ID

resp_code

Response code from the mobile operator (if available) or from the Miatel platform

dst_num

Recipient's phone number

sms_hub_sms_id

Internal sequential number of the message on the Miatel platform

sms_hub_currency_name

Currency of billing

price

Message price

remote_ip

IP address of the user of the Miatel Platform API

comment

Campaign name or comment extracted from an incoming HTTP request

Example of received data

{
"operation": "insert",
"schema": "data-sms_hub",
"table": "mdr",
"after": {
        "sms_hub_mccmnc_name": "Singapore - Singtel",
        "sms_hub_sms_time": "2023-03-05T15:20:29Z",
        "sms_hub_switch_id": 1,
        "src_num": "Miatel",
        "sms_hub_mccmnc_id": 525001,
        "username": "user_example",
        "message_body": "Hello",
        "segment_num": 1,
        "price": 0.036,
        "segment_total": 1,
        "dlr_code": 2,
        "message_id": "01d0fce6-bb81-11ed-a40f-9457a0122333",
        "resp_code": 0,
        "dst_num": "6585911223",
        "sms_hub_currency_id": 3,
        "sms_hub_sms_id": 999887766,
        "segment_id": null,
        "sms_hub_currency_name": "EUR",
        "dlr_time": "2023-03-05T15:30:01Z",
        "remote_ip": "127.0.0.1"
        "comment": "Campaign example"
        },
"commit_time": "2023-09-13T12:14:33.287567138Z"
}

Kafka parameters

  • Apache Kafka brokers are located in two data centers within the 91.206.88.0/24 network.

  • Apache Kafka version: 3.5.

  • Consensus protocol used: KRaft.

  • Messages are delivered to the topic within 30 seconds after arriving on the Miatel platform.

  • Messages in Apache Kafka are read transactionally with the read_committed transaction isolation level.

  • The key of the message in the topic is the combination of sms_hub_sms_id and sms_hub_switch_id.

Access is only granted via TLS using an ECC private key. The private key is generated by Miatel. To obtain the key, please contact support at , specifying your Miatel platform account and the IP addresses to be whitelisted, or reach out to your personal manager.

support@miatel.com
4KB
Response codes and errors.csv
Cover

SMS API

Learn how to send and receive SMS messages or check the status of your SMS via an API

Cover

Flash Call API

Send authorization codes via Miatel Flash Call API

Cover

Statistics API

Get data about sent and received SMS messages via the API