Add New List Member
Name
add_list_member
Description
Add a new member to the list. It throws error if same email exists [API reference]
Related Tables
Parameters
Output Columns
Label | Data Type (SSIS) | Data Type (SQL) | Length | Raw | Description |
---|---|---|---|---|---|
Id |
DT_WSTR
|
nvarchar(200)
|
200 | False |
|
ListId |
DT_WSTR
|
nvarchar(200)
|
200 | False |
|
EmailAddress |
DT_WSTR
|
nvarchar(200)
|
200 | False |
|
UniqueEmailId |
DT_WSTR
|
nvarchar(200)
|
200 | False |
|
ContactId |
DT_WSTR
|
nvarchar(200)
|
200 | False |
|
FullName |
DT_WSTR
|
nvarchar(100)
|
100 | False |
|
WebId |
DT_I4
|
int
|
False |
||
EmailType |
DT_WSTR
|
nvarchar(20)
|
20 | False |
|
Status |
DT_WSTR
|
nvarchar(20)
|
20 | False |
|
ConsentsToOneToOneMessaging |
DT_BOOL
|
bit
|
False |
||
FirstName |
DT_WSTR
|
nvarchar(50)
|
50 | False |
|
LastName |
DT_WSTR
|
nvarchar(50)
|
50 | False |
|
AddressLine1 |
DT_WSTR
|
nvarchar(200)
|
200 | False |
|
AddressLine2 |
DT_WSTR
|
nvarchar(200)
|
200 | False |
|
City |
DT_WSTR
|
nvarchar(200)
|
200 | False |
|
State |
DT_WSTR
|
nvarchar(100)
|
100 | False |
|
Zip |
DT_WSTR
|
nvarchar(20)
|
20 | False |
|
Country |
DT_WSTR
|
nvarchar(100)
|
100 | False |
|
Phone |
DT_WSTR
|
nvarchar(50)
|
50 | False |
|
Birthday |
DT_WSTR
|
nvarchar(50)
|
50 | False |
|
StatsAvgOpenRate |
DT_I4
|
int
|
False |
||
StatsAvgClickRate |
DT_I4
|
int
|
False |
||
IpSignup |
DT_WSTR
|
nvarchar(200)
|
200 | False |
|
TimestampSignup |
DT_DBTIMESTAMP
|
datetime
|
False |
||
IpOpt |
DT_WSTR
|
nvarchar(200)
|
200 | False |
|
TimestampOpt |
DT_DBTIMESTAMP
|
datetime
|
False |
||
MemberRating |
DT_I4
|
int
|
False |
||
LastChanged |
DT_DBTIMESTAMP
|
datetime
|
False |
||
Language |
DT_WSTR
|
nvarchar(100)
|
100 | False |
|
Vip |
DT_BOOL
|
bit
|
False |
||
EmailClient |
DT_WSTR
|
nvarchar(200)
|
200 | False |
|
Latitude |
DT_I4
|
int
|
False |
||
Longitude |
DT_I4
|
int
|
False |
||
LocationGmtOff |
DT_I4
|
int
|
False |
||
LocationDstOff |
DT_I4
|
int
|
False |
||
CountryCode |
DT_WSTR
|
nvarchar(100)
|
100 | False |
|
TimeZone |
DT_WSTR
|
nvarchar(100)
|
100 | False |
|
Region |
DT_WSTR
|
nvarchar(100)
|
100 | False |
|
Source |
DT_WSTR
|
nvarchar(100)
|
100 | False |
|
TagsCount |
DT_I4
|
int
|
False |
||
Tags |
DT_WSTR
|
nvarchar(4000)
|
4000 | False |
Input Columns
Label | Data Type (SSIS) | Data Type (SQL) | Length | Raw | Description |
---|---|---|---|---|---|
EmailAddress |
DT_WSTR
|
nvarchar(200)
|
200 | False |
|
Status |
DT_WSTR
|
nvarchar(80)
|
80 | False |
Subscriber's current status. Possible values: subscribed, unsubscribed, cleaned, pending, or transactional. |
ListId |
DT_WSTR
|
nvarchar(100)
|
100 | False |
The ID of the list for which to add a new member. |
EmailType |
DT_WSTR
|
nvarchar(20)
|
20 | False |
Type of email this member asked to get ('html' or 'text'). |
FirstName |
DT_WSTR
|
nvarchar(255)
|
255 | False |
|
LastName |
DT_WSTR
|
nvarchar(255)
|
255 | False |
|
AddressLine1 |
DT_WSTR
|
nvarchar(200)
|
200 | False |
|
AddressLine2 |
DT_WSTR
|
nvarchar(200)
|
200 | False |
|
City |
DT_WSTR
|
nvarchar(200)
|
200 | False |
|
State |
DT_WSTR
|
nvarchar(100)
|
100 | False |
|
Zip |
DT_WSTR
|
nvarchar(20)
|
20 | False |
|
Country |
DT_WSTR
|
nvarchar(100)
|
100 | False |
|
Phone |
DT_WSTR
|
nvarchar(50)
|
50 | False |
|
Birthday |
DT_WSTR
|
nvarchar(50)
|
50 | False |
|
MergeFields |
DT_WSTR
|
nvarchar(4000)
|
4000 | True |
A dictionary of merge fields where the keys are the merge tags. |
Interests |
DT_WSTR
|
nvarchar(4000)
|
4000 | True |
The key of this object's properties is the ID of the interest in question. |
Language |
DT_WSTR
|
nvarchar(10)
|
10 | False |
If set/detected, the subscriber's language. |
Vip |
DT_BOOL
|
bit
|
False |
VIP status for subscriber. | |
Latitude |
DT_WSTR
|
nvarchar(4000)
|
4000 | False |
The location latitude. |
Longitude |
DT_WSTR
|
nvarchar(4000)
|
4000 | False |
The location longitude. |
MarketingPermissions |
DT_WSTR
|
nvarchar(4000)
|
4000 | True |
The marketing permissions for the subscriber. |
IpSignup |
DT_WSTR
|
nvarchar(200)
|
200 | False |
IP address the subscriber signed up from. |
TimestampSignup |
DT_DBTIMESTAMP
|
datetime
|
False |
The date and time the subscriber signed up for the list in ISO 8601 format. | |
IpOpt |
DT_WSTR
|
nvarchar(200)
|
200 | False |
The IP address the subscriber used to confirm their opt-in status. |
TimestampOpt |
DT_DBTIMESTAMP
|
datetime
|
False |
The date and time the subscriber confirmed their opt-in status in ISO 8601 format. | |
Tags |
DT_WSTR
|
nvarchar(4000)
|
4000 | True |
The tags that are associated with a member. |
Examples
SSIS
Use Mailchimp Connector in API Source component to read data or in API Destination component to read/write data:
Insert into ListMembers table using API Destination
This Endpoint belongs to ListMembers table, therefore you cannot work with it directly. Use this table and table-operation pair instead:

