Sign in

API reference

This key

GET/v1/key

Which key this is, what it may do, and when it ends: a health check for your integration. Any key may call it.

curl --fail-with-body -sS https://<workspace>.nightlab.io/v1/key \
  -H "Authorization: Bearer $NIGHTLAB_API_KEY"

The answer

200 with the key’s name, its hint (its first characters, never the key), its scopes, its projects (empty: every project) and expires_at. A 401 means the key is unknown, revoked or expired.

200 OK

{
  "name": "CI on acme/shop",
  "hint": "nlk_live_ab12",
  "scopes": [
    "runs:read",
    "runs:write"
  ],
  "projects": [
    "shop"
  ],
  "expires_at": "2027-01-30T10:00:00Z"
}