Skip to main content

User Management API

Quick reference for managing users in your QbitSpark application.

Authentication

Include your API key in all requests:

Authorization: Bearer YOUR_API_KEY

Endpoints

List Users

GET https://doc-hub.qbitspark.com/api/users

Get a paginated list of all users.

Query Parameters:

  • page - Page number (default: 1)
  • limit - Items per page (max: 100)
  • status - Filter by status: active, inactive

Example Response:

{
  "success": true,
  "data": [
    {
      "id": 123,
      "email": "user@qbitspark.com",
      "name": "John Doe",
      "status": "active"
    }
  ],
  "total": 45
}

Create User

POST https://doc-hub.qbitspark.com/api/users

Create a new user account.

Request Body:

{
  "email": "newuser@qbitspark.com",
  "name": "Jane Smith",
  "role": "developer"
}

Response:

{
  "success": true,
  "user_id": 124,
  "message": "User created successfully"
}

Update User

PUT https://doc-hub.qbitspark.com/api/users/{id}

Update an existing user's information.

Example:

curl -X PUT https://doc-hub.qbitspark.com/api/users/123 \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "John Updated", "status": "active"}'

Delete User

DELETE https://doc-hub.qbitspark.com/api/users/{id}

Permanently remove a user account.

⚠️ Warning: This action cannot be undone!

Response:

{
  "success": true,
  "message": "User deleted successfully"
}

Error Codes

Code Status Description
400 Bad Request Invalid request data
401 Unauthorized Invalid API key
404 Not Found User doesn't exist
429 Rate Limited Too many requests

Rate Limits

  • Free Plan: 1,000 requests/day
  • Pro Plan: 10,000 requests/day
  • Enterprise: Unlimited

Need Help? Contact us at office@qbitspark.com