(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.data-privacy-src= 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-TT9ZP96');

Knowledge Base

Get Messaging Campaigns API

getMessagingCampaigns

Synopsis

This API function returns a list of MMS Campaigns for that account. Returned data consists of the campaign ID from our system, campaign name, and campaign reference ID.

Request: XML

<REQUEST>
    <ACTION>getMessagingCampaigns</ACTION>
    <API_KEY>apiKey</API_KEY>
</REQUEST>

Request Parameters

TermMandatory/OptionalDescription
ACTIONMandatoryThis is the name of the function you want to execute with the API.
API_KEY Mandatory 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.

Response Parameters

Param NamePresenceDescription
STATUSAlways“Success” or “Failure”.
MESSAGINGCAMPAIGNS Success response onlyThe list of messaging campaigns for the account.
MESSAGINGCAMPAIGNS:CAMPAIGNSuccess response only The messaging campaign details including campaign ID, campaign name, and campaign reference.
MESSAGINGCAMPAIGNS:CAMPAIGN:CAMPAIGNIDSuccess response only  The campaign ID.
MESSAGINGCAMPAIGNS:CAMPAIGN:NAMESuccess response only The name of the campaign.
MESSAGINGCAMPAIGNS:CAMPAIGN:REFERENCESuccess response onlyThe campaign reference.
ERRORCODEError response onlyError code associated with the error.
ERRORINFOError response onlyError message explaining the error code.

Request Example: XML

<REQUEST>
    <ACTION>getMessagingCampaigns</ACTION>
    <API_KEY>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</API_KEY>    
</REQUEST>

Response Example: Success

<RESPONSE>
    <STATUS>Success</STATUS>
    <MESSAGINGCAMPAIGNS>
        <CAMPAIGN>
            <ID>1233</ID>
            <NAME>Winter Sale</NAME>
            <REFERENCE>Campaign01</REFERENCE>
        </CAMPAIGN>
        <CAMPAIGN>
            <ID>1234</ID>
            <NAME>Summer Sale</NAME>
            <REFERENCE>Campaign02</REFERENCE>
        </CAMPAIGN>
        <CAMPAIGN>
            <ID>1235</ID>
            <NAME>Store opening</NAME>
            <REFERENCE>Campaign03</REFERENCE>
        </CAMPAIGN>
    </MESSAGINGCAMPAIGNS>
</RESPONSE>

Response Example: Failure

<RESPONSE>
    <STATUS>Failure</STATUS>
    <ERRORCODE>E405</ERRORCODE>
    <ERRORINFO>No Messaging Campaigns were created in this account</ERRORINFO>
</RESPONSE>

General Error Codes

CodeDescription
E100Invalid request. Make a valid request via GET/POST/XML with all the required variables.
E104User Authentication Failed.
E105This account has no API rights.
E106You can call API every X seconds.
E107This account has no rights to use this action.
E108XML Parse error: $error.
E109API not activated.
E112IP was not whitelisted. API call rejected.
E113Set throughput exceeded for this API action. API call rejected.
E114Phone number is blacklisted. API call rejected.
E120Account has reached the API request limit.
E503Internal error.
CodeDescription
E405No Messaging Campaigns were created in this account
Go to Top