Welcome to the EmoteChat API Documentation. This document provides information about the available endpoints for interacting with the EmoteChat backend.
Register a new user account.
- Method: POST
- Endpoint:
/api/auth/register
{
"name": "John Doe",
"email": "john@example.com",
"password": "yourpassword"
}- Status Code: 200 OK
- Content: Success message
Log in a user and obtain an authentication token.
- Method: POST
- Endpoint:
/api/auth/login
{
"email": "john@example.com",
"password": "yourpassword"
}- Status Code: 200 OK
- Content: Authentication token
Log out the currently authenticated user.
- Method: POST
- Endpoint:
/api/auth/logout
Authorization: Bearer <authentication_token>
- Status Code: 200 OK
- Content: Success message
Check if the current user's authentication token is valid.
- Method: GET
- Endpoint:
/api/auth/validate
Authorization: Bearer <authentication_token>
- Status Code: 200 OK
- Content: User details
Retrieve a paginated list of all users.
- Method: GET
- Endpoint:
/api/profile/users
Authorization: Bearer <authentication_token>
page(optional): Page number (default: 1)page_size(optional): Number of users per page (default: 30)
- Status Code: 200 OK
- Content: List of users and pagination details
Retrieve a paginated list of conversations.
- Method: GET
- Endpoint:
/api/conversations
Authorization: Bearer <authentication_token>
page(optional): Page number (default: 1)page_size(optional): Number of conversations per page (default: 30)
- Status Code: 200 OK
- Content: List of conversations and pagination details
Request a password reset for a user.
- Method: POST
- Endpoint:
/api/password/reset-request
{
"email": "john@example.com"
}- Status Code: 200 OK
- Content: Success message
Reset a user's password using a reset token.
- Method: POST
- Endpoint:
/api/password/reset
{
"token": "reset_token",
"password": "newpassword"
}- Status Code: 200 OK
- Content: Success message
Please note that some endpoints require authentication via an Authorization header containing a valid Bearer token. Replace <authentication_token> with the actual authentication token obtained during login.