Post audit event
POST /api/v1/audit
Writes a custom audit event. Integrators can set source, project scope, and structured data. Source defaults to “external” if omitted.
Request Body required
Section titled “Request Body required ”Audit event to record
object
Audit event to record
object
AgentType scopes the event to an agent type (e.g. “claude-code”, “codex”). Optional.
Attrs carries key-value metadata.
object
Data carries a raw JSON payload for structured event data.
Event is a snake_case identifier for the event type (e.g. “deployment_started”). Required.
Level is the severity (“info”, “warn”, “error”). Defaults to “info” if omitted.
Message is a human-readable description.
ProjectID associates the event with a project. Optional.
Source identifies the origin of the event. Must be a valid AuditSource value. Defaults to “external” if omitted.
Worktree associates the event with a worktree. Optional.
Responses
Section titled “ Responses ”No Content
Bad Request
object
Internal Server Error