Event JSON Schema
JSON Schema (draft 2020-12) for the envelope and each data type.
No key required and not rate limited. Use it to validate incoming events or generate types.
Public, no key needed
Parameters
No parameters.
Try it
Paste your API key (a regular key or a trial key from the dashboard) to call the real API; the key stays in your browser.
Response
Errors
—
curl "https://api.tokenearly.com/v1/schema"import requests
resp = requests.get("https://api.tokenearly.com/v1/schema", timeout=10)
resp.raise_for_status()
print(resp.json())// Node 18+ (built-in fetch)
async function main() {
const resp = await fetch("https://api.tokenearly.com/v1/schema");
console.log(await resp.json());
}
main().catch((err) => {
console.error(err);
process.exit(1);
});package main
import (
"fmt"
"io"
"net/http"
)
func main() {
req, _ := http.NewRequest("GET", "https://api.tokenearly.com/v1/schema", nil)
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(resp.Status, string(body))
}Example response
{
"spec_version": "1.0",
"event": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://api.tokenearly.com/v1/schema/event",
"title": "Tokenearly event",
"allOf": [
"…"
],
"$defs": {
"announcement": "…",
"news": "…",
"signal": "…",
"twitter": "…"
}
},
"envelope": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Tokenearly event envelope",
"type": "object",
"required": [
"spec_version",
"id",
"revision",
"action",
"topic",
"type",
"source",
"published_at",
"detected_at_ms",
"data"
],
"properties": {
"id": {
"type": "string",
"description": "Stable event id (24 hex characters) shared by every revision; never changes. Ids increase with the time the event was first stored and compare correctly as strings. Also the pagination and resume cursor."
},
"…": "…"
}
},
"data": {
"announcement": {
"title": "announcement data",
"type": "object",
"properties": {
"…": "…"
}
},
"news": {
"title": "news data",
"type": "object",
"properties": {
"…": "…"
}
},
"signal": {
"title": "signal data",
"type": "object",
"properties": {
"…": "…"
}
},
"twitter": {
"title": "twitter data",
"type": "object",
"properties": {
"…": "…"
}
}
}
}