For more information on using API

POST https://webapi.mymarketing.co.il/api/mailinglist/{id}/members

Add a member to a mailing list

Request Information

URI Parameters

Name

Description

Type

Additional information

id

Mailinglist id. Can be found using the endpoint "Get account's mailing lists" or in the UI (go to Contacts->Mailing Lists->click on the mailing lists's name -> you'll find the id int the URL)

integer

Required

Body Parameters

MailingListContactDTO

Name

Description

Type

Additional information

GroupIds

The groups' id the contacts will be added to separeted with commas (,). Can be found using the endpoint "Get account's groups" or in the UI (go to Contacts->Groups->click on the group's name -> you'll find the id int the URL)

Collection of integer

Required

SubscribeIp

The Subscribe Ip

string
status

Choose the states (status) of the contact you want to get

sms_status

Choose the states (sms status) of the contact you want to get

DoubleOptin

See DoubleOptin

Id

integer
Email

Required if SMS is null. please note: mendatory in the endpoint "Create a new contact" and in "Send an email operational message to individual contacts"

string
SMS

Required if email is null.

string
FirstName

Contact field

string
LastName

Contact field

string
Anniversary

Contact field

date
Birthday

Contact field

date
City

Contact field

string
Fax

Contact field

string
Phone1

Contact field

string
Phone2

Contact field

string
Street

Contact field

string
ZipCode

Contact field

string
Ext1

Contact field

string
Ext2

Contact field

string
Ext3

Contact field

string
Ext4

Contact field

string
Ext5

Contact field

string
Ext6

Contact field

string
Ext7

Contact field

string
Ext8

Contact field

string
Ext9

Contact field

string
Ext10

Contact field

string
Ext11

Contact field

string
Ext12

Contact field

string
Ext13

Contact field

string
Ext14

Contact field

string
Ext15

Contact field

string
Ext16

Contact field

string
Ext17

Contact field

string
Ext18

Contact field

string
Ext19

Contact field

string
Ext20

Contact field

string
Ext21

Contact field

string
Ext22

Contact field

string
Ext23

Contact field

string
Ext24

Contact field

string
Ext25

Contact field

string
Date1

Contact field

date
Date2

Contact field

date
Date3

Contact field

date
Date4

Contact field

date
Date5

Contact field

date
Num1

Contact field

integer
Num2

Contact field

integer
Num3

Contact field

integer
Num4

Contact field

integer
Num5

Contact field

integer
IsDeleted

If true - contact will be deleted. If false - contact will be restored if deleted (their status will be the last status they were on ActiveTrail).

boolean
IsOptined

boolean

Request Formats

application/json, text/json

Sample:
{
  "group_ids": [
    1,
    2
  ],
  "subscribe_ip": "sample string 1",
  "status": "None",
  "sms_status": "None",
  "double_optin": {
    "subject": "sample string 1",
    "message": "sample string 2",
    "confirmation_link_text": "sample string 3"
  },
  "email": "sample string 7",
  "sms": "sample string 8",
  "first_name": "sample string 9",
  "last_name": "sample string 10",
  "anniversary": "2016-12-24T14:12:12",
  "birthday": "2016-12-24T14:12:12",
  "city": "sample string 11",
  "fax": "sample string 12",
  "phone1": "sample string 13",
  "phone2": "sample string 14",
  "street": "sample string 15",
  "zip_code": "sample string 16",
  "ext1": "sample string 17",
  "ext2": "sample string 18",
  "ext3": "sample string 19",
  "ext4": "sample string 20",
  "ext5": "sample string 21",
  "ext6": "sample string 22",
  "ext7": "sample string 23",
  "ext8": "sample string 24",
  "ext9": "sample string 25",
  "ext10": "sample string 26",
  "ext11": "sample string 27",
  "ext12": "sample string 28",
  "ext13": "sample string 29",
  "ext14": "sample string 30",
  "ext15": "sample string 31",
  "ext16": "sample string 32",
  "ext17": "sample string 33",
  "ext18": "sample string 34",
  "ext19": "sample string 35",
  "ext20": "sample string 36",
  "ext21": "sample string 37",
  "ext22": "sample string 38",
  "ext23": "sample string 39",
  "ext24": "sample string 40",
  "ext25": "sample string 41",
  "date1": "2016-12-24T14:12:12",
  "date2": "2016-12-24T14:12:12",
  "date3": "2016-12-24T14:12:12",
  "date4": "2016-12-24T14:12:12",
  "date5": "2016-12-24T14:12:12",
  "num1": 1,
  "num2": 1,
  "num3": 1,
  "num4": 1,
  "num5": 1,
  "is_deleted": true
}

