Campaigns

Covers all the campaign related functionality including creating draft campaigns, selecting recipients and sending. Once the campaign is sent, you can also access all the reporting data on the results.

Creating a draft campaign

Creates (but does not send) a draft campaign ready to be tested as a preview or sent. Set the basic campaign information (name, subject, from name and from email), the URL's of the HTML and plain text content plus the lists and/or segments you'd like it to be eventually sent to. We'll automatically move all CSS inline for the HTML component.

Request:
POST

http://api.createsend.com/api/v3/campaigns/{clientid}.{xml|json}

Route Values:
{clientid}

The ID of the client for whom the campaign should be created.

Expected Request Body: JSON XML
                  {
                    "Name": "My Campaign Name",
                    "Subject": "My Subject",
                    "FromName": "My Name",
                    "FromEmail": "myemail@mydomain.com",
                    "ReplyTo": "myemail@mydomain.com",
                    "HtmlUrl": "http://example.com/campaigncontent/index.html",
                    "TextUrl": "http://example.com/campaigncontent/index.txt",
                    "ListIDs": [
                      "a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1",
                      "a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1"
                    ],
                    "SegmentIDs": [
                      "a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1",
                      "a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1"
                    ]
                  }
                
Expected Response: JSON XML
	                HTTP/1.1 201 Created
	                Content-Type: application/json; charset=utf-8
	
	                "a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1"
                
Error Responses:

Please see our response status codes documentation for details of potential error responses for any API request.

If you receive a "400 Bad Request" response for this request, these are the possible errors which may be included in the body of the response:

303: Duplicate Campaign Name

The campaign name passed in already exists for this client.

304: Campaign Subject Required

A campaign subject must be provided.

305: From Name Required

The From name field is required and must be provided.

307: Invalid From Email Address

The From Email Address must be a valid email address.

308: Reply to Address Required

The Reply-To Address is a required field and must be provided.

309: Invalid Reply-To Address

The Reply-To Address must be a valid email address.

310: HTML Content URL Required

You must provide a URL of the HTML content for your campaign.

311: Invalid HTML Content

Your content contains JavaScript or Flash which cannot be sent to email clients.

312: Text Content URL Required

You must provide a URL of the Text content for your campaign.

313: Invalid ListID’s

The List ID’s you supplied are invalid.

314: Invalid Segments

The Segments you supplied are invalid.

315: Lists or Segments Required

You must provide either List ID’s or Segments to send to.

316: Problems Importing Links

There was a problem parsing and importing your links.

317: Link Too Long

At least one of your links was too long to import.

318: Text Unsubscribe Tag In HTML Email

You currently only have a text unsubscribe link of the format {[unsubscribe]} in your HTML content. We require a single-click unsubscribe link in every campaign you send. You can do this by adding the tags and around the words you want to become an unsubscribe link, and then re-import your content.

319: Campaign Name Required

A campaign name was not provided, and is required.

4302: Unsubscribe Tag Contains Less Than 3 Chars

You'll need to add some text, such as 'unsubscribe' in between your and tags. Those words will then become an unsubscribe link for each recipient.

4303: Unsubscribe Tag Contains A Link

It appears your unsubscribe tag contains a link. Please ensure you add the tags and around only the words (and not links) you want to become an unsubscribe link. We'll automatically convert that to a link for each recipient.

4304: No Closing Unsubscribe Tag

We found the <unsubscribe> tag, but couldn't track down the </unsubscribe> tag. You'll need to add this before the unsubscribe link will work.

4201: Contains Flash

Flash is not supported by almost every email client out there and should not be included in your emails.

4203: Contains Java

Java is not supported by almost every email client out there and should not be included in your emails. Please remove it from your content.

4202: Contains Script

Almost every popular email client and spam filter does not support JavaScript. Your campaign will either be filtered as spam, or will display a security warning to your recipients. We recommend removing all JavaScript code from your campaign and then re-import it.

Sending a draft campaign

Schedules an existing draft campaign for sending either immediately or a custom date and time in the future. For campaigns with more than 5 recipients, you must have sufficient email credits, a saved credit card or an active monthly billed account.

Free sending limitation: When sending campaigns to 5 or less recipients (which are free of charge), you can send to a maximum of 50 unique email addresses per day.

