API Reference

Base URL

GET
https://api.miatel.com
This API have a base URL to which the endpoint paths are appended. The base URL is defined by host on the root level of the API specification.

Receiving and sending SMS

GET
/sendsms
This endpoint is intended for sending messages. The response to the request will indicate the message ID, by which you can find out the delivery status. If any error occurred when sending an SMS, the message id will be missing in the response and the error code will be displayed.
Request query parameters
* required
  • * username
    string
    User or account name
  • * password
    string
    User or account password
  • * from
    string
    Sender phone number (SRC-num)
  • * to
    string
    Destination phone number (DST-num)
  • * text
    string
    Text of message
  • charset
    string
    UTF-8/UTF-16BE
  • mclass
    number
    DCS msg class (0-3]
  • validity
    number
    In minutes
  • deferred
    number
    In minutes
  • pid
    byte
    PID
  • priority
    number
    Priority (0-3]
  • ...
    -
    ...
Request samples

Simple send SMS

curl -L -X GET https://api.miatel.com/sendsms?username=foo&password=bar&from=12354567890&to=62354567890&text=hello

Set charset

curl -L -X GET https://api.miatel.com/sendsms?username=foo&password=bar&from=12354567890&to=62354567890&text=hello&charset=UTF-8
Response samples

Success

42

Error

42: Failed to send sms. status:255. code:5063

HLR and PING-SMS requests

GET
/sendsms

In order to send this request, in the message you need to send the text "HLR" or "PING", respectively.

The HLR lookup returns DLR2 or DLR5 response:

  • DLR2 — the subscriber exists (in the request body we return IMSI) - this does not mean that the phone is on, but only says that there is such a subscriber.
  • DLR5 — the subscriber does not exist.

The PING-SMS returns DLR2 or DLR5 response:

  • DLR2 — the subscriber exists, is online now.
  • DLR5 — the subscriber is not available. There is a decryption inside the message.
Response decryption (success)
  • [imsi]
    number
    International Mobile Subscriber Identity
Response decryption (error)
  • 01
    number
    UnknownSubscriber
  • 03
    number
    UnknownMSC
  • 05
    number
    UnidentifiedSubscriber
  • 06
    number
    AbsentSubscriberSM
  • 07
    number
    UnknownEquipment
  • 08
    number
    RoamingNotAllowed
  • 09
    number
    IllegalSubscriber
  • 10
    number
    BearerServiceNotProvisioned
  • 11
    number
    TeleserviceNotProvisioned
  • 12
    number
    IllegalEquipment
  • 13
    number
    CallBarred
  • 14
    number
    ForwardingViolation
  • 15
    number
    CUG_Reject
  • 16
    number
    IllegalSS_Operation
  • 17
    number
    SS_ErrorStatus
  • 18
    number
    SS_NotAvailable
  • 19
    number
    SS_SubscriptionViolation
  • 20
    number
    SS_Incompatibility
  • 21
    number
    FacilityNotSupported
  • 27
    number
    AbsentSubscriber
  • 28
    number
    IncompatibleTerminal
  • 29
    number
    ShortTermDenial
  • 30
    number
    LongTermDenial
  • 31
    number
    SubscriberBusyForMT_SM
  • 32
    number
    SM_DeliveryFailure
  • 33
    number
    MessageWaitingListFull
  • 35
    number
    DataMissing
  • 36
    number
    UnexpectedDataValue
  • 37
    number
    PW_RegistrationFailure
  • 38
    number
    NegativePW_Check
  • 39
    number
    NoRoamingNumberAvailable
  • 43
    number
    NumberOfPW_Attempts_Violation
  • 44
    number
    NumberChanged
  • 45
    number
    BusySubscriber
  • 46
    number
    NoSubscriberReply
  • 47
    number
    ForwardingFailed
  • 48
    number
    OR_NotAllowed
  • 49
    number
    ATI_NotAllowed
  • 51
    number
    ResourceLimitation
  • 71
    number
    UnknownAlphabet
  • 72
    number
    USSD_Busy
  • 245
    number
    Timeout
  • 255
    number
    Reject
Request samples

curl -L -X GET https://api.miatel.com/sendsms?username=foo&password=bar&from=12354567890&to=62354567890&text=HLR

curl -L -X GET https://api.miatel.com/sendsms?username=foo&password=bar&from=12354567890&to=62354567890&text=PING
Response samples

Success with imsi

310170845466094

Error - UnknownSubscriber

01

Get SMS status

GET
/sms_status
In order to get the status for these requests, you can send a request to our api, or provide your own link to which we will contact and report the status of the subscriber.
Request query parameters
* required
  • * id
    number
    The received id when sending smssend request.
Response decryption
  • 1
    number
    ENROUTE - the message is in enroute state
  • 2
    number
    DELIVERED - message is delivered to destination
  • 3
    number
    EXPIRED - message validity period has expired
  • 4
    number
    DELETED - message has been deleted
  • 5
    number
    UNDELIVERABLE - message is undeliverable
  • 6
    number
    ACCEPTED - message is in accepted state (i.e. has been manually read on behalf of the subscriber by customer service)
  • 7
    number
    UNKNOWN - message is in invalid state
  • 8
    number
    REJECT - message is in a rejected state
Request samples

Get SMS status

curl -L -X GET https://api.miatel.com/sms_status?username=foo&password=bar&id=756

Calling your web hook

https://api.client.com/endpoint?id=[id]&dlvrd=[dlvrd]&status=[status]
Response samples

The message was successfully delivered

2

For the details

or
Call us +6531290058
or email us sales@miatel.com