/api/v1/credentialDescribe the calling credential
Returns what the credential making this request is: how it was issued, whether it acts for the whole account or for one team, the id of that team when it has one, and the scopes in force. Call this first when a request is refused, to see what this credential may actually do — the scopes listed are the ones enforced, which can be narrower than the set the credential was issued with. Requires no scope, so it answers whatever the caller holds; it reports only the caller's own grant and never the account behind it, so the team is an id and nothing more. Use getTeam for the team name and slug, and getMe for the account profile, which a team-scoped API key cannot reach.
Request
curl "https://nextjs-saas-template.lubomirgeorgiev.com/api/v1/credential" \
-H "Authorization: Bearer $API_KEY"Response
application/json objectkindstringRequiredaudiencestringRequiredteamobjectRequirednullableteam.idstringRequiredscopesstring[]Required{
"kind": "api-key",
"audience": "personal",
"team": {
"id": "string"
},
"scopes": [
"string"
]
}Error responses400401403404429Expand
Every failure is an RFC 9457 problem document whose code is stable and untranslated.
- 400
- The request body, query, or path failed validation.
- 401
- The credential is missing, malformed, expired, or revoked.
- 403
- The credential lacks the required scope or the caller lacks the team permission.
- 404
- The addressed resource does not exist or is not visible to this credential.
- 429
- Rate limit exceeded; retry after the number of seconds in `retry-after`. The `RateLimit-*` headers describe the exhausted bucket.