API Reference

Welcome to the Project X API. This documentation provides detailed information on how to interact with our platform's data and functionalities.

GET /users

Retrieves a list of all users.

Query Parameters

Name Type Description
limit integer Maximum number of users to return. Defaults to 20.
offset integer Number of users to skip. Defaults to 0.
status string Filter users by their status (e.g., 'active', 'inactive').

Responses

Code Description Content
200 OK Successfully retrieved users. Array of user objects.
401 Unauthorized Authentication credentials are missing or invalid. Error object.
500 Internal Server Error An unexpected error occurred on the server. Error object.
[ { "id": "usr_abc123", "username": "johndoe", "email": "john.doe@example.com", "created_at": "2023-10-27T10:00:00Z", "status": "active" }, { "id": "usr_def456", "username": "janedoe", "email": "jane.doe@example.com", "created_at": "2023-10-26T15:30:00Z", "status": "active" } ]

POST /users

Creates a new user.

Request Body

Field Type Required Description
username string Yes The desired username for the new user.
email string Yes The email address of the new user.
password string Yes The password for the new user.

Responses

Code Description Content
201 Created User created successfully. The newly created user object.
400 Bad Request Invalid input data in the request body. Error object detailing the validation issues.