---
title: "Ingest client-reported developer usage"
method: POST
path: "/usage/otlp/{source}"
---

# Ingest client-reported developer usage

`POST /usage/otlp/{source}`

## Request

- Base URL: `https://getsanction.com/api/v1`
- URL: `https://getsanction.com/api/v1/usage/otlp/{source}`
- Auth: API key in header `x-api-key`

OTLP HTTP JSON ExportLogsServiceRequest, uncompressed, up to 1 MiB and 500 records. Selected Claude Code/Codex log events are stored separately from governed spend. Unsupported events are ignored. Duplicate source event identities per seat count once. Observation does not authorize execution or stop billing.

## Path parameters

- `source` 'claude-code' | 'codex', required

## Request body

- object
  - `resourceLogs` object[], required

## Response `200`

OTLP ExportLogsServiceResponse; observations accepted, duplicates ignored

## Other responses

- `400`: Invalid OTLP JSON, usage values, or original event time
- `401`: Missing, revoked, expired, or invalid seat key
- `404`: Unknown client source
- `413`: Body exceeds 1 MiB
- `415`: Requires uncompressed application/json

---

[API](https://skmtc.dev/getsanction/apis/sanction-agent-governance-api.md) · [All operations](https://skmtc.dev/getsanction/apis/sanction-agent-governance-api/llms.txt) · [OpenAPI document](https://skmtc.dev/getsanction/apis/sanction-agent-governance-api/revisions/c645a9e4b72d?raw)
