For more information on using API

POST http://webapi.mymarketing.co.il/api/external/mailinglist/{mailinglistId}

Add contact to mailing list with the given external id and external name. Limited to 1000 contacts per call.

Request Information

URI Parameters

Name

Description

Type

Additional information

mailinglistId

Mailing list 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

Contacts information

ExternalList

Name

Description

Type

Additional information

contacts

Collection of ExternalBase

Request Formats

application/json, text/json

Sample:
{
  "contacts": [
    {
      "externalId": "sample string 1",
      "externalName": "sample string 2"
    },
    {
      "externalId": "sample string 1",
      "externalName": "sample string 2"
    }
  ]
}

application/xml, text/xml

Sample:
<ExternalList xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ActiveTrail.RESTfulApi.Models">
  <contacts>
    <ExternalBase>
      <externalId>sample string 1</externalId>
      <externalName>sample string 2</externalName>
    </ExternalBase>
    <ExternalBase>
      <externalId>sample string 1</externalId>
      <externalName>sample string 2</externalName>
    </ExternalBase>
  </contacts>
</ExternalList>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

ExternalResult

Name

Description

Type

Additional information

success

Number of success contacts

integer
contact_errors

Number of errors contacts

Collection of ExternalContactError

Response Formats

application/json, text/json

Sample:
{
  "success": 1,
  "contact_errors": [
    {
      "message": "sample string 1",
      "contact_error": {
        "externalId": "sample string 1",
        "externalName": "sample string 2"
      }
    },
    {
      "message": "sample string 1",
      "contact_error": {
        "externalId": "sample string 1",
        "externalName": "sample string 2"
      }
    }
  ]
}

application/xml, text/xml

Sample:
<ExternalResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ActiveTrail.RESTfulApi.Models">
  <contact_errors>
    <ExternalContactError>
      <contact_error>
        <externalId>sample string 1</externalId>
        <externalName>sample string 2</externalName>
      </contact_error>
      <message>sample string 1</message>
    </ExternalContactError>
    <ExternalContactError>
      <contact_error>
        <externalId>sample string 1</externalId>
        <externalName>sample string 2</externalName>
      </contact_error>
      <message>sample string 1</message>
    </ExternalContactError>
  </contact_errors>
  <success>1</success>
</ExternalResult>