APISpend
Spend Timeseries
Daily spend for the top groups, the rest folded into Other.
Authorization
BearerAuth AuthorizationBearer <token>
Botyard API key — see /docs/authentication.
In: header
Path Parameters
org_id*Org Id
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Body of POST /spend/timeseries.
Response Body
application/json
curl -X POST "https://example.com/v1/orgs/string/spend/timeseries" \ -H "Content-Type: application/json" \ -d '{ "from": "2019-08-24T14:15:22Z", "to": "2019-08-24T14:15:22Z", "group_by": "bot" }'{
"group_by": "bot",
"days": [
"2019-08-24"
],
"series": [
{
"key": {
"kind": "bot",
"bot_id": "string",
"name": "string",
"filter": {
"kind": "condition",
"field": "bot_id",
"operator": "eq",
"value": null
}
},
"total_spend_usd": "string",
"points": [
{
"day": "2019-08-24",
"spend_usd": "string",
"native_turns": 0,
"calls": 0,
"turns": 0
}
]
}
]
}{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string",
"error_code": "string",
"errors": [
{
"pointer": "string",
"detail": "string",
"type": "string"
}
],
"trace_id": "string"
}