Request:
POST

http://api.createsend.com/api/v3/campaigns/{campaignid}/send.{xml|json}

Route Values:
{campaignid}

The ID of the campaign draft to be sent. You can get the ID as the result of creating a campaign, or by Getting draft campaigns.

Expected Request Body: JSON XML
                {
                  "ConfirmationEmail": "myemail@mydomain.com",
                  "SendDate": "YYYY-MM-DD HH:MM"
                }
                
              

ConfirmationEmail: The email address that the confirmation email that the campaign has been sent will go to.
SendDate: The date the campaign should be scheduled to be sent. To send a campaign immediately pass in Immediately. This date should be in the client's timezone and formatted as YYYY-MM-DD HH:MM.

Expected Response (both XML and JSON):
                     HTTP/1.1 200 OK
                
              
Error Responses:

Please see our response status codes documentation for details of potential error responses for any API request.

If you receive a "400 Bad Request" response for this request, these are the possible errors which may be included in the body of the response:

5: Invalid Date

The Send Date provided was invalid.

331: Campaign has already been sent

The campaign has already been sent.

332: No Recipients Added

There are no recipient lists or segments added to this campaign.

333: No Test Campaigns Available

Each customer can send a limited number of test campaigns (of less than 6 recipients). Contact support.

334: Campaign Pending Approval

This client doesn’t have approval to send to a list of recipients of this size.

335: Payment Details Required

The payment details for this client are required.

336: Campaign Payment Failed

Payment for this campaign failed. Either there weren’t sufficient credits or the payment details were rejected.

337: Delivery Date Cannot be in the Past

The delivery date was set to a date in the past.

338: Confirm Email Required

The email address for campaign sent confirmation cannot be empty.

339: Confirm Email Invalid

The email address for campaign sent confirmation is invalid.

340: Recipient Lists Empty

The selected subscriber lists and/or segments contain no subscribers

355: Monthly Payment Failed

Your monthly account has not been paid for, and the attempt to bring it up to date failed.

Sending a campaign preview

Send a preview of any draft campaign to a number of email addresses you specify. You can also set how we should treat any personalization tags in your draft campaign.

Request:
POST

http://api.createsend.com/api/v3/campaigns/{campaignid}/sendpreview.{xml|json}

Route Values:
{campaignid}

The ID of the campaign draft being tested. You can get the ID as the result of creating a campaign, or via the Getting draft campaigns.

Expected Request Body: JSON XML
                {
                  "PreviewRecipients": ["test1@example.com", "test2@example.com"],
                  "Personalize": "Random"
                }
                

PreviewRecipients: A collection of intended recipients of the campaign preview
Personalize: Option to control personalization of the campaign preview. Only relevant when the campaign actually includes personalization tags. Valid variations are:

Fallback - use the fallback terms
Random - choose a random recipient from the lists and segments allocated to the campaign
A specific email address - use the personalisation details attached to the email address. Only valid if the subscriber is a recipient of the campaign. The address will not be sent a copy of the email

Expected Response (both XML and JSON):
                     HTTP/1.1 200 OK
                
Error Responses:

Please see our response status codes documentation for details of potential error responses for any API request.

If you receive a "400 Bad Request" response for this request, these are the possible errors which may be included in the body of the response:

333: No Test Campaigns Available

You have exceeded the limit of test campaigns you can send. Wait up to 30 minutes, and you should be able to send again.

340: Lists Added Contain No Recipients

Recipient lists and/or segments are assigned, but they can't be empty if you're using Random personalization.

370: No Preview Recipients Supplied

Preview Recipients must have at least one email address.

371: Invalid Preview Recipient Emails

PreviewRecipients must all be valid email addresses. A collection of Recipients to indicate which intended recipients were invalid email addresses is also returned.

372: Invalid Personalization Data

Personalize must be one of Fallback, Random, or a valid email address

373: Recipient Not In Campaign Lists

Personalisation email address must be a recipient of the campaign.

374: Too Many Preview Recipients

You can only send to fifteen (15) addresses at once

375: Client Test Campaign Rate Violation

You can only send to fifteen (15) addresses every five (5) minutes.

376: Campaign Must Have Content And Recipients

