Report a delivery event
curl --request POST \
--url https://pushctl.com/api/v1/events \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"event_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"delivery_id": "<string>",
"installation_id": "<string>",
"occurred_at": "2023-11-07T05:31:56Z"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
event_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
delivery_id: '<string>',
installation_id: '<string>',
occurred_at: '2023-11-07T05:31:56Z'
})
};
fetch('https://pushctl.com/api/v1/events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pushctl.com/api/v1/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([
'event_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'delivery_id' => '<string>',
'installation_id' => '<string>',
'occurred_at' => '2023-11-07T05:31:56Z'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}import requests
url = "https://pushctl.com/api/v1/events"
payload = {
"event_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"delivery_id": "<string>",
"installation_id": "<string>",
"occurred_at": "2023-11-07T05:31:56Z"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": {
"event_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"delivery_id": "<string>",
"installation_id": "<string>",
"occurred_at": "2023-11-07T05:31:56Z",
"received_at": "2023-11-07T05:31:56Z"
}
}{
"data": {
"event_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"delivery_id": "<string>",
"installation_id": "<string>",
"occurred_at": "2023-11-07T05:31:56Z",
"received_at": "2023-11-07T05:31:56Z"
}
}{
"message": "Unauthenticated."
}{
"message": "This action is unauthorized."
}{
"message": "Not Found"
}{
"message": "<string>",
"errors": {}
}{
"message": "<string>"
}Delivery events
Report a delivery event
Idempotently records a received, displayed, opened, or dismissed event.
POST
/
api
/
v1
/
events
Report a delivery event
curl --request POST \
--url https://pushctl.com/api/v1/events \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"event_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"delivery_id": "<string>",
"installation_id": "<string>",
"occurred_at": "2023-11-07T05:31:56Z"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
event_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
delivery_id: '<string>',
installation_id: '<string>',
occurred_at: '2023-11-07T05:31:56Z'
})
};
fetch('https://pushctl.com/api/v1/events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pushctl.com/api/v1/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([
'event_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'delivery_id' => '<string>',
'installation_id' => '<string>',
'occurred_at' => '2023-11-07T05:31:56Z'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}import requests
url = "https://pushctl.com/api/v1/events"
payload = {
"event_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"delivery_id": "<string>",
"installation_id": "<string>",
"occurred_at": "2023-11-07T05:31:56Z"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": {
"event_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"delivery_id": "<string>",
"installation_id": "<string>",
"occurred_at": "2023-11-07T05:31:56Z",
"received_at": "2023-11-07T05:31:56Z"
}
}{
"data": {
"event_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"delivery_id": "<string>",
"installation_id": "<string>",
"occurred_at": "2023-11-07T05:31:56Z",
"received_at": "2023-11-07T05:31:56Z"
}
}{
"message": "Unauthenticated."
}{
"message": "This action is unauthorized."
}{
"message": "Not Found"
}{
"message": "<string>",
"errors": {}
}{
"message": "<string>"
}Authorizations
Use an application-scoped token with the ability required by the endpoint.
Body
application/json
Response
The event already existed and was returned.
Show child attributes
Show child attributes
Was this page helpful?
⌘I