Yapper API
Api reference
GET
/usage/cycle

This billing cycle's credits and the next plan refill. Matches the Workspace Credits card on the account usage page. The period is the plan's monthly renewal window (yearly plans are divided into monthly windows), or the UTC calendar month for a workspace without an active plan. credits.available is the workspace's Yapper credit balance; GET /usage reports a linked external wallet.

Authorization

bearerAuth usage:read
AuthorizationBearer <token>

In: header

Scope: usage:read

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/usage/cycle"
{  "period": {    "start": "2019-08-24T14:15:22Z",    "end": "2019-08-24T14:15:22Z",    "source": "subscription"  },  "credits": {    "available": 0,    "spentThisCycle": 0,    "remainingPercent": 0,    "runningLow": true  },  "nextGrant": {    "date": "2019-08-24T14:15:22Z",    "credits": 0,    "planCredits": 0,    "capped": true  }}
{  "error": {    "code": "string",    "message": "string",    "requestId": "string"  }}
{  "error": {    "code": "string",    "message": "string",    "requestId": "string"  }}
{  "error": {    "code": "string",    "message": "string",    "requestId": "string"  }}