import weflayr
from weflayr.openapi.models import PerformanceInput
client = weflayr.client() # reads WEFLAYR_API_KEY
client.get_performance(body=PerformanceInput.from_dict({
"date_from": "2026-06-01",
"aggregate": "week",
"group_by": "user",
"user_tags": {"region": ["EU", "NA"], "plan": "premium"},
}))
const weflayr = require('weflayr');
const client = weflayr.client(); // reads WEFLAYR_API_KEY
await weflayr.api.getPerformance({
client,
throwOnError: true,
body: {
dateFrom: '2026-06-01',
aggregate: 'week',
groupBy: 'user',
userTags: { region: ['EU', 'NA'], plan: 'premium' },
},
});
curl -X POST https://app.weflayr.com/api/performance/ \
-H "Authorization: Bearer $WEFLAYR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"date_from": "2026-06-01",
"aggregate": "week",
"group_by": "user",
"user_tags": {"region": ["EU", "NA"], "plan": "premium"}
}'
{
"rows": [
{
"date_from": "2026-06-01", "date_to": "2026-06-07", "user": "u_123", "cost": 342.87,
"key_metrics": {
"Meetings booked": {"value": 134.0, "total_cost": 342.87, "cost_per_unit": 2.56},
"Tickets resolved": {"value": 556.0, "total_cost": 342.87, "cost_per_unit": 0.62}
}
},
{
"date_from": "2026-06-01", "date_to": "2026-06-07", "user": "u_456", "cost": 128.05,
"key_metrics": {
"Meetings booked": {"value": 40.0, "total_cost": 128.05, "cost_per_unit": 3.20}
}
}
],
"next_cursor": null,
"has_more": false
}
Dashboard data
Get performance
Get your AI cost and key metrics per day, week, month, quarter or year, with the cost per unit of each metric, optionally split by user or call name.
POST
/
api
/
performance
/
import weflayr
from weflayr.openapi.models import PerformanceInput
client = weflayr.client() # reads WEFLAYR_API_KEY
client.get_performance(body=PerformanceInput.from_dict({
"date_from": "2026-06-01",
"aggregate": "week",
"group_by": "user",
"user_tags": {"region": ["EU", "NA"], "plan": "premium"},
}))
const weflayr = require('weflayr');
const client = weflayr.client(); // reads WEFLAYR_API_KEY
await weflayr.api.getPerformance({
client,
throwOnError: true,
body: {
dateFrom: '2026-06-01',
aggregate: 'week',
groupBy: 'user',
userTags: { region: ['EU', 'NA'], plan: 'premium' },
},
});
curl -X POST https://app.weflayr.com/api/performance/ \
-H "Authorization: Bearer $WEFLAYR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"date_from": "2026-06-01",
"aggregate": "week",
"group_by": "user",
"user_tags": {"region": ["EU", "NA"], "plan": "premium"}
}'
{
"rows": [
{
"date_from": "2026-06-01", "date_to": "2026-06-07", "user": "u_123", "cost": 342.87,
"key_metrics": {
"Meetings booked": {"value": 134.0, "total_cost": 342.87, "cost_per_unit": 2.56},
"Tickets resolved": {"value": 556.0, "total_cost": 342.87, "cost_per_unit": 0.62}
}
},
{
"date_from": "2026-06-01", "date_to": "2026-06-07", "user": "u_456", "cost": 128.05,
"key_metrics": {
"Meetings booked": {"value": 40.0, "total_cost": 128.05, "cost_per_unit": 3.20}
}
}
],
"next_cursor": null,
"has_more": false
}
On a revenue-linked project, this route returns a 400
wrong_project_type: use Get margin instead. It applies to internal projects only.user or call_name only when group_by names it.
Parameters
Passed in the request body.string
required
Start of the period, inclusive.
YYYY-MM-DD.string
End of the period, inclusive. Defaults to today.
YYYY-MM-DD.string
default:"day"
One row per period;
"all" collapses the whole date range into a single row (per group_by, if set). One of day, week, month, quarter, year or all.string
Split each period into one row per user or per call name. Omit for one row per period. Key metrics are booked per user, so a
call_name row carries the period’s whole amount of each metric, and its cost_per_unit is that call’s cost per unit of the metric. One of user or call_name.string[]
Restrict the cost to these call names. Omit for every call. Key metrics are not narrowed. See Get calls.
string[]
Restrict to these users. Omit for every user. See Get customers.
string[]
Restrict to the users who used any of these feature tags in the period: the other users’ rows are removed.
object
Restrict to users carrying these tags (AND across
tag_key, OR within a tag_key’s values).boolean
default:"false"
Apply free AI credits discounts to
cost.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
from weflayr.openapi.models import PerformanceInput
client = weflayr.client() # reads WEFLAYR_API_KEY
client.get_performance(body=PerformanceInput.from_dict({
"date_from": "2026-06-01",
"aggregate": "week",
"group_by": "user",
"user_tags": {"region": ["EU", "NA"], "plan": "premium"},
}))
const weflayr = require('weflayr');
const client = weflayr.client(); // reads WEFLAYR_API_KEY
await weflayr.api.getPerformance({
client,
throwOnError: true,
body: {
dateFrom: '2026-06-01',
aggregate: 'week',
groupBy: 'user',
userTags: { region: ['EU', 'NA'], plan: 'premium' },
},
});
curl -X POST https://app.weflayr.com/api/performance/ \
-H "Authorization: Bearer $WEFLAYR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"date_from": "2026-06-01",
"aggregate": "week",
"group_by": "user",
"user_tags": {"region": ["EU", "NA"], "plan": "premium"}
}'
{
"rows": [
{
"date_from": "2026-06-01", "date_to": "2026-06-07", "user": "u_123", "cost": 342.87,
"key_metrics": {
"Meetings booked": {"value": 134.0, "total_cost": 342.87, "cost_per_unit": 2.56},
"Tickets resolved": {"value": 556.0, "total_cost": 342.87, "cost_per_unit": 0.62}
}
},
{
"date_from": "2026-06-01", "date_to": "2026-06-07", "user": "u_456", "cost": 128.05,
"key_metrics": {
"Meetings booked": {"value": 40.0, "total_cost": 128.05, "cost_per_unit": 3.20}
}
}
],
"next_cursor": null,
"has_more": false
}