cirrux

User profile API

Read who the request is acting as: the signed-in user and the workspace the token belongs to. This is the endpoint to call right after an OAuth exchange to learn the account you were granted access to. It lives under https://api.cirrux.co/public_api/v1/user.

The user object is only present for a user-scoped OAuth token — a workspace API key has no signed-in user, so the response carries only workspace.

The user object

FieldTypeRequiredDescription
objectstringnoAlways user.
uuidstringnoUnique identifier of the user.
usernamestringnoThe user’s login handle.
first_namestring | nullnoGiven name, when set.
last_namestring | nullnoFamily name, when set.
profile_image_urlstring | nullnoPublic URL of the user’s profile image at full resolution (512×512), or null when they have none.
profile_image_thumbnail_urlstring | nullnoPublic URL of a small square thumbnail (80×80) of the same image, or null. Use this for avatars in lists and menus.

The workspace object

FieldTypeRequiredDescription
objectstringnoAlways workspace.
uuidstringnoUnique identifier of the workspace.
namestringnoDisplay name of the workspace.
typestringnoWhat kind of workspace this is: personal (a single-person workspace), organization (a team with multiple members) or system (an internal Cirrux workspace).

Endpoint

Get the current profile

GET/v1/user/profile

Returns the authenticated user (omitted for API-key auth) and their workspace. Scope user.profile.

curl https://api.cirrux.co/public_api/v1/user/profile \
  -H "Authorization: Bearer $CIRRUX_TOKEN"
{
  "user": {
    "object": "user",
    "uuid": "a1d9e7c8-2222-4a2b-8c3d-000000000001",
    "username": "ada",
    "first_name": "Ada",
    "last_name": "Lovelace",
    "profile_image_url": "https://…/512_normal.jpg",
    "profile_image_thumbnail_url": "https://…/80_crop.jpg"
  },
  "workspace": {
    "object": "workspace",
    "uuid": "b3f1c2a4-3333-4a2b-8c3d-000000000002",
    "name": "Analytical Engines",
    "type": "organization"
  }
}

API-key auth

Called with a workspace API key, the same endpoint returns only the workspace— there is no signed-in user to describe.

{
  "workspace": {
    "object": "workspace",
    "uuid": "b3f1c2a4-3333-4a2b-8c3d-000000000002",
    "name": "Analytical Engines",
    "type": "organization"
  }
}