Predict.aiDocs
Account

Profile

Who am I, and update your profile.

These routes read and manage the account behind the token. Like all account routes they take only the Authorization header — no X-Workspace-Id.

Who am I

The fastest sanity check for any credential: who is this token, and which workspaces can it see?

curl "$API_BASE/v1/user/me" \
  -H "Authorization: Bearer $TOKEN"
{
  "data": {
    "user": {
      "uid": "3f8a1c2e-…",
      "email": "[email protected]",
      "name": "Ada Lovelace",
      "system_role": null
    },
    "workspaces": [
      { "uid": "7d1f0c4a-…", "name": "Production", "role": "owner" },
      { "uid": "c2b91e6d-…", "name": "Staging", "role": "member" }
    ]
  }
}

workspaces lists every workspace you own or belong to, with your role in each — this is one way to find the X-Workspace-Id other sections need (the canonical route is GET /v1/workspace).

Update your profile

Send only the fields you're changing; unknown fields are ignored:

curl -X POST "$API_BASE/v1/user/update-profile" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Ada Lovelace",
    "timezone": "Europe/Stockholm",
    "country": "se"
  }'
{
  "data": {
    "user": {
      "uid": "3f8a1c2e-…",
      "email": "[email protected]",
      "name": "Ada Lovelace",
      "username": "ada",
      "timezone": "Europe/Stockholm",
      "avatar": "https://…/avatar.png",
      "profile_completed": true,
      "how_heard": "colleague",
      "purpose": "demand forecasting",
      "user_type": "data_scientist",
      "country": "SE",
      "home_region": null
    }
  }
}
FieldMeaning
name / username / avatar optionalDisplay identity.
timezone optionalIANA timezone, e.g. Europe/Stockholm.
country optionalISO-3166 alpha-2 code — normalized to uppercase; an empty string clears it.
home_region optionalDefault region for new workspaces.
how_heard / purpose / user_type optionalOnboarding metadata.

Email can't be changed here; it's your sign-in identity. The first successful update also flips profile_completed to true.

Errors

StatusWhyExample message
400Empty body"No data provided"
500Nothing in the body matched an updatable field"Failed to update profile"

On this page