Campaign must have content and recipient lists assigned.

Campaign summary

Provides a basic summary of the results for any sent campaign such as the number of recipients, opens, clicks, unsubscribes, etc to date. Also includes the URL of the web version of that campaign.

Request:
GET
http://api.createsend.com/api/v3/campaigns/{campaignid}/summary.{xml|json}
Route Values:
{campaignid}

The ID of the campaign you want data for. You can get the ID by Getting sent campaigns.

Response:

Expected Response: JSON XML
                    HTTP/1.1 200 OK
                    Content-Type: application/json; charset=utf-8

                    {
                      "Recipients": 1000,
                      "TotalOpened": 345,
                      "Clicks": 132,
                      "Unsubscribed": 43,
                      "Bounced": 15,
                      "UniqueOpened": 298,
                      "WebVersionURL": "http://myclient.createsend.com/t/y-A1A1A1A1A1A1A1A1A1A1A1A1/",
					  "Forwards": 18,
					  "Likes", 25,
					  "Mentions", 11
                    }
                
Error Responses:

Please see our response status codes documentation for details of potential error responses for any API request.

Campaign lists and segments

Returns the lists and segments any campaign was sent to.

Request:
GET
http://api.createsend.com/api/v3/campaigns/{campaignid}/listsandsegments.{xml|json}
Route Values:
{campaignid}

The ID of the campaign you want data for. You can get the ID by Getting sent campaigns.

Response:

Expected Response: JSON XML
                    HTTP/1.1 200 OK
                    Content-Type: application/json; charset=utf-8

                    {
                      "Lists": [
                        {
                          "ListID": "a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1",
                          "Name": "My List 1"
                        },
                        {
                          "ListID": "b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2",
                          "Name": "My List 2"
                        }
                      ],
                      "Segments": [
                        {
                          "ListID": "a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1",
                          "SegmentID": "c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3",
                          "Title": "My Segment 1"
                        },
                        {
                          "ListID": "a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1",
                          "SegmentID": "d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4",
                          "Title": "My Segment 2"
                        }
                      ]
                    }
                
Error Responses:

Please see our response status codes documentation for details of potential error responses for any API request.

Campaign recipients

Contains a paged result representing all the subscribers that a given campaign was sent to. This includes their email address and the ID of the list they are a member of. You have complete control over how results should be returned including page sizes, sort order and sort direction.

Request:
GET
http://api.createsend.com/api/v3/campaigns/{campaignid}/recipients.{xml|json}?page={pagenumber}&pagesize={pagesize}&orderfield={email|list}&orderdirection={asc|desc}
Route Values:
{campaignid}

The ID of the campaign you want data for. You can get the ID by Getting sent campaigns.

{page}

The results page to retrieve. Default: 1

{pagesize}

The number of records to retrieve per results page. Default: 1000

{orderfield}

The field which should be used to order the results. Default: email

{orderdirection}

The direction in which results should be ordered. Default: asc

Response:

Expected Response: JSON XML
                    HTTP/1.1 200 OK
                    Content-Type: application/json; charset=utf-8

                    {
                      "Results": [
                        {
                          "EmailAddress": "example+1@example.com",
                          "ListID": "a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1",
                        },
                        {
                          "EmailAddress": "example+2@example.com",
                          "ListID": "a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1",
                        },
                        {
                          "EmailAddress": "example+3@example.com",
                          "ListID": "a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1",
                        },
                        {
                          "EmailAddress": "example+4@example.com",
                          "ListID": "a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1",
                        }
                      ],
                      "ResultsOrderedBy": "email",
                      "OrderDirection": "asc",
                      "PageNumber": 1,
                      "PageSize": 1000,
                      "RecordsOnThisPage": 4,
                      "TotalNumberOfRecords": 4,
                      "NumberOfPages": 1
                    }
                
Error Responses:

Please see our response status codes documentation for details of potential error responses for any API request.

If you receive a "400 Bad Request" response for this request, these are the possible errors which may be included in the body of the response:

800: Invalid page number

The page number you have provided is invalid.

801: Invalid page size

The page size must be between 10 and 1000.

802: Invalid order field

The order field must be either email, name or date

803: Invalid order direction

The order direction must be either asc or desc

Campaign bounces

