- Created by Andrey Veprikov, last modified on Jun 01, 2023
You are viewing an old version of this page. View the current version.
Compare with Current View Page History
« Previous Version 31 Next »
Basic Details
Parameters used in all requests are described here.
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 |
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
See "Basic Details" above for more information on required parameters.
Name | Type | Description |
---|---|---|
string | The current user's Email. | |
phone | string | The current user's phone number in international format. A phone number in full international format may begin with a plus sign (+) followed by the country code, city (area) code, and phone number. |
email_bulk | boolean | It changes the current user's subscription status to bulk email campaigns. |
email_chain | boolean | It changes the current user's subscription status to triggered email campaigns. |
email_transactional | boolean | It changes the current user's subscription status for transactional email campaigns. It's recommended that always use the "true" value, even if you don't use transactional messages. |
sms_bulk | boolean | It changes the current user's subscription status to bulk SMS campaigns. |
sms_chain | boolean | It changes the current user's subscription status to triggered SMS campaigns. |
sms_transactional | boolean | It changes the current user's subscription status for transactional SMS campaigns. It's recommended that always use the "true" value, even if you don't use transactional messages. |
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. It's recommended that always use the "true" value, even if you don't use transactional messages. |
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. It's recommended that always use the "true" value, even if you don't use transactional messages. |
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
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
See "Basic Details" above for more information on required parameters.
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
# 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
Endpoint | Request Type |
---|---|
https://api.personaclick.com/subscriptions/check | GET |
Parameters
See "Basic Details" above for more information on required parameters.
Name | Type | Description |
---|---|---|
string | Email address for checking. | |
phone | string | Phone number in international format for checking. A phone number in full international format may begin with a plus sign (+) followed by the country code, city (area) code, and phone number. |
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. |
mobile_push | boolean | Whether or not the user with the email/phone has a subscription to mobile app push. |
Request Example
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
Endpoint | Request Type |
---|---|
https://api.personaclick.com/subscriptions/changes | GET |
Parameters
See "Basic Details" above for more information on required parameters.
Name | Type | Description |
---|---|---|
string | Email address for checking. | |
phone | string | Phone number in international format for checking. A phone number in full international format may begin with a plus sign (+) followed by the country code, city (area) code, and phone number. |
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
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
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
Page Navigation
Related Pages
-
Page:
-
Page:
-
Page:
-
Page:
-
Page:
-
Page:
-
Page:
- No labels