REST API: Campaigns


The Campaigns resource represents all actions on and retrieval of campaigns in a given Betwext Broadcast account. The Campaigns resource allows retrieval of all campaigns, creation, updating, and deleting of individual campaigns.


Root Resource URI

/2011-03-01/Campaigns

Resource Properties


A Campaigns Instance resource is represented by the following properties:


Property Description
CampaignID String representing the unique system ID for an individual campaign
Name String representing the name of the campaign.
Created Unix timestamp (GMT) representing the creation time and date of this campaign.
ScheduleTime Unix timestamp (GMT) representing the time and date campaign is to be sent.
Message String representing the message sent to all subscribers.
Lists Comma separated list (string) of IDs of lists campaign is to be sent to.
Notes Text representing the notes of the list. Empty if unavailable for this subscriber.
Status String representing the current status of the campaign.
Type Integer representing type of campaign.
SendNumber Long or Short code E.164 formatted number campaign is to be sent from.
ConfirmationEmail String value representing email address to have campaign confirmation and receipt sent to.
BillingSource String representing billing source for campaign payment.

Campaign Instance Resource


Root Resource URI

/2011-03-01/Campaigns

HTTP GET

Returns account campaigns


GET /2011-03-01/campaigns

Response: GET Campaigns

Returns a paginated subset of all account campaigns.

HTTP POST


Creates a new campaign


POST /2011-03-01/campaigns

The following parameters are required to create a new campaign:


Property Description
Name String representing the name of the campaign.
Message String representing the message sent to all subscribers.
Lists Comma separated list (string) of IDs of lists campaign is to be sent to.

The following parameters are optional to create a new campaign:


Property Description
ScheduleTime Unix timestamp (GMT) representing the time and date campaign is to be sent.
Notes Text representing the notes of the campaign.
SendNumber Long or Short code E.164 formatted number campaign is to be sent from. Defaults to your account's initial long code.
ConfirmationEmail String value representing email address to have campaign confirmation and receipt sent to. Defaults to account email address.
BillingSource String representing billing source for campaign payment. Defaults to deducting credits from your account, then tries to charge credit card on file.

Response: POST New Campaign Response

Returns the newly created campaign


HTTP PUT


Not Supported


HTTP DELETE


Not Supported

Send Campaign Instance Resource


Root Resource URI

/2011-03-01/Campaigns/Send

HTTP POST


Sends a single campaign


POST /2011-03-01/campaigns/send

The following parameters are required to send a single campaign:


Property Description
CampaignID Integer representing the unique ID of an individual campaign.

Response: Send Campaign


HTTP GET


Not Supported


HTTP PUT


Not Supported


HTTP DELETE


Not Supported


Individual Campaign Instance Resource


Root Resource URI

/2011-03-01/Campaigns/Individual

HTTP GET


Returns a single campaign


GET /2011-03-01/campaigns/individual

The following parameters are required to get a single campaign:


Property Description
CampaignID Integer representing the unique ID of an individual campaign

Response: GET Individual Campaign

The response is identical to the New Campaign Resource response outlined above.


HTTP POST


Not Supported


HTTP PUT


Not Supported


HTTP DELETE


Not Supported


Delete Campaign Instance Resource


Root Resource URI

/2011-03-01/Campaigns/Delete

HTTP POST


Deletes a single campaign


POST /2011-03-01/campaigns/delete

The following parameters are required to delete a single campaign:


Property Description
CampaignID Integer representing the unique ID of an individual campaign.

Response: Delete Campaign

Deletes the campaign from the account. Returns HTTP 204 response if successful (no body).


HTTP GET


Not Supported


HTTP PUT


Not Supported


HTTP DELETE


Not Supported