Skip to main content
GET
/
v2
/
auth
/
whoami
Get current user
curl --request GET \
  --url https://api.affinity.co/v2/auth/whoami \
  --header 'Authorization: Bearer <token>'
{
  "grant": {
    "createdAt": "2023-01-01T00:00:00Z",
    "scopes": [
      "api"
    ],
    "type": "api-key"
  },
  "user": {
    "firstName": "John",
    "lastName": "Smith",
    "emailAddress": "john.smith@contoso.com",
    "id": 1
  },
  "tenant": {
    "name": "Contoso Ltd.",
    "subdomain": "contoso",
    "id": 1
  }
}

Documentation Index

Fetch the complete documentation index at: https://developer.affinity.co/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Response

OK

WhoAmI model

tenant
Tenant · object
required
user
User · object
required
grant
Grant · object
required