Get details for an existing email campaign.

Make a GET call to the /emails/{campaign_id} endpoint to get details about a single email campaign and to get a list of all associated campaign activities. The list of campaign activities includes the unique campaign_activity_id and the role that is associated with the activity.

The campaign activity role is one of the following:

  • primary_email: The email that you create when you first create an email marketing campaign.
  • permalink: The system generated, permanent hyperlink to content that you include in an email campaign. Use the permalink to add your campaign content to a web page or to your social media sites, such as Facebook.
  • resend: When creating a new campaign, you can choose the resend option if you want the option to resend the primary_email to contacts that did not open the email the first time that you sent it to them. To help avoid having contacts mark the email as spam, change the email subject line.

If you do not know the campaign_id, you can get a list (collection) of all your campaigns by making a GET call to /emails.

Authorization Requirements

User privileges: campaign:read

Authorization scopes: campaign_data

Parameters

The campaign_id parameter is required for this endpoint.

Example GET Request

GET https://api.cc.email/v3/emails/{campaign_id}

<?php

$request = new HttpRequest();
$request->setUrl('https://api.cc.email/v3/emails/fa342848-edb6-477e-914d-f93c99c7a749');
$request->setMethod(HTTP_METH_GET);

$request->setHeaders(array(
  'Postman-Token' => 'a40ee1e9-e355-4f41-b7ce-eaf00967f7a8',
  'cache-control' => 'no-cache',
  'Content-Type' => 'application/json',
  'Authorization' => 'Bearer {access_token}'
));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
curl -X GET \
  https://api.cc.email/v3/emails/d8e2a306-e489-4288-8558-349ebf36642b \
  -H 'Authorization: Bearer {access_token}' \
  -H 'Content-Type: application/json' \
  -H 'Postman-Token: 9ac50c26-6a59-4c5e-bc30-f877973062a0' \
  -H 'cache-control: no-cache'
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.cc.email/v3/emails/d8e2a306-e489-4288-8558-349ebf36642b")
  .get()
  .addHeader("Authorization", "Bearer {access_token}")
  .addHeader("Content-Type", "application/json")
  .addHeader("cache-control", "no-cache")
  .addHeader("Postman-Token", "e49ca3d8-598c-4d53-9d88-29dca5ab6414")
  .build();

Response response = client.newCall(request).execute();

Response

{
    "campaign_activities": [
        {
            "campaign_activity_id": "62805103-5d7f-4dee-abce-4d45236c11a9",
            "role": "permalink"
        },
        {
            "campaign_activity_id": "8747e3a2-28ed-43e1-9617-0dd52c677cde",
            "role": "primary_email"
        }
    ],
    "campaign_id": "d8e2a306-e489-4288-8558-349ebf36642b",
    "created_at": "2019-01-23T15:03:54.000Z",
    "current_status": "DONE",
    "name": "DesktopMobileTest",
    "type": "NEWSLETTER",
    "updated_at": "2019-01-23T15:05:47.000Z"    
}

Try it!