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 booked per user and 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 belong to an internal project. On a revenue-linked project, use the Revenue API instead.
Parameters
Passed in the query string.list[string]
Specify the names of the users whose key metrics should be fetched. Not setting it means “all users”.
integer
default:"100"
Numbers of rows to fetch. Max
1000.string
The route is paginated: pass the previous page’s
next_cursor to fetch the next page. PS: has_more from the output 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
}