API reference · v1
Meta
Identify the calling API key.
Identify the calling API key
GET
/v1/meReturns the key metadata, its owning user, the bound space (if any), and the caller's role. Works for space-unbound keys, in which case space and role are null. For an OAuth access token, oauth names the resource it was issued for, its granted scopes and its expiry.
Request
curl --fail-with-body 'https://api.maxclicks.ai/v1/me' \
-H "Authorization: Bearer $MAXCLICKS_API_KEY"Response
{
"data": {
"apiKey": {
"id": "max_BcwDvBUeSaSDILA5tHgpmU7I",
"name": "string",
"keyDisplay": "string",
"createdAt": "2025-01-15T10:30:00.000Z"
},
"user": {
"id": "usr_BcwDvBUeSaSDILA5tHgpmU7I",
"email": "[email protected]",
"name": "string"
},
"space": {
"id": "spc_BcwDvBUeSaSDILA5tHgpmU7I",
"slug": "string",
"name": "string"
},
"role": {
"name": "admin",
"label": "string",
"description": "string"
},
"oauth": {
"clientId": "string",
"resource": "https://example.com",
"scopes": [
"read"
],
"expiresAt": "2025-01-15T10:30:00.000Z"
}
},
"warnings": []
}Status codes
- 200The identity of the calling key.
- 401The credential is missing or invalid:
invalid_api_keyfor an API key,invalid_access_tokenfor an expired or revoked OAuth access token. TheWWW-Authenticateheader names the resource metadata, from which an OAuth client finds the authorization server. - 429A request rate or capacity limit was reached. Follow the error code and Retry-After; a capacity refusal can follow durable preparation.
- 500The API failed to process a valid request.
Working with these endpoints? See error handling, safe retries, client library guides, and the complete OpenAPI schema.