Create Events
Adds manual tracking events to an existing Shipment — outbound or
return. Identify the Shipment with shipment_uuid or shipment_id
in the body; the events array is required.
Preconditions: the Shipment must already have a tracking_number
and an assigned carrier — otherwise the request is rejected. Each event
needs a description or a standard_key (the standard event key
list is available from your account team); if both are sent,
standard_key wins and description is ignored with a 299 warning.
Events are added, never replaced. A Pending outbound Shipment becomes Active, Delivered, or Undeliverable when its first event arrives, depending on the event.
curl --request POST \
--url https://api.perform.ai/v5/events/create/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"shipment_id": "SHP-2026-000002",
"events": [
{
"description": "Delivered Successfully",
"date_time": "2026-09-20T10:30:55+08:00",
"location": {
"place": "Singapore"
}
}
]
}
'import requests
url = "https://api.perform.ai/v5/events/create/"
payload = {
"shipment_id": "SHP-2026-000002",
"events": [
{
"description": "Delivered Successfully",
"date_time": "2026-09-20T10:30:55+08:00",
"location": { "place": "Singapore" }
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
shipment_id: 'SHP-2026-000002',
events: [
{
description: 'Delivered Successfully',
date_time: '2026-09-20T10:30:55+08:00',
location: {place: 'Singapore'}
}
]
})
};
fetch('https://api.perform.ai/v5/events/create/', 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://api.perform.ai/v5/events/create/",
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([
'shipment_id' => 'SHP-2026-000002',
'events' => [
[
'description' => 'Delivered Successfully',
'date_time' => '2026-09-20T10:30:55+08:00',
'location' => [
'place' => 'Singapore'
]
]
]
]),
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;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.perform.ai/v5/events/create/"
payload := strings.NewReader("{\n \"shipment_id\": \"SHP-2026-000002\",\n \"events\": [\n {\n \"description\": \"Delivered Successfully\",\n \"date_time\": \"2026-09-20T10:30:55+08:00\",\n \"location\": {\n \"place\": \"Singapore\"\n }\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.perform.ai/v5/events/create/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"shipment_id\": \"SHP-2026-000002\",\n \"events\": [\n {\n \"description\": \"Delivered Successfully\",\n \"date_time\": \"2026-09-20T10:30:55+08:00\",\n \"location\": {\n \"place\": \"Singapore\"\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.perform.ai/v5/events/create/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"shipment_id\": \"SHP-2026-000002\",\n \"events\": [\n {\n \"description\": \"Delivered Successfully\",\n \"date_time\": \"2026-09-20T10:30:55+08:00\",\n \"location\": {\n \"place\": \"Singapore\"\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"api_response": "200"
}{
"api_response": "<string>",
"warnings": {},
"data": {}
}{
"api_response": "4030",
"message": "validation_error",
"errors": {
"shipment": "Manual events cannot be created for shipment as a tracking_number and carrier has not been assigned."
}
}{
"api_response": 403,
"message": "Key not authorized"
}{
"api_response": 429,
"message": "Throttled"
}{
"api_response": "500",
"message": "System error"
}Authorizations
Used by every functional endpoint. Generate the token with POST /auth/oauth/token/ and send it as Authorization: Bearer {token}.
Body
Response
Events created. The response carries no data payload.
curl --request POST \
--url https://api.perform.ai/v5/events/create/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"shipment_id": "SHP-2026-000002",
"events": [
{
"description": "Delivered Successfully",
"date_time": "2026-09-20T10:30:55+08:00",
"location": {
"place": "Singapore"
}
}
]
}
'import requests
url = "https://api.perform.ai/v5/events/create/"
payload = {
"shipment_id": "SHP-2026-000002",
"events": [
{
"description": "Delivered Successfully",
"date_time": "2026-09-20T10:30:55+08:00",
"location": { "place": "Singapore" }
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
shipment_id: 'SHP-2026-000002',
events: [
{
description: 'Delivered Successfully',
date_time: '2026-09-20T10:30:55+08:00',
location: {place: 'Singapore'}
}
]
})
};
fetch('https://api.perform.ai/v5/events/create/', 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://api.perform.ai/v5/events/create/",
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([
'shipment_id' => 'SHP-2026-000002',
'events' => [
[
'description' => 'Delivered Successfully',
'date_time' => '2026-09-20T10:30:55+08:00',
'location' => [
'place' => 'Singapore'
]
]
]
]),
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;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.perform.ai/v5/events/create/"
payload := strings.NewReader("{\n \"shipment_id\": \"SHP-2026-000002\",\n \"events\": [\n {\n \"description\": \"Delivered Successfully\",\n \"date_time\": \"2026-09-20T10:30:55+08:00\",\n \"location\": {\n \"place\": \"Singapore\"\n }\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.perform.ai/v5/events/create/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"shipment_id\": \"SHP-2026-000002\",\n \"events\": [\n {\n \"description\": \"Delivered Successfully\",\n \"date_time\": \"2026-09-20T10:30:55+08:00\",\n \"location\": {\n \"place\": \"Singapore\"\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.perform.ai/v5/events/create/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"shipment_id\": \"SHP-2026-000002\",\n \"events\": [\n {\n \"description\": \"Delivered Successfully\",\n \"date_time\": \"2026-09-20T10:30:55+08:00\",\n \"location\": {\n \"place\": \"Singapore\"\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"api_response": "200"
}{
"api_response": "<string>",
"warnings": {},
"data": {}
}{
"api_response": "4030",
"message": "validation_error",
"errors": {
"shipment": "Manual events cannot be created for shipment as a tracking_number and carrier has not been assigned."
}
}{
"api_response": 403,
"message": "Key not authorized"
}{
"api_response": 429,
"message": "Throttled"
}{
"api_response": "500",
"message": "System error"
}