Skip to Content
Docs
ReferenceRead

Who am I

POST
/whoami

Returns the awen user and the awen organisation this connection works in, what the connection may do, the organisation's plan, and the usage the user sees in awen. usage is null where the organisation hides it from members. plan or usage is null when awen can't read it right now. usage does not say whether a given request fits.

Needs a key with any access. Costs 2 units of the key's rate limit.

Authorization

apiKey
headerAuthorizationBearer <token>

An API key from Settings → Connected apps → API keys, sent as Authorization: Bearer awen_sk_…. Keep it on a server: a request from a web page is refused.

Request Body

application/json
  1. body

Response Body

The operation's answer.

application/json
  1. response
id*string
user*
organisation*
scopes*array<>
plan*|null
usage*|null
Example Request
curl -X POST 'https://app.awen.ai/api/v1/whoami' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "id": "string",  "user": {    "id": "string",    "name": "string",    "email": "string"  },  "organisation": {    "id": "string",    "name": "string"  },  "scopes": [    "awen:read"  ],  "plan": {    "name": "string"  },  "usage": {    "kind": "remaining",    "percent_left": 0,    "left_usd": 0,    "text": "string"  }}