مرجع API · Auth & profile
Update profile
patch
/me| احراز هویت | توکن مشتری (Bearer) |
|---|---|
| سطح دسترسی | کاربر رایگان · کاربر حرفهای Customer token (Bearer) — free and paid users |
Changes the panel language or the display name.
بدنه درخواست
| فیلد | نوع | توضیح |
|---|---|---|
locale | string ("fa", "en") | fa | en |
name | string | null |
نمونهjson
{
"locale": "fa",
"name": "عرفان"
}
پاسخها
200 — Me
| فیلد | نوع | توضیح |
|---|---|---|
id* | integer | Unique ID. |
email* | string | null | Email address. |
phone* | string | null | Mobile number. |
phone_verified* | boolean | |
sms_notifications* | boolean | |
name* | string | null | |
locale* | string ("en", "fa") | Language: fa or en. |
plan* | string ("paid", "free") | Plan: free (Free) or paid (Pro). |
billing_period* | string | null | |
plan_expires_at* | string | null | |
onboarding_step* | integer | |
onboarding_completed* | boolean | |
referral_code* | string | |
limits* | any[] | Limits of the account's plan. |
brand* | object | null | |
brand.id* | integer | Unique ID. |
brand.name* | string | null | |
brand.domain* | string | null | Site domain. |
brand.initial* | string | |
gaps_count* | integer | null | |
last_run* | object | null | |
last_run.id* | integer | Unique ID. |
last_run.kind* | string | |
last_run.status* | string | Current status. |
last_run.engines* | any[] | AI assistants included. |
last_run.started_at* | string | null | When it started (ISO 8601). |
last_run.finished_at* | string | null | When it finished (ISO 8601). |
last_run.done* | integer | |
last_run.total* | integer | |
next_run_at* | string | null | |
run_frequency* | string | null ("weekly", "monthly", null) | R1 plan widget: the schedule the user chose in S4 (the plan's allowed value, as RunService schedules it). |
queue* | array | null | |
notify_requested* | boolean | Sidebar plan widget «On the Pro list»: «Notify me» pressed (C2 or /signup?notify=pro) and not answered yet. |
run_issue* | object | null | The latest run failed: automatic retry state for the app shell banner (RunService::issue; null otherwise). |
run_issue.state* | string ("retrying", "stopped") | |
run_issue.attempts* | integer | |
run_issue.max_retries* | integer | |
run_issue.has_report* | boolean | |
run_issue.next_retry_at* | string | null | |
run_issue.next_run_at* | string | null | |
run_issue.message* | string | Human-readable message in the request language. |
json
{
"id": 0,
"email": "",
"phone": "",
"phone_verified": false,
"sms_notifications": false,
"name": "",
"locale": "en",
"plan": "paid",
"billing_period": "",
"plan_expires_at": "",
"onboarding_step": 0,
"onboarding_completed": false,
"referral_code": "",
"limits": [
null
],
"brand": {
"id": 0,
"name": "",
"domain": "",
"initial": ""
},
"gaps_count": 0,
"last_run": {
"id": 0,
"kind": "",
"status": "",
"engines": [
null
],
"started_at": "",
"finished_at": "",
"done": 0,
"total": 0
},
"next_run_at": "",
"run_frequency": "weekly",
"queue": [
null
],
"notify_requested": false,
"run_issue": {
"state": "retrying",
"attempts": 0,
"max_retries": 3,
"has_report": false,
"next_retry_at": "",
"next_run_at": "",
"message": ""
}
}
401 — Missing/invalid token, or a token of the wrong owner (admin token on a user route or vice versa): {"message":"…","code":"unauthenticated"} (message in the request language)
| فیلد | نوع |
|---|---|
message* | string |
code | string |
json
{
"message": "Please sign in to continue; your session has ended or is not valid.",
"code": "unauthenticated"
}
422 — Validation failed (locale, name)
| فیلد | نوع |
|---|---|
message* | string |
errors* | object |
json
{
"message": "",
"errors": {
"email": [
"ایمیل معتبر نیست."
]
}
}
نمونهٔ curl
bash
curl -X PATCH 'http://127.0.0.1:8010/api/me' \
-H 'Accept: application/json' \
-H "Authorization: Bearer $RAWI_USER_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"locale": "fa",
"name": "عرفان"
}'