Set Widget Metric Value
set_widget_metric_valueRecord the latest value of a Lock Screen Widget metric, identified by its key. Use it whenever the tracked number or text changes, such as new revenue, signups, or uptime. The value replaces the previous one. Widgets on the user's Lock Screen pick it up on their next refresh, about every 15 minutes, so it is not instant; for an immediate alert, use send_push_notification. The metric must already exist (see list_widget_metrics and create_widget_metric). Each successful call counts as a billable metric update and returns a billing error when the account's trial or plan does not allow more. Returns the metric with its new latest value.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | Key of an existing metric, as shown by list_widget_metrics. Example: mrr. | |
| value | Yes | New value. For number, currency, percent, and unit metrics, send a number; formatted text such as "$1,234.50", "99.9%", or "120ms" is also parsed. For string metrics, send text up to 64 characters. | |
| timestamp | No | Optional ISO 8601 time the value was measured, such as 2026-10-18T09:00:00Z. Defaults to now. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| metric | Yes | ||
| success | Yes |