Skip to content

Latest commit



80 lines (63 loc) · 2.11 KB

File metadata and controls

80 lines (63 loc) · 2.11 KB

REST API: GET emailing (Marketing Suite)

You can use the REST API to retrieve a summary of a mailing with an HTTP GET call to the following URL:$id

Where $id should be replaced with the ID of the mailing you want summarized.

Returned fields

The method returns a JSON object containing the following information:

  • id: The ID of the mailing.
  • timestamp: Timestamp of the mailing.
  • template: The ID of the template that was used to send the mailing.
  • subject: The subject of the mailing.
  • from_address: An array containing the 'name' and 'email' address of the sender.
  • destinations: Amount of destinations the mailing was sent to.
  • type: Type of mailing (individual or mass).
  • target: Contains the target type and the ID and type of other
  • tags: An array with tags used in the mailing. entities above it (for example the database a collection belongs to).

JSON example

The JSON for the emailing looks something like this and can be found in the 'data' property of the output:

   "timestamp":"2015-01-13 15:09:49",

PHP example

The script below demonstrates how to use this API method. Don't forget to replace the ID in the URL before executing the call.

// dependencies

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

// execute the call
print_r($api->get("ms/emailing/{$emailingID}", $parameters));

This example requires the REST API class

More information