createMessagingCampaign

Synopsis:

This API function creates a new messaging campaign within the account holders account. The campaign will be created under the name campaignname with the campaign reference ID campaignref in our system. Campaignname will be sent to users in opt-in/opt-out messages. Brandname will be shown on opt-in, help and opt-out messages to the end user to identify who is running the campaign. The campaign reference ID for each campaign must be a unique string.

Request: XML

<REQUEST>
    <ACTION>createMessagingCampaign</ACTION>
    <API_KEY>apiKey</API_KEY>
    <CAMPAIGNNAME>Camapign Name</CAMPAIGNNAME>
    <CAMPAIGNREF>CampaignReferenceID</CAMPAIGNREF>
    <BRANDNAME>Brand Name</BRANDNAME>
</REQUEST>

Request: GET

API_URL?action=createmessagingcampaign
&api_key=API key
&campaignname=campaign name
&campaignref=campaign reference ID
&brandname=brand name

Request Parameters:

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

Response Parameters:

status, campaignName, campaignRef, brandName, errorCode, errorInfo

Request Example: XML

<REQUEST>
    <ACTION>createMessagingCampaign</ACTION>
    <API_KEY>qTFkykO9JTfahCOqJ0V2Wf5Cg1t8iWlZ</API_KEY>
    <CAMPAIGNNAME>Winter Sale</CAMPAIGNNAME>
    <CAMPAIGNREF>Campaign01</CAMPAIGNREF>
    <BRANDNAME>Skycore</BRANDNAME>
</REQUEST>

Request Example: GET

https://secure.skycore.com/API/http/v1/index.php?action=createmessagingcampaign
&api_key=qTFkykO9JTfahCOqJ0V2Wf5Cg1t8iWlZ
&campaignname=Winter Sale
&campaignref=Campaign01
&brandname=Skycore

Response Example: Success

<RESPONSE>
    <STATUS>Success</STATUS>
    <CAMPAIGNNAME>Winter Sale</CAMPAIGNNAME>
    <CAMPAIGNREF>Campaign01</CAMPAIGNREF>
    <BRANDNAME>Skycore</BRANDNAME>
</RESPONSE>

Response Example: Failure

<RESPONSE>
    <STATUS>Failure</STATUS>
    <ERRORCODE>E170</ERRORCODE>
    <ERRORINFO>campaignname 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.
E718 The ‘campaignref’ is required
E721 Invalid campaignref


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.
CAMPAIGNNAME The name of the campaign.
CAMPAIGNREF The campaign reference ID (string).