Yapper API
Api reference
GET
/usage/members

Every current team member's credit spend in a range, highest first, with their monthly cap. Matches the Team Member Spending card on the account usage page. Requires the key's member to be a team owner or admin. A member's figures equal GET /usage/breakdown with that member's id as memberIds. Returns usage_breakdown_unavailable (409) until the workspace's usage history has been indexed.

Authorization

bearerAuth usage:read
AuthorizationBearer <token>

In: header

Scope: usage:read

Query Parameters

range?string
Default"month"

Value in

  • "week"
  • "month"
  • "quarter"
  • "year"
  • "all"

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/usage/members"
{  "range": "week",  "data": [    {      "userId": "string",      "name": "string",      "email": "string",      "role": "string",      "credits": 0,      "creditsSpent": 0,      "creditsRefunded": 0,      "runs": 0,      "monthlyLimit": 0,      "usedThisMonth": 0    }  ]}
{  "error": {    "code": "string",    "message": "string",    "requestId": "string"  }}
{  "error": {    "code": "string",    "message": "string",    "requestId": "string"  }}
{  "error": {    "code": "string",    "message": "string",    "requestId": "string"  }}
{  "error": {    "code": "string",    "message": "string",    "requestId": "string"  }}
{  "error": {    "code": "string",    "message": "string",    "requestId": "string"  }}