curl --request POST \
--url https://api.messaging.phonovation.com/people/2/contactInformation/push/{pushRegId}/personalize \
--header 'AppCode: <appcode>' \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"identity": {
"externalId": "external-user-id"
},
"attributes": {
"tags": [
"Personalized"
],
"customAttributes": {
"personalizationCompleted": true
}
}
}
'import requests
url = "https://api.messaging.phonovation.com/people/2/contactInformation/push/{pushRegId}/personalize"
payload = {
"identity": { "externalId": "external-user-id" },
"attributes": {
"tags": ["Personalized"],
"customAttributes": { "personalizationCompleted": True }
}
}
headers = {
"AppCode": "<appcode>",
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)using RestSharp;
var options = new RestClientOptions("https://api.messaging.phonovation.com/people/2/contactInformation/push/{pushRegId}/personalize");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("AppCode", "<appcode>");
request.AddHeader("Authorization", "<api-key>");
request.AddJsonBody("{\n \"identity\": {\n \"externalId\": \"external-user-id\"\n },\n \"attributes\": {\n \"tags\": [\n \"Personalized\"\n ],\n \"customAttributes\": {\n \"personalizationCompleted\": true\n }\n }\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
HttpResponse<String> response = Unirest.post("https://api.messaging.phonovation.com/people/2/contactInformation/push/{pushRegId}/personalize")
.header("AppCode", "<appcode>")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"identity\": {\n \"externalId\": \"external-user-id\"\n },\n \"attributes\": {\n \"tags\": [\n \"Personalized\"\n ],\n \"customAttributes\": {\n \"personalizationCompleted\": true\n }\n }\n}")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.messaging.phonovation.com/people/2/contactInformation/push/{pushRegId}/personalize",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'identity' => [
'externalId' => 'external-user-id'
],
'attributes' => [
'tags' => [
'Personalized'
],
'customAttributes' => [
'personalizationCompleted' => true
]
]
]),
CURLOPT_HTTPHEADER => [
"AppCode: <appcode>",
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}const options = {
method: 'POST',
headers: {
AppCode: '<appcode>',
Authorization: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
identity: {externalId: 'external-user-id'},
attributes: {tags: ['Personalized'], customAttributes: {personalizationCompleted: true}}
})
};
fetch('https://api.messaging.phonovation.com/people/2/contactInformation/push/{pushRegId}/personalize', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"externalId": "external-user-id",
"customAttributes": {
"personalizationCompleted": true
},
"tags": [
"Personalized"
],
"contactInformation": {
"phones": [
{
"number": "79810000000"
}
],
"emails": [
{
"address": "my.email@gmail.com"
}
]
}
}Personalize push instance
Each person can have Phone numbers, Emails or External ID. These fields are unique identifiers of a person on Phonovation platform and provide a capability to personalize any push device registration with a person profile. The platform provides data grouping functions based on these parameters. For example, if two devices will try to save the same Phone number, then both of them will be collected under a single person. Phone number, Email and External ID are also widely used when targeting users with messages across different channels via Phonovation platform.
Required scope: Enable one of: people:manage, mobile-app-messaging:manage.
curl --request POST \
--url https://api.messaging.phonovation.com/people/2/contactInformation/push/{pushRegId}/personalize \
--header 'AppCode: <appcode>' \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"identity": {
"externalId": "external-user-id"
},
"attributes": {
"tags": [
"Personalized"
],
"customAttributes": {
"personalizationCompleted": true
}
}
}
'import requests
url = "https://api.messaging.phonovation.com/people/2/contactInformation/push/{pushRegId}/personalize"
payload = {
"identity": { "externalId": "external-user-id" },
"attributes": {
"tags": ["Personalized"],
"customAttributes": { "personalizationCompleted": True }
}
}
headers = {
"AppCode": "<appcode>",
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)using RestSharp;
var options = new RestClientOptions("https://api.messaging.phonovation.com/people/2/contactInformation/push/{pushRegId}/personalize");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("AppCode", "<appcode>");
request.AddHeader("Authorization", "<api-key>");
request.AddJsonBody("{\n \"identity\": {\n \"externalId\": \"external-user-id\"\n },\n \"attributes\": {\n \"tags\": [\n \"Personalized\"\n ],\n \"customAttributes\": {\n \"personalizationCompleted\": true\n }\n }\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
HttpResponse<String> response = Unirest.post("https://api.messaging.phonovation.com/people/2/contactInformation/push/{pushRegId}/personalize")
.header("AppCode", "<appcode>")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"identity\": {\n \"externalId\": \"external-user-id\"\n },\n \"attributes\": {\n \"tags\": [\n \"Personalized\"\n ],\n \"customAttributes\": {\n \"personalizationCompleted\": true\n }\n }\n}")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.messaging.phonovation.com/people/2/contactInformation/push/{pushRegId}/personalize",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'identity' => [
'externalId' => 'external-user-id'
],
'attributes' => [
'tags' => [
'Personalized'
],
'customAttributes' => [
'personalizationCompleted' => true
]
]
]),
CURLOPT_HTTPHEADER => [
"AppCode: <appcode>",
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}const options = {
method: 'POST',
headers: {
AppCode: '<appcode>',
Authorization: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
identity: {externalId: 'external-user-id'},
attributes: {tags: ['Personalized'], customAttributes: {personalizationCompleted: true}}
})
};
fetch('https://api.messaging.phonovation.com/people/2/contactInformation/push/{pushRegId}/personalize', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"externalId": "external-user-id",
"customAttributes": {
"personalizationCompleted": true
},
"tags": [
"Personalized"
],
"contactInformation": {
"phones": [
{
"number": "79810000000"
}
],
"emails": [
{
"address": "my.email@gmail.com"
}
]
}
}Authorizations
This is the most secure authorization type and the one with the most flexibility.
API keys can be generated by calling the dedicated API method. Furthermore, API keys can have a limited scope and cover only some API methods. Lastly, they can be revoked at any time. This range of possibilities makes API keys well suited for separating the API access rights across multiple applications or use cases. Finally, the loss of an API key is easily manageable.
You can manage your API keys from GUI, or programmatically with dedicated API.
API key Authorization header example:
Authorization: App 003026bbc133714df1834b8638bb496e-8f4b3d9a-e931-478d-a994-28a725159ab9
Headers
Application code
Path Parameters
Registration identifier of a particular push device registration
Query Parameters
You can set this parameter to true if you want previous personalization to be always reset. Do not use this parameter if you want to know when there’s an attempt to personalize already personalized registration.
You can set this parameter to true if you want to prevent the promotion from Lead to Customer. Only for specific use cases where the default behaviour wants to be avoided.
You can set this parameter to true if you want the response to include "push" mobile app contact information for the person.
You can set this parameter to true if you want to set the device associated with the "pushRegId" as primary device for the person.
Body
Partial instance model
Response
OK
Id of a user in external system
User first name
User last name
User middle name
User gender
MALE, FEMALE Set of custom key-value pairs where value can be any of string, number, boolean
Show child attributes
Show child attributes
Set of string labels attached to the user
Set of string labels attached to the user
Show child attributes
Show child attributes