Usage

Get a client's credit usage

GET/v1/integration/usage

The credits the client named in `Alfa-Company-Id` used in a period, by job. Only for clients your platform created. Requires an API key with the `usage:read` scope.

Requires an Alfa API key as a bearer token. How API keys work

Query parameters

  • fromstring

    The start of the period. Defaults to the start of the current month (UTC).

    format date-time

  • tostring

    The end of the period, excluded. Defaults to now.

    format date-time

Headers

  • Alfa-Company-Idstring

    The Company ID of the company to act for. Required with a platform key, and that company must have authorized your platform; a company key acts for its own company and can leave it out.

Response body

  • companyIdstringrequired

    The client’s Company ID.

  • fromstringrequired

    The start of the period.

  • tostringrequired

    The end of the period, excluded.

  • usedintegerrequired

    Credits the client used in the period.

  • jobsobject[]required

    Usage by job in the period, highest first.

    Show fields
    • jobIdintegerrequired

      Alfa's id for the job.

    • externalJobIdstring | nullrequired

      Your ATS job id.

    • titlestring | nullrequired

      The job title.

    • usedintegerrequired

      Credits used on the job in the period.

    • interviewsintegerrequired

      AI Interviews in the period.

Responses

  • 200Success.
  • 400The request is malformed: invalid JSON, an unexpected body or an unknown query parameter. Problem details
  • 401The bearer token is missing, expired or invalid. Problem details
  • 403The caller may not perform this operation, or has no active organisation. Problem details
  • 404The resource does not exist or is not visible to the caller. Problem details
  • 422The request failed validation; `errors` lists each invalid field. Problem details
  • 429Too many requests, or the AI service is busy. Retry after a short wait. Problem details
  • 500An unexpected error. Quote the `correlationId` to support. Problem details