createEmailCampaign

Synopsis:

This API function creates new email campaign within the account holders account and returns a CampaignID. Campaign will be created under campaignname in our system. Campaignname will be sent to users in opt-in/opt-out emails. Brandname will be used in ‘from’ field of all sent emails. Mailingadress will be inserted into email footer.

Request: XML

<REQUEST>
    <ACTION>createEmailCampaign</ACTION>
    <API_KEY>apiKey</API_KEY>
    <CAMPAIGNNAME>Campaign Name</CAMPAIGNNAME>
    <BRANDNAME>Brand Name</BRANDNAME>
    <MAILINGADDRESS>Mailing Address</MAILINGADDRESS>
</REQUEST>

Request: GET

API_URL?action=createemailcampaign
&api_key=API key
&campaignname=campaign name
&brandname=brand name
&mailingaddress=mailing address

Request Parameters:

Mandatory: action, api_key, campaignName, brandName, mailingAddress
Optional: N/A

Response Parameters:

status, campaignId, campaignName, brandName, mailingAddress, errorCode, errorInfo

Request Example: XML

<REQUEST>
    <ACTION>createEmailCampaign</ACTION>
    <API_KEY>qTFkykO9JTfahCOqJ0V2Wf5Cg1t8iWlZ</API_KEY>
    <CAMPAIGNNAME>Winter Sale</CAMPAIGNNAME>
    <BRANDNAME>Codereadr</BRANDNAME>
    <MAILINGADDRESS>Skycore, LLC
        214 Lincoln Street, Suite 360
        Allston, MA 02134</MAILINGADDRESS>
</REQUEST>

Request Example: GET

https://secure.skycore.com/API/wxml/1.3/index.php?action=createemailcampaign
&api_key=qTFkykO9JTfahCOqJ0V2Wf5Cg1t8iWlZ
&campaignname=Winter+Sale
&brandname=Codereadr
&mailingaddress=Skycore%2C+LLC%0A214+Lincoln+Street%2C+Suite+360%0AAllston%2C+MA+02134

Response Example: Success

<RESPONSE>
    <STATUS>Success</STATUS>
    <CAMPAIGNID>1116</CAMPAIGNID>
    <CAMPAIGNNAME>Winter Sale</CAMPAIGNNAME>
    <BRANDNAME>Codereadr</BRANDNAME>
    <MAILINGADDRESS>Skycore, LLC
        214 Lincoln Street, Suite 360
        Allston, MA 02134</MAILINGADDRESS>
</RESPONSE>

Response Example: Failure

<RESPONSE>
    <STATUS>Failure</STATUS>
    <ERRORCODE>E173</ERRORCODE>
    <ERRORINFO>mailingaddress is required</ERRORINFO>
</RESPONSE>

General Error Codes:

Code Description
E100 Invalid request. Make a valid request via GET/POST/XML with all the required variables.
E104 User Authentication Failed.
E105 This account has no API rights.
E106 You can call API every X seconds.
E107 This account has no rights to use this action.
E108 XML Parse error: $error.
E109 API not activated.
E112 IP was not whitelisted. API call rejected.
E113 Set throughput exceeded for this API action. API call rejected.
E114 Phone number is blacklisted. API call rejected.
E120 Account has reached the API request limit.
E503 Internal error.


Code Description
E170 ‘campaignname’ is required.
E171 ‘brandname’ is required.
E172 Campaign was not created. Internal error occured. Please try again later.
E173 ‘mailingaddress’ is required.


Key Term Definitions:

Term Description
ACTION This is the name of the function you want to execute with the API.
API_KEY Random key that is assigned to an account that can be used for authorization instead of USER/PASS. You can find and regenerate this key on the ‘API Settings’ page.
BRANDNAME The company, brand, or individual that will appear as the sender’s name for the campaign.
CAMPAIGNID The ID(integer) of the campaign to which the user will be subscribed.
CAMPAIGNNAME The name for a new campaign created with either the createMMSCampaign or createEmailCampaign function.
MAILINGADDRESS This is the physical address that will appear in your email footers. You are required to provide your physical address in accordance with the “CAN-SPAM Act of 2003”. Please make sure to include your company name and country in the address when you create a campaign. This field is used when creating an Email campaign.