Dépose un fichier CSV ou XLSX de destinataires pour un envoi groupé (`fileId`)
curl --request POST \
--url https://api.dexnotify.com/api/v1/sms/messages/files \
--header 'Content-Type: multipart/form-data' \
--header 'x-api-key: <api-key>' \
--form file=@example-file \
--form 'mapping=<string>'const form = new FormData();
form.append('file', '<string>');
form.append('mapping', '<string>');
const options = {method: 'POST', headers: {'x-api-key': '<api-key>'}};
options.body = form;
fetch('https://api.dexnotify.com/api/v1/sms/messages/files', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.dexnotify.com/api/v1/sms/messages/files"
files = { "file": ("example-file", open("example-file", "rb")) }
payload = { "mapping": "<string>" }
headers = {"x-api-key": "<api-key>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.dexnotify.com/api/v1/sms/messages/files",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"mapping\"\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Content-Type: multipart/form-data",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}SMS
Dépose un fichier CSV ou XLSX de destinataires pour un envoi groupé (fileId)
Dépose un fichier CSV ou XLSX de destinataires pour un envoi groupé (fileId)
POST
/
api
/
v1
/
sms
/
messages
/
files
Dépose un fichier CSV ou XLSX de destinataires pour un envoi groupé (`fileId`)
curl --request POST \
--url https://api.dexnotify.com/api/v1/sms/messages/files \
--header 'Content-Type: multipart/form-data' \
--header 'x-api-key: <api-key>' \
--form file=@example-file \
--form 'mapping=<string>'const form = new FormData();
form.append('file', '<string>');
form.append('mapping', '<string>');
const options = {method: 'POST', headers: {'x-api-key': '<api-key>'}};
options.body = form;
fetch('https://api.dexnotify.com/api/v1/sms/messages/files', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.dexnotify.com/api/v1/sms/messages/files"
files = { "file": ("example-file", open("example-file", "rb")) }
payload = { "mapping": "<string>" }
headers = {"x-api-key": "<api-key>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.dexnotify.com/api/v1/sms/messages/files",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"mapping\"\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Content-Type: multipart/form-data",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}Authorizations
Clé API du projet, créée dans le dashboard (Développeurs › Clés API et SDK). Une clé dxn_prod_ vise la production, une clé dxn_stag_ le staging.
Body
multipart/form-data
Response
201
Fichier déposé ; supprimé après 24 h s'il n'est pas envoyé