Users
Current user profile, partial updates, and push-token registration.
All endpoints operate on the authenticated user (me is implicit — the session token identifies the user).
Source: apps/api/src/routes/client/users.ts.
Endpoints
| Method | Path | Description |
|---|---|---|
| GET | /client/users/me | Current user profile. |
| PATCH | /client/users/me | Update display_name, avatar_url, and/or properties. |
| POST | /client/users/me/push-token | Register a push token (upsert on token). |
| DELETE | /client/users/me/push-token | Mark a token inactive. |
GET /client/users/me
Response 200
Errors
404 NOT_FOUND.500 FETCH_FAILED.
Try it:
GET
client auth/client/users/mecurl -X GET 'https://api.amba.dev/client/users/me'Loading auth… Configure auth in the settings drawer (top-right) to run this request.
Curl:
PATCH /client/users/me
Only these keys are honored: display_name, avatar_url, properties. Other keys are silently ignored.
Request
Response 200
Updated user row (same shape as GET /me).
Errors
400 INVALID_INPUT— no updatable fields provided.404 NOT_FOUND.500 UPDATE_FAILED.
Try it:
PATCH
client auth/client/users/mecurl -X PATCH 'https://api.amba.dev/client/users/me' \
-H 'Content-Type: application/json' \
-d '{
"display_name": "Ada",
"properties": {
"theme": "dark"
}
}'Loading auth… Configure auth in the settings drawer (top-right) to run this request.
Curl:
POST /client/users/me/push-token
Register a device push token. Upsert by token — re-registering the same device token updates app_user_id, platform, and reactivates it.
Request
| Field | Type | Required |
|---|---|---|
token | string | yes |
platform | "ios" | "android" | yes |
provider is derived automatically (ios → apns, android → fcm).
Response 200
Errors
500 REGISTER_FAILED.
Try it:
POST
client auth/client/users/me/push-tokencurl -X POST 'https://api.amba.dev/client/users/me/push-token'Loading auth… Configure auth in the settings drawer (top-right) to run this request.
Curl:
DELETE /client/users/me/push-token
Soft-delete: sets is_active = false.
Request
| Field | Type | Required |
|---|---|---|
token | string | yes |
Response 200
Errors
500 UNREGISTER_FAILED.
Try it:
DELETE
client auth/client/users/me/push-tokencurl -X DELETE 'https://api.amba.dev/client/users/me/push-token'Loading auth… Configure auth in the settings drawer (top-right) to run this request.
Curl: