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. If no metric uses the key yet, this creates one with a label made from the key, in number format for numeric values and string format for text; call create_widget_metric first for a currency, percent, or unit format or a custom label. Keys of deleted metrics are not recreated. 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 and created: true when this call created it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | Metric key, as shown by list_widget_metrics. A new key creates the metric. 1-64 lowercase letters, numbers, dots, underscores, or dashes. 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 | ||
| created | No | ||
| success | Yes |