Home / Docs / API reference
/api/me/spending
GET /api/me/spending
Authentication signed-in session; roles: admin, cfo_viewer, fde, hr_ops, manager, member, operator
Response
| Field | Type | Description |
|---|---|---|
wallets required | array of object | |
wallets[].id required | string | The answer's id. |
wallets[].tenantId | string | |
wallets[].ownerKind | string | |
wallets[].ownerId | string | |
wallets[].kind required | string | |
wallets[].balanceMu required | integer | |
wallets[].heldMu required | integer | |
wallets[].currencyHint | string or null | |
wallets[].expiresAt | string or null | |
wallets[].spendPriority | integer | |
wallets[].sourceKind | string or null | |
wallets[].sourceRef | string or null | |
wallets[].periodStart | string or null | |
wallets[].periodEnd | string or null | |
wallets[].rolloverCapMu | integer or null | |
wallets[].createdAt | string | |
wallets[].closedAt | string or null | |
caps required | array of object | |
caps[].id | string | The answer's id. |
caps[].period | string | |
caps[].tier | object | |
caps[].botKey | object | |
caps[].limitMu | integer or null | |
caps[].perRequestMu | integer or null | |
caps[].reservedMu | integer or null | |
caps[].spentMu | integer | |
caps[].periodStartedAt | string or null | |
caps[].runsOutAt | string or null | |
pause required | object or null | |
pause.pausedAt | string | |
pause.pausedBy | string | |
pause.note | string or null | |
topUpPolicy | object or null | |
topUpPolicy.id | string | The answer's id. |
topUpPolicy.amountMu | integer | |
topUpPolicy.triggerBalanceMu | integer | |
topUpPolicy.monthlyCeilingMu | integer or null | |
topUpIntents required | array of object | |
topUpIntents[].id | string | The answer's id. |
topUpIntents[].amountMu | integer | |
topUpIntents[].reason | string | |
topUpIntents[].state | string | |
topUpIntents[].periodStart | string | |
topUpIntents[].confirmedAt | string or null | |
topUpIntents[].createdAt | string | |
skippedRuns required | array of object | |
skippedRuns[].id | string | The answer's id. |
skippedRuns[].reason | string | |
skippedRuns[].detail | string or null | |
skippedRuns[].createdAt | string | |
trial required | object or null | |
trial.balanceMu | integer | |
trial.expiresAt | string or null | |
trial.daysLeft | number | |
trial.freeLaneCallsThisPeriod | integer |
Example response (shape)
{
"wallets": [
{
"id": "<id>",
"tenantId": "<tenantId>",
"ownerKind": "<ownerKind>",
"ownerId": "<ownerId>",
"kind": "<kind>",
"balanceMu": 0,
"heldMu": 0,
"currencyHint": "<currencyHint>",
"expiresAt": "<expiresAt>",
"spendPriority": 0,
"sourceKind": "<sourceKind>",
"sourceRef": "<sourceRef>",
"periodStart": "<periodStart>",
"periodEnd": "<periodEnd>",
"rolloverCapMu": "<rolloverCapMu>",
"createdAt": "<createdAt>",
"closedAt": "<closedAt>"
}
],
"caps": [
{
"id": "<id>",
"period": "<period>",
"tier": "<tier>",
"botKey": "<botKey>",
"limitMu": "<limitMu>",
"perRequestMu": "<perRequestMu>",
"reservedMu": "<reservedMu>",
"spentMu": 0,
"periodStartedAt": "<periodStartedAt>",
"runsOutAt": "<runsOutAt>"
}
],
"pause": {
"pausedAt": "<pausedAt>",
"pausedBy": "<pausedBy>",
"note": "<note>"
},
"topUpPolicy": {
"id": "<id>",
"amountMu": 0,
"triggerBalanceMu": 0,
"monthlyCeilingMu": "<monthlyCeilingMu>"
},
"topUpIntents": [
{
"id": "<id>",
"amountMu": 0,
"reason": "<reason>",
"state": "<state>",
"periodStart": "<periodStart>",
"confirmedAt": "<confirmedAt>",
"createdAt": "<createdAt>"
}
],
"skippedRuns": [
{
"id": "<id>",
"reason": "<reason>",
"detail": "<detail>",
"createdAt": "<createdAt>"
}
],
"trial": {
"balanceMu": 0,
"expiresAt": "<expiresAt>",
"daysLeft": 0,
"freeLaneCallsThisPeriod": 0
}
}Common errors
401not signed in
Every error has the same JSON shape; see Errors and Limits.
Full schema (JSON)
Response schema
{
"description": "A session credential. With no personal workspace the page is empty (topUpPolicy is then absent).",
"type": "object",
"required": [
"wallets",
"caps",
"pause",
"topUpIntents",
"skippedRuns",
"trial"
],
"properties": {
"wallets": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"kind",
"balanceMu",
"heldMu"
],
"properties": {
"id": {
"type": "string"
},
"tenantId": {
"type": "string"
},
"ownerKind": {
"type": "string"
},
"ownerId": {
"type": "string"
},
"kind": {
"type": "string"
},
"balanceMu": {
"type": "integer"
},
"heldMu": {
"type": "integer"
},
"currencyHint": {
"type": [
"string",
"null"
]
},
"expiresAt": {
"type": [
"string",
"null"
]
},
"spendPriority": {
"type": "integer"
},
"sourceKind": {
"type": [
"string",
"null"
]
},
"sourceRef": {
"type": [
"string",
"null"
]
},
"periodStart": {
"type": [
"string",
"null"
]
},
"periodEnd": {
"type": [
"string",
"null"
]
},
"rolloverCapMu": {
"type": [
"integer",
"null"
]
},
"createdAt": {
"type": "string"
},
"closedAt": {
"type": [
"string",
"null"
]
}
}
}
},
"caps": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"period": {
"type": "string"
},
"tier": {},
"botKey": {},
"limitMu": {
"type": [
"integer",
"null"
]
},
"perRequestMu": {
"type": [
"integer",
"null"
]
},
"reservedMu": {
"type": [
"integer",
"null"
]
},
"spentMu": {
"type": "integer"
},
"periodStartedAt": {
"type": [
"string",
"null"
]
},
"runsOutAt": {
"type": [
"string",
"null"
]
}
}
}
},
"pause": {
"type": [
"object",
"null"
],
"properties": {
"pausedAt": {
"type": "string"
},
"pausedBy": {
"type": "string"
},
"note": {
"type": [
"string",
"null"
]
}
}
},
"topUpPolicy": {
"type": [
"object",
"null"
],
"properties": {
"id": {
"type": "string"
},
"amountMu": {
"type": "integer"
},
"triggerBalanceMu": {
"type": "integer"
},
"monthlyCeilingMu": {
"type": [
"integer",
"null"
]
}
}
},
"topUpIntents": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"amountMu": {
"type": "integer"
},
"reason": {
"type": "string"
},
"state": {
"type": "string"
},
"periodStart": {
"type": "string"
},
"confirmedAt": {
"type": [
"string",
"null"
]
},
"createdAt": {
"type": "string"
}
}
}
},
"skippedRuns": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"reason": {
"type": "string"
},
"detail": {
"type": [
"string",
"null"
]
},
"createdAt": {
"type": "string"
}
}
}
},
"trial": {
"type": [
"object",
"null"
],
"properties": {
"balanceMu": {
"type": "integer"
},
"expiresAt": {
"type": [
"string",
"null"
]
},
"daysLeft": {
"type": "number"
},
"freeLaneCallsThisPeriod": {
"type": "integer"
}
}
}
}
}