This endpoint registers a new OTAS user. Provide the required name and credential fields in the JSON request body. On success the server returns the persisted user object together with a JWT that can be used immediately for authenticated requests. No prior authentication is needed to call this endpoint.
Request
Method: POST
URL: http://localhost:8000/api/user/v1/create/
Authentication: None
Body parameters
A unique email address for the account. Must contain @. Stored in lowercase.
Account password. Minimum 6 characters. Stored hashed — never returned in responses.
Response
1 on success, 0 on failure.
Human-readable result code. user_created on success.
UUID of the newly created user.
Middle name, or an empty string if not provided.
ISO 8601 timestamp of account creation.
ISO 8601 timestamp of last update.
Signed JWT for the new user. Pass this in the X-OTAS-USER-TOKEN header for authenticated requests.
Example
curl --request POST \
--url http://localhost:8000/api/user/v1/create/ \
--header 'Content-Type: application/json' \
--data '{
"first_name": "Ada",
"last_name": "Lovelace",
"email": "[email protected] ",
"password": "securepassword"
}'
{
"status" : 1 ,
"status_description" : "user_created" ,
"response_body" : {
"user" : {
"id" : "a1b2c3d4-e5f6-7890-abcd-ef1234567890" ,
"first_name" : "Ada" ,
"middle_name" : "" ,
"last_name" : "Lovelace" ,
"email" : "[email protected] " ,
"created_at" : "2026-04-16T10:00:00.000000" ,
"updated_at" : "2026-04-16T10:00:00.000000"
},
"jwt_token" : "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}
}
Error responses
status_descriptionHTTP status Cause missing_fields: <names>400 One or more required fields are absent from the request body. invalid_email_format400 The email value does not contain @. password_too_short400 password is fewer than 6 characters.user_already_exists400 An account with the supplied email already exists. server_error: <detail>400 Unexpected server-side error.