Usage
Monitor Platica usage from your systems: billing period, messages, conversations, autonomy rate, message types, and the actors generating usage.
Example
curl https://api.platic.ai/v1/usage/summary \
-H "Authorization: Bearer $PLATIC_API_KEY" await platic.usage.summary(); Available endpoints
| Method | Endpoint | Description |
|---|---|---|
GET | /v1/usage/period | Get the active billing period |
GET | /v1/usage/summary | Get a usage and autonomy summary |
GET | /v1/usage/messages | Query messages by type, channel, category, campaign, or status |
GET | /v1/usage/conversations | Query conversations, assistance, and autonomy |
GET | /v1/usage/actors | Query consumption by actor |
Each endpoint answers for one workspace: { "status": "success", "data": { ... } }, where data is that workspace's metrics. If your credential covers several workspaces, send ?workspace=<id> (list workspaces); without it the answer is 400.
Data freshness
Messages in the summary and in /v1/usage/messages are counted from transactions with mode=full, the default for ranges up to 92 days. They match the Usage page without lag.
Longer ranges, enterprise, mode=fast, and /v1/usage/actors use daily aggregates updated for each transaction. They usually lag by seconds. You can read total volume (all) or charged messages (billable).
Conversations and autonomy rate use hourly aggregates and may lag by up to ~60 minutes. Check freshness in each response for the latest update.
Enterprise workspaces
Enterprise rates are set per customer. Monitor total, billable, and non-billable counts:
- With
billingType: "enterprise", the response includes workspacecreditsand omitscreditsUsedand costs. - It always uses aggregates, even with
mode=full.