AuthorizationstringRequiredActive API key sent with the Bearer scheme.
Count audiences, manage campaigns, retrieve statistics and access invoices from your own tools.
https://api.dmseurope.com/v1/Create a key under My account → API, store it in your server-side secret manager and use it only for server-to-server exchanges.
Every request requires Bearer authentication. Accept-Language accepts fr, en, es or it and controls translated error messages.
Authorization: Bearer API_KEY
Accept-Language: enLimits are 120 reads, 20 mutations and 20 audience counts per minute, per account and per IP. On HTTP 429, wait for the number of seconds provided by Retry-After.
Open a route to see every accepted parameter, a complete request, the exact success response structure and its possible errors.
/audiences/countCount an audienceReturns current aggregate volumes without saving an audience.AuthorizationstringRequiredActive API key sent with the Bearer scheme.
Accept-LanguageenumOptionalPreferred error-message language; English is used by default.
Content-TypestringRequiredRequired JSON media type for the request body.
channelenumRequiredCampaign product used for the count.
emailEmail onlysmsSMS onlyemail_smsEmail and SMS at their scheduled datesemail_retargeting_smsEmail followed by SMS retargetingtargetingobjectRequiredNested JSON object.
countriesarrayRequiredSelected countries: FR France, GB United Kingdom, ES Spain, IT Italy.
FRFranceGBUnited KingdomESSpainITItalygeographyobjectRequiredGeographic criteria grouped by selected country.
{country}objectRequiredNested JSON object.
regionsarrayOptionalRegion IDs returned by GET /targeting/geography with type=region.
departmentsarrayOptionalDepartment or administrative-area IDs returned by GET /targeting/geography with type=department.
citiesarrayOptionalCity IDs returned by GET /targeting/geography with type=city. City results include their region and department to distinguish duplicate names.
postal_codesarrayOptionalPostal codes available for the country.
profileobjectRequiredDemographic and household criteria; use an empty object for no filter.
age_minintegerOptionalMinimum inclusive age.
age_maxintegerOptionalMaximum inclusive age.
gender_idsarrayOptionalChoose one or more gender IDs shown below. An empty array includes all genders.
1maleMale2femaleFemale3unknownUnknowncsp_idsarrayOptionalChoose one or more socio-professional category IDs shown below. An empty array includes every category.
6csp_plusHigher socioeconomic group7csp_middleMiddle socioeconomic group8csp_minusLower socioeconomic group9unknownUnknownhousing_status_idsarrayOptionalChoose one or more housing-status IDs shown below. An empty array includes every status.
10ownerOwner11tenantTenant12otherOther status4unknownUnknownhousing_type_idsarrayOptionalChoose one or more housing-type IDs shown below. An empty array includes every type.
14houseHouse15apartmentApartment16otherOther housing type5unknownUnknowncar_owner_status_idsarrayOptionalChoose the car-owner ID shown below to target vehicle owners. An empty array applies no car-ownership filter.
18ownerOwns a vehicle19non_ownerDoes not own a vehicle20unknownUnknownexclusionsobjectRequiredRecent-contact and previous-campaign exclusions.
recent_daysenumOptional0 applies no recent-contact exclusion; 15, 30 or 60 excludes contacts already reached during that many previous days.
0No recent-contact exclusion15Exclude contacts reached in the last 15 days30Exclude contacts reached in the last 30 days60Exclude contacts reached in the last 60 dayscampaign_referencesarrayOptionalExclude contacts from sent campaigns owned by the account during the last 12 months.
https://api.dmseurope.com/v1/audiences/countcurl -X POST 'https://api.dmseurope.com/v1/audiences/count' \
-H 'Authorization: Bearer API_KEY' -H 'Content-Type: application/json' \
-d '{"channel":"email","targeting":{"countries":["FR"],"geography":{"FR":{"regions":[11],"departments":[75],"cities":[],"postal_codes":["75001"]}},"profile":{"age_min":30,"age_max":55,"gender_ids":[1],"csp_ids":[],"housing_status_ids":[],"housing_type_ids":[],"car_owner_status_ids":[]},"exclusions":{"recent_days":30,"campaign_references":[]}}}'<?php
$url = 'https://api.dmseurope.com/v1/audiences/count';
$payload = <<<'JSON'
{
"channel": "email",
"targeting": {
"countries": [
"FR"
],
"geography": {
"FR": {
"regions": [
11
],
"departments": [
75
],
"cities": [],
"postal_codes": [
"75001"
]
}
},
"profile": {
"age_min": 30,
"age_max": 55,
"gender_ids": [
1
],
"csp_ids": [],
"housing_status_ids": [],
"housing_type_ids": [],
"car_owner_status_ids": []
},
"exclusions": {
"recent_days": 30,
"campaign_references": []
}
}
}
JSON;
$curl = curl_init($url);
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer API_KEY',
'Content-Type: application/json'
],
CURLOPT_POSTFIELDS => $payload,
]);
$response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_RESPONSE_CODE);
curl_close($curl);
var_dump($status, json_decode((string) $response, true));// Run this code server-side with Node.js 18 or later.
const response = await fetch('https://api.dmseurope.com/v1/audiences/count', {
method: 'POST',
headers: {
"Authorization": "Bearer API_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"channel": "email",
"targeting": {
"countries": [
"FR"
],
"geography": {
"FR": {
"regions": [
11
],
"departments": [
75
],
"cities": [],
"postal_codes": [
"75001"
]
}
},
"profile": {
"age_min": 30,
"age_max": 55,
"gender_ids": [
1
],
"csp_ids": [],
"housing_status_ids": [],
"housing_type_ids": [],
"car_owner_status_ids": []
},
"exclusions": {
"recent_days": 30,
"campaign_references": []
}
}
})
});
const data = await response.json();
if (!response.ok) throw new Error(JSON.stringify(data));
console.log(data);import json
import requests
url = "https:\/\/api.dmseurope.com\/v1\/audiences\/count"
headers = {
"Authorization": "Bearer API_KEY",
"Content-Type": "application/json"
}
payload = json.loads(r'''
{
"channel": "email",
"targeting": {
"countries": [
"FR"
],
"geography": {
"FR": {
"regions": [
11
],
"departments": [
75
],
"cities": [],
"postal_codes": [
"75001"
]
}
},
"profile": {
"age_min": 30,
"age_max": 55,
"gender_ids": [
1
],
"csp_ids": [],
"housing_status_ids": [],
"housing_type_ids": [],
"car_owner_status_ids": []
},
"exclusions": {
"recent_days": 30,
"campaign_references": []
}
}
}
''')
response = requests.request("POST", url, headers=headers, json=payload)
response.raise_for_status()
print(response.json())Success — All HTTP responses include X-Request-Id; JSON responses also include request_id.
The API is temporarily disabled.
The server configuration is incomplete.
The Bearer header is missing.
The API key is invalid or revoked.
The account is not active.
The account cannot use the current environment.
The request quota has been exceeded.
An unexpected server error occurred.
A parameter or JSON field is invalid.
The JSON body cannot be decoded.
A targeting value is unknown or unavailable.
The JSON body exceeds the permitted size.
Content-Type must be application/json.
/targeting/geographyFind geographic identifiersReturns the region, department or city identifiers accepted by targeting.AuthorizationstringRequiredActive API key sent with the Bearer scheme.
Accept-LanguageenumOptionalPreferred error-message language; English is used by default.
countryenumRequiredCountry whose geographic reference is queried.
FRFranceGBUnited KingdomESSpainITItalytypeenumRequiredReference level to return: regions, departments or cities.
regionRegiondepartmentDepartment or administrative areacityCityquerystringConditionalOptional for regions and departments. Required for cities, with at least 2 characters.
https://api.dmseurope.com/v1/targeting/geographycurl 'https://api.dmseurope.com/v1/targeting/geography?country=FR&type=city&query=Paris' \
-H 'Authorization: Bearer API_KEY'<?php
$url = 'https://api.dmseurope.com/v1/targeting/geography?country=FR&type=city&query=Paris';
$curl = curl_init($url);
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer API_KEY'
],
]);
$response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_RESPONSE_CODE);
curl_close($curl);
var_dump($status, json_decode((string) $response, true));// Run this code server-side with Node.js 18 or later.
const response = await fetch('https://api.dmseurope.com/v1/targeting/geography?country=FR&type=city&query=Paris', {
method: 'GET',
headers: {
"Authorization": "Bearer API_KEY"
}
});
const data = await response.json();
if (!response.ok) throw new Error(JSON.stringify(data));
console.log(data);import json
import requests
url = "https:\/\/api.dmseurope.com\/v1\/targeting\/geography?country=FR&type=city&query=Paris"
headers = {
"Authorization": "Bearer API_KEY"
}
response = requests.request("GET", url, headers=headers)
response.raise_for_status()
print(response.json())Success — All HTTP responses include X-Request-Id; JSON responses also include request_id.
The API is temporarily disabled.
The server configuration is incomplete.
The Bearer header is missing.
The API key is invalid or revoked.
The account is not active.
The account cannot use the current environment.
The request quota has been exceeded.
An unexpected server error occurred.
A parameter or JSON field is invalid.
/campaignsList campaignsReturns the account’s campaigns with pagination and filters.AuthorizationstringRequiredActive API key sent with the Bearer scheme.
Accept-LanguageenumOptionalPreferred error-message language; English is used by default.
pageintegerOptionalRequested page number.
per_pageintegerOptionalNumber of results per page.
statusenumOptionalExact campaign status.
draftDraftpending_validationPending reviewneeds_changesCorrections requiredscheduledScheduledsendingSendingsentSentcancelledCancelledproductenumOptionalCampaign product filter.
emailEmail onlysmsSMS onlyemail_smsEmail and SMS at their scheduled datesemail_retargeting_smsEmail followed by SMS retargetingcountryenumOptionalCountry filter.
FRFranceGBUnited KingdomESSpainITItalycreated_fromstringOptionalInclusive minimum creation date.
created_tostringOptionalInclusive maximum creation date.
scheduled_fromstringOptionalInclusive minimum scheduled date.
scheduled_tostringOptionalInclusive maximum scheduled date.
searchstringOptionalCampaign name or public reference search.
https://api.dmseurope.com/v1/campaignscurl 'https://api.dmseurope.com/v1/campaigns?page=1&per_page=20&status=scheduled&country=FR' \
-H 'Authorization: Bearer API_KEY'<?php
$url = 'https://api.dmseurope.com/v1/campaigns?page=1&per_page=20&status=scheduled&country=FR';
$curl = curl_init($url);
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer API_KEY'
],
]);
$response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_RESPONSE_CODE);
curl_close($curl);
var_dump($status, json_decode((string) $response, true));// Run this code server-side with Node.js 18 or later.
const response = await fetch('https://api.dmseurope.com/v1/campaigns?page=1&per_page=20&status=scheduled&country=FR', {
method: 'GET',
headers: {
"Authorization": "Bearer API_KEY"
}
});
const data = await response.json();
if (!response.ok) throw new Error(JSON.stringify(data));
console.log(data);import json
import requests
url = "https:\/\/api.dmseurope.com\/v1\/campaigns?page=1&per_page=20&status=scheduled&country=FR"
headers = {
"Authorization": "Bearer API_KEY"
}
response = requests.request("GET", url, headers=headers)
response.raise_for_status()
print(response.json())Success — All HTTP responses include X-Request-Id; JSON responses also include request_id.
The API is temporarily disabled.
The server configuration is incomplete.
The Bearer header is missing.
The API key is invalid or revoked.
The account is not active.
The account cannot use the current environment.
The request quota has been exceeded.
An unexpected server error occurred.
A parameter or JSON field is invalid.
/campaignsCreate a campaignCounts the audience, calculates the price, reserves credit and submits a complete campaign.AuthorizationstringRequiredActive API key sent with the Bearer scheme.
Accept-LanguageenumOptionalPreferred error-message language; English is used by default.
Content-TypestringRequiredRequired JSON media type for the request body.
Client-ReferencestringRequiredPermanent business reference unique to this campaign creation. A second creation with the same value is rejected.
namestringRequiredCampaign name.
productenumRequiredemail: email only; sms: SMS only; email_sms: both channels; email_retargeting_sms: email followed by SMS retargeting.
emailEmail onlysmsSMS onlyemail_smsEmail and SMS at their scheduled datesemail_retargeting_smsEmail followed by SMS retargetingtargetingobjectRequiredNested JSON object.
countriesarrayRequiredSelected countries: FR France, GB United Kingdom, ES Spain, IT Italy.
FRFranceGBUnited KingdomESSpainITItalygeographyobjectRequiredGeographic criteria grouped by selected country.
{country}objectRequiredNested JSON object.
regionsarrayOptionalRegion IDs returned by GET /targeting/geography with type=region.
departmentsarrayOptionalDepartment or administrative-area IDs returned by GET /targeting/geography with type=department.
citiesarrayOptionalCity IDs returned by GET /targeting/geography with type=city. City results include their region and department to distinguish duplicate names.
postal_codesarrayOptionalPostal codes available for the country.
profileobjectRequiredDemographic and household criteria; use an empty object for no filter.
age_minintegerOptionalMinimum inclusive age.
age_maxintegerOptionalMaximum inclusive age.
gender_idsarrayOptionalChoose one or more gender IDs shown below. An empty array includes all genders.
1maleMale2femaleFemale3unknownUnknowncsp_idsarrayOptionalChoose one or more socio-professional category IDs shown below. An empty array includes every category.
6csp_plusHigher socioeconomic group7csp_middleMiddle socioeconomic group8csp_minusLower socioeconomic group9unknownUnknownhousing_status_idsarrayOptionalChoose one or more housing-status IDs shown below. An empty array includes every status.
10ownerOwner11tenantTenant12otherOther status4unknownUnknownhousing_type_idsarrayOptionalChoose one or more housing-type IDs shown below. An empty array includes every type.
14houseHouse15apartmentApartment16otherOther housing type5unknownUnknowncar_owner_status_idsarrayOptionalChoose the car-owner ID shown below to target vehicle owners. An empty array applies no car-ownership filter.
18ownerOwns a vehicle19non_ownerDoes not own a vehicle20unknownUnknownexclusionsobjectRequiredRecent-contact and previous-campaign exclusions.
recent_daysenumOptional0 applies no recent-contact exclusion; 15, 30 or 60 excludes contacts already reached during that many previous days.
0No recent-contact exclusion15Exclude contacts reached in the last 15 days30Exclude contacts reached in the last 30 days60Exclude contacts reached in the last 60 dayscampaign_referencesarrayOptionalExclude contacts from sent campaigns owned by the account during the last 12 months.
volumesobjectRequiredRequested volumes by country; keys must exactly match targeting.countries.
{country}integerRequiredRequested contact volume for this country.
contentsobjectRequiredContent by country; keys must exactly match targeting.countries.
{country}objectRequiredContent object for each selected country; its exact keys depend on product.
emailobjectConditionalRequired for every selected country when the product includes email.
sender_namestringConditionalEmail sender name.
subjectstringConditionalEmail subject line.
preheaderstringOptionalOptional email preheader.
htmlstringConditionalComplete email HTML.
smsobjectConditionalRequired for every selected country when the product includes SMS.
sender_namestringConditional1 to 11 ASCII letters or digits, with at least one letter; a value resembling a telephone number is rejected.
messagestringConditionalMessage body without the automatic STOP suffix. Maximum 4 SMS segments including the country STOP suffix, personalization reserves and the 20-character short link.
destination_urlstringOptionalOptional public HTTP(S) URL, maximum 2,048 characters. It is required exactly when the message contains one {{short_url}} tag; raw URLs in the message are rejected.
scheduleobjectRequiredIANA timezone and required dispatch dates. Every dispatch must be at least 48 business hours in the future.
timezonestringRequiredIANA timezone used to validate the date offsets.
email_atstringConditionalRequired when the product includes email; forbidden for sms. For email_sms, it must be no more than 48 hours from sms_at.
sms_atstringConditionalRequired for sms and email_sms; forbidden for email and email_retargeting_sms. Local time must be between 08:00 and 19:45 and no more than 48 hours from email_at for email_sms.
retargeting_delay_hoursintegerOptionalOnly used for email_retargeting_sms: integer from 6 to 72 hours after the email; default 24.
promo_codestringOptionalOptional promotion code: 1 to 64 uppercase letters, digits, underscores or hyphens; first character must be a letter or digit.
https://api.dmseurope.com/v1/campaignscurl -X POST 'https://api.dmseurope.com/v1/campaigns' \
-H 'Authorization: Bearer API_KEY' \
-H 'Client-Reference: crm-campaign-20260829-001' \
-H 'Content-Type: application/json' \
-d '{
"name":"Summer launch 2026",
"product":"email_sms",
"targeting":{
"countries":["FR"],
"geography":{"FR":{"regions":[11],"departments":[75],"cities":[],"postal_codes":["75001"]}},
"profile":{"age_min":30,"age_max":55,"gender_ids":[1],"csp_ids":[2],"housing_status_ids":[],"housing_type_ids":[],"car_owner_status_ids":[]},
"exclusions":{"recent_days":30,"campaign_references":[]}
},
"volumes":{"FR":4000},
"contents":{"FR":{
"email":{"sender_name":"My brand","subject":"Summer offer","preheader":"Discover our offer","html":"<p>Hello</p>"},
"sms":{"sender_name":"MyBrand","message":"Discover the offer: {{short_url}}","destination_url":"https://example.com/offer"}
}},
"schedule":{"timezone":"Europe/Paris","email_at":"2026-09-15T10:00:00+02:00","sms_at":"2026-09-15T12:00:00+02:00"},
"promo_code":null
}'<?php
$url = 'https://api.dmseurope.com/v1/campaigns';
$payload = <<<'JSON'
{
"name": "Summer launch 2026",
"product": "email_sms",
"targeting": {
"countries": [
"FR"
],
"geography": {
"FR": {
"regions": [
11
],
"departments": [
75
],
"cities": [],
"postal_codes": [
"75001"
]
}
},
"profile": {
"age_min": 30,
"age_max": 55,
"gender_ids": [
1
],
"csp_ids": [
2
],
"housing_status_ids": [],
"housing_type_ids": [],
"car_owner_status_ids": []
},
"exclusions": {
"recent_days": 30,
"campaign_references": []
}
},
"volumes": {
"FR": 4000
},
"contents": {
"FR": {
"email": {
"sender_name": "My brand",
"subject": "Summer offer",
"preheader": "Discover our offer",
"html": "<p>Hello</p>"
},
"sms": {
"sender_name": "MyBrand",
"message": "Discover the offer: {{short_url}}",
"destination_url": "https://example.com/offer"
}
}
},
"schedule": {
"timezone": "Europe/Paris",
"email_at": "2026-09-15T10:00:00+02:00",
"sms_at": "2026-09-15T12:00:00+02:00"
},
"promo_code": null
}
JSON;
$curl = curl_init($url);
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer API_KEY',
'Client-Reference: crm-campaign-20260829-001',
'Content-Type: application/json'
],
CURLOPT_POSTFIELDS => $payload,
]);
$response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_RESPONSE_CODE);
curl_close($curl);
var_dump($status, json_decode((string) $response, true));// Run this code server-side with Node.js 18 or later.
const response = await fetch('https://api.dmseurope.com/v1/campaigns', {
method: 'POST',
headers: {
"Authorization": "Bearer API_KEY",
"Client-Reference": "crm-campaign-20260829-001",
"Content-Type": "application/json"
},
body: JSON.stringify({
"name": "Summer launch 2026",
"product": "email_sms",
"targeting": {
"countries": [
"FR"
],
"geography": {
"FR": {
"regions": [
11
],
"departments": [
75
],
"cities": [],
"postal_codes": [
"75001"
]
}
},
"profile": {
"age_min": 30,
"age_max": 55,
"gender_ids": [
1
],
"csp_ids": [
2
],
"housing_status_ids": [],
"housing_type_ids": [],
"car_owner_status_ids": []
},
"exclusions": {
"recent_days": 30,
"campaign_references": []
}
},
"volumes": {
"FR": 4000
},
"contents": {
"FR": {
"email": {
"sender_name": "My brand",
"subject": "Summer offer",
"preheader": "Discover our offer",
"html": "<p>Hello</p>"
},
"sms": {
"sender_name": "MyBrand",
"message": "Discover the offer: {{short_url}}",
"destination_url": "https://example.com/offer"
}
}
},
"schedule": {
"timezone": "Europe/Paris",
"email_at": "2026-09-15T10:00:00+02:00",
"sms_at": "2026-09-15T12:00:00+02:00"
},
"promo_code": null
})
});
const data = await response.json();
if (!response.ok) throw new Error(JSON.stringify(data));
console.log(data);import json
import requests
url = "https:\/\/api.dmseurope.com\/v1\/campaigns"
headers = {
"Authorization": "Bearer API_KEY",
"Client-Reference": "crm-campaign-20260829-001",
"Content-Type": "application/json"
}
payload = json.loads(r'''
{
"name": "Summer launch 2026",
"product": "email_sms",
"targeting": {
"countries": [
"FR"
],
"geography": {
"FR": {
"regions": [
11
],
"departments": [
75
],
"cities": [],
"postal_codes": [
"75001"
]
}
},
"profile": {
"age_min": 30,
"age_max": 55,
"gender_ids": [
1
],
"csp_ids": [
2
],
"housing_status_ids": [],
"housing_type_ids": [],
"car_owner_status_ids": []
},
"exclusions": {
"recent_days": 30,
"campaign_references": []
}
},
"volumes": {
"FR": 4000
},
"contents": {
"FR": {
"email": {
"sender_name": "My brand",
"subject": "Summer offer",
"preheader": "Discover our offer",
"html": "<p>Hello</p>"
},
"sms": {
"sender_name": "MyBrand",
"message": "Discover the offer: {{short_url}}",
"destination_url": "https://example.com/offer"
}
}
},
"schedule": {
"timezone": "Europe/Paris",
"email_at": "2026-09-15T10:00:00+02:00",
"sms_at": "2026-09-15T12:00:00+02:00"
},
"promo_code": null
}
''')
response = requests.request("POST", url, headers=headers, json=payload)
response.raise_for_status()
print(response.json())Success — All HTTP responses include X-Request-Id; JSON responses also include request_id.
The API is temporarily disabled.
The server configuration is incomplete.
The Bearer header is missing.
The API key is invalid or revoked.
The account is not active.
The account cannot use the current environment.
An active postpaid account with a positive limit is required.
The request quota has been exceeded.
An unexpected server error occurred.
A parameter or JSON field is invalid.
The JSON body cannot be decoded.
Client-Reference is missing.
Client-Reference does not match the required format.
A targeting value is unknown or unavailable.
The JSON body exceeds the permitted size.
Content-Type must be application/json.
The reference already identifies a campaign creation.
Available credit is insufficient.
The complete campaign violates a business rule.
/campaigns/{reference}Get a campaignReturns targeting, content, schedule, pricing, moderation and production information.AuthorizationstringRequiredActive API key sent with the Bearer scheme.
Accept-LanguageenumOptionalPreferred error-message language; English is used by default.
referencestringRequiredPublic campaign reference.
https://api.dmseurope.com/v1/campaigns/{reference}curl 'https://api.dmseurope.com/v1/campaigns/CMP-2026-0000123' \
-H 'Authorization: Bearer API_KEY'<?php
$url = 'https://api.dmseurope.com/v1/campaigns/CMP-2026-0000123';
$curl = curl_init($url);
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer API_KEY'
],
]);
$response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_RESPONSE_CODE);
curl_close($curl);
var_dump($status, json_decode((string) $response, true));// Run this code server-side with Node.js 18 or later.
const response = await fetch('https://api.dmseurope.com/v1/campaigns/CMP-2026-0000123', {
method: 'GET',
headers: {
"Authorization": "Bearer API_KEY"
}
});
const data = await response.json();
if (!response.ok) throw new Error(JSON.stringify(data));
console.log(data);import json
import requests
url = "https:\/\/api.dmseurope.com\/v1\/campaigns\/CMP-2026-0000123"
headers = {
"Authorization": "Bearer API_KEY"
}
response = requests.request("GET", url, headers=headers)
response.raise_for_status()
print(response.json())Success — All HTTP responses include X-Request-Id; JSON responses also include request_id.
The API is temporarily disabled.
The server configuration is incomplete.
The Bearer header is missing.
The API key is invalid or revoked.
The account is not active.
The account cannot use the current environment.
The request quota has been exceeded.
An unexpected server error occurred.
A parameter or JSON field is invalid.
The campaign is absent or belongs to another account.
/campaigns/{reference}Replace a campaignFully replaces an editable campaign. The same Client-Reference may be reused with new content.AuthorizationstringRequiredActive API key sent with the Bearer scheme.
Accept-LanguageenumOptionalPreferred error-message language; English is used by default.
Content-TypestringRequiredRequired JSON media type for the request body.
Client-ReferencestringRequiredBusiness reference for the update. It may be reused for later updates, with identical or different JSON.
referencestringRequiredPublic campaign reference.
namestringRequiredCampaign name.
productenumRequiredemail: email only; sms: SMS only; email_sms: both channels; email_retargeting_sms: email followed by SMS retargeting.
emailEmail onlysmsSMS onlyemail_smsEmail and SMS at their scheduled datesemail_retargeting_smsEmail followed by SMS retargetingtargetingobjectRequiredNested JSON object.
countriesarrayRequiredSelected countries: FR France, GB United Kingdom, ES Spain, IT Italy.
FRFranceGBUnited KingdomESSpainITItalygeographyobjectRequiredGeographic criteria grouped by selected country.
{country}objectRequiredNested JSON object.
regionsarrayOptionalRegion IDs returned by GET /targeting/geography with type=region.
departmentsarrayOptionalDepartment or administrative-area IDs returned by GET /targeting/geography with type=department.
citiesarrayOptionalCity IDs returned by GET /targeting/geography with type=city. City results include their region and department to distinguish duplicate names.
postal_codesarrayOptionalPostal codes available for the country.
profileobjectRequiredDemographic and household criteria; use an empty object for no filter.
age_minintegerOptionalMinimum inclusive age.
age_maxintegerOptionalMaximum inclusive age.
gender_idsarrayOptionalChoose one or more gender IDs shown below. An empty array includes all genders.
1maleMale2femaleFemale3unknownUnknowncsp_idsarrayOptionalChoose one or more socio-professional category IDs shown below. An empty array includes every category.
6csp_plusHigher socioeconomic group7csp_middleMiddle socioeconomic group8csp_minusLower socioeconomic group9unknownUnknownhousing_status_idsarrayOptionalChoose one or more housing-status IDs shown below. An empty array includes every status.
10ownerOwner11tenantTenant12otherOther status4unknownUnknownhousing_type_idsarrayOptionalChoose one or more housing-type IDs shown below. An empty array includes every type.
14houseHouse15apartmentApartment16otherOther housing type5unknownUnknowncar_owner_status_idsarrayOptionalChoose the car-owner ID shown below to target vehicle owners. An empty array applies no car-ownership filter.
18ownerOwns a vehicle19non_ownerDoes not own a vehicle20unknownUnknownexclusionsobjectRequiredRecent-contact and previous-campaign exclusions.
recent_daysenumOptional0 applies no recent-contact exclusion; 15, 30 or 60 excludes contacts already reached during that many previous days.
0No recent-contact exclusion15Exclude contacts reached in the last 15 days30Exclude contacts reached in the last 30 days60Exclude contacts reached in the last 60 dayscampaign_referencesarrayOptionalExclude contacts from sent campaigns owned by the account during the last 12 months.
volumesobjectRequiredRequested volumes by country; keys must exactly match targeting.countries.
{country}integerRequiredRequested contact volume for this country.
contentsobjectRequiredContent by country; keys must exactly match targeting.countries.
{country}objectRequiredContent object for each selected country; its exact keys depend on product.
emailobjectConditionalRequired for every selected country when the product includes email.
sender_namestringConditionalEmail sender name.
subjectstringConditionalEmail subject line.
preheaderstringOptionalOptional email preheader.
htmlstringConditionalComplete email HTML.
smsobjectConditionalRequired for every selected country when the product includes SMS.
sender_namestringConditional1 to 11 ASCII letters or digits, with at least one letter; a value resembling a telephone number is rejected.
messagestringConditionalMessage body without the automatic STOP suffix. Maximum 4 SMS segments including the country STOP suffix, personalization reserves and the 20-character short link.
destination_urlstringOptionalOptional public HTTP(S) URL, maximum 2,048 characters. It is required exactly when the message contains one {{short_url}} tag; raw URLs in the message are rejected.
scheduleobjectRequiredIANA timezone and required dispatch dates. Every dispatch must be at least 48 business hours in the future.
timezonestringRequiredIANA timezone used to validate the date offsets.
email_atstringConditionalRequired when the product includes email; forbidden for sms. For email_sms, it must be no more than 48 hours from sms_at.
sms_atstringConditionalRequired for sms and email_sms; forbidden for email and email_retargeting_sms. Local time must be between 08:00 and 19:45 and no more than 48 hours from email_at for email_sms.
retargeting_delay_hoursintegerOptionalOnly used for email_retargeting_sms: integer from 6 to 72 hours after the email; default 24.
promo_codestringOptionalOptional promotion code: 1 to 64 uppercase letters, digits, underscores or hyphens; first character must be a letter or digit.
https://api.dmseurope.com/v1/campaigns/{reference}curl -X PUT 'https://api.dmseurope.com/v1/campaigns/CMP-2026-0000123' \
-H 'Authorization: Bearer API_KEY' \
-H 'Client-Reference: crm-update-20260829-001' \
-H 'Content-Type: application/json' \
-d '{
"name":"Summer launch 2026",
"product":"email_sms",
"targeting":{
"countries":["FR"],
"geography":{"FR":{"regions":[11],"departments":[75],"cities":[],"postal_codes":["75001"]}},
"profile":{"age_min":30,"age_max":55,"gender_ids":[1],"csp_ids":[2],"housing_status_ids":[],"housing_type_ids":[],"car_owner_status_ids":[]},
"exclusions":{"recent_days":30,"campaign_references":[]}
},
"volumes":{"FR":4000},
"contents":{"FR":{
"email":{"sender_name":"My brand","subject":"Summer offer","preheader":"Discover our offer","html":"<p>Hello</p>"},
"sms":{"sender_name":"MyBrand","message":"Discover the offer: {{short_url}}","destination_url":"https://example.com/offer"}
}},
"schedule":{"timezone":"Europe/Paris","email_at":"2026-09-15T10:00:00+02:00","sms_at":"2026-09-15T12:00:00+02:00"},
"promo_code":null
}'<?php
$url = 'https://api.dmseurope.com/v1/campaigns/CMP-2026-0000123';
$payload = <<<'JSON'
{
"name": "Summer launch 2026",
"product": "email_sms",
"targeting": {
"countries": [
"FR"
],
"geography": {
"FR": {
"regions": [
11
],
"departments": [
75
],
"cities": [],
"postal_codes": [
"75001"
]
}
},
"profile": {
"age_min": 30,
"age_max": 55,
"gender_ids": [
1
],
"csp_ids": [
2
],
"housing_status_ids": [],
"housing_type_ids": [],
"car_owner_status_ids": []
},
"exclusions": {
"recent_days": 30,
"campaign_references": []
}
},
"volumes": {
"FR": 4000
},
"contents": {
"FR": {
"email": {
"sender_name": "My brand",
"subject": "Summer offer",
"preheader": "Discover our offer",
"html": "<p>Hello</p>"
},
"sms": {
"sender_name": "MyBrand",
"message": "Discover the offer: {{short_url}}",
"destination_url": "https://example.com/offer"
}
}
},
"schedule": {
"timezone": "Europe/Paris",
"email_at": "2026-09-15T10:00:00+02:00",
"sms_at": "2026-09-15T12:00:00+02:00"
},
"promo_code": null
}
JSON;
$curl = curl_init($url);
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer API_KEY',
'Client-Reference: crm-update-20260829-001',
'Content-Type: application/json'
],
CURLOPT_POSTFIELDS => $payload,
]);
$response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_RESPONSE_CODE);
curl_close($curl);
var_dump($status, json_decode((string) $response, true));// Run this code server-side with Node.js 18 or later.
const response = await fetch('https://api.dmseurope.com/v1/campaigns/CMP-2026-0000123', {
method: 'PUT',
headers: {
"Authorization": "Bearer API_KEY",
"Client-Reference": "crm-update-20260829-001",
"Content-Type": "application/json"
},
body: JSON.stringify({
"name": "Summer launch 2026",
"product": "email_sms",
"targeting": {
"countries": [
"FR"
],
"geography": {
"FR": {
"regions": [
11
],
"departments": [
75
],
"cities": [],
"postal_codes": [
"75001"
]
}
},
"profile": {
"age_min": 30,
"age_max": 55,
"gender_ids": [
1
],
"csp_ids": [
2
],
"housing_status_ids": [],
"housing_type_ids": [],
"car_owner_status_ids": []
},
"exclusions": {
"recent_days": 30,
"campaign_references": []
}
},
"volumes": {
"FR": 4000
},
"contents": {
"FR": {
"email": {
"sender_name": "My brand",
"subject": "Summer offer",
"preheader": "Discover our offer",
"html": "<p>Hello</p>"
},
"sms": {
"sender_name": "MyBrand",
"message": "Discover the offer: {{short_url}}",
"destination_url": "https://example.com/offer"
}
}
},
"schedule": {
"timezone": "Europe/Paris",
"email_at": "2026-09-15T10:00:00+02:00",
"sms_at": "2026-09-15T12:00:00+02:00"
},
"promo_code": null
})
});
const data = await response.json();
if (!response.ok) throw new Error(JSON.stringify(data));
console.log(data);import json
import requests
url = "https:\/\/api.dmseurope.com\/v1\/campaigns\/CMP-2026-0000123"
headers = {
"Authorization": "Bearer API_KEY",
"Client-Reference": "crm-update-20260829-001",
"Content-Type": "application/json"
}
payload = json.loads(r'''
{
"name": "Summer launch 2026",
"product": "email_sms",
"targeting": {
"countries": [
"FR"
],
"geography": {
"FR": {
"regions": [
11
],
"departments": [
75
],
"cities": [],
"postal_codes": [
"75001"
]
}
},
"profile": {
"age_min": 30,
"age_max": 55,
"gender_ids": [
1
],
"csp_ids": [
2
],
"housing_status_ids": [],
"housing_type_ids": [],
"car_owner_status_ids": []
},
"exclusions": {
"recent_days": 30,
"campaign_references": []
}
},
"volumes": {
"FR": 4000
},
"contents": {
"FR": {
"email": {
"sender_name": "My brand",
"subject": "Summer offer",
"preheader": "Discover our offer",
"html": "<p>Hello</p>"
},
"sms": {
"sender_name": "MyBrand",
"message": "Discover the offer: {{short_url}}",
"destination_url": "https://example.com/offer"
}
}
},
"schedule": {
"timezone": "Europe/Paris",
"email_at": "2026-09-15T10:00:00+02:00",
"sms_at": "2026-09-15T12:00:00+02:00"
},
"promo_code": null
}
''')
response = requests.request("PUT", url, headers=headers, json=payload)
response.raise_for_status()
print(response.json())Success — All HTTP responses include X-Request-Id; JSON responses also include request_id.
The API is temporarily disabled.
The server configuration is incomplete.
The Bearer header is missing.
The API key is invalid or revoked.
The account is not active.
The account cannot use the current environment.
An active postpaid account with a positive limit is required.
The request quota has been exceeded.
An unexpected server error occurred.
A parameter or JSON field is invalid.
The JSON body cannot be decoded.
Client-Reference is missing.
Client-Reference does not match the required format.
A targeting value is unknown or unavailable.
The JSON body exceeds the permitted size.
Content-Type must be application/json.
The campaign is absent or belongs to another account.
The campaign status does not allow replacement.
Available credit is insufficient.
The complete campaign violates a business rule.
/campaigns/{reference}/cancelCancel a campaignCancels an eligible campaign and releases reserved credit when applicable. Client-Reference is not required.AuthorizationstringRequiredActive API key sent with the Bearer scheme.
Accept-LanguageenumOptionalPreferred error-message language; English is used by default.
Content-TypestringConditionalRequired only when a JSON cancellation body is sent.
referencestringRequiredPublic campaign reference.
reasonstringOptionalOptional cancellation reason.
https://api.dmseurope.com/v1/campaigns/{reference}/cancelcurl -X POST 'https://api.dmseurope.com/v1/campaigns/CMP-2026-0000123/cancel' \
-H 'Authorization: Bearer API_KEY' -H 'Content-Type: application/json' \
-d '{"reason":"Cancelled by CRM operator"}'<?php
$url = 'https://api.dmseurope.com/v1/campaigns/CMP-2026-0000123/cancel';
$payload = <<<'JSON'
{
"reason": "Cancelled by CRM operator"
}
JSON;
$curl = curl_init($url);
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer API_KEY',
'Content-Type: application/json'
],
CURLOPT_POSTFIELDS => $payload,
]);
$response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_RESPONSE_CODE);
curl_close($curl);
var_dump($status, json_decode((string) $response, true));// Run this code server-side with Node.js 18 or later.
const response = await fetch('https://api.dmseurope.com/v1/campaigns/CMP-2026-0000123/cancel', {
method: 'POST',
headers: {
"Authorization": "Bearer API_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"reason": "Cancelled by CRM operator"
})
});
const data = await response.json();
if (!response.ok) throw new Error(JSON.stringify(data));
console.log(data);import json
import requests
url = "https:\/\/api.dmseurope.com\/v1\/campaigns\/CMP-2026-0000123\/cancel"
headers = {
"Authorization": "Bearer API_KEY",
"Content-Type": "application/json"
}
payload = json.loads(r'''
{
"reason": "Cancelled by CRM operator"
}
''')
response = requests.request("POST", url, headers=headers, json=payload)
response.raise_for_status()
print(response.json())Success — All HTTP responses include X-Request-Id; JSON responses also include request_id.
The API is temporarily disabled.
The server configuration is incomplete.
The Bearer header is missing.
The API key is invalid or revoked.
The account is not active.
The account cannot use the current environment.
The request quota has been exceeded.
An unexpected server error occurred.
A parameter or JSON field is invalid.
The JSON body cannot be decoded.
The JSON body exceeds the permitted size.
Content-Type must be application/json.
The campaign is absent or belongs to another account.
The campaign status does not allow cancellation.
/campaigns/{reference}/statisticsGet campaign statisticsReturns current totals and breakdowns by country, language and channel.AuthorizationstringRequiredActive API key sent with the Bearer scheme.
Accept-LanguageenumOptionalPreferred error-message language; English is used by default.
referencestringRequiredPublic campaign reference.
https://api.dmseurope.com/v1/campaigns/{reference}/statisticscurl 'https://api.dmseurope.com/v1/campaigns/CMP-2026-0000123/statistics' \
-H 'Authorization: Bearer API_KEY'<?php
$url = 'https://api.dmseurope.com/v1/campaigns/CMP-2026-0000123/statistics';
$curl = curl_init($url);
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer API_KEY'
],
]);
$response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_RESPONSE_CODE);
curl_close($curl);
var_dump($status, json_decode((string) $response, true));// Run this code server-side with Node.js 18 or later.
const response = await fetch('https://api.dmseurope.com/v1/campaigns/CMP-2026-0000123/statistics', {
method: 'GET',
headers: {
"Authorization": "Bearer API_KEY"
}
});
const data = await response.json();
if (!response.ok) throw new Error(JSON.stringify(data));
console.log(data);import json
import requests
url = "https:\/\/api.dmseurope.com\/v1\/campaigns\/CMP-2026-0000123\/statistics"
headers = {
"Authorization": "Bearer API_KEY"
}
response = requests.request("GET", url, headers=headers)
response.raise_for_status()
print(response.json())Success — All HTTP responses include X-Request-Id; JSON responses also include request_id.
The API is temporarily disabled.
The server configuration is incomplete.
The Bearer header is missing.
The API key is invalid or revoked.
The account is not active.
The account cannot use the current environment.
The request quota has been exceeded.
An unexpected server error occurred.
A parameter or JSON field is invalid.
The campaign is absent or belongs to another account.
/invoicesList invoicesReturns invoices and credit notes. Each item contains pdf_url, whose path includes opaque_reference.AuthorizationstringRequiredActive API key sent with the Bearer scheme.
Accept-LanguageenumOptionalPreferred error-message language; English is used by default.
pageintegerOptionalRequested page number.
per_pageintegerOptionalNumber of results per page.
typeenumOptionalDocument type filter.
invoiceInvoicecredit_noteCredit notestatusstringOptionalExact invoice lifecycle status.
payment_statusstringOptionalExact payment status.
issued_fromstringOptionalInclusive minimum issue date.
issued_tostringOptionalInclusive maximum issue date.
campaign_referencestringOptionalPublic campaign reference filter.
https://api.dmseurope.com/v1/invoicescurl 'https://api.dmseurope.com/v1/invoices?page=1&per_page=20&type=invoice&payment_status=paid' \
-H 'Authorization: Bearer API_KEY'<?php
$url = 'https://api.dmseurope.com/v1/invoices?page=1&per_page=20&type=invoice&payment_status=paid';
$curl = curl_init($url);
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer API_KEY'
],
]);
$response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_RESPONSE_CODE);
curl_close($curl);
var_dump($status, json_decode((string) $response, true));// Run this code server-side with Node.js 18 or later.
const response = await fetch('https://api.dmseurope.com/v1/invoices?page=1&per_page=20&type=invoice&payment_status=paid', {
method: 'GET',
headers: {
"Authorization": "Bearer API_KEY"
}
});
const data = await response.json();
if (!response.ok) throw new Error(JSON.stringify(data));
console.log(data);import json
import requests
url = "https:\/\/api.dmseurope.com\/v1\/invoices?page=1&per_page=20&type=invoice&payment_status=paid"
headers = {
"Authorization": "Bearer API_KEY"
}
response = requests.request("GET", url, headers=headers)
response.raise_for_status()
print(response.json())Success — All HTTP responses include X-Request-Id; JSON responses also include request_id.
The API is temporarily disabled.
The server configuration is incomplete.
The Bearer header is missing.
The API key is invalid or revoked.
The account is not active.
The account cannot use the current environment.
The request quota has been exceeded.
An unexpected server error occurred.
A parameter or JSON field is invalid.
/invoices/{number}Get an invoiceReturns the structured legal document and pdf_url containing opaque_reference.AuthorizationstringRequiredActive API key sent with the Bearer scheme.
Accept-LanguageenumOptionalPreferred error-message language; English is used by default.
numberstringRequiredLegal invoice or credit-note number.
https://api.dmseurope.com/v1/invoices/{number}curl 'https://api.dmseurope.com/v1/invoices/INV-2026-000123' \
-H 'Authorization: Bearer API_KEY'<?php
$url = 'https://api.dmseurope.com/v1/invoices/INV-2026-000123';
$curl = curl_init($url);
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer API_KEY'
],
]);
$response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_RESPONSE_CODE);
curl_close($curl);
var_dump($status, json_decode((string) $response, true));// Run this code server-side with Node.js 18 or later.
const response = await fetch('https://api.dmseurope.com/v1/invoices/INV-2026-000123', {
method: 'GET',
headers: {
"Authorization": "Bearer API_KEY"
}
});
const data = await response.json();
if (!response.ok) throw new Error(JSON.stringify(data));
console.log(data);import json
import requests
url = "https:\/\/api.dmseurope.com\/v1\/invoices\/INV-2026-000123"
headers = {
"Authorization": "Bearer API_KEY"
}
response = requests.request("GET", url, headers=headers)
response.raise_for_status()
print(response.json())Success — All HTTP responses include X-Request-Id; JSON responses also include request_id.
The API is temporarily disabled.
The server configuration is incomplete.
The Bearer header is missing.
The API key is invalid or revoked.
The account is not active.
The account cannot use the current environment.
The request quota has been exceeded.
An unexpected server error occurred.
A parameter or JSON field is invalid.
The document is absent or belongs to another account.