Skip to main content
Both endpoints need only your API key (no Bearer token). Use an end_users key from browsers and mobile apps.

Register

POST /auth/{guard}/register Send the login field by its field name, a password, and any other fields on the collection.
Response 201 Created:
If the guard has email verification on, the response also includes "status": "pending_verification" and a code is emailed. See Email verification. What Bludia does:
  1. Checks registration is enabled for the guard.
  2. Requires the login field and a password of at least 8 characters.
  3. Rejects the request if an account with that login already exists.
  4. Saves a record with the password hashed. The new user owns their own record.
  5. Assigns the guard’s default user role.
  6. Returns a session, so the user is signed in right away.

Login

POST /auth/{guard}/login
Response 200 OK:
Every attempt, successful or not, is logged with IP and user agent.

Account status

User records have a status that controls login: To block a user, change their record’s status in the dashboard. To also end their current sessions, see Sessions & tokens.

Creating users yourself

You can also add users as records in the dashboard: set the password field and it’s hashed on save. Then assign roles in Authentication → Roles. To create accounts from code, call /auth/{guard}/register (from a server if registration is closed to the public, temporarily enable it or create users in the dashboard). Don’t write password values through the records API.