Campaign

Create and delete an SMS program

Create an SMS program

How it works

If you have the SMS Sender feature enabled for your Org you will need to use this API to create SMS Text to Join Programs instead of SMS Campaign Manager.

Note: This API is only available for Orgs that have SMS Sender feature enabled.

Use Case
Use this REST API to create an SMS program when you have the SMS Sender feature enabled for your SMS Org.

Requirements to use this API

  1. Your Campaign org must have SMS enabled by provisioning and be provisioned to send SMS messages through the Sender feature.
  2. A database in your Campaign org must have SMS enabled.
  3. The user making the API call must be enabled for SMS.
  4. The user making the API call must have valid Oauth credentials.

Note: Up to 10 concurrent requests are allowed to our API servers at any given time when using the OAuth method for authentication.

Endpoint
POST /channels/sms/program

Parameters

Attribute
Description
Sample
Notes

programName

Name of the SMS Program, required, string

Black Friday

Program Name must be unique and contain between 1 and 50 characters.

campaignName

SMS Campaign Name, required, string

2020 Holiday Sales

An SMS Campaign may contain one or more programs. Campaign name must be between 1 and 50 characters.

code

SMS Program Long/Short Code, required, string

87767

SMS code must be numeric. Code will not be used in case of 1-way messaging but is required for the program to be displayed in the user interface.

senderId

Sender ID for the SMS Program, optional, string

WATSON

Not supported in some countries. In case of 1-way messaging, this is required field.

status

Status of the SMS Program, required, string

ACTIVE

API call will fail if status is not ACTIVE

type

SMS Program type, required, string

TEXT_TO_JOIN

API call will fail if type is not TEXT_TO_JOIN (not case sensitive).

country

SMS program country represented by two alpha characters, required, string

US

Country will not be used in case of 1-way messaging but is required for the program to be displayed in the user interface.

Sample payload

```{

 "programName": "Black Friday"

 "campaignName": "2017 Holiday Sales",

 "code": "87767",

 "senderId": "WATSON",

 "status": "active",

 "type": "Text_to_Join",

 "country": "UK"

}```

Response codes

Scenario
Code
Message

Success

200

SMS program name is blank or greater than 50 characters.

400

SMS program name must be between 1 and 50 characters.

SMS campaign name is blank or greater than 50 characters.

400

SMS program name must be between 1 and 50 characters.

SMS code contains non-numeric characters.

400

SMS code must be numeric.

SMS program senderId is greater than 11 characters.

400

SMS program senderId must be between 1 and 11 characters.

SMS program status is not ACTIVE.

400

SMS status must be set too ACTIVE.

SMS program type is not TEXT_TO_JOIN or Text_to_Join.

400

SMS program type must be TEXT_TO_JOIN or Text_to_Join.

SMS country code entered is something other than two alpha characters

400

SMS program country must be valid two character country code.

User is not on an SMS-enabled Org

403

Forbidden

User calling the API is not SMS enabled

403

Forbidden

UBX Sender feature is not enabled for the Org

405

Unsupported operation

Test your API call

Use Swagger to test your API call. To access the Swagger environment for your Org, replace {POD#} with the Pod where your Org exists:

https://api-campaign-us-[POD#].goacoustic.com/restdoc/#!/channels/sms_to_contacts_post_6

For example, here’s the link to use if your Org is on Pod 1:

https://api-campaign-us-1.goacoustic.com/restdoc/#!/channels/sms_to_contacts_post_6

Delete an SMS program

How it works

If you have the SMS [shortcode-variables slug="ubx-short"] Sender feature enabled for your Org you will need to use this API to delete an SMS Text to Join Program.

Note: This API is only available for Orgs that have SMS [shortcode-variables slug="ubx-short"] Sender feature enabled.

Use case

Use this REST API to delete an SMS program when you have the SMS [shortcode-variables slug="ubx-short"] Sender feature enabled for your SMS Org.

Requirements to use this API

  1. Your Campaign org must have SMS enabled by provisioning and be provisioned to send SMS messages through the [shortcode-variables slug="ubx-short"] Sender feature.
  2. A database in your Campaign org must have SMS enabled.
  3. The user making the API call must be enabled for SMS.
  4. The user making the API call must have valid Oauth credentials.
    Note: Up to 10 concurrent requests are allowed to our API servers at any given time when using the OAuth method for authentication.

Endpoint

DELETE /channels/sms/program/{programId}

Parameters

Attribute
Description
Example
Notes

programId

SMS program Id to be deleted, required, string

12345

ProgramId is provided in the response to a successful Create an SMS Program API call. Alternatively, you can call Get all SMS Programs for an Org API to retrieve a programId.

Response codes

Scenario
Response code
Message

Success

200

User is not on an SMS-enabled Org

403

Forbidden

User calling the API is not SMS enabled

403

Forbidden

Program ID not found

404

Unable to locate SMS program ID {}

UBX Sender feature is not enabled for this Org

405

Unsupported operation

Test your API call

Use Swagger to test your API call. To access the Swagger environment for your Org, replace {POD#} with the Pod where your Org exists:

https://api-campaign-us-[POD#].goacoustic.com/restdoc/#!/channels/delete_sms_program_delete_8

For example, here’s the link to use if your Org is on Pod 1:

https://api-campaign-us-1.goacoustic.com/restdoc/#!/channels/delete_sms_program_delete_8

Updated 8 months ago


Create and delete an SMS program


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.