Skip to content

Latest commit

 

History

History
155 lines (155 loc) · 6.67 KB

Send a parametric SMS message.md

File metadata and controls

155 lines (155 loc) · 6.67 KB

Send a parametric SMS message

Sends a parametric SMS message to a given list of recipients. With this API it is possible to put placeholders in the message body, and then, for each recipient, specify the values that will replace the placeholders in the message body, for that particular recipient message.

Placeholders are in the form ${ParameterName}

Landing Pages URLs

It is possible to include a link to a published Landing Page by specifying the

id_landing parameter
and by adding the following placeholder in the message body:
%PAGESLINK____________%
.

When using parameters, the message length possibly changes between recipents. If a message length, when processed, exceeds the 1000 characters, an error code will be returned

Landing pages must be first created and published in your user panel, since you will need

id_landing
to send it.

A list of published landing pages can be retrieved by using the Landing Pages APIs

Short URLs

When including URLs in the message, it may be convinient to use short URLs to limit the number of characters used in the SMS message.

Our API can automatically generate a short link starting from a long one, and add it in the message.

o use this feature, use the

%SHORT_LINK%
placeholder in the message body, that will be replaced with the generated short link, and the respective
short_link_url
parameter, that should be set to a valid URL. For shortlink dns personalization please contact us at helpdesk@smsend.it

Sender Alias

Alphanumeric aliases require to be registered first, and need to be approved both from Us and AGCOM.

Aliases can be used only with high-quality message types.

Remember to provide the authentication HTTP headers as described in the Authenticate using a session key and the Authenticate using a user token sections.
All the query string parameters in URL must be UTF-8 URL Encoded.

HTTP Headers

user_key / Session_key

HTTP Method

POST

HTTP Request

https://app.gateway.smsend.it/API/v1.0/REST/paramsms

Body Fields

Parameter Type Description Required Default
message_type String (“N” for High quality with reception notification, “L” for Medium Quality, “LL” For Low Cost) The type of SMS. Yes -
message String (max 1000 chars with “gsm” encoding, 450 with “ucs2” encoding) The body of the message. *Message max length could be 160 chars when using low-quality SMSs Yes -
recipients Map(String, Map(String, String)) A map of recipents and relative parameters Yes -
sender String The Sender name. If the message type allows a custom TPOA and the field is left empty, the user’s preferred TPOA is used. Must be empty if the message type does not allow a custom TPOA No “”
scheduled_delivery_time String [ddMMyy, yyyyMMdd, ddMMyyHHmm, yyyyMMddHHmmss, yyyy-MM-dd HH:mm, yyyy-MM-dd HH:mm.0] The messages will be sent at the given scheduled time No null
scheduled_delivery_timezone Timezone(IANA time zone) Optional timezone applied to scheduled_delivery_time date No -
order_id String (max 32 chars, accepts only any letters, numbers, underscore, dot and dash) Specifies a custom order ID No Generated UUID
returnCredits Bool Returns the number of credits used instead of the number of messages. i.e. when message is more than 160 chars long more than one credit is used No false
returnRemaining Bool Returs the number of remaining SMSs No false
allowInvalidRecipients Bool Sending to an invalid recipient does not block the operation No false
encoding String (“gsm” or “ucs2”) The SMS encoding. Use UCS2 for non standard character sets No “gsm”
id_landing int The id of the published page. Also add the %PAGESLINK____________% placeholder in the message body No -
campaign_name String The campaign name No -
short_link_url String The url where the short link redirects. Also add the %SHORT_LINK% placeholder in the message body No -

Returns

Code Description
200 SMS have been successfully sent. The order ID and some other informations are returned
400 Other errors, details are in the body
401 [Unauthorized] User_key, Token or Session_key are invalid or not provided
404 [Not found] The User_key was not found