Skip to main content
POST
/
metrics
/
{key}
/
value
Node
import ActivitySmith from "activitysmith";

const activitysmith = new ActivitySmith({
  apiKey: process.env.ACTIVITYSMITH_API_KEY,
});

await activitysmith.metrics.update("deploy.success_rate", 99.9);
{
  "success": true
}

Documentation Index

Fetch the complete documentation index at: https://activitysmith.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Required. Include Authorization: Bearer ask_123456789 in every request. Replace ask_123456789 with your API key.

Path Parameters

key
string
required

Metric key configured in the web app. Lowercase letters, numbers, dots, underscores, and dashes are allowed.

Required string length: 1 - 64
Pattern: ^[a-z0-9][a-z0-9_.-]{0,63}$

Body

application/json

Latest metric value to display in widgets.

value
required
timestamp
string<date-time>

Optional ISO timestamp for when the metric value was measured. Defaults to the server receive time.

Response

Metric value updated

success
boolean
required