Get logs from a webhook

Get /settings/webhooks/{id}/logs

URL parameters:

Name Description Type Mandatory
id Id of the webhook String Yes

Parameters:

Name Description Type Mandatory
pageSize Int No
page Int No
order Order of the return 0 (ASC) or 1 (DESC) / based on eventDate) Int No

Response:

Array of logs generated:

Parameter Description Type
recipient Recipient's email address String
subject Subject of the email String
eventDate Datetime on timestamp format Int
descriptionError If error, you can see the error returned String
errorType Event String
typeOfStatus success / failure String
Programming language:

Request exemple:

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

Response exemple:

							[
							  {
							    "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"
							  }
							]
							

Code example:

								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";
	
}