Skip to main content

Quickstart

This walks you from nothing to one event stored and readable back through the API. It takes about five minutes.

1. Create an account​

Sign up at https://santati.io/accounts/signup/ and create a team.

2. Create a trail​

In the app, open Audit Log → Trails and create a trail — team admins only. Every event is written to exactly one trail; use a name that matches a product area, e.g. billing.

You can also create one from the API, which needs a key with the manage scope (step 3 covers creating keys):

curl -X POST 'https://api.santati.io/api/v0/trails/' \
-H "Authorization: Api-Key $SANTATI_API_KEY" \
-H 'Content-Type: application/json' \
-d '{"name": "billing", "region": "us-east"}'

region is optional; blank means the default region, us-east, which is currently the only one. A successful call returns 201 with the trail's name, region and ingest_url. See Create a trail.

3. Create an API key​

In the app, open Audit Log → API Keys and create a key with the write scope — or manage if you also want to create trails and streams from the API. Only team admins can create keys, and the key is shown exactly once — copy it now. It looks like sat_sk_01J9Z6K3M4QX8RT2VN5B7HCWDA.rkr1c2….

4. Export the key​

export SANTATI_API_KEY=sat_sk_...

5. Install an SDK​

Pick a language. The tabs on this page stay in sync, and the URL's ?lang= parameter selects one.

curl ships with macOS and most Linux distributions; there is nothing to install. The curl tabs call the HTTP API directly.

6. Emit an event​

Send one event to the billing trail. event, trail and organization_id are required — a blank organization_id is rejected with unknown_organization. The SDK snippets set billing as the client's default trail, so each emit inherits it. The actor block is optional, but a useful audit record names who did it.

curl -X POST 'https://api.santati.io/api/v0/events/' \
-H "Authorization: Api-Key $SANTATI_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"event": "invoice.voided",
"trail": "billing",
"created_at": "2026-09-29T14:03:11.482Z",
"organization_id": "org_acme_logistics",
"actor": {"type": "user", "id": "usr_123", "name": "Valentine Michael Smith"},
"targets": [{"type": "invoice", "id": "inv_555", "name": "INV-555"}]
}'

A successful emit returns 201 Created with the stored event in the read shape — curl prints it as-is, and the SDKs return it as result.event (event in Node) alongside duplicate, which is true when the server replayed an earlier request. Each SDK generates an idempotency key per emit and reuses it on its automatic retries, so a retry never stores the event twice; see Idempotency. The stored event looks like this:

{
"id": "01J9Z6K3M4QX8RT2VN5B7HCWDA",
"trail": "billing",
"event": "invoice.voided",
"created_at": "2026-09-29T14:03:11.482000Z",
"received_at": "2026-09-29T14:03:11.913000Z",
"organization_id": "org_acme_logistics",
"actor": {"type": "user", "id": "usr_123", "name": "Valentine Michael Smith", "metadata": {}},
"targets": [{"type": "invoice", "id": "inv_555", "name": "INV-555", "metadata": {}}],
"metadata": {},
"data": {},
"context": {},
"hash": "",
"schema_version": null
}

7. Read it back​

List the events on the trail:

curl 'https://api.santati.io/api/v0/events/?trail=billing' \
-H "Authorization: Api-Key $SANTATI_API_KEY"

List responses are cursor-paginated and carry no total. The SDKs' list returns one page with its results and the next page's cursor; iterate follows the cursors for you (see each SDK's page). The raw response looks like this:

{
"next": null,
"previous": null,
"results": [
{
"id": "01J9Z6K3M4QX8RT2VN5B7HCWDA",
"trail": "billing",
"event": "invoice.voided",
"created_at": "2026-09-29T14:03:11.482000Z",
"received_at": "2026-09-29T14:03:11.913000Z",
"organization_id": "org_acme_logistics",
"actor": {"type": "user", "id": "usr_123", "name": "Valentine Michael Smith", "metadata": {}},
"targets": [{"type": "invoice", "id": "inv_555", "name": "INV-555", "metadata": {}}],
"metadata": {},
"data": {},
"context": {},
"hash": "",
"schema_version": null
}
]
}

See Searching events for the full filter vocabulary, and List events for the reference.

8. See it in the app​

Open Audit Log → Events in the app to browse the trail's events, inspect an event's payload, and follow its place in the chain.