border.bot
Esc
  • Loading…
↑ ↓ to move↵ to openEsc to close
Docs menu

Usage history

GET https://api.border.bot/v1/usage

Requires an access token from an API client (Authorization: Bearer <access_token>).

Every billable request made by the workspace (dashboard, API and MCP), newest first, with cursor pagination.

API client scope: account.

Parameters#

Name Type Required Description
limit integer no Page size (1–100).
cursor string no Opaque cursor from a previous page.
action "classify" | "classify_max" | "classify_regulator" | "calculate" | "calculate_stacking" | "extract_product" | "infer_origin" | "air_waybill" | "commercial_invoice" | "screen" | "restrict" | "comply" | "inspect" | "cross" no Only this action.

Responses#

  • 200: A page of usage events. (UsageResponse)
  • 400: Invalid input (invalid_input). (Error)
  • 401: Missing, invalid or expired access token, or a revoked or expired API client (unauthorized). (Error)
  • 403: The API client doesn’t have the account scope (forbidden, details.reason: "missing_scope"). (Error)
  • 429: Rate limited (rate_limited). Retry after Retry-After seconds; RateLimit says which limit was hit (r=0, t seconds until its window ends) and RateLimit-Policy its quota. (Error)
  • 500: Unexpected error (internal). (Error)

Example request#

curl -X GET https://api.border.bot/v1/usage \
  -H "Authorization: Bearer $BORDERBOT_TOKEN"

Example response (200)#

JSON
{
  "data": [
    {
      "id": "string",
      "action": "classify",
      "source": "dashboard",
      "status": "pending",
      "credits": 0,
      "summary": "string",
      "actor": "string",
      "errorCode": "string",
      "durationMs": 0,
      "createdAt": "2026-10-20T09:30:00.000Z",
      "completedAt": "2026-10-20T09:30:00.000Z"
    }
  ],
  "nextCursor": "string"
}