Modifier la configuration

Post /settings/sendingconfiguration

Paramètres :

Nom Description Type Obligatoire
trackOpens Activer le tracking à l'ouverture Boolean Non
trackClicks Activer le tracking au clic Boolean Non
googleAnalytics

Données utilisées pour Google Analytics

Nom Description Type Obligatoire
enable Activer le tracking Google Analytics Boolean Oui
utmSource Source utilisé pour Google Analytics String Non
utmMedia Media utilisé pour Google Analytics String Non
utmContent Content utilisé pour Google Analytics String Non
utmCampaign Campaign utilisé pour Google Analytics String Non
Array Non
trackMailTo Activer le tracking pour les liens mailto Boolean Non
unsubscribe

Paramètres de désinscription

Nom Description Type
enable Activer le lien de désinscription au sein de votre email Boolean
content Contenu de votre lien de désinscription String
Array Non

Réponse :

Nom Description Type
status success / failure String
Langage de programmation :

Exemple de requête :

							{
								"trackOpens": false,
								"trackClicks": false,
								"googleAnalytics": {
									"enable": false
								}
							}
							

Exemple de réponse :

							{
								"status": "success"
							}
							

Exemple de code :

								curl -X POST -d '{"trackOpens":1,"trackClicks":1}' -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/sendingconfiguration
							
require 'vendor/autoload.php';

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

try {
	
	$tipimail->getSettingsService()->getSendingConfigurationService()->enableTrackOpens();
	
	$tipimail->getSettingsService()->getSendingConfigurationService()->disableTrackOpens();
	
	$tipimail->getSettingsService()->getSendingConfigurationService()->enableTrackClicks();
	
	$tipimail->getSettingsService()->getSendingConfigurationService()->disableTrackClicks();
	
	$utmSource = 'sourceExample';
	$utmMedia = 'mediaExample';
	$utmContent = 'contentExample';
	$utmCampaign = 'campaignExample';
	$tipimail->getSettingsService()->getSendingConfigurationService()->enableGoogleAnalytics($utmSource, $utmMedia, $utmContent, $utmCampaign);
	
	$tipimail->getSettingsService()->getSendingConfigurationService()->disableGoogleAnalytics();
	
	$content = 'My unsubscribe link content';
	$tipimail->getSettingsService()->getSendingConfigurationService()->enableCustomizedUnsubscribeLink($content);
	
	$tipimail->getSettingsService()->getSendingConfigurationService()->disableCustomizedUnsubscribeLink();
	
	$tipimail->getSettingsService()->getSendingConfigurationService()->enableTrackMailtoLinks();
	
	$tipimail->getSettingsService()->getSendingConfigurationService()->disableTrackMailtoLinks();
		
}
catch(Tipimail\Exceptions\TipimailException $e) {
	echo 'Exception received :', $e->getMessage(), "\n";
	
}