BillKit/DocsConsole
Meta

Check a key

Confirms a key authenticates and reports which account and mode it resolves to. The one route that needs no scope, and the cheapest way to tell a live key from a test one.

GET/v1/ping
Operation ping·OpenAPI v1.1.0

Parameters

This endpoint takes no parameters.

Returns

tenant_id, the account the key belongs to; mode, either test or live; and object, always ping. Nothing is written and nothing is charged.

The mode comes from the key’s own prefix, so this is how you confirm which set of data a deployment is pointed at without creating anything to look at. A bk_test_ key can only ever answer "mode": "test".

Every other route needs exactly one scope. This one needs none, so it answers for a key narrowed to a single resource as readily as for a full-access one, which is what makes it a usable health check for a key you did not mint yourself.

A 401 here means the key is wrong, revoked or malformed, and no other call will work either. See Authentication for which of the three, by code.

Test it

Run it first, before anything else in the quickstart. If it answers, the key, the base URL and your network path are all good, and any later failure is about the call you made rather than about how you are reaching the API.

Errors

StatusCause
400The request was refused (type: invalid_request_error): a required parameter is missing (parameter_missing), one failed validation (parameter_invalid) or is not one the operation takes (parameter_unknown), and param names it.
401No credential, or one that does not authenticate.
402The account is suspended (tenant_suspended), or the payment provider refused a charge or refund the call made (type: payment_error, code: payment_refused).
403Authenticated, but not allowed: missing scope (insufficient_scope), a key of the wrong mode (mode_mismatch), or a refused origin.
404No such object in this account and mode.
429Rate limited. Retry-After says when to try again.
500Something failed on BillKit's side (type: api_error). Retry with the same Idempotency-Key.
503Temporarily unable to serve. reason says whether the request was attempted.
Request · curl
curl -X GET https://api.billkit.eu/v1/ping \
  -H "Authorization: Bearer $BILLKIT_API_KEY"
Response · 200 OK
{
  "mode": "live",
  "object": "ping",
  "tenant_id": "tenant_9XKp2vQ1"
}