Billing

The billing API allows you to retrieve current usage information for your organization, including ticket counts, seat usage, webhook limits, and AI credit consumption. This is useful for monitoring your usage and integrating billing data into your own systems.

The usage model

The usage response contains current period usage across all metered resources.

Properties

  • Name
    period_start
    Type
    timestamp
    Description

    Start of the current calendar month in the server time zone, returned as an ISO timestamp.

  • Name
    period_end
    Type
    timestamp
    Description

    End of the current calendar month in the server time zone, returned as an ISO timestamp.

  • Name
    tickets
    Type
    object
    Description

    Ticket usage for the current period.

  • Name
    tickets.used
    Type
    integer
    Description

    Number of tickets created this calendar month.

  • Name
    tickets.limit
    Type
    integer | null
    Description

    Maximum tickets allowed per period, or null if unlimited.

  • Name
    seats
    Type
    object
    Description

    Seat (team member) usage.

  • Name
    seats.used
    Type
    integer
    Description

    Number of members plus pending invitations that have not expired.

  • Name
    seats.limit
    Type
    integer | null
    Description

    Maximum seats allowed, or null if unlimited.

  • Name
    webhooks
    Type
    object
    Description

    Webhook configuration usage.

  • Name
    webhooks.used
    Type
    integer
    Description

    Number of configured webhooks, including inactive webhooks.

  • Name
    webhooks.limit
    Type
    integer | null
    Description

    Maximum webhooks allowed, or null if unlimited.

  • Name
    ai_credits
    Type
    object
    Description

    AI credit usage for the knowledge base chat feature.

  • Name
    ai_credits.used
    Type
    integer
    Description

    Number of AI credits consumed this period.

  • Name
    ai_credits.included
    Type
    integer
    Description

    AI credits included with your plan.

  • Name
    ai_credits.purchased
    Type
    integer
    Description

    Additional AI credits purchased.

  • Name
    ai_credits.remaining
    Type
    integer
    Description

    Remaining AI credits available.

  • Name
    ai_credits.overage_this_period
    Type
    integer
    Description

    AI credits used beyond your included allocation (charged separately).


GET/api/v1/billing/usage

Get current usage

Returns the current usage statistics for your organization. This includes tickets created this calendar month, seat count, webhook usage, and AI credit consumption.

Required scope: billing:read

Request

GET
/api/v1/billing/usage
curl https://api.supportstation.io/api/v1/billing/usage \
  -H "Authorization: Bearer {token}"

Response

{
  "data": {
    "period_start": "2025-01-01T00:00:00.000Z",
    "period_end": "2025-01-31T23:59:59.999Z",
    "tickets": {
      "used": 247,
      "limit": null
    },
    "seats": {
      "used": 5,
      "limit": 10
    },
    "webhooks": {
      "used": 3,
      "limit": null
    },
    "ai_credits": {
      "used": 1250,
      "included": 5000,
      "purchased": 0,
      "remaining": 3750,
      "overage_this_period": 0
    }
  }
}

Understanding AI Credits

The response reports the current credit ledger. Use included, purchased, used, and remaining to track the available credits. Plan limits and prices can change; check your dashboard for your current allocation and charges.

Monitoring usage

We recommend monitoring your AI credit usage regularly:

# Check AI credit status
curl https://api.supportstation.io/api/v1/billing/usage \
  -H "Authorization: Bearer {token}" \
  | jq '.data.ai_credits'

This returns:

{
  "used": 1250,
  "included": 5000,
  "purchased": 0,
  "remaining": 3750,
  "overage_this_period": 0
}

When remaining approaches zero, consider purchasing additional credits or upgrading your plan to avoid service interruption.

Was this page helpful?