Below you'll find reference materials that will teach you how to use Campaign Cog, and documentation for all the features available to the users of our API.
Note: To battle spam and keep Campaign Cog working without any issues, api access must be requested directly. Just contact email@example.com to request this access. Production access to the API is only available to paying users, although a test key will be made available to any potential clients.
You authenticate to the Campaign Cog API by providing your API key in the request. Your API keys carry many privileges, so be sure to keep them secret!
The class will look for an HTTP header with the API key on each request. An invalid or missing API key will result in an HTTP 403 Forbidden response.
All API requests must be made over HTTP. You must authenticate for all requests.
To get campaigns you will will make a Http GET Request, also if you want to add a new one you will have different required fields, but will be using the same endpoint while using a post request.
Note: When returning a campaign, to use the code you need to inject into an email, you will need to decode it from its base64 format. There is an example of this decoding in this github demo project.
Since this is a rest interface a GET request would be used to retreive a filterable list of campaigns.
Since this is a rest interface a POST request would be used to create new campaigns.
Note: As of now if click tracking is enabled the response will include an item with the tags <html>. This will always be included in the callback for code if you have click tracking enabled.
key: This would be your API key.
name: The name that was chosen for the campaign.
no_subscriber: Number of subscribers that the campaign will be sent to.
start_date: The date that the campaign will be sent out.
subscriber_level_tag: This would be the merge tag that you want to provide for the software sending out the email. (optional)
click_tracking: This would be 1 if you want to enable click tracking otherwise leave it blank or set it to 0. (optional)
email_code: This would be the email that you want to enable the click tracking on links for, upon successful return it will comeback in the html response with the tag html. (optional)
google: This will enable google analytics tracking, of the email. 1 would enable this option. (optional)
Since this is a rest interface a DELETE request would be used to delete the campaign specified by campaign_id.
Supported Formats for the responses are listed below. The default formate is xml, although to change the respons format just append the get parameters like in the examples below.
|Response Type||Content Type|
Added functionality to directly tie in the API for each user to create new campaigns. This should allow easier integration into existing email marketing systems.
First iteration of Version 1 of the api has been released to developers that want to use Campaign Cog via an api instead of directly using our user dashboard for all functionality.
200 OK - Everything worked as expected.
400 Bad Request - Often missing a required parameter.
403 Forbidden - No valid API key provided.
402 Request Failed - Parameters were valid but request failed.
404 Not Found - The requested item doesn't exist.
500, 502, 503, 504 Server errors - something went wrong on Campaign Cogs's end.