ODBC application
Use these SQL queries in your ODBC application data source:
Create a new member in the specified list/audience in your Mailchimp account
INSERT INTO ListMembers
(EmailAddress, Status, EmailType, MergeFields, Language, Vip, Latitude, Longitude, IpSignup, TimestampSignup, IpOpt, TimestampOpt, Tags)
VALUES
('np-brucewayne1@zappysys.com', 'subscribed', 'html',
'{"FNAME":"John","LNAME":"Doe","ADDRESS":{"addr1":"123","Freddie":"Ave","city":"Atlanta","state":"GA","zip":"12345"}}',
'en', false, '41.881832', '-87.623177', '192.168.0.8', '2023-04-01 18:00:00', '192.168.0.8', '2023-04-02 14:00:00',
'["Newtag1","Newtag2","Newtag3"]')
WITH (ListId='a4d24015f8')
add_list_member
endpoint belongs to
ListMembers
table(s), and can therefore be used via those table(s).
SQL Server
Use these SQL queries in SQL Server after you create a data source in Data Gateway:
Create a new member in the specified list/audience in your Mailchimp account
DECLARE @MyQuery NVARCHAR(MAX) = 'INSERT INTO ListMembers
(EmailAddress, Status, EmailType, MergeFields, Language, Vip, Latitude, Longitude, IpSignup, TimestampSignup, IpOpt, TimestampOpt, Tags)
VALUES
(''np-brucewayne1@zappysys.com'', ''subscribed'', ''html'',
''{"FNAME":"John","LNAME":"Doe","ADDRESS":{"addr1":"123","Freddie":"Ave","city":"Atlanta","state":"GA","zip":"12345"}}'',
''en'', false, ''41.881832'', ''-87.623177'', ''192.168.0.8'', ''2023-04-01 18:00:00'', ''192.168.0.8'', ''2023-04-02 14:00:00'',
''["Newtag1","Newtag2","Newtag3"]'')
WITH (ListId=''a4d24015f8'')';
EXEC (@MyQuery) AT [LS_TO_MAILCHIMP_IN_GATEWAY];
add_list_member
endpoint belongs to
ListMembers
table(s), and can therefore be used via those table(s).