curl --request POST \
--url https://api.example.com/api/v1/events/ingest \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"events": [
{
"code": "<string>",
"customer_id": "<string>",
"event_id": "<string>",
"timestamp": "2026-01-15T10:30:00Z",
"properties": {
"region": "us-east-1",
"tier": "pro",
"bytes": "1048576"
}
}
],
"allow_backfilling": true,
"allow_partial_failures": true
}
'import requests
url = "https://api.example.com/api/v1/events/ingest"
payload = {
"events": [
{
"code": "<string>",
"customer_id": "<string>",
"event_id": "<string>",
"timestamp": "2026-01-15T10:30:00Z",
"properties": {
"region": "us-east-1",
"tier": "pro",
"bytes": "1048576"
}
}
],
"allow_backfilling": True,
"allow_partial_failures": True
}
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({
events: [
{
code: '<string>',
customer_id: '<string>',
event_id: '<string>',
timestamp: '2026-01-15T10:30:00Z',
properties: {region: 'us-east-1', tier: 'pro', bytes: '1048576'}
}
],
allow_backfilling: true,
allow_partial_failures: true
})
};
fetch('https://api.example.com/api/v1/events/ingest', 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.example.com/api/v1/events/ingest",
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([
'events' => [
[
'code' => '<string>',
'customer_id' => '<string>',
'event_id' => '<string>',
'timestamp' => '2026-01-15T10:30:00Z',
'properties' => [
'region' => 'us-east-1',
'tier' => 'pro',
'bytes' => '1048576'
]
]
],
'allow_backfilling' => true,
'allow_partial_failures' => true
]),
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.example.com/api/v1/events/ingest"
payload := strings.NewReader("{\n \"events\": [\n {\n \"code\": \"<string>\",\n \"customer_id\": \"<string>\",\n \"event_id\": \"<string>\",\n \"timestamp\": \"2026-01-15T10:30:00Z\",\n \"properties\": {\n \"region\": \"us-east-1\",\n \"tier\": \"pro\",\n \"bytes\": \"1048576\"\n }\n }\n ],\n \"allow_backfilling\": true,\n \"allow_partial_failures\": true\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.example.com/api/v1/events/ingest")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"events\": [\n {\n \"code\": \"<string>\",\n \"customer_id\": \"<string>\",\n \"event_id\": \"<string>\",\n \"timestamp\": \"2026-01-15T10:30:00Z\",\n \"properties\": {\n \"region\": \"us-east-1\",\n \"tier\": \"pro\",\n \"bytes\": \"1048576\"\n }\n }\n ],\n \"allow_backfilling\": true,\n \"allow_partial_failures\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/events/ingest")
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 \"events\": [\n {\n \"code\": \"<string>\",\n \"customer_id\": \"<string>\",\n \"event_id\": \"<string>\",\n \"timestamp\": \"2026-01-15T10:30:00Z\",\n \"properties\": {\n \"region\": \"us-east-1\",\n \"tier\": \"pro\",\n \"bytes\": \"1048576\"\n }\n }\n ],\n \"allow_backfilling\": true,\n \"allow_partial_failures\": true\n}"
response = http.request(request)
puts response.read_body{
"failures": [
{
"event_id": "<string>",
"reason": "<string>"
}
]
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}Ingest events
Ingest usage events for metering and billing purposes.
Events are deduplicated by (event_id, customer_id) — re-sending the same pair will not be
double-counted. If timestamps differ across duplicates, the event with the latest timestamp is used.
By default, any invalid event rejects the entire batch. Set allow_partial_failures to true to ingest valid events and receive per-event failure details in the response body.
curl --request POST \
--url https://api.example.com/api/v1/events/ingest \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"events": [
{
"code": "<string>",
"customer_id": "<string>",
"event_id": "<string>",
"timestamp": "2026-01-15T10:30:00Z",
"properties": {
"region": "us-east-1",
"tier": "pro",
"bytes": "1048576"
}
}
],
"allow_backfilling": true,
"allow_partial_failures": true
}
'import requests
url = "https://api.example.com/api/v1/events/ingest"
payload = {
"events": [
{
"code": "<string>",
"customer_id": "<string>",
"event_id": "<string>",
"timestamp": "2026-01-15T10:30:00Z",
"properties": {
"region": "us-east-1",
"tier": "pro",
"bytes": "1048576"
}
}
],
"allow_backfilling": True,
"allow_partial_failures": True
}
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({
events: [
{
code: '<string>',
customer_id: '<string>',
event_id: '<string>',
timestamp: '2026-01-15T10:30:00Z',
properties: {region: 'us-east-1', tier: 'pro', bytes: '1048576'}
}
],
allow_backfilling: true,
allow_partial_failures: true
})
};
fetch('https://api.example.com/api/v1/events/ingest', 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.example.com/api/v1/events/ingest",
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([
'events' => [
[
'code' => '<string>',
'customer_id' => '<string>',
'event_id' => '<string>',
'timestamp' => '2026-01-15T10:30:00Z',
'properties' => [
'region' => 'us-east-1',
'tier' => 'pro',
'bytes' => '1048576'
]
]
],
'allow_backfilling' => true,
'allow_partial_failures' => true
]),
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.example.com/api/v1/events/ingest"
payload := strings.NewReader("{\n \"events\": [\n {\n \"code\": \"<string>\",\n \"customer_id\": \"<string>\",\n \"event_id\": \"<string>\",\n \"timestamp\": \"2026-01-15T10:30:00Z\",\n \"properties\": {\n \"region\": \"us-east-1\",\n \"tier\": \"pro\",\n \"bytes\": \"1048576\"\n }\n }\n ],\n \"allow_backfilling\": true,\n \"allow_partial_failures\": true\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.example.com/api/v1/events/ingest")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"events\": [\n {\n \"code\": \"<string>\",\n \"customer_id\": \"<string>\",\n \"event_id\": \"<string>\",\n \"timestamp\": \"2026-01-15T10:30:00Z\",\n \"properties\": {\n \"region\": \"us-east-1\",\n \"tier\": \"pro\",\n \"bytes\": \"1048576\"\n }\n }\n ],\n \"allow_backfilling\": true,\n \"allow_partial_failures\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/events/ingest")
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 \"events\": [\n {\n \"code\": \"<string>\",\n \"customer_id\": \"<string>\",\n \"event_id\": \"<string>\",\n \"timestamp\": \"2026-01-15T10:30:00Z\",\n \"properties\": {\n \"region\": \"us-east-1\",\n \"tier\": \"pro\",\n \"bytes\": \"1048576\"\n }\n }\n ],\n \"allow_backfilling\": true,\n \"allow_partial_failures\": true\n}"
response = http.request(request)
puts response.read_body{
"failures": [
{
"event_id": "<string>",
"reason": "<string>"
}
]
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
1–100 events per request.
Show child attributes
Show child attributes
Allow events with timestamps more than 1 day in the past. Defaults to false.
Accept the batch even if some events fail validation. Defaults to false.
When true, valid events are ingested and failures are reported in the response body.
When false (default), any invalid event rejects the entire batch.
Response
Events ingested successfully
Events that failed to ingest. Omitted when no failures.
Show child attributes
Show child attributes