Contains a paged result representing all the subscribers who bounced for a given campaign, and the type of bounce (Hard = Hard Bounce, Soft = Soft Bounce). You have complete control over how results should be returned including page sizes, sort order and sort direction.

Request:
GET
http://api.createsend.com/api/v3/campaigns/{campaignid}/bounces.{xml|json}?date={YYYY-MM-DD HH:MM:SS}&page={pagenumber}&pagesize={pagesize}&orderfield={email|list|date}&orderdirection={asc|desc}
Route Values:
{campaignid}

The ID of the campaign you want data for. You can get the ID by Getting sent campaigns.

{date}

Bounces after the date value specified will be returned. Must be in the format YYYY-MM-DD HH:MM:SS.

{page}

The results page to retrieve. Default: 1

{pagesize}

The number of records to retrieve per results page. Default: 1000

{orderfield}

The field which should be used to order the results. Default: date

{orderdirection}

The direction in which results should be ordered. Default: asc

Response:

Expected Response: JSON XML
                    HTTP/1.1 200 OK
                    Content-Type: application/json; charset=utf-8

                    {
                      "Results": [
                        {
                          "EmailAddress": "example+1@example.com",
                          "ListID": "a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1",
                          "BounceType": "Hard",
                          "Date": "2009-05-18 16:45:00",
                          "Reason": "Invalid Email Address"
                        },
                        {
                          "EmailAddress": "example+2@example.com",
                          "ListID": "a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1",
                          "BounceType": "Hard",
                          "Date": "2009-05-19 16:45:00",
                          "Reason": "Hard Bounce"
                        },
                        {
                          "EmailAddress": "example+3@example.com",
                          "ListID": "a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1",
                          "BounceType": "Soft",
                          "Date": "2009-05-20 16:45:00",
                          "Reason": "Soft Bounce - Mailbox Full"
                        },
                        {
                          "EmailAddress": "example+4@example.com",
                          "ListID": "a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1",
                          "BounceType": "Soft",
                          "Date": "2009-05-21 16:45:00",
                          "Reason": "General Bounce"
                        }
                      ],
                      "ResultsOrderedBy": "date",
                      "OrderDirection": "asc",
                      "PageNumber": 1,
                      "PageSize": 1000,
                      "RecordsOnThisPage": 4,
                      "TotalNumberOfRecords": 4,
                      "NumberOfPages": 1
                    }
                
Error Responses:

Please see our response status codes documentation for details of potential error responses for any API request.

If you receive a "400 Bad Request" response for this request, these are the possible errors which may be included in the body of the response:

5: Invalid Date

The date must be provided and in the format YYYY-MM-DD HH:MM:SS

800: Invalid page number

The page number you have provided is invalid.

801: Invalid page size

The page size must be between 10 and 1000.

802: Invalid order field

The order field must be either email, name or date

803: Invalid order direction

The order direction must be either asc or desc

Campaign opens

Contains a paged result representing all subscribers who opened the email for a given campaign, including the date/time and IP address they opened the campaign from. You have complete control over how results should be returned including page sizes, sort order and sort direction.

Request:
GET
http://api.createsend.com/api/v3/campaigns/{campaignid}/opens.{xml|json}?date={YYYY-MM-DD HH:MM:SS}&page={pagenumber}&pagesize={pagesize}&orderfield={email|list|date}&orderdirection={asc|desc}
Route Values:
{campaignid}

The ID of the campaign you want data for. You can get the ID by Getting sent campaigns.

{date}

Opens after the date value specified will be returned. Must be in the format YYYY-MM-DD HH:MM:SS.

{page}

The results page to retrieve. Default: 1

{pagesize}

The number of records to retrieve per results page. Default: 1000

{orderfield}

The field which should be used to order the results. Default: date

{orderdirection}

The direction in which results should be ordered. Default: asc

Response:

