Skip to main content
Use these endpoints to see what your users earn you and what they cost to serve, and, if you have a qualifying-request agreement, to read its monthly statement.

Revenue per user

GET /publisher-dashboard/user-analytics

See what your users earn you and what they cost you to serve: earnings and model cost per 1,000 messages, by day, country, model, activity, new and returning users, and your own user tags. Every publisher can call this route.A message is an ad request that carries a user ID (user.id), about one for each assistant reply. The ID "anonymous" isn’t a user, so those requests aren’t counted. Earnings use your payout for the range, split across users by the ad spend that Gravity attributes to each of them. Requests without a user ID keep their own share, so these earnings can add up to less than your total payout. Model cost comes from the usage that you send on ad requests: the cost that you report, or else the token counts priced at the model’s public list price.
integer
default:"30"
The number of days to look back, from 1 to 365. Or send start_date and end_date (YYYY-MM-DD).
string
Comma-separated ISO country codes, or unknown. At most 20 countries.
string
Comma-separated: new, returning. A user is new when their first request is in the range.
string
Comma-separated activity groups, in messages per active day: under_10, 10_24, 25_49, 50_99, 100_plus.
string
A user tag as key:value, for example tag=plan:free. Repeat the parameter for more tags. Several values of one key match any of them. At most 10 keys and 20 values per key.
string
Comma-separated model IDs, or not_reported for users who sent no model usage. At most 20 models. A user’s model is the one that answered most of their reported messages.
string
The first dimension of matrix: country, model, activity, new_vs_returning, or tag:<key>. Send it with columns.
string
The second dimension of matrix, from the same list. It must be different from rows.
Filters on different dimensions all apply. Gravity ignores filter values that it doesn’t know.Every group in the response has at least 50 users (min_segment_users). If your filters leave fewer than 50 users, too_few_users is true, summary and matrix are null, and daily and breakdowns are empty.A breakdown has up to 25 segments, the groups with the most messages first (activity and new_vs_returning keep their natural order). Smaller groups are combined into other when it has 50 users or more. A tag breakdown can also have not_tagged, the users without that tag. Users with no country are unknown, and users who reported no usage are not_reported. Each segment has segment (the group), message_share, earnings_share, and the economics fields.A field is null when Gravity can’t compute it, for example a model cost with no usage.
Request
Response (abbreviated)

Agreement statements

These routes return the monthly statement of a qualifying-request agreement. They exist only for publishers on that kind of agreement. For any other key, they return 404. Both take month (any date in the month, YYYY-MM-DD; the default is the current month) and tz (an IANA time zone, default UTC). A bad month or tz returns 400. A future month returns 404. Amounts that end in _microdollars are in millionths of a dollar.

GET /publisher-dashboard/qualifying-requests

Get the qualifying requests, rate, tier, and earnings of one month.accrued_minimum_microdollars is the minimum for the days of the month that the agreement covers, not a full month. earned_month_to_date and earned_today are in dollars.
Response

GET /publisher-dashboard/proven-ad-value

Get the Publisher Attributable Value (PAV) of one month, by conversion event. Gravity uses the same calculation for the monthly reconciliation. This route is available only when your agreement shows PAV to you.types always lists every conversion event of the agreement’s rate card, in the agreement’s order, including events with a zero value. provisional is true until the month is over, because conversions can still arrive.
Response