Credit Consumption

Get Daily Credit Usage

Changed on

Retrieve daily API and UI credit consumption for your team, by charge date. Set group_by=search_pattern to group each day's credits by search patterns with the same stable filters. Charges without a search pattern appear as Other usage. Filter by types, exact endpoint path, origin, API key or search_pattern_key. Each group includes observed endpoints and origins. Choose exactly one group_by dimension: search_pattern, endpoint or origin. Omit it for daily totals. endpoints and origins are independent multiselect filters (OR within each, AND between them). Unfiltered grouped totals include all credits.

get/v0/teams/credits_consumption

Request

  • Base URL
    https://api.theirstack.com
  • URL
    https://api.theirstack.com/v0/teams/credits_consumption
  • Auth
    HTTP bearer

Query parameters

start_datetimestring date-time nullable

Start datetime in ISO format (e.g., 2023-01-01T00:00:00)

end_datetimestring date-time nullable

End datetime in ISO format (e.g., 2023-01-01T23:59:59)

group_by'search_pattern' | 'endpoint' | 'origin' nullable
search_pattern_keystring nullable

Only charges associated with this canonical search pattern.

is_origin_appboolean nullable
origin'api' | 'app' | 'web' | 'mcp' | 'admin_mcp'
api_key_idstring uuid nullable
typesRequestType[] nullable

Filter by search type.

endpointsstring[] nullable

Match any exact request URL path; unassigned selects charges without a recorded endpoint. Intersects the singular endpoint filter.

status_codesinteger[] nullable

Match any HTTP response status code.

endpointstring nullable

Exact request URL path, e.g. /v1/jobs/search; host and query string are ignored.

timezonestring

IANA timezone, such as Europe/Madrid.

Response

Successful Response

group_keystring nullable

Key of the selected grouping dimension: search pattern hash, endpoint path or origin.

group_namestring nullable

Display name for the selected grouping dimension.

search_pattern_filtersobject nullable

Canonical identity filters when grouped by search pattern.

endpointsstring[]

Distinct request URL paths without host/query; unassigned marks missing paths.

originsstring[]

Recorded request origins, webhook only when a webhook event is linked, or unassigned when attribution is missing.

period_startstring date-time required

Start of the period.

api_credits_consumedinteger required

Number of API credits consumed.

ui_credits_consumedinteger required

Number of UI credits consumed.

search_type'jobs' | 'companies' | 'technologies' nullable

Search type when grouped by search pattern; null for other usage.

search_pattern_keystring nullable

Stable search pattern key when grouped by search pattern.

search_pattern_namestring nullable

Search summary naming this search pattern.

Changes

    • breaking

      removed the enum value campaign from the property anyOf[subschema #1]/ of the query request parameter group_by

    • warning

      deleted the query request parameter campaign_key

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • info

      added the new optional query request parameter search_pattern_key

    • info

      added the enum value search_pattern to the property anyOf[subschema #1]/ of the query request parameter group_by

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the new optional query request parameter api_key_id

    • info

      added the new optional query request parameter campaign_key

    • info

      added the new optional query request parameter endpoint

    • info

      added the new optional query request parameter endpoints

    • info

      added the new optional query request parameter group_by

    • info

      added the new optional query request parameter is_origin_app

    • info

      added the new optional query request parameter origin

    • info

      added the new optional query request parameter origins

    • info

      added the new optional query request parameter status_codes

    • info

      added the new optional query request parameter types

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status