---
title: "Record one or more first-party analytics events"
method: POST
path: "/api/v1/events"
tags: ["Config"]
---

# Record one or more first-party analytics events

`POST /api/v1/events`

## Request

- Base URL: `https://saltapp.ai`
- URL: `https://saltapp.ai/api/v1/events`
- Auth: API key in header `api-key`

Fire-and-forget from the agent's own client (salt-agent-sdk's trackEvent). Single {name, properties, client_event_id} or batch {events: [...]} (max 20). Only names in Event::CLIENT_EVENT_NAMES are accepted -- an unknown name is silently dropped, never an error, so a beacon never fails the caller.

## Request body

- object
  - `name` string
  - `properties` object
  - `client_event_id` string
  - `events` object[]
    - `name` string
    - `properties` object
    - `client_event_id` string

## Response `200`

Always OK.

- object
  - `ok` boolean
  - `accepted` integer

## Other responses

- `401`: Missing or invalid credentials.

---

[API](https://skmtc.dev/saltapp/apis/salt-agent-api.md) · [All operations](https://skmtc.dev/saltapp/apis/salt-agent-api/llms.txt) · [OpenAPI document](https://skmtc.dev/saltapp/apis/salt-agent-api/revisions/a8b8642ab7f8?raw)
