Send SMS messages

This request is used to send real-time or delayed SMS messages.

URLs

POST https://api.smspartner.fr/v1/send

Parameters

Each API request supports the following parameters:

  • The platform does not send commercial SMS messages between 10pm and 8am during the week and on Sundays and public holidays (legal restriction). In case of sending, the SMS messages are on pause until the next business day at 8am.
  • You do not send commercial SMS messages? Contact us: help@smspartner.fr
apiKey API key of your account. You get it in your SMS Partner account.
phoneNumbers Telephone numbers of the recipients.
When sending several SMS messages, the numbers must be separated by commas.
They can be:

  • in national (06xxxxxxxxxxxx) or international (+336xxxxxxxxxx) format, for French numbers.
  • in international format (+496xxxxxxxxxx), for numbers outside France.
message SMS content. 160 characters maximum per SMS (beyond that, you will be charged one additional SMS per 153 characters).

Be careful, some special and accented characters will be replaced when sending:

Consult the list

\r\n Allows you to make a line break.
The STOP SMS mention is mandatory for SMS with commercial characters (see parameter isStopSms below)

Optional parameters
gamme SMS range, its value must be:

  • 1 for Premium SMS
  • 2 for Low Cost SMS

  If this parameter is omitted, SMS will be sent in the Premium range.

sender Name of the sender of the message. If the sender is left empty, your SMS messages will be sent with an operator shortcode as sender (example: 36xxx).

The number of characters for the transmitter name must be between 3 and 11 inclusive and must not contain any special characters.

Some mobile phone models do not interpret spaces.

scheduledDeliveryDate Date of sending of the SMS, in dd/mm/YYYY format. To be defined only if you want SMS to be sent offline.
time SMS sending time (format 0-24), mandatory if scheduledDeliveryDate is set.
minute SMS sending time regarding minutes units (format 0-55, per five-minute interval), mandatory if scheduledDeliveryDate is defined.
isStopSms Premium range: 1 to add the mention STOP at the end of the SMS (mandatory for commercial SMS).

Low Cost range: This parameter is not applicable for this range, it is necessary to manually add the mention NoPub=STOP for commercial SMS.

sandbox To test sending SMS, you can use thesandbox:

  • 1 setting to enable sandbox mode

No SMS will be sent, and there will be no debit to your account, these SMS will be deleted from your mailing lists automatically every day.

_format Response format. You can choose between JSON or XML. By default, the response format is JSON.

Request

Request example:

Answers

Errors

Error messages examples:

Control Code

  Error Codes
1 The API Key is required
2 The telephone number is required
9 At least one constraint was not respected during the sending:

  • The transmitter cannot be longer than 11 characters.
  • Invalid phone number.
  • If scheduledDeliveryDate is set:
    • The date (dd/mm/yyyyy) is before the current date.
    • The minute is required.
    • The time is required.
10 Invalid API Key
11 Lack of funds