Need An Email Marketing Solution For All Of Your Customers?

Partner With VerticalResponse!

createList


The createList() method creates a new email or mailing list in the VR system, but does not append any members to that list. You can add custom fields with this call, or separately with the method createCustomListField.

Field names are case-sensitive. Standard fields are all lowercase, and custom fields’ case will depend on how you created them. For simplicity, we recommend creating all of your custom fields in lowercase.

If you are comparing your custom fields to the “List Fields” section of the VerticalResponse web application, the cases for any custom fields will match the Name column rather than the Merge Field column. (Standard fields will be all lowercase).

Input

[vrtypens:createListArgs]

session_id [xsd:string] (required)
Your API session id.
name [xsd:string] (required)
The name of the new list.
type [xsd:string] (required)
The type of the new list, almost always email. If postcard is selected, mailing addresses will be checked for validity.
custom_field_names [vrtypens:ArrayOfString]
A list of names for any non-standards fields that should be provided for this list.
custom_field_widths [vrtypens:ArrayOfString]
An array of widths for the custom fields. This array should match 1 on 1 with the fields array.
Allowed widths: “small”, “medium”, “large”. Defaults to “medium”

Output

[xsd:int]
The output is the ID of the new list.

Examples

PHP

$vr->createList( array (
	'session_id' => $sid,
	'name' => 'PHP Test List ' . time(),
	'type'	=> 'email',
) );

Ruby

vr.createList({
	'session_id'	=> sid,
	'name'	=> "Ruby Test List: " + DateTime.now.to_s,
	'type'	=> 'email',
})

Java

String listName = "API Test List "+ System.currentTimeMillis();
String type = "email";

CreateListArgs createListArgs = new CreateListArgs( sessionID, listName, type, null, null );

listID = vr.createList(createListArgs);

C#.NET

createListArgs objCLA = new createListArgs();
	objCLA.name = "C# Test List: " + date;
	objCLA.session_id =  sessionId;
	objCLA.type = "email";

int intlistId = 0;
try
{
    intlistId = objVR.createList(objCLA);
}
catch (Exception e)
{
    System.Console.WriteLine(e.Message);
}

Perl

$vr->createList( {
	session_id => $sid,
	name => 'Perl Test List ' . time(),
	type => 'email',
} );