Create user in current organization
POST
/api/accounts/users
const url = 'https://api.getvespy.com/api/accounts/users';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"email":"hello@example.com","fullName":"example","isActive":true,"password":"example","phone":"example","role":"admin"}'};
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.getvespy.com/api/accounts/users \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "email": "hello@example.com", "fullName": "example", "isActive": true, "password": "example", "phone": "example", "role": "admin" }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
email
required
string format: email
fullName
required
string
isActive
boolean
password
required
string
phone
string
role
required
string
Responses
Section titled “Responses”Default Response
Media typeapplication/json
object
user
required
object
deletedAt
required
string format: date-time
email
required
string format: email
emailConsentAt
required
string format: date-time
fullName
required
string
id
required
string format: uuid
isActive
required
boolean
isSuperadmin
required
boolean
organizationId
required
string format: uuid
phone
required
string
role
required
string
smsConsentAt
required
string format: date-time
Example
{ "user": { "role": "admin" }}Default Response
Media typeapplication/json
object
code
string
errors
Array<object>
object
code
required
string
message
required
string
path
required
string
message
required
string
Examplegenerated
{ "code": "example", "errors": [ { "code": "example", "message": "example", "path": "example" } ], "message": "example"}Default Response
Media typeapplication/json
object
code
string
errors
Array<object>
object
code
required
string
message
required
string
path
required
string
message
required
string
Examplegenerated
{ "code": "example", "errors": [ { "code": "example", "message": "example", "path": "example" } ], "message": "example"}Default Response
Media typeapplication/json
object
code
string
errors
Array<object>
object
code
required
string
message
required
string
path
required
string
message
required
string
Examplegenerated
{ "code": "example", "errors": [ { "code": "example", "message": "example", "path": "example" } ], "message": "example"}Default Response
Media typeapplication/json
object
code
string
errors
Array<object>
object
code
required
string
message
required
string
path
required
string
message
required
string
Examplegenerated
{ "code": "example", "errors": [ { "code": "example", "message": "example", "path": "example" } ], "message": "example"}