API Reference Documentation

API Referencev1.0

Users API

API endpoints for managing user accounts and authentication.

Base URL:https://api.example.com/v1
GET/users

Retrieve a paginated list of all users in the system.

Query Parameters

NameTypeDescription
pageintegerPage number for pagination (default: 1)
limitintegerNumber of results per page (default: 20, max: 100)
sortstringSort field (name, email, created_at)
orderstringSort order (asc, desc)

Response

NameTypeDescription
dataUser[]Array of user objects
meta.totalintegerTotal number of users
meta.pageintegerCurrent page number
meta.pagesintegerTotal number of pages

Example

Request
GET /users?page=1&limit=10
Response
{
  "data": [
    {
      "id": "usr_123",
      "name": "John Doe",
      "email": "john@example.com",
      "created_at": "2025-01-15T10:30:00Z"
    }
  ],
  "meta": {
    "total": 150,
    "page": 1,
    "pages": 15
  }
}
POST/users

Create a new user account.

Request Body

NameTypeDescription
namerequiredstringFull name of the user
emailrequiredstringUnique email address
passwordrequiredstringPassword (min 8 characters)
rolestringUser role (user, admin). Defaults to user

Response

NameTypeDescription
idstringUnique user identifier
namestringUser's full name
emailstringUser's email address
created_atstringISO 8601 timestamp

Example

Request
POST /users
Content-Type: application/json

{
  "name": "Jane Smith",
  "email": "jane@example.com",
  "password": "securePassword123"
}
Response
{
  "id": "usr_456",
  "name": "Jane Smith",
  "email": "jane@example.com",
  "created_at": "2025-01-20T14:22:00Z"
}
DELETE/users/:id

Permanently delete a user account. This action cannot be undone.

Query Parameters

NameTypeDescription
idrequiredstringThe unique identifier of the user to delete

Example

Request
DELETE /users/usr_123
Response
{
  "success": true,
  "message": "User deleted successfully"
}
About this block

API Reference DocumentationPRO

Technical reference with endpoint cards, HTTP method badges, and side-by-side request/response examples. Perfect for API documentation.

More Post blocks

View all Post
PRO

post20

Documentation Getting Started

Documentation-focused layout with version badge, info/warning/tip boxes, and previous/next navigation. Best for technical documentation.

PRO

post47

Resource Roundup

Curated list format with resource cards, descriptions, and links. Great for collections and recommendations.

PRO

post18

Article with Code Snippets

Technical article with code blocks featuring language labels, filenames, and copy-to-clipboard buttons. Ideal for programming tutorials.

PRO

post71

Knowledge Base Article

Searchable FAQ with category filters, helpful votes, and related questions. Perfect for help centers and documentation.

PRO

post60

Research Paper Summary

Academic article with abstract, key findings, and references. Perfect for research summaries and study highlights.

PRO

post55

Interactive Checklist Article

Article with checkable items, progress tracking, and print/download options. Perfect for actionable guides and checklists.