Audit

Record a tool call audit entry

Records a non-LLM tool call (API calls, webhooks, MCP tool executions by external orchestrators) in the AxonFlow audit trail. Only tool_name is required; all other fields are optional.

post/api/v1/audit/tool-call

Request

Headers

X-Tenant-IDstring required

Tenant identifier (must match the client ID from Basic auth credentials)

X-Axonflow-Proxy-Authstring required

Internal-service HMAC token proving the request was routed through the AxonFlow Agent gateway (derived from AXONFLOW_INTERNAL_SERVICE_SECRET). Enforced fail-closed in every non-Community deployment: a missing or invalid token — or an unconfigured secret — is rejected with 403, in addition to the Basic auth requirement below. Community deployments without the secret configured skip this check.

Idempotency-Keystring

Optional per-request dedup token. When supplied, the platform caches the response for 24h and returns it byte-for-byte on subsequent requests carrying the same key + same authenticated tenant. A cache hit adds an Idempotent-Replayed: true response header. Pattern: ^[A-Za-z0-9_.:\-/]+$, max 256 chars. 5xx responses are not cached so the caller's retry can hit a fresh attempt.

Request body

tool_namestring required

Name of the tool that was called

caller_namestring

Which client/integration made this call (e.g. claude_code, codex, cursor, openclaw). Replaces tool_type (#2912), which was misnamed for this purpose — every real caller used it to identify itself, not to describe a property of the tool.

tool_typestring

Deprecated — use caller_name instead. Accepted as a legacy input fallback when caller_name is not supplied.

inputobject

Input data sent to the tool

outputobject

Output data returned by the tool

workflow_idstring

Associated workflow ID

step_idstring

Associated workflow step ID

user_idstring

User who triggered the tool call

duration_msinteger

Duration of the tool call in milliseconds

policies_appliedstring[]

List of policy names applied during the tool call

successboolean

Whether the tool call succeeded

error_messagestring

Error message if the tool call failed

Response

Tool call audit recorded

audit_idstring

Unique identifier for the audit entry

status'recorded'

Recording status

timestampstring date-time

When the audit entry was recorded

Changes

No recorded changes to this operation across all 1 revision of this API.