application/xml, text/xml

Sample:
<MailingListContactDTO xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ActiveTrail.RESTfulApi.Models">
  <anniversary>2016-12-24T14:12:12</anniversary>
  <birthday>2016-12-24T14:12:12</birthday>
  <city>sample string 11</city>
  <date1>2016-12-24T14:12:12</date1>
  <date2>2016-12-24T14:12:12</date2>
  <date3>2016-12-24T14:12:12</date3>
  <date4>2016-12-24T14:12:12</date4>
  <date5>2016-12-24T14:12:12</date5>
  <dontSentToKafka>true</dontSentToKafka>
  <email>sample string 7</email>
  <eventGuid>298e1ac6-882e-4ab3-adfa-5e066028deab</eventGuid>
  <ext1>sample string 17</ext1>
  <ext10>sample string 26</ext10>
  <ext11>sample string 27</ext11>
  <ext12>sample string 28</ext12>
  <ext13>sample string 29</ext13>
  <ext14>sample string 30</ext14>
  <ext15>sample string 31</ext15>
  <ext16>sample string 32</ext16>
  <ext17>sample string 33</ext17>
  <ext18>sample string 34</ext18>
  <ext19>sample string 35</ext19>
  <ext2>sample string 18</ext2>
  <ext20>sample string 36</ext20>
  <ext21>sample string 37</ext21>
  <ext22>sample string 38</ext22>
  <ext23>sample string 39</ext23>
  <ext24>sample string 40</ext24>
  <ext25>sample string 41</ext25>
  <ext3>sample string 19</ext3>
  <ext4>sample string 20</ext4>
  <ext5>sample string 21</ext5>
  <ext6>sample string 22</ext6>
  <ext7>sample string 23</ext7>
  <ext8>sample string 24</ext8>
  <ext9>sample string 25</ext9>
  <externalId>sample string 5</externalId>
  <externalName>sample string 6</externalName>
  <externalSFId>sample string 3</externalSFId>
  <externalSFName>sample string 4</externalSFName>
  <fax>sample string 12</fax>
  <first_name>sample string 9</first_name>
  <is_deleted>true</is_deleted>
  <is_do_not_mail>true</is_do_not_mail>
  <last_name>sample string 10</last_name>
  <num1>1</num1>
  <num2>1</num2>
  <num3>1</num3>
  <num4>1</num4>
  <num5>1</num5>
  <phone1>sample string 13</phone1>
  <phone2>sample string 14</phone2>
  <sms>sample string 8</sms>
  <street>sample string 15</street>
  <zip_code>sample string 16</zip_code>
  <double_optin>
    <confirmation_link_text>sample string 3</confirmation_link_text>
    <message>sample string 2</message>
    <subject>sample string 1</subject>
  </double_optin>
  <GroupIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:int>1</d2p1:int>
    <d2p1:int>2</d2p1:int>
  </GroupIds>
</MailingListContactDTO>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

ContactContainerItem

Name

Description

Type

Additional information

id

Contact field

integer
state

Contact field

is_optined

Contact field

boolean
email

Required if SMS is null. please note: mendatory in the endpoint "Create a new contact" and in "Send an email operational message to individual contacts"

string
sms

Required if email is null.

string
first_name

Contact field

string
last_name

Contact field

string
anniversary

Contact field

date
birthday

Contact field

date
city

Contact field

string
fax

Contact field

string
phone1

Contact field

string
phone2

Contact field

string
street

Contact field

string
zip_code

Contact field

string
ext1

Contact field

string
ext2

Contact field

string
ext3

Contact field

string
ext4

Contact field

string
ext5

Contact field

string
ext6

Contact field

string
ext7

Contact field

string
ext8

Contact field

string
ext9

Contact field

string
ext10

Contact field

string
ext11

Contact field

string
ext12

Contact field

string
ext13

Contact field

string
ext14

Contact field

string
ext15

Contact field

string
ext16

Contact field

string
ext17

Contact field

string
ext18

Contact field

string
ext19

Contact field

string
ext20

Contact field

string
ext21

Contact field

string
ext22

Contact field

string
ext23

Contact field

string
ext24

Contact field

string
ext25

Contact field

string
date1

Contact field

date
date2

Contact field

date
date3

Contact field

date
date4

Contact field

date
date5

Contact field

date
num1

Contact field

integer
num2

Contact field

integer
num3

Contact field

integer
num4

Contact field

integer
num5

Contact field

integer
is_deleted

