Users

Get all users

get

List all users (admin only)

Authorizations
Responses
200
List of users
application/json
get
GET /api/users HTTP/1.1
Host: localhost:3000
Authorization: Bearer JWT
Accept: */*
[
  {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "username": "text",
    "permissions": [
      "text"
    ],
    "createdAt": "2025-07-06T06:24:31.055Z",
    "updatedAt": "2025-07-06T06:24:31.055Z"
  }
]

Create a new user

post

Create a new user (admin only)

Authorizations
Body
usernamestring · min: 1Required
passwordstring · min: 8Required
permissionsstring[]Optional
Responses
201
User created successfully
application/json
post
POST /api/users HTTP/1.1
Host: localhost:3000
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 60

{
  "username": "text",
  "password": "text",
  "permissions": [
    "text"
  ]
}
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "username": "text",
  "permissions": [
    "text"
  ],
  "createdAt": "2025-07-06T06:24:31.055Z",
  "updatedAt": "2025-07-06T06:24:31.055Z"
}

Get user by ID

get

Get user details by ID (admin only)

Authorizations
Path parameters
idstring · uuidRequired
Responses
200
User details
application/json
get
GET /api/users/{id} HTTP/1.1
Host: localhost:3000
Authorization: Bearer JWT
Accept: */*
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "username": "text",
  "permissions": [
    "text"
  ],
  "createdAt": "2025-07-06T06:24:31.055Z",
  "updatedAt": "2025-07-06T06:24:31.055Z"
}

Delete user

delete

Delete a user (admin only)

Authorizations
Path parameters
idstring · uuidRequired
Responses
200
User deleted successfully
application/json
delete
DELETE /api/users/{id} HTTP/1.1
Host: localhost:3000
Authorization: Bearer JWT
Accept: */*
{
  "success": true
}

Update user

patch

Update user details (admin only)

Authorizations
Path parameters
idstring · uuidRequired
Body
usernamestring · min: 1Optional
passwordstring · min: 8Optional
permissionsstring[]Optional
Responses
200
User updated successfully
application/json
patch
PATCH /api/users/{id} HTTP/1.1
Host: localhost:3000
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 60

{
  "username": "text",
  "password": "text",
  "permissions": [
    "text"
  ]
}
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "username": "text",
  "permissions": [
    "text"
  ],
  "createdAt": "2025-07-06T06:24:31.055Z",
  "updatedAt": "2025-07-06T06:24:31.055Z"
}

Was this helpful?