auth

Operations about auths

Get current user

Returns information about the authenticated user, their current organization, and API key permissions. Use this endpoint to verify your authentication and understand your available API access levels.

SecuritybearerAuth
Responses
200

OK

Response Headers
X-Ratelimit-Limit-User
integer

Number of requests allowed per minute for the user

X-Ratelimit-Limit-User-Remaining
integer

Number of requests remaining for the user

X-Ratelimit-Limit-User-Reset
integer

Time in seconds before the limit resets for the user

X-Ratelimit-Limit-Org
integer

Number of requests allowed per month for the account

X-Ratelimit-Limit-Org-Remaining
integer

Number of requests remaining for the account

X-Ratelimit-Limit-Org-Reset
integer

Time in seconds before the limit resets for the account

Response Schema: application/json
required
object (Tenant)
id
required
integer <int64> [ 1 .. 9007199254740991 ]

The tenant's unique identifier

name
required
string

The name of the tenant

subdomain
required
string <hostname>

The tenant's subdomain under affinity.co

required
object (User)
id
required
integer <int64> [ 1 .. 9007199254740991 ]

The user's unique identifier

firstName
required
string

The user's first name

lastName
required
string or null

The user's last name

emailAddress
required
string <email>

The user's email address

required
object (Grant)
type
required
string

The type of grant used to authenticate

Enum: "api-key" "access-token"
scopes
required
Array of strings

The scopes available to the current grant

createdAt
required
string <date-time>

When the grant was created

404

Not Found

default

Errors

get/v2/auth/whoami
Request samples
Response samples
application/json
{
  • "grant": {
    },
  • "user": {
    },
  • "tenant": {
    }
}