Nvia Technical Guides
SMS API Wiki 1.0
SMS API Wiki 1.0
  • Basics
    • Glossary
  • 1. Sending SMS-MT
    • 1.1 Interfaces
      • 1.1.1 HTTP Request
        • Sending text, flash and binary messages
        • Sending WAP push messages
      • 1.1.2 JSON Request
        • Sending text, flash and binary messages
        • Sending WAP push messages
      • 1.1.3 Webservices
        • Sending text, flash and binary messages
        • Sending WAP push messages
      • 1.1.4 SMPP interface
        • About the SMPP interface
        • Date time formats for scheduled delivery and validity period
    • 1.2 Date time formats
    • 1.3 Error Codes
    • 1.4 Delivery Report Callback
  • 2. SMS - 2 Ways
    • 2.1 Sonic MQ
    • 2.2 HTTP with Content-Reply (Synchronous)
    • 2.3 HTTP (2 requests)
    • 2.4 Unanswered messages
    • 2.5 Delivery reports (DLR)
  • 3. SMS Certified by Blockchain
    • 3.1 SMS Certified by Blockchain
    • 3.2 Sending a SMS certified by blockchain
  • EXAMPLES
    • GitHub sendMtSms
Powered by GitBook
On this page
  • Base URL
  • Parameters
  • Json example
  • Outputs
  1. 1. Sending SMS-MT
  2. 1.1 Interfaces
  3. 1.1.2 JSON Request

Sending text, flash and binary messages

Base URL

The base URL to which partners must request the sending of an SMS is:

https://www.panelsms.com/httpinput/sendMtSms.php?

Parameters

To send the SMS, partners must use the following parameters in the base URL:

PARAMETER NAME
DESCRIPTION
REQUIRED

user

User identifier within the Nvia Platform (contact e-mail).

Yes

apiKey

User generates the apiKey at the sms.nvia.com panel.

Yes

to

Phone number to where the SMS will be delivered. The number must be in international format (for instance: +1 222 333 444).

Yes

message

Content of the message to be delivered to the handset.

Yes

senderId

Sender of the message.

No

transactionId

User can specify a transaction id; if not, we generate one.

No

confirmation

Used if the user desires a delivery report with the status of the SMS. Can be set to true or false.

No

udh

User Data Header (UDH) is a binary structure which may be present at the start of a short message in the Short Message Service in GSM. It does not contain any text, but it specifies how the message should be formatted and processed.

No

dcs

Data coding scheme of the message. Allowed any value in the SMPP 3.4 standard. The supported values are:

  • 0 (Default Encoding – ISO-8859-1 Latin1 Encoding)

  • 1 (GSM7 Encoding)

  • 2 (Binary SMS)

  • 3 (ISO-8859-1 Latin1 Encoding)

  • 4 (Binary SMS)

  • 8 (UCS2 Encoding)

Do note that not all operators accept all forms of encoding. Contact your account manager for more information.

No

validityPeriod

Validity period can be set in a relative and an absolute format. Please check the section dedicated to datetime formats for more information. Please note that not all operators support validity period. Contact your account manager for more information.

No

scheduledDeliveryTime

Scheduled delivery time can be sent in a relative and an absolute format. Please check the section dedicated to datetime formats for more info. Please note that not all operators support validity period. Contact your account manager for more information.

No

callbackUrl

URL where the user wants to receive the status of the response in Json or Xml

No

Json example

{
    "user": "push",
    "apiKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "to": "34655051711",
    "senderId": "test25",
    "message": "test 25",
    "transactionId": "transaction-id-test-25",
    "confirmation": true,
    "callbackUrl": "https://panelsms.net/gateway/test/jsonTest.php?"
}

Outputs

If the user’s petition is correct and responseType is a json, the Nvia SMSC will answer the following:

{
    "response": {
        "status": "OK",
        "transactionId": "transaction-id-test-25"
    }
}

Where transactionId is the identifier of the message in the system. This value can be used by the sender to match the SMS with the delivery report.

If the user’s petition is incorrect, the Nvia SMSC will answer in plain text the following:

{
  "response": {
    "status": "ERROR",
    "code": "5",
    "description": "Mandatory parameter is missing"
  }
}

Where code is the numeric identifier of the error. Details regarding the error codes can be found at

Last updated 1 year ago

1.3 Error Codes