aiFlags
query · in the family Billing and the wallet
What it does
Your group’s AI usage flags by day — who tripped which unusual-pressing pattern, so a person can take a look.
Your group's fired AI-watch flags by UTC day. Actor captions resolve at read (a user actor names itself; a session actor answers 'other'). Self-group BY construction (no target arg exists — the aiUsage stance). Requires authentication.
Before you call
A bearer session from an API key (see Authentication and key hygiene) or a signed-in user.
Capability area: Billing and the wallet — Your platform bill, token purchases and the usage and cost reads.
Roles that may call it:
- Owner
- Manager
- Associate Manager
- An API key whose scope allows
api:aiFlags
What happens
A read over the flags the AI watch records when someone presses AI features unusually hard (the thresholds are deliberately generous). Nothing is ever blocked — a flag just asks a human to review; the same fire also drops a task in the owners’ inbox.
Arguments
| Name | Type | Required | Notes |
|---|---|---|---|
days | Int | no |
Returns
AiFlagWindow AiFlagWindow! — Your group's fired AI-watch flags: newest day first.
Example request
query ExampleAiFlags($days: Int) {
aiFlags(days: $days) {
flags {
day
pattern
actorKind
actorId
actorCaption
count
}
}
}Variables:
{
"days": 1
}Example response
{
"data": {
"aiFlags": {
"flags": [
{
"day": "<day>",
"pattern": "<pattern>",
"actorKind": "<actor kind>",
"actorId": "01900000-0000-7000-8000-b449dc5a0000",
"actorCaption": "Blue jeans",
"count": 1
}
]
}
},
"extensions": {
"at": {
"callId": "01EXAMPLE-CALL-ID",
"version": {
"requested": null,
"serviced": {
"name": "genesis",
"number": 0
}
}
}
}
}Errors this call can answer
VALIDATION/INVALID— Something in the request is not valid. Retry: no. (VALIDATION)AUTHN/REQUIRED— Sign in to do this. Retry: no. (AUTHN)AUTHZ/FORBIDDEN— Your role does not allow this action. Retry: no. (AUTHZ)RATE_LIMIT/THROTTLED— Too many requests in a short time. Retry: yes. (RATE_LIMIT)