POST v/1/Rest/Public/{client_domain}/Campaigns/ListOptIn

Opt a contact into a specific list.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
client_domain

string

None.

Body Parameters

which list you'd like to opt-in to

ListOptInParameters
NameDescriptionTypeAdditional information
Contact

ContactInfoParameters

None.

OptInList_Id

integer

None.

OptInListIds

Collection of integer

None.

Initiative_Id

integer

None.

AudienceSegment_Id

integer

None.

InitiativeGuid

string

None.

Request Formats

application/json, text/json

Sample:
{
  "Contact": {
    "PersonInfo": {
      "Prefix_Id": 1,
      "FirstName": "sample string 1",
      "MiddleName": "sample string 2",
      "LastName": "sample string 3",
      "Suffix_Id": 1,
      "BirthDate": "2024-12-26T10:31:37.0153928-05:00",
      "Gender": 1
    },
    "OrganizationInfo": {
      "Name": "sample string 1",
      "Type": 8
    },
    "HouseholdInfo": {
      "Name": "sample string 1"
    },
    "AddressStreet1": "sample string 1",
    "AddressStreet2": "sample string 2",
    "AddressCity": "sample string 3",
    "AddressState": "sample string 4",
    "AddressPostalCode": "sample string 5",
    "AddressCountry": "sample string 6",
    "EmailAddress": "sample string 7",
    "PhoneNumber": "sample string 8",
    "FaxNumber": "sample string 9",
    "SmsNumber": "sample string 10",
    "MailOptIn": true,
    "EmailOptIn": true,
    "PhoneOptIn": true,
    "FaxOptIn": true,
    "SmsOptIn": true
  },
  "OptInList_Id": 1,
  "OptInListIds": [
    1,
    2
  ],
  "Initiative_Id": 1,
  "AudienceSegment_Id": 1,
  "InitiativeGuid": "sample string 2"
}

application/xml, text/xml

Sample:
<ListOptInParameters xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <AudienceSegment_Id>1</AudienceSegment_Id>
  <Contact>
    <AddressCity>sample string 3</AddressCity>
    <AddressCountry>sample string 6</AddressCountry>
    <AddressPostalCode>sample string 5</AddressPostalCode>
    <AddressState>sample string 4</AddressState>
    <AddressStreet1>sample string 1</AddressStreet1>
    <AddressStreet2>sample string 2</AddressStreet2>
    <EmailAddress>sample string 7</EmailAddress>
    <EmailOptIn>true</EmailOptIn>
    <FaxNumber>sample string 9</FaxNumber>
    <FaxOptIn>true</FaxOptIn>
    <HouseholdInfo>
      <Name>sample string 1</Name>
    </HouseholdInfo>
    <MailOptIn>true</MailOptIn>
    <OrganizationInfo>
      <Name>sample string 1</Name>
      <Type>None</Type>
    </OrganizationInfo>
    <PersonInfo>
      <BirthDate>2024-12-26T10:31:37.0153928-05:00</BirthDate>
      <FirstName>sample string 1</FirstName>
      <Gender>Male</Gender>
      <LastName>sample string 3</LastName>
      <MiddleName>sample string 2</MiddleName>
      <Prefix_Id>1</Prefix_Id>
      <Suffix_Id>1</Suffix_Id>
    </PersonInfo>
    <PhoneNumber>sample string 8</PhoneNumber>
    <PhoneOptIn>true</PhoneOptIn>
    <SmsNumber>sample string 10</SmsNumber>
    <SmsOptIn>true</SmsOptIn>
  </Contact>
  <InitiativeGuid>sample string 2</InitiativeGuid>
  <Initiative_Id>1</Initiative_Id>
  <OptInListIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:int>1</d2p1:int>
    <d2p1:int>2</d2p1:int>
  </OptInListIds>
  <OptInList_Id>1</OptInList_Id>
</ListOptInParameters>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'ListOptInParameters'.

Response Information

Resource Description

information on the result of the opt-in operation.

ListOptInResponse
NameDescriptionTypeAdditional information
Successful

boolean

None.

Error

PublicApiError

None.

Response Formats

application/json, text/json

Sample:
{
  "Successful": true,
  "Error": {
    "Code": 0,
    "Message": "sample string 1"
  }
}

application/xml, text/xml

Sample:
<ListOptInResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <Error>
    <Message>sample string 1</Message>
    <Code>None</Code>
  </Error>
  <Successful>true</Successful>
</ListOptInResponse>