REST API v4: GET hyperlink extensions (HTML)

This method can be used if you want to retrieve the hyperlink extensions of Publisher (HTML) mailings. By sending a GET request to the following URL, you can fetch the hyperlink extensions:

https://api.copernica.com/v4/html/emailing/$id/hyperlinkextensions

{
    "all": {
       "utm_source": "copernica",
       "utm_medium": "email",
       "utm_campaign": "test_message",
       "utm_content": "button"
    },
    "copernica.com": {
       "utm_source": "copernica",
       "utm_medium": "email",
       "utm_campaign": "test_message",
       "utm_content": "link"
    }
}

PHP example

The following PHP script calls this API method:

// dependencies
require_once('CopernicaRestAPI.php');

// change this into your access token
$api = new CopernicaRestAPI("your-access-token", 4);

// do the call, and print result
print_r($api->get("html/emailing/$id/hyperlinkextensions", $parameters));

The example above requires the CopernicaRestApi class.

More information