Credit activity logs and analytics. Proxies to the NinjaHire dashboard API. Callers must pass tenant_id in the request body.
List customer credit balances
Returns credit balances for every customer (sub-tenant) of the authenticated API-key tenant — that is, every tenant whose parent_tenant_id matches the tenant resolved from the API key. Customers without an active subscription are returned with zeroed credits.
Headers
Authorizationstring · requiredBearer JWT for upstream dashboard auth.
Responses
Fetch credit activity logs
Return paginated credit activity logs for a tenant within a date range. tenant_id is required in the body (not taken from the auth token). Optional filters: attributes, jobIds; optional sortBy/sortOrder.
Authentication: Pass a Bearer token in the Authorization header.
Headers
Authorizationstring · requiredBearer JWT for upstream dashboard auth.
Request Body
tenant_idstring · uuid · requiredTenant UUID to query. Required; not derived from the API key / JWT.
startDatestring · date · requiredRange start (ISO date).
endDatestring · date · requiredRange end (ISO date).
pageinteger · min: 1Default: 1pageSizeinteger · min: 1 · max: 100Default: 50attributesstring[]Optional attribute filter.
jobIdsstring[]Optional job ID filter.
sortBystring · enumEnum values:created_atunitsattributeDefault: created_atsortOrderstring · enumEnum values:ascdescDefault: desc
Responses
Credit activity logs returned successfully
rowsobject[]Activity rows for the requested page, ordered by sortBy/sortOrder. Empty array when nothing matches the filters.
total_countintegerTotal matching rows across the whole date range.
total_creditsnumberSum of
unitsacross all matching rows in the date range.total_pagesintegerNumber of pages at the requested pageSize. 0 when there are no matching rows.
pageintegerEcho of the resolved page number (clamped to >= 1).
page_sizeintegerEcho of the resolved page size (clamped to 1–100).
has_nextbooleanTrue when a further page exists.
has_prevbooleanTrue when an earlier page exists.
Fetch credit activity analytics
Get your credit catalog
Returns the credit catalog the API key's tenant is billed against: every attribute of the tenant's active plan version with its description, unit, price, credits per unit and whether the tenant may use it. The tenant always comes from the API key. Not billed.
Headers
Authorizationstring · requiredThe
Authorizationheader is used to authenticate with the API using your API key. Value is of the formatBearer YOUR_KEY_HERE.
Responses
Tenant credit catalog
tenant_idstring · uuidversionintegerCatalog version of the tenant's active plan
summaryobjectattributesobject[]
