> For the complete documentation index, see [llms.txt](https://ga0-2.gitbook.io/seifxr10anz-content/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ga0-2.gitbook.io/seifxr10anz-content/week-16/day-1-sign-up-and-login-without-sessions/lab-integrate-sign-up-with-api.md).

# Lab: Integrate sign up with API

You should already have the server-side logic for creating new users with a POST request to `/api/users`.

Use that API with your new HTML page and some JavaScript to make a working sign-up form to create new users. We'll use this same HTML file for both the signup form.

### Validation

Your API should return a 400 (Bad Request) status code if the information in the sign-up form is invalid.

Show these messages in the UI, to let the user know if:

* The email is already in use by another user
* The password is too short (or invalid in some other way)
