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"from predictai import PredictAI
client = PredictAI(token="pa_live_…")
data = client.account.get_user_me()
import { PredictAI } from "@predictai/sdk";
const client = new PredictAI({ token: "pa_live_…" });
const data = await client.account.getUserMe();
{
"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"
}'from predictai import PredictAI
client = PredictAI(token="pa_live_…")
data = client.account.post_user_update_profile(json={
"name": "Ada Lovelace",
"timezone": "Europe/Stockholm",
"country": "se",
})
import { PredictAI } from "@predictai/sdk";
const client = new PredictAI({ token: "pa_live_…" });
const data = await client.account.postUserUpdateProfile({
json: {
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
}
}
}| Field | Meaning |
|---|---|
name / username / avatar optional | Display identity. |
timezone optional | IANA timezone, e.g. Europe/Stockholm. |
country optional | ISO-3166 alpha-2 code — normalized to uppercase; an empty string clears it. |
home_region optional | Default region for new workspaces. |
how_heard / purpose / user_type optional | Onboarding metadata. |
Email can't be changed here; it's your sign-in identity. The
first successful update also flips profile_completed to true.
Errors
| Status | Why | Example message |
|---|---|---|
400 | Empty body | "No data provided" |
500 | Nothing in the body matched an updatable field | "Failed to update profile" |

