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/x-www-form-urlencoded

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.

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 query.

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/x-www-form-urlencoded' \
  -d 'email=john.doe%40examplemail.com&email_bulk=true&email_chain=true&email_transactional=false&sms_bulk=false&sms_chain=true&sms_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/x-www-form-urlencoded

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 are no event parameter, or the paramenter has an incorrect value.
403 ForbiddenThe request was unsuccessful.
404 Not FoundThere are no mandatory parameters in the query.

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

Examples

Code Block
languagejs
themeFadeToGrey
# hard_bounce testevent
curl 'https://api.personaclick.com/subscriptions/managecallback' \
  -X 'POST' \
  -H 'content-type: application/x-www-form-urlencoded' \
  -d 'email=john.doe%40examplemail.com&emailshop_bulkid=true0d42fd8b713d0752776ca589cc0056&emailshop_chainsecret=true&email_transactional=false&sms_bulk=false&sms_chain=true&sms_transactional=false0123456789abcdef0123456789abcdef&event=hard_bounced'

# complained event
curl 'https://api.personaclick.com/subscriptions/callback' \
  -X 'POST' \
  -H 'content-type: application/x-www-form-urlencoded' \
  -d 'email=john.doe%40examplemail.com&shop_id=0d42fd8b713d0752776ca589cc0056&shop_secret=0123456789abcdef0123456789abcdef&event=complained'

# blacklisted event
curl 'https://api.personaclick.com/subscriptions/callback' \
  -X 'POST' \
  -H 'content-type: application/x-www-form-urlencoded' \
  -d 'email=john.doe%40examplemail.com&shop_id=0d42fd8b713d0752776ca589cc0056&shop_secret=0123456789abcdef0123456789abcdef&event=blacklisted'

# unsubscribed event
curl 'https://api.personaclick.com/subscriptions/callback' \
  -X 'POST' \
  -H 'content-type: application/x-www-form-urlencoded' \
  -d 'email=john.doe%40examplemail.com&shop_id=0d42fd8b713d0752776ca589cc0056&shop_secret=0123456789abcdef0123456789abcdef&event=unsubscribed'


Subscription Statuses



List of Subscription Changes



Table of Contents
maxLevel1
classpersonaclick-fixed-position