Evénements d'un webhook

Get /settings/webhooks/{id}/logs

Paramètres dans l'URL :

Nom Description Type Obligatoire
id Id du webhook String Oui

Paramètres :

Nom Description Type Obligatoire
pageSize Int Non
page Int Non
order Ordre du retour (0 (ASC) ou 1 (DESC) / basé sur la date de l'événement) Int Non

Réponse :

Tableau de logs généré :

Parameter Description Type
recipient Adresse email du destinataire String
subject Sujet de l'email String
eventDate Date au format timestamp Int
descriptionError Si erreur, vous pouvez voir le le message d'erreur String
errorType Evénement String
typeOfStatus success / failure String
Langage de programmation :

Exemple de requête :

							{
								"pageSize": 10,
								"page": 1,
								"order": 1
							}
							

Exemple de réponse :

							[
							  {
							    "recipient": "email@example.com",
							    "subject": "test",
							    "eventDate": "1443017959",
							    "statusDate": "1443017959",
							    "descriptionError": "",
							    "eventType": "delivered",
							    "typeOfStatus": "Success"
							  },
							  {
							    "recipient": "email@example.com",
							    "subject": "test",
							    "eventDate": "1443100566",
							    "statusDate": "1443100567",
							    "descriptionError": "",
							    "eventType": "opened",
							    "typeOfStatus": "Success"
							  },
							  {
							    "recipient": "email@example.com",
							    "subject": "test",
							    "eventDate": "1443100666",
							    "statusDate": "1443100666",
							    "descriptionError": "",
							    "eventType": "delivered",
							    "typeOfStatus": "Success"
							  }
							]
							

Exemple de code :

								curl -X GET -H "Content-Type: application/json" -H "X-Tipimail-ApiUser:YOUR_SMTP_USERNAME" -H "X-Tipimail-ApiKey:YOUR_SMTP_KEY" https://api.tipimail.com/v1/settings/webhooks/55eff0c70cf2d2153ff9733c/logs
							
require 'vendor/autoload.php';

$tipimail = new Tipimail\Tipimail('YOUR_SMTP_USERNAME', 'YOUR_API_KEY');

try {
	
	$pageSize = 2;
	$page = 1;
	$result = $tipimail->getSettingsService()->getWebhooksService()->getLogs('646r54g6r4gr6g46g46546d4', $pageSize, $page);
	var_dump($result);
		
}
catch(Tipimail\Exceptions\TipimailException $e) {
	echo 'Exception received :', $e->getMessage(), "\n";
	
}