Add Subscriber

The section describes the JSON request to add a new subscriber to a list

Required to Submit JSON Request

Username

The email that account holder uses to login SMTP PLANS

API Token

The API token user has generated using API Configuration section

Method

POST

Path

https://portal.smtp-plans.com/API/addSubscriber

Throughout this API document, required fields are mentioned as required under priority column of the Field Details Table. While for the non-required fields, priority column remains empty. The second column of the table "Variables" shows the variables that you will use in an API request to parse the values of the respective fields. 

Field Details 

Label

Variable

Priority

Description

 Email

['email']

Required

Email Address of the Subscriber you need to add

List ID

['list_id']

Required

List ID of the subscriber list where you want to add subscriber information to

Title

['title']

Optional 

Professional title, designation of the subscriber such as COO, CIO, CMO etc

First Name

['first_name']

Optional 

First Name of the Subscriber you want to add to the list

Last Name

['last_name']

Optional 

Last Name of the Subscriber you want to add to the list

Unsubscribed

['unsubscribed']

Optional 

Had the subscriber been marked as “Unsubscribed”? If yes then set this field with “1” while sending API request for adding subscriber information to a list. Otherwise, proceed with “0” which sets this subscriber status as default “Subscribed” within the list.

Bounced

['bounced']

Optional 

Had the subscriber been marked as “Bounced”? If yes then set this field with “1” while sending API request for adding subscriber information to a list. Otherwise, proceed with “0” which sets this subscriber status as default “Not Bounced” within the list.

Create Date

['create_date']

Optional 

 

FORMAT

['format']

Optional 

What essential email format subscriber prefers to receive, HTML/ Text (h for HTML and t for Text emails)

Confirmation Status

['confirmation_status']

Optional 

Indicates the confirmation status of the subscriber, confirmed or not. Set this field with “1” to mark the subscriber status as “Confirmed” or proceed with “0” in case subscriber has not been confirmed yet.

City

['city']

Optional 

Which city subscriber belongs to

Country

['country']

Optional 

Which country subscriber belongs to

Company

['company']

Optional 

Which company subscriber works in

Post Code

['post_code']

Optional 

Post Code information of the subscriber current location

State

['state']

Optional 

Which state subscriber belongs to

Mobile

['mobile']

Optional 

Mobile phone number of the subscriber

Phone

['phone']

Optional 

Phone number of the subscriber

Fax

['fax']

Optional 

Information of the subscriber to add into the Fax field


Success Response

The required subscriber and other related information will be added to the list upon submitting valid information appropriately, as a result of successful submission, JSON based response will return the ID of newly added subscriber as in the following sample response.

Status value for successfully added subscriber will be- “success”
Data Returned-"Subscriber ID"
Following is the example of a success response.

{"status":"success","response":{"Subscriber ID":"20"}};


Erroneous Response

When you submit request with inappropriate, incorrect information.

Status value for unsuccessful submission will be-"error”
Data Returned- Text based message describing reason of unsuccessful response
Some erroneous responses are as follows.

{"status":"error","response":"Email already exists in this List."}
{"status":"error","response":"List not available to add subscriber"}
{"status":"error","response":"Email is required to add subscriber"}
{"status":"error","response":"List ID is required to add subscriber"}

  • 0 användare blev hjälpta av detta svar
Hjälpte svaret dig?

Relaterade artiklar

Delete Subscriber

The section describes the JSON request to delete a subscriber from a list Required to Submit...

Get Subscriber

The section describes the JSON request to get a subscriber detail Required to Submit JSON...

Get Subscribers

The section describes the JSON request to get multiple subscribers Required to Submit JSON...

Update Subscriber

The section describes the JSON request to update a subscriber Required to Submit JSON Request...

Add List

The section describes the JSON request to add a new list Required to Submit JSON Request...