SMS Text Campaign

Overview

The SMS Text Campaign endpoint allows you to manage your SMS Text Campaigns, by creating new Campaigns, or by requesting information about or updating existing Campaigns.

For more details on how to set up an SMS Campaign API request, please see the SMS Campaign API Technical Guide.

GET Method

The SMS Text Campaign endpoint supports the following GET operation. This endpoint allows you to retrieve information about a specified SMS Text Campaign by providing its Object Reference ID.

Note: This endpoint works only for Campaigns in the SMS Text channel; the endpoint can't retrieve information about Campaigns in other channels.

Click hereClick here to see a sample response message in JSON format.

{

  "campId": 19225,

  "campName": "Double Opt-in SMS campaign",

  "custId": 123,

  "entityId": 100,

  "channelTypeId": "SMS",

  "typeId": "REGULAR",

  "contBodies": [

    {

      "campId": 19225,

      "type": "TEXT",

      "usageMask": "SMS"

      "body": "Text CONFIRM to confirm!"

    }

  ],

  "senderProfileId": 18,

  "campParam": {

    "campId": 19225,

    "shortenLinksFlag": 0,

    "carryOverToNextDayFlag": 1,

    "stopNightDeliveryFlag": 0,

    "sendSchedule": {

      "timeZone": "Central_Standard_Time",

      "dayFrequency": {

        "frequencyType": "Daily",

        "daysInterval": 1

      },

      "timeFrequency": {

        "timeIntervalType": "MutipleTimesADay",

        "multipleTimesInterval": {

          "excludeTimeBefore": "2000-01-01T00:00:01",

          "excludeTimeAfter": "2000-01-01T23:59:59"

        }

      }

    },

    "queueSchedule": {

      "timeZone": "Central_Standard_Time"

    }

  },

  "campToList": {

    "campId": 19225

  },

  "campLimit": {

    "campId": 19225

  },

  "campMetaParams": [

    {

      "campId": 19225,

      "optionId": 1

    }

  ],

  "campReviewFlags": {

    "campId": 19225,

    "contCalculationFlag": 0,

    "personalizationFlag": 0,

    "sendingFlag": 1

  },

  "smsMsgTemplate": {

    "campId": 19225,

    "senderId": 12,

    "toAddressPropId": 11139

  },

  "obj": {

    "obj_id": 39717,

    "display_name": "Double Opt-in SMS campaign",

    "type_id": "CampaignSms",

    "ref_id": 19225,

    "parent_obj_id": 37249,

    "eligibility_status_id": "READY"

  }

}

 

 

POST Method

The SMS Text Campaign endpoint supports the following POST operation. This endpoint allows you to create a new SMS Text Campaign by providing the following basic information:

Click hereClick here to see a sample request message in JSON format.

{

  "custId": 123,

  "entityId": 100,

  "typeId": "REGULAR",

  "contBodies": [

    {

      "type": "TEXT",

      "usageMask": "SMS",

      "body": "SMS Text message content!"

    }

  ],

  "senderProfileId": 18,

  "campParam": {

    "campId": 19225,

    "shortenLinksFlag": 0,

    "carryOverToNextDayFlag": 1,

    "stopNightDeliveryFlag": 0,

    "sendSchedule": {

      "timeZone": "Central_Standard_Time",

      "dayFrequency": {

        "frequencyType": "Daily",

        "daysInterval": 1

      },

      "timeFrequency": {

        "timeIntervalType": "MutipleTimesADay",

        "multipleTimesInterval": {

          "excludeTimeBefore": "2000-01-01T00:00:01",

          "excludeTimeAfter": "2000-01-01T23:59:59"

        }

      }

    },

    "queueSchedule": {

      "timeZone": "Central_Standard_Time"

    }

  },

  "campToList": {},

  "campLimit": {},

  "campMetaParams": [],

  "campReviewFlags": {

    "contCalculationFlag": 0,

    "personalizationFlag": 0,

    "sendingFlag": 1

  },

  "smsMsgTemplate": {

    "senderId": 12,

    "toAddressPropId": 11139

  },

  "obj": {

    "display_name": "API SMS campaign",

    "parent_obj_id": 37249

  }

}

 

PUT Method

The SMS Text Campaign endpoint supports the following PUT operation. This endpoint allows you to submit modifications to an existing SMS Text Campaign. The request message must include the Campaign's Object Reference ID, and the desired changes. Using this endpoint, you can change just about any aspect of the Campaign, including its name, message content, schedule, etc.

In addition, you can use the PUT method to execute a process for this Campaign, such as send proofs, run audits, or launch the Campaign, for example.

 

Click hereClick here to see a sample request message in JSON format.

In the following example, the user is changing the message content for the specified SMS Text Campaign.

{

  "campId": 23831,

  "campName": "API SMS campaign",

  "custId": 123,

  "entityId": 100,

  "channelTypeId": "SMS",

  "typeId": "REGULAR",

  "contBodies": [

    {

      "campId": 23831,

      "type": "TEXT",

      "usageMask": "SMS",

      "body": "Text COUPON to receive a coupon code for ten percent off your next purchase!"

    }

  ],

  "senderProfileId": 18,

  "campParam": {

    "campId": 23831,

    "shortenLinksFlag": 0,

    "carryOverToNextDayFlag": 1,

    "stopNightDeliveryFlag": 0,

    "sendSchedule": {

      "timeZone": "Central_Standard_Time",

      "dayFrequency": {

        "frequencyType": "Daily",

        "daysInterval": 1

      },

      "timeFrequency": {

        "timeIntervalType": "MutipleTimesADay",

        "multipleTimesInterval": {

          "excludeTimeBefore": "2000-01-01T00:00:01",

          "excludeTimeAfter": "2000-01-01T23:59:59"

        }

      }

    },

    "queueSchedule": {

      "timeZone": "Central_Standard_Time"

    }

  },

  "campToList": {

    "campId": 23831

  },

  "campLimit": {

    "campId": 23831

  },

  "campReviewFlags": {

    "campId": 23831,

    "contCalculationFlag": 0,

    "personalizationFlag": 0,

    "sendingFlag": 1

  },

  "smsMsgTemplate": {

    "campId": 23831,

    "senderId": 12,

    "toAddressPropId": 11139

  },

  "obj": {

    "obj_id": 46651,

    "display_name": "API SMS campaign",

    "type_id": "CampaignSms",

    "ref_id": 23831,

    "parent_obj_id": 37249,

    "eligibility_status_id": "READY"

  }

}

 

 

DELETE Method

The SMS Text Campaign endpoint supports a DELETE operation that will delete the specified Campaign. You must provide the Object Reference ID for the desired Campaign.

Note: Deleted Campaigns are moved to the Recycle Bin.

 

Back to API Category - Campaign Management