# Campaign List

Retrieve details about a list of sent campaigns - creation and sending time, sender, subject, tracking options enabled etc. Each e-mail going through Mailjet is attached to a Campaign. This object is automatically generated by Mailjet.

> Note: If no query parameters are used, only campaigns sent since 00:00 UTC on the current day will be returned.

Endpoint: GET /v3/REST/campaign
Version: 1.0.0
Security: basicAuth

## Query parameters:

  - `CampaignID` (integer)
    Retrieves only the campaign details for the specified Campaign ID.

  - `ContactsListID` (integer)
    Retrieves only details for campaigns sent to the specified Contact List ID.

  - `CustomCampaign` (string)
    Retrieves only details for the campaign with the specified custom value assigned to it.

  - `From` (string)
    Retrieves only details for campaigns, which used the specified sender email address.

  - `FromDomain` (string)
    Retrieves only details for campaigns, which used the specified sender email domain.

  - `FromID` (integer)
    Retrieve only details for campaigns, which used the specified sender ID.

  - `FromTS` (string)
    Retrieves only details for campaigns sent after the specified timestamp. Both Unix timestamp (e.g. 1514764800) and RFC3339 (2018-01-01T00:00:00) formats are accepted.

  - `FromType` (integer)
    Retrieves only details for campaigns of the specified type:

- 1 - Transactional
- 2 - Marketing
- 3 - Unknown

  - `IsDeleted` (boolean)
    When true, only details for deleted campaigns will be returned. When false, deleted campaigns will be excluded from the response.

  - `IsNewsletterTool` (boolean)
    When true, will return only details for campaigns created by the Newsletter tool (legacy template builder). When false, newsletter campaigns will be excluded from the response.

  - `IsStarred` (boolean)
    When true, will return only details for campaigns marked as starred. When false, starred campaigns will be excluded from the response.

  - `Period` (string)
    Retrieves only details for campaigns sent between the start of the selected period and the current timestamp.

- Day - since the start of the current day
- Week - since the start of the current week
- Month - since the start of the current month
- Year - since the start of the current year

  - `ToTS` (string)
    Retrieves only details for campaigns sent before this timestamp.

  - `WorkflowID` (integer)
    Retrieves only details for campaigns that were triggered by this automation workflow ID.

## Response 200 fields (application/json):

  - `Count` (integer)
    Indicates the number of objects in the Data array.

  - `Data` (array)
    A JSON array containing a list of objects returned by this endpoint.

  - `Data.CampaignType` (integer)
    Type of campaign:

- 1 - Transactional
- 2 - Marketing
- 3 - Unknown

  - `Data.CreatedAt` (string)
    Timestamp indicating when the campaign was created.

  - `Data.CustomValue` (string)
    Custom unique tag for this campaign.

  - `Data.FirstMessageID` (integer)
    Unique numeric ID of the first sent message for this campaign.

  - `Data.FromEmail` (string)
    Sender email address for this campaign.

  - `Data.FromID` (integer)
    Unique numeric ID for the sender email address.

  - `Data.FromName` (string)
    Sender name selected for this campaign.

  - `Data.HasHtmlCount` (integer)
    Indicates whether the emails in this campaign have HTML content (1) or not (0).

  - `Data.HasTxtCount` (integer)
    Indicates whether the emails in this campaign have plain text content (1) or not (0).

  - `Data.ID` (integer)
    Unique numeric ID of this campaign.

  - `Data.ListID` (integer)
    Unique numeric ID of the contact list, to which this campaign was sent.

  - `Data.NewsLetterID` (integer)
    Unique numeric ID of this campaign draft object linked to this campaign.

  - `Data.SegmentationID` (integer)
    Unique numeric ID for the segmentation used for this campaign (see /contactfilter). Returned only if a segmentation is used for the campaign.

  - `Data.SendEndAt` (string)
    Timestamp indicating when last message in this campaign was sent.

  - `Data.SendStartAt` (string)
    Timestamp indicating when first message in this campaign was sent.

  - `Data.SpamassScore` (number)
    SpamAssassin score for this campaign.

  - `Data.Subject` (string)
    Subject line used for the emails in this campaign.

  - `Data.WorkflowID` (integer)
    Unique numeric ID of the automation workflow that triggered this campaign. Returned only if a workflow is used for the campaign.

  - `Data.IsDeleted` (boolean)
    Indicates whether this campaign is deleted or not.

  - `Data.IsStarred` (boolean)
    Indicates whether this campaign is marked as starred or not.

  - `Data.ClickTracked` (integer)
    Indicates whether click tracking has been enabled for this campaign (1) or not (2).

  - `Data.OpenTracked` (integer)
    Indicates whether click tracking has been enabled for this campaign (1) or not (2).

  - `Data.Status` (integer)
    Status of this campaign.

  - `Data.UnsubscribeTrackedCount` (integer)
    Indicates whether unsubscribe tracking has been enabled for this campaign (1) or not (0).

  - `Total` (integer)
    Indicates the number of objects in the Data array.


## Response 400 fields

## Response 401 fields

## Response 403 fields

## Response 404 fields

## Response 429 fields

## Response 500 fields
