Skip to main content

Create a user

Admin-only. Password must be at least 8 characters and contain upper, lower, digit, and special character.

Request

Method: POST
Path: /api/users

Authentication: Not required

Request Body

Content Type: application/json

Schema: See component schemas below

Responses

201 - User created

400 - Validation error

403 - Requires admin role

Examples

cURL

curl -X POST \
-H "Content-Type: application/json" \
http://localhost:3000/api/users \
-d '{"example": "data"}'

JavaScript

const response = await fetch('http://localhost:3000/api/users', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
// Request data
}),
});

const data = await response.json();
console.log(data);

This documentation is automatically generated from the OpenAPI specification.