Update a subscriber
Request
|
Parameter |
In |
Type |
Required |
Description |
|---|---|---|---|---|
|
|
header |
string |
true |
Determines the expected format and data type to retrieve the response data. Value: |
|
|
path |
string |
true |
The ID of the email list that contains the subscriber. |
|
|
path |
string |
true |
The ID of the subscriber that you want to update. |
|
|
path |
string |
true |
The supported file format for getting a response. Possible values: |
|
|
query |
string |
true |
The API key of your account |
|
|
body |
string |
false |
The name of the subscriber. |
|
|
body |
string |
true |
The email address of the subscriber. |
|
|
body |
Boolean |
false |
When |
|
|
body |
array |
false |
A list of name-value pairs that match the subscriber’s custom fields defined in the email list. For example, if you have two custom fields for |
|
|
body |
object |
false |
The member tag you can use to filter members by when working with an email list. |
|
|
body |
object |
false |
The member preferences you can user to segment or filter members by, when working with an email list. |
POST https://{hostname}/v3/subscribers/{MailingListID}/update/{SubscriberID}.{Format}?apikey=
Request body:
{
"Name": "Some NamePaul",
"Email": "[email protected]",
"HasExternalDoubleOptIn": false,
"CustomFields": [
"Age=25",
"Country=USA"
],
"Tags": [
"repeater"
],
"Preferences": [
"option a",
"option b",
"option c"
]
}
Response
|
Status |
Description |
Headers |
Schema |
|---|---|---|---|
|
|
The request is successful. |
|
N/A |
{
"Code": 0,
"Error": null,
"Context": {
"ID": "d75fca65-a2bc-4474-bd4d-307f9cf63a57",
"Name": "Some name",
"Email": "[email protected]",
"CreatedOn": "/Date(1465380655880+0100)/",
"UpdatedOn": "/Date(1465388373874)/",
"UnsubscribedOn": null,
"UnsubscribedFromID": null,
"SubscribeType": 1,
"SubscribeMethod": 2,
"CustomFields": [
{
"CustomFieldID": "b9a6cb39-ec8f-4e5e-a41a-b64b9b3fc190",
"Name": "Age",
"Value": 25
},
{
"CustomFieldID": "1c4ff8dc-48e3-4af1-ae4f-2b1b81a44d17",
"Name": "Country",
"Value": "USA"
}
],
"RemovedOn": null,
"Tags": [
"potential",
"repeater"
]
}
}-
Code- the response code. This is0if successful. -
Error- the response error message. This isnullif successful. -
Context- an object that contains all the following information for the updated subscriber:-
ID- the ID of the subscriber. -
Name- the name of the subscriber. -
Email- the email address of the subscriber. -
CreatedOn- the date-time the subscriber was added to the email list. -
UnsubscribedOn- the date-time the subscriber was unsubscribed from the email list. This isnullif not unsubscribed from the list. -
UnsubscribedFromID- the ID that the subscriber is unsubscribed from. -
SubscribeType- the status of the subscriber. For subscribed, this is1, for unsubscribed, this is2, for bounced, this is3, and for removed, this is4. -
SubscribeMethod- the method used to subscribe the member to the email list. For subscription forms, this is0, for file imports, this is1, for manually added, this is2. -
CustomFields- a list containing the custom fields of the new subscriber. Each custom field contains the following:-
CustomFieldID- the ID of the custom field. -
Name- the name of the custom field. -
Value- the value of the custom field.
-
-
RemovedOn- the date-time the subscriber was removed from the email list. -
Tags- a list containing the tags of the new subscriber.
-