Auth

Introspect the credential

The workspace this credential acts on, how the request authenticated (an API key, an OAuth access token from an MCP sign-in, or the dashboard session), whether it may write, and for a key its id and expiry. Run it first: a read key answers 403 read_only_key on every write, and a wrong workspace is the classic scripting mistake.

GET
/v1/whoami
AuthorizationBearer <token>

API key minted via POST /v1/api-keys (format mk_live_...)

In: header

Response Body

application/json

application/json

curl -X GET "https://api.mentio.dev/v1/whoami"
{
  "workspace": {
    "id": "string",
    "name": "string"
  },
  "auth": {
    "kind": "api_key",
    "scope": "read",
    "apiKeyId": "string",
    "expiresAt": "string"
  },
  "user": {
    "id": "string",
    "email": "string",
    "name": "string"
  }
}
{
  "error": {
    "code": "unauthorized",
    "message": "string",
    "requestId": "string",
    "retryAfterSeconds": 0
  }
}