Creating a List

Create a List via the Web Service.


Function

  • createList()

Url

  • POST: /PuresendService/v1/createList

Parameters

  • listName: String
    • name of the list.
  • categoryId: int
    • category to create list in.
    • -1 for default top level.
  • brandName: String
    • any human readable name used for list purpose
  • isProofList: boolean
    • is this list a proof list
  • fieldNames: String[]
    • custom field names for the list. Maximum 25 fields allowed.

Return

  • newListId: int
    • The new List's list ID. Zero if create fail.

Exception

  • PuresendException

Documentation

  • If you are using custom field names, do not specify 'Email' as this is already defined by Puresend and has its on setter function.

Examples

{
    "listName" : "New List Name",
    "categoryId" : 0,
    "brandName" : "Brand Name",
    "isProofList" : false,
    "fieldNames" : ["fieldA", "fieldB"]
}
{
    "newListId": 9399
}