Expected Response: JSON XML
                    HTTP/1.1 200 OK
                    Content-Type: application/json; charset=utf-8

                    {
                      "Results": [
                        {
                          "EmailAddress": "example+1@example.com",
                          "ListID": "a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1",
                          "Date": "2009-05-18 16:45:00",
                          "IPAddress": "192.168.0.1"
                        },
                        {
                          "EmailAddress": "example+2@example.com",
                          "ListID": "a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1",
                          "Date": "2009-05-19 16:45:00",
                          "IPAddress": "192.168.0.2"
                        },
                        {
                          "EmailAddress": "example+3@example.com",
                          "ListID": "a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1",
                          "Date": "2009-05-20 16:45:00",
                          "IPAddress": "192.168.0.3"
                        },
                        {
                          "EmailAddress": "example+4@example.com",
                          "ListID": "a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1",
                          "Date": "2009-05-21 16:45:00",
                          "IPAddress": "192.168.0.4"
                        }
                      ],
                      "ResultsOrderedBy": "date",
                      "OrderDirection": "asc",
                      "PageNumber": 1,
                      "PageSize": 1000,
                      "RecordsOnThisPage": 4,
                      "TotalNumberOfRecords": 4,
                      "NumberOfPages": 1
                    }
                
Error Responses:

Please see our response status codes documentation for details of potential error responses for any API request.

If you receive a "400 Bad Request" response for this request, these are the possible errors which may be included in the body of the response:

5: Invalid Date

The date must be provided and in the format YYYY-MM-DD HH:MM:SS

800: Invalid page number

The page number you have provided is invalid.

801: Invalid page size

The page size must be between 10 and 1000.

802: Invalid order field

The order field must be either email, name or date

803: Invalid order direction

The order direction must be either asc or desc

Campaign clicks

Contains a paged result representing all subscribers who clicked a link in the email for a given campaign, including the date/time and IP address they clicked the campaign from. You have complete control over how results should be returned including page sizes, sort order and sort direction.

Request:
GET
http://api.createsend.com/api/v3/campaigns/{campaignid}/clicks.{xml|json}?date={YYYY-MM-DD HH:MM:SS}&page={pagenumber}&pagesize={pagesize}&orderfield={email|list|date}&orderdirection={asc|desc}
Route Values:
{campaignid}

The ID of the campaign you want data for. You can get the ID by Getting sent campaigns.

{date}

Clicks after the Date value specified will be returned. Must be in the format YYYY-MM-DD HH:MM:SS.

{page}

The results page to retrieve. Default: 1

{pagesize}

The number of records to retrieve per results page. Default: 1000

{orderfield}

The field which should be used to order the results. Default: date

{orderdirection}

The direction in which results should be ordered. Default: asc

Response:

Expected Response: JSON XML
                    HTTP/1.1 200 OK
                    Content-Type: application/json; charset=utf-8

                    {
                     "Results": [
                        {
                          "EmailAddress": "example+1@example.com",
                          "URL": "http://www.myexammple.com/index.html",
                          "ListID": "a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1",
                          "Date": "2009-05-18 16:45:00",
                          "IPAddress": "192.168.0.1"
                        },
                        {
                          "EmailAddress": "example+1@example.com",
                          "URL": "http://www.myexammple.com/homepage.html",
                          "ListID": "a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1",
                          "Date": "2009-05-19 16:45:00",
                          "IPAddress": "192.168.0.1"
                        },
                        {
                          "EmailAddress": "example+2@example.com",
                          "URL": "http://www.myexammple.com/index.html",
                          "ListID": "a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1",
                          "Date": "2009-05-20 16:45:00",
                          "IPAddress": "192.168.0.3"
                        },
                        {
                          "EmailAddress": "example+3@example.com",
                          "URL": "http://www.myexammple.com/index.html",
                          "ListID": "a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1",
                          "Date": "2009-05-21 16:45:00",
                          "IPAddress": "192.168.0.4"
                        }
                      ],
                      "ResultsOrderedBy": "date",
                      "OrderDirection": "asc",
                      "PageNumber": 1,
                      "PageSize": 1000,
                      "RecordsOnThisPage": 4,
                      "TotalNumberOfRecords": 4,
                      "NumberOfPages": 1
                    }
                
Error Responses:

Please see our response status codes documentation for details of potential error responses for any API request.

If you receive a "400 Bad Request" response for this request, these are the possible errors which may be included in the body of the response:

5: Invalid Date

The date must be provided and in the format YYYY-MM-DD HH:MM:SS

800: Invalid page number

The page number you have provided is invalid.

801: Invalid page size

