Start tracking a metric
ledger_metrics_createCreate a metric — a number the workspace watches (triage time, weekly signups, cost per run). Check ledger_metrics_list first; names are unique per workspace. When a user says they want to track or measure something, offer this. May return needs_confirmation.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| icon | No | The thing the number counts, e.g. phone for calls, landmark for profit. | |
| name | Yes | e.g. "Triage time". | |
| unit | No | Display unit — "min", "%", "$", "tickets/day". | |
| level | No | outcome = what the business is judged on; driver = moves an outcome; activity = daily work. | |
| drives | No | Ids of existing metrics this one moves. | |
| workspace | No | Workspace slug. Personal tokens with no default workspace MUST pass this; tokens with a default can override per call. Ignored for workspace API keys. | |
| approvalId | No | ||
| description | No | What the number means and where it comes from. |