This endpoint creates a new user account in the Social Media Backend. It validates that the submitted email address is well-formed and unique, hashes the plaintext password with bcrypt before writing it to the database, and returns the newly created user profile. No authentication token is required to call this endpoint — it is the entry point for new user registration.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/pvnm4/Social-Media-Backend/llms.txt
Use this file to discover all available pages before exploring further.
Endpoint
Request Body
A valid email address for the new account. Must be unique across all registered users — submitting an email that already exists returns a
409 Conflict error. The value is validated against RFC 5322 email format rules via Pydantic’s EmailStr.The plaintext password for the new account. The password is immediately hashed with bcrypt before storage and is never stored or returned in plaintext. The raw value is not persisted anywhere.
Response
A successful request returns HTTP 201 Created with the new user’s profile.Auto-generated unique integer ID assigned to the user by the database.
The email address that was registered. Confirms the value that was accepted and stored.
ISO 8601 timestamp (with timezone) indicating when the account was created. Generated automatically by the database using
now() at insert time. Example: "2024-01-15T10:30:00.000000+00:00".The
password field is never included in any response from this endpoint. Only id, email, and created_at are returned, as defined by the UserOut schema.Error Responses
| Status Code | Detail Message | Cause |
|---|---|---|
409 Conflict | "User with this email already exists" | The submitted email address is already registered to another account. |
422 Unprocessable Entity | (Pydantic validation error) | The email field failed format validation, or a required field is missing from the request body. |