Users
List, create, update and block the people who sign in to your app, and reset their passwords.
These endpoints work with your app's users: the people who sign in to the app you built. They are available when sign-in is turned on for the app.
What a user looks like#
| Field | Type | Notes |
|---|---|---|
id | number | The user's id. |
email | string | Required when you create a user. |
full_name | string | |
phone | string | |
avatar_url | string | |
role | number | A role id. See Roles. |
is_active | boolean | false when the user is blocked. |
last_login_at | datetime | |
created_at | datetime | |
extra | object | The custom user fields your app defines. |
Custom user fields live inside extra, both when you read a user and when you write one.
Roles#
When your app uses roles, role holds a role id. The API tab of your app lists the ids together with their names.
List users#
/users| Query | Notes |
|---|---|
search | Matches email or name. |
role | A role id. |
active | true for active users, false for blocked ones. |
sort | created_at, last_login_at, email, full_name or role. Put - in front for descending order. |
page | Starts at 1. |
limit | Users per page. |
curl "https://apipublic.yeshbe.com/api/v1/users?page=1&limit=50&active=true&sort=-created_at" \ -H "Authorization: Bearer $YESHBE_APP_KEY"const data = awaitapi("/users?page=1&limit=50&active=true&sort=-created_at");data = api("/users?page=1&limit=50&active=true&sort=-created_at")var res = await client.GetStringAsync("users?page=1&limit=50&active=true&sort=-created_at");{"success":true,"data":{"items":[{"id":42,"email":"dana@example.com","full_name":"Dana Levi","phone":"0501234567","avatar_url":null,"role":1,"is_active":true,"last_login_at":"2026-01-14T09:20:00Z","created_at":"2025-11-02T11:04:00Z","extra":{}}],"page":1,"limit":50,"total":128,"pages":3}}Get a user#
/users/{id}curl "https://apipublic.yeshbe.com/api/v1/users/42" \ -H "Authorization: Bearer $YESHBE_APP_KEY"const data = awaitapi("/users/42");data = api("/users/42")var res = await client.GetStringAsync("users/42");The response holds one user, in the same shape as an item in the list.
Create a user#
/userscurl -X POST "https://apipublic.yeshbe.com/api/v1/users" \ -H "Authorization: Bearer $YESHBE_APP_KEY" \ -H "Content-Type: application/json" \ -d '{"email":"dana@example.com","password":"a-strong-password","full_name":"Dana Levi","phone":"0501234567","role":1}'const data = awaitapi("/users", { method: "POST", body: JSON.stringify({ "email": "dana@example.com", "password": "a-strong-password", "full_name": "Dana Levi", "phone": "0501234567", "role": 1 }) });data = api("/users", method="POST", body={"email": "dana@example.com", "password": "a-strong-password", "full_name": "Dana Levi", "phone": "0501234567", "role": 1})var body = new StringContent( @"{""email"":""dana@example.com"",""password"":""a-strong-password"",""full_name"":""Dana Levi"",""phone"":""0501234567"",""role"":1}", Encoding.UTF8, "application/json"); var res = await client.PostAsync("users", body);The response holds the new user.
Update a user#
/users/{id}Send the fields to change. To change a password, use the password endpoints.
curl -X PUT "https://apipublic.yeshbe.com/api/v1/users/42" \ -H "Authorization: Bearer $YESHBE_APP_KEY" \ -H "Content-Type: application/json" \ -d '{"phone":"0509999999"}'const data = awaitapi("/users/42", { method: "PUT", body: JSON.stringify({ "phone": "0509999999" }) });data = api("/users/42", method="PUT", body={"phone": "0509999999"})var body = new StringContent( @"{""phone"":""0509999999""}", Encoding.UTF8, "application/json"); var res = await client.PutAsync("users/42", body);The response holds the updated user.
Block and unblock a user#
/users/{id}/block/users/{id}/unblockA blocked user can't sign in. Blocking doesn't delete anything, and unblocking restores access.
curl -X POST "https://apipublic.yeshbe.com/api/v1/users/42/block" \ -H "Authorization: Bearer $YESHBE_APP_KEY"const data = awaitapi("/users/42/block", { method: "POST" });data = api("/users/42/block", method="POST")var res = await client.PostAsync("users/42/block", null);{"success":true,"data":{"id":42,"is_active":false}}Passwords#
Send a reset email#
/users/reset-password/requestSends the user an email with a reset token.
curl -X POST "https://apipublic.yeshbe.com/api/v1/users/reset-password/request" \ -H "Authorization: Bearer $YESHBE_APP_KEY" \ -H "Content-Type: application/json" \ -d '{"email":"dana@example.com"}'const data = awaitapi("/users/reset-password/request", { method: "POST", body: JSON.stringify({ "email": "dana@example.com" }) });data = api("/users/reset-password/request", method="POST", body={"email": "dana@example.com"})var body = new StringContent( @"{""email"":""dana@example.com""}", Encoding.UTF8, "application/json"); var res = await client.PostAsync("users/reset-password/request", body);{"success":true,"data":{"sent":true}}Complete a reset#
/users/reset-password/confirmSets a new password using the token from the email.
curl -X POST "https://apipublic.yeshbe.com/api/v1/users/reset-password/confirm" \ -H "Authorization: Bearer $YESHBE_APP_KEY" \ -H "Content-Type: application/json" \ -d '{"token":"the-token-from-the-email","password":"a-new-password"}'const data = awaitapi("/users/reset-password/confirm", { method: "POST", body: JSON.stringify({ "token": "the-token-from-the-email", "password": "a-new-password" }) });data = api("/users/reset-password/confirm", method="POST", body={"token": "the-token-from-the-email", "password": "a-new-password"})var body = new StringContent( @"{""token"":""the-token-from-the-email"",""password"":""a-new-password""}", Encoding.UTF8, "application/json"); var res = await client.PostAsync("users/reset-password/confirm", body);{"success":true,"data":{"changed":true}}Set a password directly#
/users/{id}/set-passwordSets a user's password without an email. Use it from your own back office, never from code that runs in a browser.
curl -X POST "https://apipublic.yeshbe.com/api/v1/users/42/set-password" \ -H "Authorization: Bearer $YESHBE_APP_KEY" \ -H "Content-Type: application/json" \ -d '{"password":"a-new-password"}'const data = awaitapi("/users/42/set-password", { method: "POST", body: JSON.stringify({ "password": "a-new-password" }) });data = api("/users/42/set-password", method="POST", body={"password": "a-new-password"})var body = new StringContent( @"{""password"":""a-new-password""}", Encoding.UTF8, "application/json"); var res = await client.PostAsync("users/42/set-password", body);{"success":true,"data":{"id":42,"changed":true}}