E-mails transactionnels
Renvoyer un e-mail transactionnel
Envoie à nouveau, aux mêmes destinataires, avec les mêmes variables et la même langue. Un nouvel e-mail est journalisé.
POST
/
api
/
v1
/
transactional-mails
/
{mail}
/
resend
Renvoyer un e-mail transactionnel
curl --request POST \
--url https://{host}/api/v1/transactional-mails/{mail}/resend \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{host}/api/v1/transactional-mails/{mail}/resend', 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/{mail}/resend",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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/{mail}/resend"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(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"
}
}{
"message": "Unauthenticated."
}{
"message": "<string>"
}{
"message": "<string>"
}{
"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"
}
}Autorisations
Jeton d'API. Aptitude « read » : routes GET seulement. « read + write » : toutes les routes.
En-têtes
Rejouez une écriture sans risque : la même clé rend la première réponse pendant 24 heures (en-tête Idempotent-Replay: true).
Maximum string length:
255Paramètres de chemin
L'identifiant (uuid) de l'e-mail.
Réponse
Renvoyé.
Show child attributes
Show child attributes
⌘I
Renvoyer un e-mail transactionnel
curl --request POST \
--url https://{host}/api/v1/transactional-mails/{mail}/resend \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{host}/api/v1/transactional-mails/{mail}/resend', 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/{mail}/resend",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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/{mail}/resend"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(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"
}
}{
"message": "Unauthenticated."
}{
"message": "<string>"
}{
"message": "<string>"
}{
"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"
}
}