If true - contact will be deleted. If false - contact will be restored if deleted (their status will be the last status they were on ActiveTrail).

boolean

Response Formats

application/json, text/json

Sample:
{
  "id": 1,
  "state": "Unsubscribed",
  "is_optined": true,
  "email": "sample string 6",
  "sms": "sample string 7",
  "first_name": "sample string 8",
  "last_name": "sample string 9",
  "anniversary": "2016-12-24T14:12:12",
  "birthday": "2016-12-24T14:12:12",
  "city": "sample string 10",
  "fax": "sample string 11",
  "phone1": "sample string 12",
  "phone2": "sample string 13",
  "street": "sample string 14",
  "zip_code": "sample string 15",
  "ext1": "sample string 16",
  "ext2": "sample string 17",
  "ext3": "sample string 18",
  "ext4": "sample string 19",
  "ext5": "sample string 20",
  "ext6": "sample string 21",
  "ext7": "sample string 22",
  "ext8": "sample string 23",
  "ext9": "sample string 24",
  "ext10": "sample string 25",
  "ext11": "sample string 26",
  "ext12": "sample string 27",
  "ext13": "sample string 28",
  "ext14": "sample string 29",
  "ext15": "sample string 30",
  "ext16": "sample string 31",
  "ext17": "sample string 32",
  "ext18": "sample string 33",
  "ext19": "sample string 34",
  "ext20": "sample string 35",
  "ext21": "sample string 36",
  "ext22": "sample string 37",
  "ext23": "sample string 38",
  "ext24": "sample string 39",
  "ext25": "sample string 40",
  "date1": "2016-12-24T14:12:12",
  "date2": "2016-12-24T14:12:12",
  "date3": "2016-12-24T14:12:12",
  "date4": "2016-12-24T14:12:12",
  "date5": "2016-12-24T14:12:12",
  "num1": 1,
  "num2": 1,
  "num3": 1,
  "num4": 1,
  "num5": 1,
  "is_deleted": true
}

application/xml, text/xml

Sample:
<ContactContainerItem xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ActiveTrail.RESTfulApi.Models">
  <anniversary>2016-12-24T14:12:12</anniversary>
  <birthday>2016-12-24T14:12:12</birthday>
  <city>sample string 10</city>
  <date1>2016-12-24T14:12:12</date1>
  <date2>2016-12-24T14:12:12</date2>
  <date3>2016-12-24T14:12:12</date3>
  <date4>2016-12-24T14:12:12</date4>
  <date5>2016-12-24T14:12:12</date5>
  <dontSentToKafka>true</dontSentToKafka>
  <email>sample string 6</email>
  <eventGuid>d3ece7fa-3953-464d-9803-5e1ed94f4780</eventGuid>
  <ext1>sample string 16</ext1>
  <ext10>sample string 25</ext10>
  <ext11>sample string 26</ext11>
  <ext12>sample string 27</ext12>
  <ext13>sample string 28</ext13>
  <ext14>sample string 29</ext14>
  <ext15>sample string 30</ext15>
  <ext16>sample string 31</ext16>
  <ext17>sample string 32</ext17>
  <ext18>sample string 33</ext18>
  <ext19>sample string 34</ext19>
  <ext2>sample string 17</ext2>
  <ext20>sample string 35</ext20>
  <ext21>sample string 36</ext21>
  <ext22>sample string 37</ext22>
  <ext23>sample string 38</ext23>
  <ext24>sample string 39</ext24>
  <ext25>sample string 40</ext25>
  <ext3>sample string 18</ext3>
  <ext4>sample string 19</ext4>
  <ext5>sample string 20</ext5>
  <ext6>sample string 21</ext6>
  <ext7>sample string 22</ext7>
  <ext8>sample string 23</ext8>
  <ext9>sample string 24</ext9>
  <externalId>sample string 4</externalId>
  <externalName>sample string 5</externalName>
  <externalSFId>sample string 2</externalSFId>
  <externalSFName>sample string 3</externalSFName>
  <fax>sample string 11</fax>
  <first_name>sample string 8</first_name>
  <is_deleted>true</is_deleted>
  <is_do_not_mail>true</is_do_not_mail>
  <last_name>sample string 9</last_name>
  <num1>1</num1>
  <num2>1</num2>
  <num3>1</num3>
  <num4>1</num4>
  <num5>1</num5>
  <phone1>sample string 12</phone1>
  <phone2>sample string 13</phone2>
  <sms>sample string 7</sms>
  <street>sample string 14</street>
  <zip_code>sample string 15</zip_code>
</ContactContainerItem>