Skip to content

Who the caller is signed in as, and what they can act on.

GET
/auth/me
curl --request GET \
--url http://localhost:3001/auth/me \
--header 'Authorization: Bearer <token>'

Reuses handlers::list_portfolios’s exact query shape rather than a widened or narrowed one, so /auth/me’s notion of “granted portfolios” can never drift from /portfolios’s.

OK

Media typeapplication/json

The signed-in principal plus its granted portfolios — the shape a front end needs to render itself without a second round trip.

object
code
required
string
display_name
string
nullable
portfolios
required
Array<object>

One portfolio the caller is entitled to, with the entitlement itself.

The flags are returned rather than filtered on, so a client can grey out what it cannot do instead of discovering it from a 403 mid-order.

object
base_currency
string
nullable
can_allocate
required
boolean
can_trade
required
boolean
can_view
required
boolean
code
required
string
name
required
string
portfolio_id
required
string
status
required
string
principal_id
required
string

Example generated

{
"code": "example",
"display_name": "example",
"portfolios": [
{
"base_currency": "example",
"can_allocate": true,
"can_trade": true,
"can_view": true,
"code": "example",
"name": "example",
"portfolio_id": "example",
"status": "example"
}
],
"principal_id": "example"
}

Not authenticated