POST
/api/Users
const url = 'https://example.com/api/Users';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"merchantId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","email":"hello@example.com","firstName":"example","lastName":"example","role":"Owner"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/Users \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "merchantId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "email": "hello@example.com", "firstName": "example", "lastName": "example", "role": "Owner" }'Invites a new staff user. The future auth service will issue credentials and an invite email.
Authorizations
Section titled “Authorizations ”Request Body
Section titled “Request Body ”User creation payload.
object
merchantId
required
string format: uuid
email
required
string format: email
firstName
required
string
lastName
required
string
role
required
string
object
merchantId
required
string format: uuid
email
required
string format: email
firstName
required
string
lastName
required
string
role
required
string
object
merchantId
required
string format: uuid
email
required
string format: email
firstName
required
string
lastName
required
string
role
required
string
Responses
Section titled “ Responses ”User created successfully.
Media type application/json
object
id
string format: uuid
merchantId
string format: uuid
email
string
firstName
string
lastName
string
fullName
string
role
string
isActive
boolean
lastLoginAt
string format: date-time
createdAt
string format: date-time
updatedAt
string format: date-time
Example
{ "role": "Owner"}Validation failed — check the errors object.
Media type application/json
object
type
string
title
string
status
integer format: int32
detail
string
instance
string
key
additional properties
Example generated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}Caller is not an Owner or Admin.
Media type application/json
object
type
string
title
string
status
integer format: int32
detail
string
instance
string
key
additional properties
Example generated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}