Skip to main content
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

first_name
string
required
The user’s first name.
last_name
string
required
The user’s last name.
email
string
required
A unique email address for the account. Must contain @. Stored in lowercase.
password
string
required
Account password. Minimum 6 characters. Stored hashed — never returned in responses.
middle_name
string
Optional middle name.

Response

status
integer
required
1 on success, 0 on failure.
status_description
string
required
Human-readable result code. user_created on success.
response_body
object

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 statusCause
missing_fields: <names>400One or more required fields are absent from the request body.
invalid_email_format400The email value does not contain @.
password_too_short400password is fewer than 6 characters.
user_already_exists400An account with the supplied email already exists.
server_error: <detail>400Unexpected server-side error.

Build docs developers (and LLMs) love