Create new user
POST
/users/
const url = 'https://api.occulights.com/api/v1/users/';const options = { method: 'POST', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"email":"john.doe@example.com","firstName":"John","lastName":"Doe","orgId":"8089bb74-fd69-411b-8fd7-ad92a75fdf56","password":"example"}'};
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://api.occulights.com/api/v1/users/ \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "email": "john.doe@example.com", "firstName": "John", "lastName": "Doe", "orgId": "8089bb74-fd69-411b-8fd7-ad92a75fdf56", "password": "example" }'Creates a new user for the authenticated tenant
Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”User object
Media typeapplication/json
object
email
string
Example
john.doe@example.comfirstName
string
Example
JohnlastName
string
Example
DoeorgId
string
Example
8089bb74-fd69-411b-8fd7-ad92a75fdf56password
Let’s re-add this when we differentiate between email and username
Username string json:"username"
string
Responses
Section titled “Responses”Created
Media typeapplication/json
object
email
string
firstName
string
lastName
string
orgId
string
password
Let’s re-add this when we differentiate between email and username
Username string json:"username"
string
Example
{ "email": "john.doe@example.com", "firstName": "John", "lastName": "Doe", "orgId": "8089bb74-fd69-411b-8fd7-ad92a75fdf56"}Invalid input
Media typeapplication/json
object
message
string
Example generated
{ "message": "example"}Unauthorized
Media typeapplication/json
string
Example generated
exampleUser already exists
Media typeapplication/json
object
message
string
Example generated
{ "message": "example"}Internal Server Error
Media typeapplication/json