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
Manage Subscriptions
Method Objective
The method allows changing the status of the current user's subscriptions to notification channels.
Request
Parameters
Note |
---|
See "Basic Details" above for more information on required parameters. |
Name
Description
The current user's Email.
It changes the current user's subscription status for transactional email campaigns.
Note |
---|
It's recommended that always use the "true" value, even if you don't use transactional messages. |
It changes the current user's subscription status for transactional SMS campaigns.
Note |
---|
It's recommended that always use the "true" value, even if you don't use transactional messages. |
Manage Subscriptions
Method Objective
The method allows changing the status of the current user's subscriptions to notification channels.
Request
Endpoint | Request Type | Content-Type |
---|---|---|
https://api.personaclick.com/subscriptions/manage | POST | application/json |
Parameters
Name | Type | Requirement | Description |
---|---|---|---|
shop_id | string | required | Unique Store Key in PersonaClick. Located there: Account > Settings > Store Settings |
shop_secret | string | required | Store Secret Key in PersonaClick. Located there: Account > Settings > Store Settings |
Name | Type | Description | ||
---|---|---|---|---|
string | The current user's Email. | |||
phone | string | The current user's phone number in international format.
| ||
external_id | string | Store side user ID. | ||
loyalty_id | sting | The Loyalty Program user ID (loyalty card). | ||
telegram_id | sting | Telegram User ID. | ||
email_bulk | boolean | It changes the current user's subscription status to bulk webpush email campaigns. | ||
webemail_push_chain | boolean | It changes the current user's subscription status to triggered webpush email campaigns. | ||
web_pushemail_transactional | boolean | It changes the current user's subscription status for transactional webpush email campaigns.
| ||
mobile_pushsms_bulk | boolean | It changes the current user's subscription status to bulk app SMS campaigns. | ||
mobilesms_push_chain | boolean | It changes the current user's subscription status to triggered app SMS campaigns. | ||
mobile_pushsms_transactional | boolean | It changes the current user's subscription status for transactional app SMS campaigns.
|
API Response Code
HTTP status code
The request was successful.
API Response Data
The response is JSON type with the following properties:
Current status. Can have one of two values:
- success - the request was successful
- error - the request was unsuccessful
The text of the error if it occurred
Request Example
language | js |
---|---|
theme | FadeToGrey |
web_push_bulk | boolean | It changes the current user's subscription status to bulk webpush campaigns. | ||
web_push_chain | boolean | It changes the current user's subscription status to triggered webpush campaigns. | ||
web_push_transactional | boolean | It changes the current user's subscription status for transactional webpush campaigns.
| ||
mobile_push_bulk | boolean | It changes the current user's subscription status to bulk app campaigns. | ||
mobile_push_chain | boolean | It changes the current user's subscription status to triggered app campaigns. | ||
mobile_push_transactional | boolean | It 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 Request | There are no parameters to change the status of subscriptions. |
403 Forbidden | The request was unsuccessful. |
404 Not Found | There are no mandatory parameters in the request. |
API Response Data
The response is JSON type with the following properties:
Name | Type | Description |
---|---|---|
status | string | Current status. Can have one of two values:
|
message | string | The text of the error if it occurred |
Request Example
Code Block | ||||
---|---|---|---|---|
| ||||
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
Endpoint | Request Type | Content-Type |
---|---|---|
https://api.personaclick.com/subscriptions/callback | POST | application/json |
Parameters
Name |
---|
Type | Requirement | Description | |
---|---|---|---|
shop_id | string | required | Unique Store Key in PersonaClick. Located there: Account > Settings > Store Settings |
shop_secret | string | required | Store Secret Key in PersonaClick. Located there: Account > Settings > Store Settings |
Name | Type | Description |
---|---|---|
event | string | Specifies the action to be performed with the email. Available values:
|
string | Email address for marking. |
API Response Code
HTTP status code | Description |
---|---|
200 OK | The request was successful. |
400 Bad Request | There is no event parameter, or the paramenter has an incorrect value. |
403 Forbidden | The request was unsuccessful. |
404 Not Found | There are no mandatory parameters in the request. |
API Response Data
The response is JSON type with the following properties:
Name | Type | Description |
---|---|---|
status | string | Current status. Can have one of two values:
|
message | string | The text of the error if it occurred |
Request Examples
Code Block | ||||
---|---|---|---|---|
| ||||
# 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 '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
Endpoint | Request Type |
---|---|
https://api.personaclick.com/subscriptions/check | GET |
Parameters
Name | Type | Requirement | Description | ||
---|---|---|---|---|---|
shop_id | string | required | Unique Store Key in PersonaClick. Located there: Account > Settings > Store Settings | ||
shop_secret | string | required if "did" isn't used | Store Secret Key in PersonaClick. Located there: Account > Settings > Store Settings | ||
did | string | required if "shop_secret" isn't used | Unique Device ID. See "Initialization (REST API)" for information about getting and using Device ID. | ||
string | required if "shop_secret" is used | Email address for checking. | |||
phone | string | required if "shop_secret" is used | Phone number in international format for checking.
|
API Response Code
HTTP status code | Description |
---|---|
200 OK | The request was successful. |
400 Bad Request | There are no email or phone parameters. |
403 Forbidden | The request was unsuccessful. |
API Response Data
The response is JSON type with the following properties:
Name | Type | Description |
---|---|---|
status | string | Available only in case of an error. Contains the "error" value in this case. |
message | string | Available only in case of an error. Contains a description of the error. |
exists | boolean | Shows whether a profile with the requested property exists or not. |
email_confirmed | boolean | Shows whether the email is confirmed or not. |
email_bulk | boolean | Email subscription status for bulk campaigns. |
email_chain | boolean | Email subscription status for chain/trigger campaigns. |
email_transactional | boolean | Email subscription status for transactional campaigns. |
email_bounced | boolean | The email is hard bounced or not. |
email_suppressed | boolean | The email is suppressed or not. |
email_blacklisted | boolean | The email is blacklisted or not. |
email_invalid | boolean | The email is invalid or not. |
sms_bulk | boolean | Phone subscription status for SMS bulk campaigns. |
sms_chain | boolean | Phone subscription status for SMS chain/trigger campaigns. |
sms_transactional | boolean | Phone subscription status for SMS transactional campaigns. |
web_push | boolean | Whether or not the user with the email/phone has a subscription to web push. |
web_push_bulk | boolean | Web-push subscription status for bulk campaigns. |
web_push_chain | boolean | Web-push subscription status for chain/trigger campaigns. |
web_push_transactional | boolean | Web-push subscription status for transactional campaigns. |
mobile_push | boolean | Whether or not the user with the email/phone has a subscription to mobile app push. |
mobile_push_bulk | boolean | Mobile app push subscription status for bulk campaigns. |
mobile_push_chain | boolean | Mobile app push subscription status for chain/trigger campaigns. |
mobile_push_transactional | boolean | Mobile app push subscription status for transactional campaigns. |
telegram_bulk | boolean | Telegram subscription status for bulk campaigns. |
telegram_chain | boolean | Telegram subscription status for chain/trigger campaigns. |
telegram_transactional | boolean | Telegram subscription status for transactional campaigns. |
Request Example
Code Block | ||||
---|---|---|---|---|
| ||||
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"}' |
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
Endpoint | Request Type |
---|---|
https://api.personaclick.com/subscriptions/check | GET |
Parameters
Type | |
---|---|
https://api.personaclick.com/subscriptions/changes | GET |
Parameters
Name | Type | Requirement | Description |
---|---|---|---|
shop_id | string | required | Unique Store Key in PersonaClick. Located there: Account > Settings > Store Settings |
shop_secret | string | required | Store Secret Key in PersonaClick. Located there: Account > Settings > Store Settings |
API Response Code
HTTP status code
The request was successful.
API Response Data
Note |
---|
The API response is limited to 20000 records per request. |
The response is JSON type with the following properties:
Campaign type. Available values:
- bulk
- chain
- transactional
- everything
Event Channel. Available values:
- email_feedback_processing
- api
- api_callback
- popup
- import
- crm
- unsubscribe_page
- resubscribe_page
Type of contact. Available values:
- sms
- wpush
- mpush
Event Type. Available values:
- subscribe
- unsubscribe
- hard_bounced
- complained
- blacklisted
Name | Type | Description |
---|---|---|
string | Email address for checking. | |
phone | string | Phone number in international format for checking. |
API Response Code
HTTP status code
The request was successful.
API Response Data
The response is JSON type with the following properties:
Available only in case of an error. Contains the "error" value in this case.
Available only in case of an error. Contains a description of the error.
Request Example
Code Block | ||||
---|---|---|---|---|
| ||||
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
Parameters
Note |
---|
See "Basic Details" above for more information on required parameters. |
Name
Description
Email address for checking.
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
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
Start of the period. Format: YYYY-MM-DD. Defaults to 24 hours ago.
| ||
event | string | Filter by the event. Filter by event. Available values:
|
channel | string | Filter by the channel. Available values:
|
from | string | Start of the period. Format: YYYY-MM-DD. Defaults to 24 hours ago. |
to | string | End of period. Format: YYYY-MM-DD. The default is the current moment. |
offset | number | Offset relative to the first entry for the selected period. The default is 0. |
limit | number | Limit 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 Forbidden | The 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:
Name | Type | Description |
---|---|---|
campaign_type | string | Campaign type. Available values:
|
channel | string | Event Channel. Available values:
|
contact | string | The value of contact. |
contact_type | string | Type of contact. Available values:
|
datetime | string | Date of the event in the format YYYY-MM-DDThh:mm:ss.SSS |
event | string | Event Type. Available values:
|
ip | string | The email is suppressed or not. |
Request Example
Code Block | ||||
---|---|---|---|---|
| ||||
curl https://api.personaclick.com/subscriptions/changes?shop_id=0d42fd8b713d0752776ca589cc0056&shop_secret=0123456789abcdef0123456789abcdef&event=subscribe&channel=import&from=2021-05-04&to=2021-05-05&offset=100500&limit=146
|
Force call of the "Subscribed" event
Method Objective
The method allows force-calling the "Subscribed" event to send a double opt-in email.
Request
Endpoint | Request Type | Content-Type |
---|---|---|
https://api.personaclick.com/subscriptions/confirm_email | POST | application/json |
Parameters
Name | Type | Requirement | Description |
---|---|---|---|
shop_id | string | required | Unique Store Key in PersonaClick. Located there: Account > Settings > Store Settings |
shop_secret | string | required | Store Secret Key in PersonaClick. Located there: Account > Settings > Store Settings |
Name | Type | Description |
---|---|---|
string | Email address for which the "Subscribed" event should be triggered |
API Response Code
HTTP status code | Description |
---|---|
200 OK | The request was successful |
400 Bad Request | One of the reasons:
|
403 Forbidden | The request was unsuccessful |
404 Not Found | There are no mandatory parameters in the request |
API Response Data
The response is JSON type with the following properties:
Name | Type | Description |
---|---|---|
status | string | Current status. Can have one of two values:
|
message | string | The text of the error if it occurred |
Request Examples
Code Block | ||||
---|---|---|---|---|
| ||||
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=146api.personaclick.com/subscriptions/confirm_email' \ -X 'POST' \ -H 'content-type: application/json' \ -d '{"email":"john.doe@examplemail.com","shop_id":"0d42fd8b713d0752776ca589cc0056","shop_secret":"0123456789abcdef0123456789abcdef"}' |
Column | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Page Navigation
Related Pages
|