NAV

List(Last Updated : 01/11/2017)

The following section provides the parameters and template for making requests to manage subscriptions, or contacts. Example response from the system is also provided.

Methods

Create List /http/v2/createlist
Rename List /http/v2/renamelist
Delete List /http/v2/deletelist

Create List

This function creates a new list. At the beginning of any list-creation request, you must specify the URL of the resource: http://api.trumpia.com/http/v2/createlist.

Resource Information

Response Formats JSON
Allowed Methods GET/POST
URL http://api.trumpia.com/http/v2/createlist

Body Parameters

* required parameters
Parameter Description
apikey * The API key is located in API Settings within the system. An API certification must be approved before a key is generated.

Example value: 123456789abc1011
list_name * Enter the name of your list. List name is case-insensitive but must contain only alphanumeric characters. The maximum length for a list name is 32 characters.

Example value: GeneralList
display_name * The display name will be the name that your subscribers will see when signing up for your distribution list. As this name is public, make sure it makes sense to your future subscribers. There is a 50-character limit.

Example value: GeneralList
frequency * The frequency of messages your subscribers receive each month must be disclosed, according to mobile industry regulations. The maximum value is 999.

Example value: 4
description * The description of what types of messages your subscribers will receive when they opt in to this list must be disclosed. There is a 20-character limit.

Example value: promo alerts

Request Example

GET Method

http://api.trumpia.com/http/v2/createlist?apikey=123456789abc1011&list_name=listname&display_name=TestDisplay&frequency=3&description=Promotions

POST Method

<form method="post" action="http://api.trumpia.com/http/v2/createlist"> <input type="text" name="apikey" value="123456789abc1011"> <input type="text" name="list_name" value="TestList"> <input type="text" name="display_name" value="TestDisplay"> <input type="text" name="frequency" value="3"> <input type="text" name="description" value="Promotions"> </form>

Response Example

{ "message" : "Create List Success", "statuscode" : "1", "listname" : "TestList", "displayname" : "TestDisplay", "frequency" : "3", "description" : "Promotions" }

Rename List

This function renames an existing distribution list. At the beginning of any renaming request, you must specify the URL of the resource: http://api.trumpia.com/http/v2/renamelist.

Resource Information

Response Formats JSON
Allowed Methods GET/POST
URL http://api.trumpia.com/http/v2/renamelist

Body Parameters

* required parameters
Parameter Description
apikey * The API key is located in API Settings within the system. An API certification must be approved before a key is generated.

Example value: 123456789abc1011
list_name * The distribution list to be renamed. List name is case-insensitive but must contain only alphanumeric characters. The maximum length for a list name is 32 characters.

Example value: GeneralList
new_list_name * The new name of the distribution list. List name is case-insensitive but must contain only alphanumeric characters. The maximum length for a list name is 32 characters.

Example value: VIPlist

Request Example

GET Method

http://api.trumpia.com/http/v2/renamelist?apikey=1234567890&list_name=TestList&new_list_name=NewList

POST Method

<form method="post" action="http://api.trumpia.com/http/v2/renamelist"> <input type="text" name="apikey" value=" 123456789abc1011"> <input type="text" name="list_name" value="TestList"> <input type="text" name="new_list_name" value="NewList"> </form>

Response Example

{ "requestID" : "1234561234567asdf123" }

Delete List

This function deletes a list. At the beginning of your request, you must specify the URL of the resource: http://api.trumpia.com/http/v2/deletelist.

Resource Information

Response Formats JSON
Allowed Methods GET/POST
URL http://api.trumpia.com/http/v2/deletelist

Body Parameters

* required parameters
Parameter Description
apikey * The API key is located in API Settings within the system. An API certification must be approved before a key is generated.

Example value: 123456789abc1011
list_name * The distribution list to be renamed. List name is case-insensitive but must contain only alphanumeric characters. The maximum length for a list name is 32 characters.

Example value: GeneralList
delete_contact TRUE or FALSE. Setting this to TRUE will delete all contacts on the list; contact data cannot be restored.

Default value: FALSE

Request Example

GET Method

http://api.trumpia.com/http/v2/deletelist?apikey=123456789abc1011&list_name=testlist&delete_contact=TRUE

POST Method

<form method="post" action="http://api.trumpia.com/http/v2/deletelist"> <input type="text" name="apikey" value="123456789abc1011"> <input type="text" name="list_name" value="TestList"> <input type="text" name="delete_contact" value="TRUE"> </form>

Response Example

{ "requestID" : "1234561234567asdf123" }