---
title: "Record CLI command execution event"
method: POST
path: "/cli/telemetry/event"
tags: ["telemetry"]
---

# Record CLI command execution event

`POST /cli/telemetry/event`

## Request

- Base URL: `https://api.replicated.com/vendor/v3`
- URL: `https://api.replicated.com/vendor/v3/cli/telemetry/event`
- Auth: API key in header `Authorization`

Records telemetry data for a CLI command execution including exit code, duration, and environment metadata.
Returns a unique event_id that can be used to correlate errors with this event.

Note: Authentication required. Team and user information is extracted automatically from the Bearer token.
This endpoint is accessible to all authenticated users, including read-only users, to ensure comprehensive telemetry collection.

## Request body

- object
  - `command` string, required: Name of the CLI command that was executed
  - `duration_ms` integer: Duration of command execution in milliseconds
  - `event_id` string, required: Unique identifier for the event (UUID format, must be generated by client)
  - `exit_code` integer: Exit code of the command execution
  - `has_config_file` boolean: Whether a config file was present

## Response `201`

CliTelemetryEventResponse represents the response from creating a telemetry event

- object
  - `event_id` string: Unique identifier for the event (UUID format)

## Other responses

- `400`: Returned on bad input
- `401`: Return if the caller is not authorized

## Changes

- **2026-11-03** `a36c6aead22f`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/replicated/apis/vendor-api-v3-2/changes/cli/telemetry/event/post.md)

---

[API](https://skmtc.dev/replicated/apis/vendor-api-v3-2.md) - [All operations](https://skmtc.dev/replicated/apis/vendor-api-v3-2/llms.txt) - [OpenAPI document](https://skmtc.dev/replicated/apis/vendor-api-v3-2/revisions/a36c6aead22f?raw)
