Usage

List credit usage line items

GET/v1/integration/platform/usage/events/page

Every AI Interview that used a credit in the period, oldest first, for reconciling with your own records. 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

  • companyIdstring

    Only this client’s interviews.

    at least 1 characters · at most 64 characters

  • limitstring

    How many results to return, from 1 to 100. Defaults to 25.

  • cursorstring

    The `nextCursor` of the previous page. Leave it out for the first page.

    at least 1 characters · at most 2048 characters

Response body

  • dataobject[]required

    The results on this page.

    Show fields
    • usageIdintegerrequired

      The line item id.

    • companyIdstringrequired

      The client’s Company ID.

    • jobIdintegerrequired

      Alfa's id for the job.

    • externalJobIdstring | nullrequired

      Your ATS job id.

    • candidateIdstringrequired

      Alfa's id for the candidate.

    • externalCandidateIdstring | nullrequired

      Your candidate id, for applicants you sent.

    • creditsintegerrequired

      Credits used.

    • durationSecondsinteger | nullrequired

      How long the interview lasted.

    • occurredAtstringrequired

      When the interview finished.

  • nextCursorstring | nullrequired

    Pass as `cursor` to read the next page; null on the last page.

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