E-mails transactionnels
Lister les e-mails transactionnels
GET
/
api
/
v1
/
transactional-mails
Lister les e-mails transactionnels
curl --request GET \
--url https://{host}/api/v1/transactional-mails \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{host}/api/v1/transactional-mails', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{host}/api/v1/transactional-mails",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}import requests
url = "https://{host}/api/v1/transactional-mails"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"template": "<string>",
"subject": "<string>",
"from": "jsmith@example.com",
"to": [
"jsmith@example.com"
],
"cc": [
"jsmith@example.com"
],
"bcc": [
"jsmith@example.com"
],
"status": "pending",
"failure_reason": "<string>",
"opens": 123,
"clicks": 123,
"sent_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z"
}
],
"links": {
"first": "<string>",
"last": "<string>",
"prev": "<string>",
"next": "<string>"
},
"meta": {
"current_page": 123,
"from": 123,
"last_page": 123,
"path": "<string>",
"per_page": 123,
"to": 123,
"total": 123
}
}{
"message": "Unauthenticated."
}{
"message": "<string>"
}Autorisations
Jeton d'API. Aptitude « read » : routes GET seulement. « read + write » : toutes les routes.
Paramètres de requête
Plage requise:
x >= 1Plage requise:
1 <= x <= 100Nom du modèle.
Options disponibles:
pending, sent, failed Un destinataire.
⌘I
Lister les e-mails transactionnels
curl --request GET \
--url https://{host}/api/v1/transactional-mails \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{host}/api/v1/transactional-mails', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{host}/api/v1/transactional-mails",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}import requests
url = "https://{host}/api/v1/transactional-mails"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"template": "<string>",
"subject": "<string>",
"from": "jsmith@example.com",
"to": [
"jsmith@example.com"
],
"cc": [
"jsmith@example.com"
],
"bcc": [
"jsmith@example.com"
],
"status": "pending",
"failure_reason": "<string>",
"opens": 123,
"clicks": 123,
"sent_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z"
}
],
"links": {
"first": "<string>",
"last": "<string>",
"prev": "<string>",
"next": "<string>"
},
"meta": {
"current_page": 123,
"from": 123,
"last_page": 123,
"path": "<string>",
"per_page": 123,
"to": 123,
"total": 123
}
}{
"message": "Unauthenticated."
}{
"message": "<string>"
}