# GET /v1/whoami

Which key and project am I calling as. The health check to run when wiring up a new consumer — it costs nothing upstream.

## Request

```bash
curl "https://tikdata.io/v1/whoami" \
  -H "Authorization: Bearer thr_live_xxx"
```

No parameters.

## Response — 200

```json
{
  "keyId": "rk_1630e4b68fd5",
  "label": "market bubble site",
  "project": "market-bubble",
  "scopes": null,
  "createdAt": "2026-09-07T21:16:26.000Z",
  "lastUsedAt": "2026-09-08T14:02:11.000Z",
  "requestCount": 10527
}
```

| field | type | notes |
|---|---|---|
| `keyId` | string | `rk_` + 12 hex; the id used by `/v1/keys` and `/v1/usage` |
| `label` | string | human name given at creation |
| `project` | string | the attribution bucket every call from this key lands in |
| `scopes` | string[] \| null | upstream path prefixes this key may reach via `/v1/raw`; `null` = unrestricted |
| `createdAt` | ISO 8601 | |
| `lastUsedAt` | ISO 8601 \| null | best-effort, updated after each billable call |
| `requestCount` | integer | lifetime billable calls through this key |

## Errors

401 for a missing, unknown or disabled key — see [authentication](/docs/authentication.md).

## Notes

- Not billed and not counted toward usage.
- `requestCount` and `lastUsedAt` are stamped after the response is sent, so a `whoami` immediately following a call may lag by a second.
