مرجع API · Auth & profile
Get current user
get
/me| احراز هویت | توکن مشتری (Bearer) |
|---|---|
| سطح دسترسی | کاربر رایگان · کاربر حرفهای Customer token (Bearer) — free and paid users |
Account (email may be null for phone-only accounts; phone = verified mobile in E.164 or null, phone_verified, sms_notifications), plan, limits, brand, last run, next run, run_frequency (the schedule chosen in the app: weekly|monthly, monthly when the plan does not allow weekly; null before a brand exists; shown in the sidebar plan widget), free-queue position and notify_requested (pressed «Notify me» for Pro and not told yet: the sidebar widget says “On the Pro list”). The frontend routes users by onboarding_step (2..8 = next O-step, 9 = finished).
پاسخها
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* | object | Limits of the account's plan. |
limits.engines | string[] | AI assistants included. |
limits.questions | integer | |
limits.products | integer | |
limits.customers | integer | |
limits.cells | integer | |
limits.changes_per_month | integer | |
limits.run_frequencies | string[] | |
limits.discovered_limit | integer | |
limits.citations_full | boolean | |
limits.all_runs | boolean | |
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": 1,
"email": "demo@rawi.local",
"phone": "+989120000077",
"phone_verified": true,
"sms_notifications": true,
"name": "عرفان",
"locale": "fa",
"plan": "free",
"billing_period": null,
"plan_expires_at": null,
"onboarding_step": 9,
"onboarding_completed": true,
"referral_code": "wth1ftkn",
"limits": {
"engines": [
"chatgpt"
],
"questions": 10,
"products": 1,
"customers": 1,
"cells": 1,
"changes_per_month": 2,
"run_frequencies": [
"monthly"
],
"discovered_limit": 10,
"citations_full": false,
"all_runs": false
},
"brand": {
"id": 40,
"name": "آوند",
"domain": "avand.example",
"initial": "آ"
},
"gaps_count": 2,
"last_run": {
"id": 38,
"kind": "scheduled",
"status": "complete",
"engines": [
"chatgpt"
],
"started_at": "2026-11-25T10:16:00Z",
"finished_at": "2026-11-25T10:30:00Z",
"done": 10,
"total": 10
},
"next_run_at": "2026-12-25T10:30:00Z",
"queue": null
}
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"
}
نمونهٔ curl
bash
curl -X GET 'http://127.0.0.1:8010/api/me' \
-H 'Accept: application/json' \
-H "Authorization: Bearer $RAWI_USER_TOKEN"