Skip to content

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#

FieldTypeNotes
idnumberThe user's id.
emailstringRequired when you create a user.
full_namestring
phonestring
avatar_urlstring
rolenumberA role id. See Roles.
is_activebooleanfalse when the user is blocked.
last_login_atdatetime
created_atdatetime
extraobjectThe 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#

GET/users
QueryNotes
searchMatches email or name.
roleA role id.
activetrue for active users, false for blocked ones.
sortcreated_at, last_login_at, email, full_name or role. Put - in front for descending order.
pageStarts at 1.
limitUsers 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"
Response
{"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#

GET/users/{id}
curl "https://apipublic.yeshbe.com/api/v1/users/42" \ -H "Authorization: Bearer $YESHBE_APP_KEY"

The response holds one user, in the same shape as an item in the list.

Create a user#

POST/users
curl -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}'

The response holds the new user.

Update a user#

PUT/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"}'

The response holds the updated user.

Block and unblock a user#

POST/users/{id}/block
POST/users/{id}/unblock

A 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"
Response
{"success":true,"data":{"id":42,"is_active":false}}

Passwords#

Send a reset email#

POST/users/reset-password/request

Sends 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"}'
Response
{"success":true,"data":{"sent":true}}

Complete a reset#

POST/users/reset-password/confirm

Sets 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"}'
Response
{"success":true,"data":{"changed":true}}

Set a password directly#

POST/users/{id}/set-password

Sets 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"}'
Response
{"success":true,"data":{"id":42,"changed":true}}