import weflayr
client = weflayr.client() # reads WEFLAYR_API_KEY
client.get_key_metrics(user_names=["u_123", "u_456"])
const weflayr = require('weflayr');
const client = weflayr.client(); // reads WEFLAYR_API_KEY
await weflayr.api.getKeyMetrics({
client,
throwOnError: true,
query: { userNames: ['u_123', 'u_456'] },
});
curl "https://app.weflayr.com/api/key-metrics/?user_names=u_123&user_names=u_456" \
-H "Authorization: Bearer $WEFLAYR_API_KEY"
{
"rows": [
{"metric_id": "b3f2b160-6e12-4f1a-9c3d-0a2e7c9b5d41", "user_name": "u_123", "metric_name": "Meetings booked", "month": "2026-06", "amount": 3.0, "source": "api"}
],
"next_cursor": null,
"has_more": false
}
Key metrics
Get key metrics
List the key-metric values of each user, per month.
GET
/
api
/
key-metrics
/
import weflayr
client = weflayr.client() # reads WEFLAYR_API_KEY
client.get_key_metrics(user_names=["u_123", "u_456"])
const weflayr = require('weflayr');
const client = weflayr.client(); // reads WEFLAYR_API_KEY
await weflayr.api.getKeyMetrics({
client,
throwOnError: true,
query: { userNames: ['u_123', 'u_456'] },
});
curl "https://app.weflayr.com/api/key-metrics/?user_names=u_123&user_names=u_456" \
-H "Authorization: Bearer $WEFLAYR_API_KEY"
{
"rows": [
{"metric_id": "b3f2b160-6e12-4f1a-9c3d-0a2e7c9b5d41", "user_name": "u_123", "metric_name": "Meetings booked", "month": "2026-06", "amount": 3.0, "source": "api"}
],
"next_cursor": null,
"has_more": false
}
Key metrics apply to internal projects only. On a revenue-linked project, use Get revenue instead: this route is not refused there, it returns the key-metric rows only, normally none.
Parameters
Passed in the query string.string[]
The users whose key metrics to get. Omit for every user.
integer
default:"100"
Number of rows per page. Max
1000.string
The route is paginated: pass the previous page’s
next_cursor, as is, to get the next page. has_more says whether another page exists.import weflayr
client = weflayr.client() # reads WEFLAYR_API_KEY
client.get_key_metrics(user_names=["u_123", "u_456"])
const weflayr = require('weflayr');
const client = weflayr.client(); // reads WEFLAYR_API_KEY
await weflayr.api.getKeyMetrics({
client,
throwOnError: true,
query: { userNames: ['u_123', 'u_456'] },
});
curl "https://app.weflayr.com/api/key-metrics/?user_names=u_123&user_names=u_456" \
-H "Authorization: Bearer $WEFLAYR_API_KEY"
{
"rows": [
{"metric_id": "b3f2b160-6e12-4f1a-9c3d-0a2e7c9b5d41", "user_name": "u_123", "metric_name": "Meetings booked", "month": "2026-06", "amount": 3.0, "source": "api"}
],
"next_cursor": null,
"has_more": false
}