Who Am I
const url = 'https://example.com/v1/whoami';const options = {method: 'GET', headers: {'X-API-Key': '<X-API-Key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/v1/whoami \ --header 'X-API-Key: <X-API-Key>'The account and workspace this request acts in, the person it acts as and their role in that workspace, and the API key it used.
Without X-Qualia-Workspace the workspace is the key’s own (for a
signed-in user, the account’s default). Any valid key may ask; no scope is
needed. An SDK client with a key and no configured account uses this
account_id.
Authorizations
Section titled “Authorizations ”Responses
Section titled “ Responses ”The bound account, workspace and key
The caller, as this request was bound.
object
The bound account
The account’s name
Personal or organization (the platform’s account type)
The bound workspace
The workspace’s name
The person it acts as: for an API key, its creator
That person’s username
That person’s role in the bound workspace (an API key’s scopes cap what it may do with it); null when it could not be read
The API key, or null for a signed-in user
object
The key’s name
The key’s first 12 characters, as the dashboard lists it
Organization: every workspace of the account its creator can reach; workspace: only the workspace that owns it; restricted: a custom workspace or repository allowlist
Granted permissions
Workspaces the key is restricted to; empty means no restriction
Expiry, ISO 8601
Example
{ "role": "viewer", "principal": "api_key", "key": { "scope": "organization" }}Invalid or missing API key
Standard error response.
object
Error message describing what went wrong
Example generated
{ "detail": "example"}The named workspace is not readable
Standard error response.
object
Error message describing what went wrong
Example generated
{ "detail": "example"}