Discover
our APIs
Get to the heart of our technology with our dedicated API documentation.
SMS API
You can now integrate the ability to send SMS directly from your business applications. With a single account, MTarget can send your SMS messages to France and abroad. All you need to do is specify the additional destinations you want.
Please note that you are obliged to take into account recipients’ wishes to stop receiving SMS messages.
Depending on the country of destination (determined by the telephone prefix of their mobile number), they may be offered different channels for exercising this right (“STOP” response on a shortcode or long number indicated in the message sent, use of a link to an unsubscribe page, etc.), and different laws and regulations may govern the terms and conditions.
You can open an account to test our service free of charge. There is no obligation to create an account. To open an account, send an e-mail to support@mtarget.fr specifying :
- Vos contact details :
– account email
– last name
– first name
– company name
– Siret
– phone number - The fixed IP addresses of the servers from which messages will be sent if you want IP control.
In return, we’ll provide you with the credentials you need to use the API.
The shipping account we open for you can support several different offers and tariffs depending on the destination and operator. Please let us know which destinations you would like to test.
In order to secure your account, we offer an IP restriction on your account. You must provide us with the IP of your servers when you create your account or before your tests. Don’t forget to provide us with the IPs of your test PCs or servers, if you have any.
We can provide you with our sending IP so that you can set up equivalent restrictions on your side.
The combined use of IP protection, API password protection and the TLS protocol to secure exchanges guarantees a high level of security, compatible with most requirements. However, our technical teams are at your disposal to study with you the implementation of additional security mechanisms likely to meet the needs of your Information Systems Security Policy.
Our response times to your requests are normally well below one second. However, we advise you to set up a 45s timeout on your side. Non-response on our part should not be regarded as normal behavior and should not be used as a reason for returning the request.
Service access
The API is available via two URLs. If your account is configured with restricted access to certain IPs,
the URL you should use is : https://api.mtarget.fr/
Otherwise, the URL to use without IP control is : https://api-public.mtarget.fr/.
This URL will systematically return an error message if your account is an IP-controlled account.
If, during your tests, our service doesn’t respond and goes into timeout, it’s because you have an IP-restricted account and the IP you’re using is not authorized.
For reasons of backward compatibility, these URLs also respond in HTTP, but this behavior is not guaranteed in the long term, and we strongly recommend that you use the secure HTTPS protocol for your requests.
In France, sending SMS is subject to strict time regulations (other countries may have their own time regulations, please consult support). On distingue deux types de SMS et nous vous proposons donc plusieurs offres :
- SMS Marketing
SMS marketing messages are advertising à promotional messages for mass communication (promotions, sales, etc.).
These shipments are authorized in France from Monday to Saturday, 8am to 10pm. They are prohibited on Sundays and public holidays.
In addition, marketing messages must contain the words “STOP 36180”.allowing customers to opt-out of receiving further messages.
If you send us content on a marketing offer between 22:00 and 08:00, the SMS will be put on hold and sent at 08:00. SMS messages sent on public holidays and Sundays will be refused.
- SMS Alerting
SMS alerting concerns notification messages intended for individual communication, such as appointment scheduling, parcel deliveries, home automation alerts, etc.
Alerting messages are not affected by SMS Marketing time restrictions. Marketing content is of course strictly forbidden on this offer.
Any abuse may result in account closure and contractual penalties.
API RCS
RCS (Rich Communication Services) is a protocol for sending multimedia messages to your customers via an agent dedicated to your brand or company.
The use of these APIs depends on two factors:
- Open an account to test our service. Creating an account is free and without obligation. To open an account, send an e-mail to support@mtarget.fr and csm@mtarget.fr with “API RCS account creation” in the subject line, specifying your contact details:
- account email
- name
- first name
- company name
- Siret
- cell phone number
In return, we provide you with the log-in details to connect to our portal.
- The opening of an agent with French metropolitan operators. Once your API account has been opened, you can connect to our portal to fill in a form, including the graphic resources required for the BOT.
Time2Chat API
Time2Chat uses native cell phone technologies to send both SMS and voice messages via the same number, facilitating exchanges between brands and customers.
NB: For this service, use the SMS API documentation. The sender field will be used to personalize your Time2Chat message.
You can open an account to test our service. There is no obligation to create an account. To open an account, send an e-mail to support@mtarget.fr with the subject line “Create a T2C account” and specifying :
– Your contact details :
- account email
- name
- first name
- company name
- Siret
- phone number
– The fixed IP addresses of the servers from which messages will be sent if you want IP control.
– In return, we’ll suggest the available sender numbers with their associated rates. Once you’ve made your choice, we’ll provide you with the logins you need to use the API. T2C SMS is sent using our classic SMS API.
API Voice
You can send pre-recorded voice messages to your contacts. Depending on the destination, messages can be sent via direct dialing or deposited on an answering machine.
To request access send an email to support@mtarget.fr. avec comme sujet de mail “Demande d’accès à l’API de Push Vocal” et en précisant vos coordonnées :
- account email
- name
- first name
- company name
- Siret
- cell phone number
Once you’ve requested access, we’ll provide you with login details to access our online API, so you can program your voice pushes and retrieve your statistics.
Simplify your life with our free documentation.
CRM & CMS
Use our dedicated connectors to easily integrate our SMS solution into your existing technical architecture, making it easy to automate specific tasks.
The system is compatible with various CRMs and CMSs, such as Salesforce, Adobe Campaign and Selligent, as well as WordPress, Marketo and numerous industry-specific CMRs such as Immofacile and Horus.
We allow you to send SMS messages on your Marketo tool.
Registration
You can open an account to test our service. Creating an account is free and without obligation. To open an account, send an e-mail to support@mtarget.fr with the subject “Create a Marketo API account” and your contact details:
- account email
- name
- first name
- company name
- Siret
- cell phone number
In return, we’ll provide you with the credentials you need to use the API.
The shipping account we open for you can support several different offers and tariffs depending on the destination and operator. Please let us know which destinations you would like to test.
Create a new webhook
To start the integration, first create a new Webhook :
- Go to Admin > Webhook > New Webhook
- Enter the following parameters:
- Webhook Name: the name of your new webhook
- URL: https://api-public-2.mtarget.fr/messages
- Request Type: POST
- Template: username={{my.SMS username}}&password={{my.SMS password}}&serviceid={{my.SMS serviceid}}&msisdn=%2B{{lead.Phone Number}}&msg={{my.SMS message}}&timetosend={{my.SMS timetosend}}&sender={{my.SMS sender}}
- Request Token Encoding : Form/Url
- Response type: XML
Please note: Changing these settings may take a few minutes to be taken into account by Marketo.
Create the corresponding tokens
Once the webhook has been created, you need to associate the corresponding parameters with it. To do this, go to Marketing Activities and create a token for each parameter received during registration:
- SMS username: username transmitted on reception
- SMS password: password sent upon registration
- SMS serviceid: serviceid sent on registration
Then, in the Program’s Activity section, enter the following parameters (required)
- SMS message: The content of your message.
- SMS sender : Sender personalization: 11 alphanumeric characters, e.g. “Store” (default value differs by country and operator). Some operators will refuse sender personalization (e.g. in France NRJ Mobile or Transatel).
- SMS timetosend : Date and time of message transmission (format: yyyy-MM-dd HH:mm:ss ex: 2038-01-19 04:14:08). The timetosend can’t be more than 24 hours in the future, so longer lead times must be managed on your side. Even if programmed in advance, it is not possible to cancel a message. The time zone is that of France. If, in the meantime, a recipient indicates that he no longer wishes to receive SMS messages (STOP), you will no longer be able to manage him on these pre-programmed sendings. Please note: this field is optional, but if entered in the template, it must be in the expected format (not empty).
Test
The webhook is now configured. Call it once to check that it works. If there are any problems, take a closer look at the webhook feedback.
We give you the possibility to send SMS from your WordPress site thanks to the integration of the plug-in WP SMS PLUG-IN.
Registration
You can open an account to test our service. Creating an account is free and without obligation. To open an account, send an e-mail to support@mtarget.fr with the subject line “WordPress API account creation” and your contact details:
- account email
- name
- first name
- company name
- Siret
- cell phone number
In return, we’ll provide you with the credentials you need to use the API.
The shipping account we open for you can support several different offers and tariffs depending on the destination and operator. Please let us know which destinations you would like to test.
Use
- Install the plug-in, then go to the Settings tab > Gateway to configure your account.
- Select Mtarget in the Gateway name field.
- Configure your username and password with those supplied when you registered. You can choose a personalized sender in the Sender number field (11 characters).
- The Send as unicode option must be ticked if you want to send characters not supported by conventional SMS. Please note that this option reduces the length of an SMS from 160 to 70 characters.
- If you want to send your own SMS messages, the plugin includes a wp_sms_send function that takes two parameters into account: an array of msisdns and the message to be sent (see example below).
$to[] = ‘+33xxxx1’;
$to[] = ‘+33xxxx2’;
$msg = “Test”;
wp_sms_send($to, $msg);
For more information on the plug-in’s features, please visit https://wordpress.org/plugins/wp-sms/.
SMPP & SFTP
We give you the flexibility to optimize your SMS campaigns to suit your needs.
Choose between the SMPP protocol, a robust solution for sending bulk SMS messages, and the SFTP connection mode, ideal for integrating and automating your campaigns in a secure way.
For more information on these technologies, see our detailed guides.
SMPP
You can find out more about SMPP on the website https://smpp.org .
To use this connection, please contact support@mtarget.fr with “SMPP account creation” in the subject line and the following information:
- your IP addresses from which to launch the SMPP connection.
- your contact details: surname, first name, company name, Siret and telephone number
SFTP
Upload your files to our SFTP server to send your SMS campaigns. The messages are sent and you recover a file containing the acknowledgments of each message as well as the unsubscriptions (STOP).
This protocol is one of the most secure and reliable. It is perfectly suited to mass mailings (such as SMS marketing campaigns) of up to 1 million recipients. For larger numbers, you’ll need to send several files.
Please note that depending on the country of destination, you are obliged to take into account the desire of SMS recipients to be able to unsubscribe. This often takes the form of people sending STOP in return for a message. This information is detailed in the STOP Report section.
To use SMS sending via SFTP repository, please contact support@mtarget.fr with email subject “SFTP account creation”.
Here is the information you need to send us in the e-mail:
- contact details: surname, first name, company name, Siret and telephone number
- fixed IP addresses of servers from which files will be sent
- If you wish to activate the Mo (answers)
- If you wish to receive the campaign tracking by e-mail
Routing
With a single account, MTarget can route your SMS messages in France and abroad. We’re connected to more than 700 operators in 280 destinations, so all you need to do is tell us which destinations you’re interested in beforehand.
IMPORTANT : Time restrictions SMS MARKETING France. SMS Marketing concerns advertising messages of a promotional nature for mass communication (promotions, sales… etc).
Marketing mailings are authorized: Monday to Saturday, 8am to 10pm. Sundays and public holidays excluded.
For any campaign sent outside the authorized days and times, messages will be kept on hold and sent on the next working day at 8am.
Credit deduction: Your account is debited when your campaign is sent (not when it is scheduled). Make sure you have enough credit in your account when you send your campaign, otherwise it may be cancelled or only partially sent.
Protocol
We have SFTP servers with IP filtering.
Sending files is immediate, and your file will be processed as soon as it is uploaded to the SFTP. The speed of transmission depends on the load of links with operators.
The SFTP lock consists of 2 directories:
- Send
- Report
Security
For security reasons, we block unknown IP addresses. You will need to inform us of your fixed IP addresses at the following address: support@mtarget.fr.
Other security mechanisms can also be implemented, such as authentication using asymmetric RSA keys (the technical department will be happy to work with you on options compatible with your requirements).
As part of good practice, we ask you to delete the recovered data from the SFTP. We reserve the right to do so for files older than one month.
Follow-up on campaign acceptance by e-mail
As an option, you can receive information by e-mail about the status of your campaign. An initial e-mail is sent when the file is submitted, confirming that the file complies with the nomenclature set up. A second e-mail is sent when the campaign is launched, informing you of the number of sms that have been programmed.
File format
The file must be in csv format (semicolon separator) according to the standard: https: //www.ietf.org/rfc/rfc4180.txt
File encoding The encoding of the source file must be in UTF-8 (the encoding can be modified on the MTarget side if required).
File formatting : The file must not contain column headers. Each line of the CSV file will be of the form: IDREMOTE;NUMTEL;EMETTEUR ;MSG
IDREMOTE: This is a free field limited to 40 alphanumeric characters, i.e. unaccented lower- or uppercase characters from A to Z and numbers from 0 to 9. This allows you to give us a business identifier, which we will return to you in the acknowledgement report.
NUMTEL : Corresponds to the mobile number, which must be in international format (+33). Your file must be deduplicated.
SENDER: This field can be customized with 11 alphanumeric characters without accentuation.
MSG: Message content. You can send long text messages (+160 characters) if the option is enabled on your account.
Character counting: Please note that in the GSM alphabet, some characters take up 2 bytes, e.g. the EURO € sign, “€ [ ] {}”. To calculate the length, the characters in the message text must be counted independently of the source encoding (i.e., applying the 1 byte=1 car rule), and an extra byte must be added for each double-counted character, so that the total does not exceed 160 bytes.
For unicode shipments, please contact us.
For long messages (+160 characters), we allow up to 5 * 153 GSM characters. (7 characters are used for message concatenation).
Text encoding Final encoding of message text for sending: GSM 03.38
Table of gsm characters: http: //en.wikipedia.org/wiki/GSM_03.38
Characters not included in the gsm alphabet are automatically replaced.
Field delimiter: Important: All field delimiters ( ; ) must be present.
Example: The file to be uploaded will contain a set of lines as shown below:
VSQR0339;+33787798753;Housing;http://www.URL.com/fr/ref-VSQR0339 4P 79m2 3rd floor Imm old 2Chbres Volumes view Perfect condition
File name
The file name should be formalised as follows: SEND-SERVICEID-DATE-TIME-IDCAMPAGNE.csv
SEND : Mandatory prefix that can be written in upper or lower case.
SERVICEID: this is a 5-digit parameter given to you when you open your account.
DATE : in YYYYMMDD format
TIME : in HHMM format
IDCAMPAGNE : This is a free field that can contain a maximum of 20 alphanumeric characters, i.e. unaccented lower- or uppercase characters from A to Z, and numbers from 0 to 9.
Example: SEND-12345-20160728-1827-testpushsftp.csv
Delayed dispatch: You can defer the sending of a campaign by specifying the desired date and time. Please note: your file will be taken into account as soon as it is uploaded to the SFTP. It will therefore not be possible to modify or cancel scheduled mailings by re-downloading a different version of the initial file. In this case, you will need to contact M-Target support as soon as possible to cancel the deferred campaign.
Please note that if, in the meantime, a recipient informs us that they no longer wish to receive SMS messages (STOP), you will no longer be able to manage these pre-programmed messages.
If you upload a file with a date in the past, it will be sent immediately.
File processing
File upload: Files for sending campaigns are uploaded to the send directory. Files deposited in the root directory will not be processed. To avoid the file being processed before the end of the transfer, the file must be deposited with the extension “.tmp”. Once the file has been uploaded, rename it to “.csv”. It will be taken into account instantly as soon as it is renamed, and we will add the “.lock” extension while the file is being processed.
Example If you upload SEND-12345-20160728-1827-testpushsftp.tmp, you rename it to SEND-12345-20160728-1827-testpushsftp.csv. When the file is accepted by our system, it is renamed to .lock
Compliant file
If your file conforms and has been processed, it will be renamed to .done.
Example : SEND-12345-20160728-1827-testpushsftp.done
Non-compliant file
If your file is non-compliant and could not be processed, it will be renamed to .reject.
Example : SEND-12345-20160728-1827-testpushsftp.reject
This status means that no SMS has been sent.
Acknowledgement report
The acknowledgement report is available in this directory at :
D+4 for shipments over 10,000 SMS
D+1 for shipments of less than 10,000 SMS with a daily update for 4 days.
File name A csv file will be filed with the following name: ACK-SERVICEID-DATE-HEURE-IDCAMPAGNE.csv
Example: ACK-12345-20160728-1827-testpushsftp.csv
File contents: The file will contain the following data: IDREMOTE;NUMTEL;EMETTEUR;MSG;IDSTATUS;STATUS;ACKOPERATEUR
Example: VZBL6259;+33787789959;Housing;http://www.URL.com/fr/ref-VSQR0339 4P 79m2 3rd floor Imm old 2Chbres Volumes view Perfect condition;2 ;sent;92c30692-705b-4433-8789-92a1e78104b4
IDSTATUS and STATUS:
STOP Report
A file containing the CAMPAIGN’s STOPs will be available and updated in real time. If the file is deleted after you have processed it, and a new STOP is received, we will recreate the file.
File name A csv file will be uploaded with the following name: STOP-SERVICEID-DATE-HEURE-IDCAMPAGNE.csv
Example: STOP-12345-20160728-1827-testpushsftp.csv
File contents : The file will contain the following data: TELNUMBER;DATE;TIME;CONTENT;OTEID
Blacklist management: MTarget offers you the option of setting up a blacklist on your account to guarantee that you won’t communicate with numbers that have answered STOP.
SMS-MO report
A file containing the MOs (responses) for the CAMPAIGN will be available and updated in real time. If the file is deleted after processing on your part and a new MO is received, we will recreate the file.
File name: A csv file will be uploaded with the following name: SMSMO-SERVICEID-DATE-HEURE-IDCAMPAGNE.csv
Example: SMSMO-12345-20160728-1827-testpushsftp.csv
File contents: The file will contain the following data: TELNUMBER;DATE;TIME;CONTENT;OTEID
Tools
API Test
This tool allows our support team to retrieve the elements sent to the https://api-test.mtarget.fr/ substitution address in order to help you solve problems during the deployment of our API (your password is not transmitted).
In this way, we can retrieve your IP address so that you can authorize it to use our services.
Simply replace the API URL with this test URL and send an e-mail to support@mtarget.fr for assistance.
Character counting
This tool lets you enter your message and estimate the number of SMS messages needed to send it. It lets you know which characters cannot be sent using theGSM alphabet.
If these characters are not present in the GSM alphabet, it is necessary to switch to the Unicode format, which drastically reduces the size of an SMS to 70 characters (compared with 160 in GSM).
Excluding Unicode, beyond 160 characters and in order to chain SMS messages, the GSM standard imposes an SMS length of 153 characters (normal message: 160 characters, long message: 153 +153 + …).
Please note that this tool cannot technically take into account the presence of certain characters (invisible, etc.) linked to your system. Only a unit test will enable you to be sure of the number of sms in your message.