The page size must be between 10 and 1000.

802: Invalid order field

The order field must be either email, name or date

803: Invalid order direction

The order direction must be either asc or desc

Campaign unsubscribes

Contains a paged result representing all subscribers who unsubscribed from the email for a given campaign, including the date/time and IP address they unsubscribed from. You have complete control over how results should be returned including page sizes, sort order and sort direction.

Request:
GET
http://api.createsend.com/api/v3/campaigns/{campaignid}/unsubscribes.{xml|json}?date={YYYY-MM-DD HH:MM:SS}&page={pagenumber}&pagesize={pagesize}&orderfield={email|list|date}&orderdirection={asc|desc}
Route Values:
{campaignid}

The ID of the campaign you want data for. You can get the ID by Getting sent campaigns.

{date}

Unsubscribes made after the Date value specified will be returned. Must be in the format YYYY-MM-DD. Required.

{page}

The results page to retrieve. Default: 1

{pagesize}

The number of records to retrieve per results page. Default: 1000

{orderfield}

The field which should be used to order the results. Default: date

{orderdirection}

The direction in which results should be ordered. Default: asc

Response:

Expected Response: JSON XML
                    HTTP/1.1 200 OK
                    Content-Type: application/json; charset=utf-8

                    {
                      "Results": [
                        {
                          "EmailAddress": "example+1@example.com",
                          "ListID": "a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1",
                          "Date": "2009-05-18 16:45:00",
                          "IPAddress": "192.168.0.1"
                        },
                        {
                          "EmailAddress": "example+1@example.com",
                          "ListID": "a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1",
                          "Date": "2009-05-19 16:45:00",
                          "IPAddress": "192.168.0.1"
                        },
                        {
                          "EmailAddress": "example+2@example.com",
                          "ListID": "a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1",
                          "Date": "2009-05-20 16:45:00",
                          "IPAddress": "192.168.0.3"
                        },
                        {
                          "EmailAddress": "example+3@example.com",
                          "ListID": "a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1",
                          "Date": "2009-05-21 16:45:00",
                          "IPAddress": "192.168.0.4"
                        }
                      ],
                      "ResultsOrderedBy": "date",
                      "OrderDirection": "asc",
                      "PageNumber": 1,
                      "PageSize": 1000,
                      "RecordsOnThisPage": 4,
                      "TotalNumberOfRecords": 4,
                      "NumberOfPages": 1
                    }
                
Error Responses:

Please see our response status codes documentation for details of potential error responses for any API request.

If you receive a "400 Bad Request" response for this request, these are the possible errors which may be included in the body of the response:

5: Invalid Date

The date must be provided and in the format YYYY-MM-DD HH:MM:SS

800: Invalid page number

The page number you have provided is invalid.

801: Invalid page size

The page size must be between 10 and 1000.

802: Invalid order field

The order field must be either email, name or date

803: Invalid order direction

The order direction must be either asc or desc

Deleting a campaign

Deletes a campaign from your account. For draft and scheduled campaigns (prior to the time of scheduling), this will prevent the campaign from sending. If the campaign is already sent or in the process of sending, it will remove the campaign from the account.

Request:
DELETE

http://api.createsend.com/api/v3/campaigns/{campaignid}.{xml|json}

Route Values:
{campaignid}

The ID of the campaign to be deleted.

Expected Response (both XML and JSON):
		              HTTP/1.1 200 OK
                
Error Responses:

Please see our response status codes documentation for details of potential error responses for any API request.

Unscheduling a campaign

Cancels the sending of the campaign and moves it back into the drafts. If the campaign is already sent or in the process of sending, this operation will fail.

Request:
POST

http://api.createsend.com/api/v3/campaigns/{campaignid}/unschedule.{xml|json}

Route Values:
{campaignid}

The ID of the campaign to be deleted.

Expected Response (both XML and JSON):
		              HTTP/1.1 200 OK
                
Error Responses:

Please see our response status codes documentation for details of potential error responses for any API request.

If you receive a "400 Bad Request" response for this request, these are the possible errors which may be included in the body of the response:

341: Campaign is not scheduled

The campaign is not currently scheduled. Either a schedule has not been specified or the campaign has already been sent (or is in the process of sending).