User

Get the current user

get/v1/user/current

Returns the profile and organisation details for the authenticated caller.

Returns

idstring
Unique user identifier.
emailstring
User's email address.
organisationOrganisation | null
Organisation the user belongs to, or null if the user is not a member of one.

Error codes

401Unauthorized
Missing or invalid bearer token.
GET /v1/user/current
curl "https://api.v2.pd4castr.com.au/v1/user/current" \
  -H "Authorization: Bearer $PD4CASTR_TOKEN"
Response
{
  "id": "user_a1b2c3d4",
  "email": "forecaster@acme.com.au",
  "organisation": {
    "id": "org_b2c3d4e5",
    "displayName": "Acme Energy",
    "slug": "acme-energy",
    "domains": [
      "acme.com.au"
    ],
    "permissions": [
      "models.publish",
      "models.run"
    ]
  }
}