# Campaign Draft List

Retrieve details on the configuration of all campaign drafts. Newsletter and CampaignDraft objects are differentiated by the EditMode values. We recommend using CampaignDraft, as Newsletter objects are ones created using the legacy Mailjet template builder.

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

## Query parameters:

  - `AXTesting` (integer)
    Retrieves only the campaign draft linked to the specified AXTesting ID.

  - `Campaign` (integer)
    Retrieves only the campaign draft linked to the specified Campaign ID.

  - `ContactsList` (integer)
    Retrieves only the campaign drafts linked to the specified contact list ID.

  - `DeliveredAt` (string)
    Retrieves only the campaign drafts, which were delivered at the specified timestamp. Both Unix timestamp (e.g. 1514764800) and RFC3339 (2018-01-01T00:00:00) formats are accepted.

  - `EditMode` (string)
    Retrieves only campaign drafts, whose email templates were edited with the specified edit tool.

Possible values:

- tool2 - Passport drag-and-drop template editor
- html2 - HTML editor in Passport
- mjml - MJML editor in Passport

  - `IsArchived` (boolean)
    When true, will return only archived campaign drafts. When false, archived campaign drafts will be excluded from the response.

  - `IsCampaign` (boolean)
    Only retrieves campaigndraft resources for which IsCampaign equals
the specified value.

  - `IsDeleted` (boolean)
    When true, will return only deleted campaign drafts. When false, deleted drafts will be excluded from the response.

  - `IsHandled` (boolean)
    Only retrieves campaigndraft resources for which IsHandled equals
the specified value.

  - `IsStarred` (boolean)
    When true, will return only starred campaign drafts. When false, starred drafts will be excluded from the response.

  - `Modified` (boolean)
    When true, will return only campaign drafts that have been modified after their creation. When false, only non-modified drafts will be returned.

> Note: All campaign drafts created within the Mailjet app are marked as Modified immediately after creation, while ones created via the API are not.

  - `NewsLetterTemplate` (integer)
    Only retrieves campaigndraft resources for which NewsLetterTemplate
equals the specified value.

  - `Segmentation` (integer)
    Retrieves only campaign drafts, which use the specified segmentation ID.

  - `Status` (integer)
    Retrieves only campaign drafts with the specified campaign status ID.

Possible values:

- -3 - AXCanceled
- -2 - Deleted
- -1 - Archived
- 0 - Draft
- 1 - Programmed (scheduled)
- 2 - Sent
- 3 - AXTested (AB Testing versions sent, but winning version not selected yet)
- 4 - AXSelected (AB Testing winning version selected and sent)

  - `Subject` (string)
    Retrieves only campaign drafts with the specified Subject line.

  - `Template` (integer)
    Retrieves only campaign drafts which use the specified Template 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.CampaignID` (integer)
    Unique numeric ID of the campaign linked to this campaign draft. Will only be returned if the draft is already sent.

  - `Data.ContactsListID` (integer)
    Unique numeric ID for the contact list linked to this draft. Required for successful sending of the campaign.

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

  - `Data.DeliveredAt` (string)
    Timestamp indicating when the campaigndraft was delivered.

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

  - `Data.Locale` (string)
    Locale, in which the information is saved.

  - `Data.ModifiedAt` (string)
    Timestamp indicating when the campaign draft was last modified.

  - `Data.Preset` (string)
    String, representing a JSON array of styles for this campaign draft. The API does not interpret the styles.

  - `Data.SegmentationID` (integer)
    ID of the segment configuration (contactfilter) used for this campaign draft.

  - `Data.Sender` (string)
    Unique numeric ID of the sender email address.

  - `Data.SenderEmail` (string)
    Email address of the sender.

  - `Data.Status` (integer)
    Status of the campaign draft. Only campaign drafts in status Draft or Programmed can be scheduled and sent out via /campaigndraft/{draft_id}/schedule or /campaigndraft/{draft_id}/send.

Possible values:

- -3 - AXCanceled
- -2 - Deleted
- -1 - Archived
- 0 - Draft
- 1 - Programmed (scheduled)
- 2 - Sent
- 3 - AXTested (AB Testing versions sent, but winning version not selected yet)
- 4 - AXSelected (AB Testing winning version selected and sent)

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

  - `Data.Url` (string)
    The URL, where an online version of the template can be found. A URL is automatically generated by Mailjet for marketing templates, after the campaign draft is sent.

  - `Data.Used` (boolean)
    Indicates whether the campaign draft (or a test email of it) has been sent or not.

  - `Data.AXFraction` (number)
    Fraction of an AB Testing campaign as a percentage of the total emails. Zero indicates the remainder.

  - `Data.AXFractionName` (string)
    Name of the AB Testing fraction.

  - `Data.AXTesting` (object)
    An ID reference to the respective AXTesting object.

  - `Data.Current` (integer)
    Data ID of the current content.

  - `Data.EditMode` (string)
    Edit mode for the campaign draft.

Possible values:

- tool2 - Passport drag-and-drop template editor
- html2 - HTML editor in Passport
- mjml - MJML editor in Passport

  - `Data.IsStarred` (boolean)
    Indicates whether the campaign draft is marked as Starred or not.

  - `Data.IsTextPartIncluded` (boolean)
    Indicates whether the draft email contains a text version or not.

  - `Data.ReplyEmail` (string)
    Reply-to email address for the campaign. Returned only if a reply-to email was specified.

  - `Data.SenderName` (string)
    Name of the sender, which will be visible to recipients.

  - `Data.TemplateID` (integer)
    Unique numeric ID of the template the CampaignDraft was generated from, or as which it was last saved. Changing the template ID will not update the content of the CampaignDraft.

  - `Data.Title` (string)
    Internal title for this campaign draft.

  - `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
