- Auth
- Users
- Reports
- Room
- Device
- category
- Sensor
- Automation
Create Account
Developing
POST
/auth/register
auth
Request
Body Params application/json
email
string
required
password
string
required
username
string
required
first_name
string
required
last_name
string
required
Example
{
"email": "string",
"password": "string",
"username": "string",
"first_name": "string",
"last_name": "string"
}
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/auth/register' \
--header 'Content-Type: application/json' \
--data-raw '{
"email": "string",
"password": "string",
"username": "string",
"first_name": "string",
"last_name": "string"
}'
Responses
🟢201Created
application/json
Body
message
string
required
data
object
required
Example
{
"message": "Account created successfully",
"data": {
"id": "67d79585ad2213042fef438b",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3ZDc5NTg1YWQyMjEzMDQyZmVmNDM4YiIsImVtYWlsIjoiUHJpbmNlc3M1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTVAZ21haWwuY29tIiwiaWF0IjoxNzQyMTgxNzcwLCJleHAiOjE3NDQ3NzM3NzB9.k_YNjtQkoIgDw_ulgIaOs85QHrGuYatZFwR83vaWpng"
}
}
🟠400Bad Request