Back to Home

Documentation

Everything you need to know to get the most out of DiscountFlow. Find guides, tutorials, and API references.

Quick Start
API References
FAQs
API References
/
API Endpoints
/
Create User

Create User

Create user

Method

POST

Path

/api/users

Authentication

API Key

Request Body Schema

Content-type: application/json

NameTypeRequiredDescription
firstNamestringRequired

First name of user

lastNamestringRequired

Last name of user

rolestringRequired

Enum: manager, admin, regular

Example Payload

{
 "id": "u123",
 "firstName": "John".
 "lastName": "Doe",
 "createadAt": "2026-02-26"
}

Response

Returns the newly created user object

Example Response

{
 "id": "u123",
 "firstName": "John".
 "lastName": "Doe",
 "createadAt": "2026-02-26"
}

Errors

  • Unauthorized
  • Invalid Request

Example Response

{
 "status": "Error"
 "message": "Unauthorized".
 "httpStatus": 400
}