curl --request POST \
--url https://api.example.com/events \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Migrated checkout service to Graviton",
"date": "2026-07-20",
"description": "Deployed ARM64 instances for the checkout service, reducing its EC2 compute cost by approximately 20%.",
"category": "TECHNICAL",
"metadata": {
"source": "custom",
"link": "https://github.com/acme/checkout/pull/4821"
},
"tags": [
{
"key": "service",
"value": "checkout"
},
{
"key": "change",
"value": "graviton-migration"
}
],
"labels": [
"production",
"aws"
],
"currency": "USD",
"widgetEvents": []
}
'import requests
url = "https://api.example.com/events"
payload = {
"name": "Migrated checkout service to Graviton",
"date": "2026-07-20",
"description": "Deployed ARM64 instances for the checkout service, reducing its EC2 compute cost by approximately 20%.",
"category": "TECHNICAL",
"metadata": {
"source": "custom",
"link": "https://github.com/acme/checkout/pull/4821"
},
"tags": [
{
"key": "service",
"value": "checkout"
},
{
"key": "change",
"value": "graviton-migration"
}
],
"labels": ["production", "aws"],
"currency": "USD",
"widgetEvents": []
}
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({
name: 'Migrated checkout service to Graviton',
date: '2026-07-20',
description: 'Deployed ARM64 instances for the checkout service, reducing its EC2 compute cost by approximately 20%.',
category: 'TECHNICAL',
metadata: {source: 'custom', link: 'https://github.com/acme/checkout/pull/4821'},
tags: [
{key: 'service', value: 'checkout'},
{key: 'change', value: 'graviton-migration'}
],
labels: ['production', 'aws'],
currency: 'USD',
widgetEvents: []
})
};
fetch('https://api.example.com/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://api.example.com/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([
'name' => 'Migrated checkout service to Graviton',
'date' => '2026-07-20',
'description' => 'Deployed ARM64 instances for the checkout service, reducing its EC2 compute cost by approximately 20%.',
'category' => 'TECHNICAL',
'metadata' => [
'source' => 'custom',
'link' => 'https://github.com/acme/checkout/pull/4821'
],
'tags' => [
[
'key' => 'service',
'value' => 'checkout'
],
[
'key' => 'change',
'value' => 'graviton-migration'
]
],
'labels' => [
'production',
'aws'
],
'currency' => 'USD',
'widgetEvents' => [
]
]),
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/events"
payload := strings.NewReader("{\n \"name\": \"Migrated checkout service to Graviton\",\n \"date\": \"2026-07-20\",\n \"description\": \"Deployed ARM64 instances for the checkout service, reducing its EC2 compute cost by approximately 20%.\",\n \"category\": \"TECHNICAL\",\n \"metadata\": {\n \"source\": \"custom\",\n \"link\": \"https://github.com/acme/checkout/pull/4821\"\n },\n \"tags\": [\n {\n \"key\": \"service\",\n \"value\": \"checkout\"\n },\n {\n \"key\": \"change\",\n \"value\": \"graviton-migration\"\n }\n ],\n \"labels\": [\n \"production\",\n \"aws\"\n ],\n \"currency\": \"USD\",\n \"widgetEvents\": []\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/events")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Migrated checkout service to Graviton\",\n \"date\": \"2026-07-20\",\n \"description\": \"Deployed ARM64 instances for the checkout service, reducing its EC2 compute cost by approximately 20%.\",\n \"category\": \"TECHNICAL\",\n \"metadata\": {\n \"source\": \"custom\",\n \"link\": \"https://github.com/acme/checkout/pull/4821\"\n },\n \"tags\": [\n {\n \"key\": \"service\",\n \"value\": \"checkout\"\n },\n {\n \"key\": \"change\",\n \"value\": \"graviton-migration\"\n }\n ],\n \"labels\": [\n \"production\",\n \"aws\"\n ],\n \"currency\": \"USD\",\n \"widgetEvents\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/events")
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 \"name\": \"Migrated checkout service to Graviton\",\n \"date\": \"2026-07-20\",\n \"description\": \"Deployed ARM64 instances for the checkout service, reducing its EC2 compute cost by approximately 20%.\",\n \"category\": \"TECHNICAL\",\n \"metadata\": {\n \"source\": \"custom\",\n \"link\": \"https://github.com/acme/checkout/pull/4821\"\n },\n \"tags\": [\n {\n \"key\": \"service\",\n \"value\": \"checkout\"\n },\n {\n \"key\": \"change\",\n \"value\": \"graviton-migration\"\n }\n ],\n \"labels\": [\n \"production\",\n \"aws\"\n ],\n \"currency\": \"USD\",\n \"widgetEvents\": []\n}"
response = http.request(request)
puts response.read_body"<string>"{
"error": "<string>",
"reason": "<string>",
"details": "<unknown>",
"summary": "<string>"
}{
"error": "<string>"
}Create a new event
Endpoint to create a new event from the internal API.
curl --request POST \
--url https://api.example.com/events \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Migrated checkout service to Graviton",
"date": "2026-07-20",
"description": "Deployed ARM64 instances for the checkout service, reducing its EC2 compute cost by approximately 20%.",
"category": "TECHNICAL",
"metadata": {
"source": "custom",
"link": "https://github.com/acme/checkout/pull/4821"
},
"tags": [
{
"key": "service",
"value": "checkout"
},
{
"key": "change",
"value": "graviton-migration"
}
],
"labels": [
"production",
"aws"
],
"currency": "USD",
"widgetEvents": []
}
'import requests
url = "https://api.example.com/events"
payload = {
"name": "Migrated checkout service to Graviton",
"date": "2026-07-20",
"description": "Deployed ARM64 instances for the checkout service, reducing its EC2 compute cost by approximately 20%.",
"category": "TECHNICAL",
"metadata": {
"source": "custom",
"link": "https://github.com/acme/checkout/pull/4821"
},
"tags": [
{
"key": "service",
"value": "checkout"
},
{
"key": "change",
"value": "graviton-migration"
}
],
"labels": ["production", "aws"],
"currency": "USD",
"widgetEvents": []
}
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({
name: 'Migrated checkout service to Graviton',
date: '2026-07-20',
description: 'Deployed ARM64 instances for the checkout service, reducing its EC2 compute cost by approximately 20%.',
category: 'TECHNICAL',
metadata: {source: 'custom', link: 'https://github.com/acme/checkout/pull/4821'},
tags: [
{key: 'service', value: 'checkout'},
{key: 'change', value: 'graviton-migration'}
],
labels: ['production', 'aws'],
currency: 'USD',
widgetEvents: []
})
};
fetch('https://api.example.com/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://api.example.com/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([
'name' => 'Migrated checkout service to Graviton',
'date' => '2026-07-20',
'description' => 'Deployed ARM64 instances for the checkout service, reducing its EC2 compute cost by approximately 20%.',
'category' => 'TECHNICAL',
'metadata' => [
'source' => 'custom',
'link' => 'https://github.com/acme/checkout/pull/4821'
],
'tags' => [
[
'key' => 'service',
'value' => 'checkout'
],
[
'key' => 'change',
'value' => 'graviton-migration'
]
],
'labels' => [
'production',
'aws'
],
'currency' => 'USD',
'widgetEvents' => [
]
]),
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/events"
payload := strings.NewReader("{\n \"name\": \"Migrated checkout service to Graviton\",\n \"date\": \"2026-07-20\",\n \"description\": \"Deployed ARM64 instances for the checkout service, reducing its EC2 compute cost by approximately 20%.\",\n \"category\": \"TECHNICAL\",\n \"metadata\": {\n \"source\": \"custom\",\n \"link\": \"https://github.com/acme/checkout/pull/4821\"\n },\n \"tags\": [\n {\n \"key\": \"service\",\n \"value\": \"checkout\"\n },\n {\n \"key\": \"change\",\n \"value\": \"graviton-migration\"\n }\n ],\n \"labels\": [\n \"production\",\n \"aws\"\n ],\n \"currency\": \"USD\",\n \"widgetEvents\": []\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/events")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Migrated checkout service to Graviton\",\n \"date\": \"2026-07-20\",\n \"description\": \"Deployed ARM64 instances for the checkout service, reducing its EC2 compute cost by approximately 20%.\",\n \"category\": \"TECHNICAL\",\n \"metadata\": {\n \"source\": \"custom\",\n \"link\": \"https://github.com/acme/checkout/pull/4821\"\n },\n \"tags\": [\n {\n \"key\": \"service\",\n \"value\": \"checkout\"\n },\n {\n \"key\": \"change\",\n \"value\": \"graviton-migration\"\n }\n ],\n \"labels\": [\n \"production\",\n \"aws\"\n ],\n \"currency\": \"USD\",\n \"widgetEvents\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/events")
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 \"name\": \"Migrated checkout service to Graviton\",\n \"date\": \"2026-07-20\",\n \"description\": \"Deployed ARM64 instances for the checkout service, reducing its EC2 compute cost by approximately 20%.\",\n \"category\": \"TECHNICAL\",\n \"metadata\": {\n \"source\": \"custom\",\n \"link\": \"https://github.com/acme/checkout/pull/4821\"\n },\n \"tags\": [\n {\n \"key\": \"service\",\n \"value\": \"checkout\"\n },\n {\n \"key\": \"change\",\n \"value\": \"graviton-migration\"\n }\n ],\n \"labels\": [\n \"production\",\n \"aws\"\n ],\n \"currency\": \"USD\",\n \"widgetEvents\": []\n}"
response = http.request(request)
puts response.read_body"<string>"{
"error": "<string>",
"reason": "<string>",
"details": "<unknown>",
"summary": "<string>"
}{
"error": "<string>"
}Authorizations
Send Authorization: Bearer <credential> using either a Clerk session JWT or a Clerk API key (ak_*). API keys may identify a user (user_*) or organization (org_*) principal and are generated in the Clerk Dashboard under API keys.
Body
Show child attributes
Show child attributes
5Show child attributes
Show child attributes
BUSINESS, TECHNICAL, PROVIDER Chart annotation associated with the event. Send an empty array for an event without a chart, or one item containing its grid layout, title, description, and Advanced Explorer request. POST /events accepts at most one item.
1Show child attributes
Show child attributes
Legacy event-level metric context. Usually omit it: when a chart is provided in widgetEvents, the backend derives this from its first cost query.
Legacy event-level group-by dimension. Usually omit it: when a chart is provided in widgetEvents, the backend derives this from its first cost query.
Legacy event-level chart period preset. Usually omit it: the backend derives the period from widgetEvents.
TRAILING_90_DAYS, TRAILING_30_DAYS, TRAILING_45_DAYS, TRAILING_7_DAYS, TRAILING_3_DAYS, TRAILING_14_WEEKS, MTD, QTD, YTD, LAST_WEEK, LAST_MONTH, LAST_6_MONTHS, LAST_12_MONTHS, LAST_4_YEARS, LAST_3_MONTHS, LAST_INVOICE_MONTH Legacy event-level custom period start date. Usually omit it: the backend derives the period from widgetEvents.
Legacy event-level custom period end date. Usually omit it: the backend derives the period from widgetEvents.
Legacy event-level query-builder filter. Usually omit it: the backend derives conditions from the first cost query's whereClause in widgetEvents.
Show child attributes
Show child attributes
Legacy event-level chart currency. Usually omit it: the backend derives currency from widgetEvents.
EUR, USD, GBP, CNY Show child attributes
Show child attributes
Response
Event created successfully
The response is of type string.
Was this page helpful?
