curl --request POST \
--url https://api.messaging.phonovation.com/people/3/events \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
[
{
"definitionId": "addToCart",
"occurredTime": "2025-03-17T13:00:27.864Z",
"identifier": {
"id": "example@gmail.com",
"type": "EMAIL",
"sender": "75320"
},
"properties": {
"transactionId": "my-transaction-1",
"fromPromoCampaign": true,
"totalCost": 100,
"itemsInCart": [
{
"itemId": 1,
"price": 25,
"quantity": 3,
"inStockSince": "2023-11-17T15:47:50.413Z",
"category": "clothes"
},
{
"itemId": 2,
"price": 25,
"quantity": 1,
"inStockSince": "2023-12-17T15:47:50.413Z",
"category": "shoes"
}
]
}
},
{
"definitionId": "addToCart",
"occurredTime": "2025-03-17T11:30:00.109Z",
"identifier": {
"id": "15",
"type": "ID"
},
"properties": {
"transactionId": "my-transaction-2",
"fromPromoCampaign": false,
"totalCost": 1539,
"itemsInCart": [
{
"itemId": 7,
"price": 39,
"quantity": 1,
"inStockSince": "2024-09-21T10:12:50.209Z",
"category": "shirt"
},
{
"itemId": 8,
"price": 250,
"quantity": 6,
"inStockSince": "2024-09-20T09:21:30.483Z",
"category": "jacket"
}
]
}
}
]
'import requests
url = "https://api.messaging.phonovation.com/people/3/events"
payload = [
{
"definitionId": "addToCart",
"occurredTime": "2025-03-17T13:00:27.864Z",
"identifier": {
"id": "example@gmail.com",
"type": "EMAIL",
"sender": "75320"
},
"properties": {
"transactionId": "my-transaction-1",
"fromPromoCampaign": True,
"totalCost": 100,
"itemsInCart": [
{
"itemId": 1,
"price": 25,
"quantity": 3,
"inStockSince": "2023-11-17T15:47:50.413Z",
"category": "clothes"
},
{
"itemId": 2,
"price": 25,
"quantity": 1,
"inStockSince": "2023-12-17T15:47:50.413Z",
"category": "shoes"
}
]
}
},
{
"definitionId": "addToCart",
"occurredTime": "2025-03-17T11:30:00.109Z",
"identifier": {
"id": "15",
"type": "ID"
},
"properties": {
"transactionId": "my-transaction-2",
"fromPromoCampaign": False,
"totalCost": 1539,
"itemsInCart": [
{
"itemId": 7,
"price": 39,
"quantity": 1,
"inStockSince": "2024-09-21T10:12:50.209Z",
"category": "shirt"
},
{
"itemId": 8,
"price": 250,
"quantity": 6,
"inStockSince": "2024-09-20T09:21:30.483Z",
"category": "jacket"
}
]
}
}
]
headers = {
"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/3/events");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "<api-key>");
request.AddJsonBody("[\n {\n \"definitionId\": \"addToCart\",\n \"occurredTime\": \"2025-03-17T13:00:27.864Z\",\n \"identifier\": {\n \"id\": \"example@gmail.com\",\n \"type\": \"EMAIL\",\n \"sender\": \"75320\"\n },\n \"properties\": {\n \"transactionId\": \"my-transaction-1\",\n \"fromPromoCampaign\": true,\n \"totalCost\": 100,\n \"itemsInCart\": [\n {\n \"itemId\": 1,\n \"price\": 25,\n \"quantity\": 3,\n \"inStockSince\": \"2023-11-17T15:47:50.413Z\",\n \"category\": \"clothes\"\n },\n {\n \"itemId\": 2,\n \"price\": 25,\n \"quantity\": 1,\n \"inStockSince\": \"2023-12-17T15:47:50.413Z\",\n \"category\": \"shoes\"\n }\n ]\n }\n },\n {\n \"definitionId\": \"addToCart\",\n \"occurredTime\": \"2025-03-17T11:30:00.109Z\",\n \"identifier\": {\n \"id\": \"15\",\n \"type\": \"ID\"\n },\n \"properties\": {\n \"transactionId\": \"my-transaction-2\",\n \"fromPromoCampaign\": false,\n \"totalCost\": 1539,\n \"itemsInCart\": [\n {\n \"itemId\": 7,\n \"price\": 39,\n \"quantity\": 1,\n \"inStockSince\": \"2024-09-21T10:12:50.209Z\",\n \"category\": \"shirt\"\n },\n {\n \"itemId\": 8,\n \"price\": 250,\n \"quantity\": 6,\n \"inStockSince\": \"2024-09-20T09:21:30.483Z\",\n \"category\": \"jacket\"\n }\n ]\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/3/events")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("[\n {\n \"definitionId\": \"addToCart\",\n \"occurredTime\": \"2025-03-17T13:00:27.864Z\",\n \"identifier\": {\n \"id\": \"example@gmail.com\",\n \"type\": \"EMAIL\",\n \"sender\": \"75320\"\n },\n \"properties\": {\n \"transactionId\": \"my-transaction-1\",\n \"fromPromoCampaign\": true,\n \"totalCost\": 100,\n \"itemsInCart\": [\n {\n \"itemId\": 1,\n \"price\": 25,\n \"quantity\": 3,\n \"inStockSince\": \"2023-11-17T15:47:50.413Z\",\n \"category\": \"clothes\"\n },\n {\n \"itemId\": 2,\n \"price\": 25,\n \"quantity\": 1,\n \"inStockSince\": \"2023-12-17T15:47:50.413Z\",\n \"category\": \"shoes\"\n }\n ]\n }\n },\n {\n \"definitionId\": \"addToCart\",\n \"occurredTime\": \"2025-03-17T11:30:00.109Z\",\n \"identifier\": {\n \"id\": \"15\",\n \"type\": \"ID\"\n },\n \"properties\": {\n \"transactionId\": \"my-transaction-2\",\n \"fromPromoCampaign\": false,\n \"totalCost\": 1539,\n \"itemsInCart\": [\n {\n \"itemId\": 7,\n \"price\": 39,\n \"quantity\": 1,\n \"inStockSince\": \"2024-09-21T10:12:50.209Z\",\n \"category\": \"shirt\"\n },\n {\n \"itemId\": 8,\n \"price\": 250,\n \"quantity\": 6,\n \"inStockSince\": \"2024-09-20T09:21:30.483Z\",\n \"category\": \"jacket\"\n }\n ]\n }\n }\n]")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.messaging.phonovation.com/people/3/events",
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([
[
'definitionId' => 'addToCart',
'occurredTime' => '2025-03-17T13:00:27.864Z',
'identifier' => [
'id' => 'example@gmail.com',
'type' => 'EMAIL',
'sender' => '75320'
],
'properties' => [
'transactionId' => 'my-transaction-1',
'fromPromoCampaign' => true,
'totalCost' => 100,
'itemsInCart' => [
[
'itemId' => 1,
'price' => 25,
'quantity' => 3,
'inStockSince' => '2023-11-17T15:47:50.413Z',
'category' => 'clothes'
],
[
'itemId' => 2,
'price' => 25,
'quantity' => 1,
'inStockSince' => '2023-12-17T15:47:50.413Z',
'category' => 'shoes'
]
]
]
],
[
'definitionId' => 'addToCart',
'occurredTime' => '2025-03-17T11:30:00.109Z',
'identifier' => [
'id' => '15',
'type' => 'ID'
],
'properties' => [
'transactionId' => 'my-transaction-2',
'fromPromoCampaign' => false,
'totalCost' => 1539,
'itemsInCart' => [
[
'itemId' => 7,
'price' => 39,
'quantity' => 1,
'inStockSince' => '2024-09-21T10:12:50.209Z',
'category' => 'shirt'
],
[
'itemId' => 8,
'price' => 250,
'quantity' => 6,
'inStockSince' => '2024-09-20T09:21:30.483Z',
'category' => 'jacket'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"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: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify([
{
definitionId: 'addToCart',
occurredTime: '2025-03-17T13:00:27.864Z',
identifier: {id: 'example@gmail.com', type: 'EMAIL', sender: '75320'},
properties: {
transactionId: 'my-transaction-1',
fromPromoCampaign: true,
totalCost: 100,
itemsInCart: [
{
itemId: 1,
price: 25,
quantity: 3,
inStockSince: '2023-11-17T15:47:50.413Z',
category: 'clothes'
},
{
itemId: 2,
price: 25,
quantity: 1,
inStockSince: '2023-12-17T15:47:50.413Z',
category: 'shoes'
}
]
}
},
{
definitionId: 'addToCart',
occurredTime: '2025-03-17T11:30:00.109Z',
identifier: {id: '15', type: 'ID'},
properties: {
transactionId: 'my-transaction-2',
fromPromoCampaign: false,
totalCost: 1539,
itemsInCart: [
{
itemId: 7,
price: 39,
quantity: 1,
inStockSince: '2024-09-21T10:12:50.209Z',
category: 'shirt'
},
{
itemId: 8,
price: 250,
quantity: 6,
inStockSince: '2024-09-20T09:21:30.483Z',
category: 'jacket'
}
]
}
}
])
};
fetch('https://api.messaging.phonovation.com/people/3/events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));Batch Send Events
curl --request POST \
--url https://api.messaging.phonovation.com/people/3/events \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
[
{
"definitionId": "addToCart",
"occurredTime": "2025-03-17T13:00:27.864Z",
"identifier": {
"id": "example@gmail.com",
"type": "EMAIL",
"sender": "75320"
},
"properties": {
"transactionId": "my-transaction-1",
"fromPromoCampaign": true,
"totalCost": 100,
"itemsInCart": [
{
"itemId": 1,
"price": 25,
"quantity": 3,
"inStockSince": "2023-11-17T15:47:50.413Z",
"category": "clothes"
},
{
"itemId": 2,
"price": 25,
"quantity": 1,
"inStockSince": "2023-12-17T15:47:50.413Z",
"category": "shoes"
}
]
}
},
{
"definitionId": "addToCart",
"occurredTime": "2025-03-17T11:30:00.109Z",
"identifier": {
"id": "15",
"type": "ID"
},
"properties": {
"transactionId": "my-transaction-2",
"fromPromoCampaign": false,
"totalCost": 1539,
"itemsInCart": [
{
"itemId": 7,
"price": 39,
"quantity": 1,
"inStockSince": "2024-09-21T10:12:50.209Z",
"category": "shirt"
},
{
"itemId": 8,
"price": 250,
"quantity": 6,
"inStockSince": "2024-09-20T09:21:30.483Z",
"category": "jacket"
}
]
}
}
]
'import requests
url = "https://api.messaging.phonovation.com/people/3/events"
payload = [
{
"definitionId": "addToCart",
"occurredTime": "2025-03-17T13:00:27.864Z",
"identifier": {
"id": "example@gmail.com",
"type": "EMAIL",
"sender": "75320"
},
"properties": {
"transactionId": "my-transaction-1",
"fromPromoCampaign": True,
"totalCost": 100,
"itemsInCart": [
{
"itemId": 1,
"price": 25,
"quantity": 3,
"inStockSince": "2023-11-17T15:47:50.413Z",
"category": "clothes"
},
{
"itemId": 2,
"price": 25,
"quantity": 1,
"inStockSince": "2023-12-17T15:47:50.413Z",
"category": "shoes"
}
]
}
},
{
"definitionId": "addToCart",
"occurredTime": "2025-03-17T11:30:00.109Z",
"identifier": {
"id": "15",
"type": "ID"
},
"properties": {
"transactionId": "my-transaction-2",
"fromPromoCampaign": False,
"totalCost": 1539,
"itemsInCart": [
{
"itemId": 7,
"price": 39,
"quantity": 1,
"inStockSince": "2024-09-21T10:12:50.209Z",
"category": "shirt"
},
{
"itemId": 8,
"price": 250,
"quantity": 6,
"inStockSince": "2024-09-20T09:21:30.483Z",
"category": "jacket"
}
]
}
}
]
headers = {
"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/3/events");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "<api-key>");
request.AddJsonBody("[\n {\n \"definitionId\": \"addToCart\",\n \"occurredTime\": \"2025-03-17T13:00:27.864Z\",\n \"identifier\": {\n \"id\": \"example@gmail.com\",\n \"type\": \"EMAIL\",\n \"sender\": \"75320\"\n },\n \"properties\": {\n \"transactionId\": \"my-transaction-1\",\n \"fromPromoCampaign\": true,\n \"totalCost\": 100,\n \"itemsInCart\": [\n {\n \"itemId\": 1,\n \"price\": 25,\n \"quantity\": 3,\n \"inStockSince\": \"2023-11-17T15:47:50.413Z\",\n \"category\": \"clothes\"\n },\n {\n \"itemId\": 2,\n \"price\": 25,\n \"quantity\": 1,\n \"inStockSince\": \"2023-12-17T15:47:50.413Z\",\n \"category\": \"shoes\"\n }\n ]\n }\n },\n {\n \"definitionId\": \"addToCart\",\n \"occurredTime\": \"2025-03-17T11:30:00.109Z\",\n \"identifier\": {\n \"id\": \"15\",\n \"type\": \"ID\"\n },\n \"properties\": {\n \"transactionId\": \"my-transaction-2\",\n \"fromPromoCampaign\": false,\n \"totalCost\": 1539,\n \"itemsInCart\": [\n {\n \"itemId\": 7,\n \"price\": 39,\n \"quantity\": 1,\n \"inStockSince\": \"2024-09-21T10:12:50.209Z\",\n \"category\": \"shirt\"\n },\n {\n \"itemId\": 8,\n \"price\": 250,\n \"quantity\": 6,\n \"inStockSince\": \"2024-09-20T09:21:30.483Z\",\n \"category\": \"jacket\"\n }\n ]\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/3/events")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("[\n {\n \"definitionId\": \"addToCart\",\n \"occurredTime\": \"2025-03-17T13:00:27.864Z\",\n \"identifier\": {\n \"id\": \"example@gmail.com\",\n \"type\": \"EMAIL\",\n \"sender\": \"75320\"\n },\n \"properties\": {\n \"transactionId\": \"my-transaction-1\",\n \"fromPromoCampaign\": true,\n \"totalCost\": 100,\n \"itemsInCart\": [\n {\n \"itemId\": 1,\n \"price\": 25,\n \"quantity\": 3,\n \"inStockSince\": \"2023-11-17T15:47:50.413Z\",\n \"category\": \"clothes\"\n },\n {\n \"itemId\": 2,\n \"price\": 25,\n \"quantity\": 1,\n \"inStockSince\": \"2023-12-17T15:47:50.413Z\",\n \"category\": \"shoes\"\n }\n ]\n }\n },\n {\n \"definitionId\": \"addToCart\",\n \"occurredTime\": \"2025-03-17T11:30:00.109Z\",\n \"identifier\": {\n \"id\": \"15\",\n \"type\": \"ID\"\n },\n \"properties\": {\n \"transactionId\": \"my-transaction-2\",\n \"fromPromoCampaign\": false,\n \"totalCost\": 1539,\n \"itemsInCart\": [\n {\n \"itemId\": 7,\n \"price\": 39,\n \"quantity\": 1,\n \"inStockSince\": \"2024-09-21T10:12:50.209Z\",\n \"category\": \"shirt\"\n },\n {\n \"itemId\": 8,\n \"price\": 250,\n \"quantity\": 6,\n \"inStockSince\": \"2024-09-20T09:21:30.483Z\",\n \"category\": \"jacket\"\n }\n ]\n }\n }\n]")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.messaging.phonovation.com/people/3/events",
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([
[
'definitionId' => 'addToCart',
'occurredTime' => '2025-03-17T13:00:27.864Z',
'identifier' => [
'id' => 'example@gmail.com',
'type' => 'EMAIL',
'sender' => '75320'
],
'properties' => [
'transactionId' => 'my-transaction-1',
'fromPromoCampaign' => true,
'totalCost' => 100,
'itemsInCart' => [
[
'itemId' => 1,
'price' => 25,
'quantity' => 3,
'inStockSince' => '2023-11-17T15:47:50.413Z',
'category' => 'clothes'
],
[
'itemId' => 2,
'price' => 25,
'quantity' => 1,
'inStockSince' => '2023-12-17T15:47:50.413Z',
'category' => 'shoes'
]
]
]
],
[
'definitionId' => 'addToCart',
'occurredTime' => '2025-03-17T11:30:00.109Z',
'identifier' => [
'id' => '15',
'type' => 'ID'
],
'properties' => [
'transactionId' => 'my-transaction-2',
'fromPromoCampaign' => false,
'totalCost' => 1539,
'itemsInCart' => [
[
'itemId' => 7,
'price' => 39,
'quantity' => 1,
'inStockSince' => '2024-09-21T10:12:50.209Z',
'category' => 'shirt'
],
[
'itemId' => 8,
'price' => 250,
'quantity' => 6,
'inStockSince' => '2024-09-20T09:21:30.483Z',
'category' => 'jacket'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"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: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify([
{
definitionId: 'addToCart',
occurredTime: '2025-03-17T13:00:27.864Z',
identifier: {id: 'example@gmail.com', type: 'EMAIL', sender: '75320'},
properties: {
transactionId: 'my-transaction-1',
fromPromoCampaign: true,
totalCost: 100,
itemsInCart: [
{
itemId: 1,
price: 25,
quantity: 3,
inStockSince: '2023-11-17T15:47:50.413Z',
category: 'clothes'
},
{
itemId: 2,
price: 25,
quantity: 1,
inStockSince: '2023-12-17T15:47:50.413Z',
category: 'shoes'
}
]
}
},
{
definitionId: 'addToCart',
occurredTime: '2025-03-17T11:30:00.109Z',
identifier: {id: '15', type: 'ID'},
properties: {
transactionId: 'my-transaction-2',
fromPromoCampaign: false,
totalCost: 1539,
itemsInCart: [
{
itemId: 7,
price: 39,
quantity: 1,
inStockSince: '2024-09-21T10:12:50.209Z',
category: 'shirt'
},
{
itemId: 8,
price: 250,
quantity: 6,
inStockSince: '2024-09-20T09:21:30.483Z',
category: 'jacket'
}
]
}
}
])
};
fetch('https://api.messaging.phonovation.com/people/3/events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));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
Body
Unique identifier of event schema.
Time of event occurrence, as the following format yyyy-MM-dd'T'HH:mm:ss.SSSZ. Events occurred more than 30 days ago will be rejected. Future dates are not allowed and will be automatically set to the current UTC time.
"2025-03-17T13:00:27.864Z"
Used to match the event to an existing person profile using the provided identifier.
If no matching profile is found, a new profile will be automatically created.
Note: New profiles can only be created for the following identifier types: PHONE, EMAIL, or EXTERNAL_ID.
Show child attributes
Show child attributes
Unique identifier of the event. If provided, it helps prevent duplicate events in case of retries—for example, if the first API call fails and the same event is sent again. Passing the same eventId ensures the event is only recorded once in the person profile.
The value must be 1–36 characters long and can include letters (A–Z, a–z), digits (0–9), underscores (_), and hyphens (-) only.
Object containing event properties. Must match the corresponding event definition. See People Events documentation for supported data types.
Show child attributes
Show child attributes
Response
Accepted