Modifie un brouillon
curl --request PATCH \
--url https://api.dexnotify.com/api/v1/marketing-campaigns/{id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "<string>",
"audience": {
"listIds": [],
"excludeListIds": []
},
"email": {
"subject": "",
"preheader": "<string>",
"fromName": "",
"fromEmail": "",
"replyTo": "<string>",
"html": "",
"design": "<unknown>"
},
"sms": {
"sender": "",
"text": "",
"unsubscribeMention": true
}
}
'const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
audience: {listIds: [], excludeListIds: []},
email: {
subject: '',
preheader: '<string>',
fromName: '',
fromEmail: '',
replyTo: '<string>',
html: '',
design: '<unknown>'
},
sms: {sender: '', text: '', unsubscribeMention: true}
})
};
fetch('https://api.dexnotify.com/api/v1/marketing-campaigns/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.dexnotify.com/api/v1/marketing-campaigns/{id}"
payload = {
"name": "<string>",
"audience": {
"listIds": [],
"excludeListIds": []
},
"email": {
"subject": "",
"preheader": "<string>",
"fromName": "",
"fromEmail": "",
"replyTo": "<string>",
"html": "",
"design": "<unknown>"
},
"sms": {
"sender": "",
"text": "",
"unsubscribeMention": True
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.dexnotify.com/api/v1/marketing-campaigns/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'audience' => [
'listIds' => [
],
'excludeListIds' => [
]
],
'email' => [
'subject' => '',
'preheader' => '<string>',
'fromName' => '',
'fromEmail' => '',
'replyTo' => '<string>',
'html' => '',
'design' => '<unknown>'
],
'sms' => [
'sender' => '',
'text' => '',
'unsubscribeMention' => true
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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;
}Campagnes
Modifie un brouillon
PATCH
/
api
/
v1
/
marketing-campaigns
/
{id}
Modifie un brouillon
curl --request PATCH \
--url https://api.dexnotify.com/api/v1/marketing-campaigns/{id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "<string>",
"audience": {
"listIds": [],
"excludeListIds": []
},
"email": {
"subject": "",
"preheader": "<string>",
"fromName": "",
"fromEmail": "",
"replyTo": "<string>",
"html": "",
"design": "<unknown>"
},
"sms": {
"sender": "",
"text": "",
"unsubscribeMention": true
}
}
'const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
audience: {listIds: [], excludeListIds: []},
email: {
subject: '',
preheader: '<string>',
fromName: '',
fromEmail: '',
replyTo: '<string>',
html: '',
design: '<unknown>'
},
sms: {sender: '', text: '', unsubscribeMention: true}
})
};
fetch('https://api.dexnotify.com/api/v1/marketing-campaigns/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.dexnotify.com/api/v1/marketing-campaigns/{id}"
payload = {
"name": "<string>",
"audience": {
"listIds": [],
"excludeListIds": []
},
"email": {
"subject": "",
"preheader": "<string>",
"fromName": "",
"fromEmail": "",
"replyTo": "<string>",
"html": "",
"design": "<unknown>"
},
"sms": {
"sender": "",
"text": "",
"unsubscribeMention": True
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.dexnotify.com/api/v1/marketing-campaigns/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'audience' => [
'listIds' => [
],
'excludeListIds' => [
]
],
'email' => [
'subject' => '',
'preheader' => '<string>',
'fromName' => '',
'fromEmail' => '',
'replyTo' => '<string>',
'html' => '',
'design' => '<unknown>'
],
'sms' => [
'sender' => '',
'text' => '',
'unsubscribeMention' => true
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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.
Path Parameters
Body
application/json
Response
200