Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Basic Details

Parameters used in all requests are described here.

Parameters

NameTypeRequirementDescription
shop_idstringrequiredUnique Store Key in PersonaClick. Located there: Account > Settings > Store Settings
shop_secretstringrequiredStore Secret Key in PersonaClick. Located there: Account > Settings > Store Settings


Manage Subscriptions

Method Objective

The method allows changing the status of the current user's subscriptions to notification channels.

Request

EndpointRequest TypeContent-Type
https://api.personaclick.com/subscriptions/managePOSTapplication/json

Parameters

Note

See "Basic Details" above for more information on required parameters.


Name

Type

Description

email

string

The current user's Email.

phonestringThe current user's Phone.
email_bulkbooleanIt changes the current user's subscription status to bulk email campaigns.
email_chainbooleanIt changes the current user's subscription status to triggered email campaigns.
email_transactionalbooleanIt changes the current user's subscription status for transactional email campaigns.
sms_bulkbooleanIt changes the current user's subscription status to bulk SMS campaigns.
sms_chainbooleanIt changes the current user's subscription status to triggered SMS campaigns.
sms_transactionalbooleanIt changes the current user's subscription status for transactional SMS campaigns.
web_push_bulkbooleanIt changes the current user's subscription status to bulk webpush campaigns.
web_push_chainbooleanIt changes the current user's subscription status to triggered webpush campaigns.
web_push_transactionalbooleanIt changes the current user's subscription status for transactional webpush campaigns.
mobile_push_bulkbooleanIt changes the current user's subscription status to bulk app campaigns.
mobile_push_chainbooleanIt changes the current user's subscription status to triggered app campaigns.
mobile_push_transactionalbooleanIt changes the current user's subscription status for transactional app campaigns.

API Response Code

HTTP status code

Description
200 OK

The request was successful.

400 Bad RequestThere are no parameters to change the status of subscriptions.
403 ForbiddenThe request was unsuccessful.
404 Not FoundThere are no mandatory parameters in the request.

API Response Data

The response is JSON type with the following properties:

NameTypeDescription
statusstring

Current status. Can have one of two values:

  • success - the request was successful
  • error - the request was unsuccessful
messagestring

The text of the error if it occurred

Request Example

Code Block
languagejs
themeFadeToGrey
curl 'https://api.personaclick.com/subscriptions/manage' \
  -X 'POST' \
  -H 'content-type: application/json' \
  -d '{"email":"john.doe@examplemail.com","email_bulk":"true","email_chain":"true","email_transactional":"false","sms_bulk":"false","sms_chain":"true","sms_transactional":"false","web_push_bulk":"true","web_push_chain":"true","web_push_transactional":"false","mobile_push_bulk":"false","mobile_push_chain":"true","mobile_push_transactional":"false","shop_id":"0d42fd8b713d0752776ca589cc0056","shop_secret":"0123456789abcdef0123456789abcdef"}'


System Operations

Method Objective

The method allows marking email addresses with system statuses and unsubscribing from all types of campaigns.

Request

EndpointRequest TypeContent-Type
https://api.personaclick.com/subscriptions/callbackPOSTapplication/json

Parameters

Note

See "Basic Details" above for more information on required parameters.


Name

Type

Description

eventstring

Specifies the action to be performed with the email. Available values:

  • hard_bounced - use this event only for hard bounced emails, not for soft bounced emails, as the method will permanently remove the email from the database
  • complained - use this event for FBL requests when a user has marked an message as spam
  • blacklisted - use this event to send the email to the blacklist
  • unsubscribed - use this event to unsubscribe the email from all campaigns

email

string

Email address for marking.

API Response Code

HTTP status code

Description
200 OK

The request was successful.

400 Bad RequestThere is no event parameter, or the paramenter has an incorrect value.
403 ForbiddenThe request was unsuccessful.
404 Not FoundThere are no mandatory parameters in the request.

API Response Data

The response is JSON type with the following properties:

NameTypeDescription
statusstring

Current status. Can have one of two values:

  • success - the request was successful
  • error - the request was unsuccessful
messagestring

The text of the error if it occurred

Request Examples

Code Block
languagejs
themeFadeToGrey
# hard_bounce event
curl 'https://api.personaclick.com/subscriptions/callback' \
  -X 'POST' \
  -H 'content-type: application/json' \
  -d '{"email":"john.doe@examplemail.com","shop_id":"0d42fd8b713d0752776ca589cc0056","shop_secret":"0123456789abcdef0123456789abcdef","event":"hard_bounced"}'

# complained event
curl 'https://api.personaclick.com/subscriptions/callback' \
  -X 'POST' \
  -H 'content-type: application/json' \
  -d '{"email":"john.doe@examplemail.com","shop_id":"0d42fd8b713d0752776ca589cc0056","shop_secret":"0123456789abcdef0123456789abcdef","event":"complained"}'

# blacklisted event
curl 'https://api.personaclick.com/subscriptions/callback' \
  -X 'POST' \
  -H 'content-type: application/json' \
  -d '{"email":"john.doe@examplemail.com","shop_id":"0d42fd8b713d0752776ca589cc0056","shop_secret":"0123456789abcdef0123456789abcdef","event":"blacklisted"}'

