Update sending configuration
Post /settings/sendingconfiguration
Parameters:
Name | Description | Type | Mandatory | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
trackOpens | Enable track for open | Boolean | No | ||||||||||||||||||||||||
trackClicks | Enable track for clicks | Boolean | No | ||||||||||||||||||||||||
googleAnalytics |
|
Array | No | ||||||||||||||||||||||||
trackMailTo | Enable track for mailto links | Boolean | No | ||||||||||||||||||||||||
unsubscribe |
|
Array | No |
Response:
Name | Description | Type |
---|---|---|
status | success / failure | String |
Programming language:
Request exemple:
{ "trackOpens": false, "trackClicks": false, "googleAnalytics": { "enable": false } }
Response exemple:
{ "status": "success" }
Code example:
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"; }