Sms - Outgoing

Send sms messages using query parameters.

It is strongly recommended to use the POST version instead of this version to send text messages. This endpoint is only a emergency fallback option for systems that are not capable of doing an HTTP post.

post/v4/sms/outgoing/sendusingquery

Request

  • Base URL: https://api.inmobile.com
  • URL: https://api.inmobile.com/v4/sms/outgoing/sendusingquery
  • Auth: one of:
    • HTTP basic
    • API key in query parameter apikey

Query parameters

Textstring
Example:This is a message text to be sent

The text message.

Fromstring
Example:PetShop

The sender. This can either be a 3-11 chars text sender or an up to 14 digit long sender number.</br> If the max length is exceeded, the string is truncated.

Flashboolean nullable

If true, the message will be shown as a flash message (also known as a class0 message) on the target phone. If false, it will be received as a standard text message.</br> Default: false

Encodingstring
Example:gsm7

The encoding of the message. Can be either "gsm7", "ucs2" or "auto".</br> "gsm7" is the default alphabet for text messages and when using gsm7, a single sms message can contain 160 characters. If the length exceeds 160 characters, the message is actually split up into parts of 153 characters and charged according to this. Please note, that a few, specific characters fill up 2 bytes and count for 2 letters. Ref: https://en.wikipedia.org/wiki/GSM_03.38</br> "ucs2" allows for more non-roman characters to be used along with smileys. When using this encoding, a single message can consist of 70 characters. If the message exceeds 70 characters, the final message is actually split into parts of 67 characters.</br> "auto" can be used in case the sender wishes to support non-roman characters but wants to save the expenses on all the traffic that only contains gsm characters anyway.</br> Default: "gsm7"

Tostring
Example:4512345678

The msisdn (country code and number) to send to. (Remember to include countrycode in all numbers, e.g. 4512345678).</br> If max length is exceeded, the entire api call will fail.

CountryHintstring
Example:45

For optimal phone number validation, we encourage you to provide us with a country code.</br> This can be the numeric country code (like 44) or the two-letter ISO 3166-1 alpha-2 code (like GB).</br> If this field is empty it is important that you add the country code (e.g 44) in front of the phone number in “to”.

MessageIdstring
Example:PetShop

An optional message id used to identify the message.</br> If no message id is provided, a new message id is generated and assigned to the message. This id must be unique across all messages created on the same account.</br> (In case a previous message has been deleted according to GDPR deletion rules setup on the specific account, the messageId is allowed to be reused)</br> If max length is exceeded, the entire api call will fail.

RespectBlacklistboolean nullable
Example:true

If true, this message will be blocked from sending if the target number is on the account's blacklist. If false, the message will be sent no matter blacklist settings.</br> Default: true

ValidityPeriodInSecondsinteger nullable
Example:90

The validity period in seconds. Minimum is 60 seconds and maximum is 172800 (48 hours).</br> If not specified, the messages is attempted to be delivered in 48 hours. A typical use of validityPeriod is for messages that makes no sense to delivery after a certain time frame, in the case the phone is turned off, e.g. two-factor codes.</br> Please note, that messages are still charged even though the operator is cancelling the delivery attempt due to an exceeded validity period.

StatusCallbackUrlstring
Example:https://[your_domain]/your/desired/path

In case you would like a callback from us when the message is delivered, you can specify it here, and we will call it when we have new message statuses.</br> The callback payload will be an array of status objects.</br> Api calls sending messages with the same apikey will be subject to being bulked together.

SendTime.UtcTimestring date-time
SendTime.LocalServerTimestring date-time
MsisdnCooldownInMinutesinteger nullable
Example:1440

If set, the message will be cancelled if the same mobile number already has received an SMS or an RCS message within this specified time period.</br> Fx. used to prevent spamming a mobile number.</br> Minimum 60 minutes (1 hour) and maximum is 43200 minutes (30 days).

Response

Example response

{
  "results": [
    {
      "numberDetails": {
        "countryCode": "45",
        "phoneNumber": "12345678",
        "rawMsisdn": "45 12 34 56 78",
        "msisdn": "4512345678",
        "isValidMsisdn": true,
        "countryHint": "45"
      },
      "text": "This is a message text to be sent",
      "from": "PetShop",
      "smsCount": 1,
      "messageId": "PetShop",
      "encoding": "gsm7"
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.