# unsubscribed event
curl 'https://api.personaclick.com/subscriptions/callback' \
  -X 'POST' \
  -H 'content-type: application/json' \
  -d '{"email":"john.doe@examplemail.com","shop_id":"0d42fd8b713d0752776ca589cc0056","shop_secret":"0123456789abcdef0123456789abcdef","event":"unsubscribed"}'


Subscription Statuses

Method Objective

The method allows checking the user's current subscription status by email or phone number.

Request

EndpointRequest Type
https://api.personaclick.com/subscriptions/checkGET

Parameters

Note

See "Basic Details" above for more information on required parameters.


Name

Type

Description

email

string

Email address for checking.

phonestringPhone number for checking.

API Response Code

HTTP status code

Description
200 OK

The request was successful.

400 Bad RequestThere are no email or phone parameters.
403 ForbiddenThe request was unsuccessful.

API Response Data

The response is JSON type with the following properties:

NameTypeDescription
statusstring

Available only in case of an error. Contains the "error" value in this case.

messagestring

Available only in case of an error. Contains a description of the error.

existsbooleanShows whether a profile with the requested property exists or not.
email_confirmedbooleanShows whether the email is confirmed or not.
email_bulkbooleanEmail subscription status for bulk campaigns.
email_chainbooleanEmail subscription status for chain/trigger campaigns.
email_transactionalbooleanEmail subscription status for transactional campaigns.
email_bouncedbooleanThe email is hard bounced or not.
email_suppressedbooleanThe email is suppressed or not.
email_blacklistedbooleanThe email is blacklisted or not.
email_invalidbooleanThe email is invalid or not.
sms_bulkbooleanPhone subscription status for SMS bulk campaigns.
sms_chainbooleanPhone subscription status for SMS chain/trigger campaigns.
sms_transactionalbooleanPhone subscription status for SMS transactional campaigns.
web_pushbooleanWhether or not the user with the email/phone has a subscription to web push.
mobile_pushbooleanWhether or not the user with the email/phone has a subscription to mobile app push.

Request Example

Code Block
languagejs
themeFadeToGrey
curl 'https://api.personaclick.com/subscriptions/check?email=john.doe%40examplemail.com&shop_id=0d42fd8b713d0752776ca589cc0056&shop_secret=0123456789abcdef0123456789abcdef'


List of Subscription Changes

Method Objective

The method allows checking the user's current subscription status by email or phone number.

Request

EndpointRequest Type
https://api.personaclick.com/subscriptions/changesGET

Parameters

Note

See "Basic Details" above for more information on required parameters.


Name

Type

Description

email

string

Email address for checking.

phonestringPhone number for checking.
eventstring

Filter by the event. Filter by event. Available values:

  • subscribe - subscription events only
  • unsubscribe - unsubscribe events only
  • hard_bounced - hard bounced events only
  • complained - complained events only
  • blacklisted - blacklisted events only
channelstring

Filter by the channel. Available values:

  • email_feedback_processing - if hard bounce is the reason for changing subscription statuses
  • api - if the change of subscription statuses was made by the "Manage Subscriptions" API method
  • api_callback - if API method "System Operations" was used to change the subscription statuses
  • popup - if the subscription statuses were changed with the popup tool
  • import - if the subscription statuses were set when the audience was imported
  • crm - if the subscription statuses were changed with the CRM tool
  • unsubscribe_page - if the subscription statuses were changed in the unsubscribe page
  • resubscribe_page - if the subscription statuses were changed in the resubscribe page

from

string

Start of the period. Format: YYYY-MM-DD. Defaults to 24 hours ago.

tostringEnd of period. Format: YYYY-MM-DD. The default is the current moment.
offsetnumberOffset relative to the first entry for the selected period. The default is 0.
limitnumberLimit of entries in the API response. The default is 20000. The maximum is 20000.

API Response Code

HTTP status code

Description
200 OK

The request was successful.

403 ForbiddenThe request was unsuccessful.

API Response Data

Note

The API response is limited to 20000 records per request.

The response is JSON type with the following properties:

NameTypeDescription
campaign_typestring

Campaign type. Available values:

  • bulk
  • chain
  • transactional
  • everything
channelstring

Event Channel. Available values:

  • email_feedback_processing
  • api
  • api_callback
  • popup
  • import
  • crm
  • unsubscribe_page
  • resubscribe_page
contactstringThe value of contact.
contact_typestring

Type of contact. Available values:

  • email
  • sms
  • wpush
  • mpush
datetimestringDate of the event in the format YYYY-MM-DDThh:mm:ss.SSS
eventstring

Event Type. Available values:

  • subscribe
  • unsubscribe
  • hard_bounced
  • complained
  • blacklisted
ipstringThe email is suppressed or not.

Request Example

Code Block
languagejs
themeFadeToGrey
curl https://api.personaclick.com/subscriptions/changes?shop_id=0d42fd8b713d0752776ca589cc0056&shop_secret=0123456789abcdef0123456789abcdef&event=subscribed&channel=import&from=2021-05-04&to=2021-05-05&offset=100500&limit=146



Column

Page Navigation

Table of Contents
maxLevel1
indent0px
stylenone




Related Pages

Filter by label (Content by label)
showLabelsfalse
showSpacefalse
sorttitle
cqllabel = "subscriptions"