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 |
|
Array | Non | ||||||||||||||||||||||||
trackMailTo | Activer le tracking pour les liens mailto | Boolean | Non | ||||||||||||||||||||||||
unsubscribe |
|
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"; }