Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Vedant-Jayesh-Oza/otas/llms.txt

Use this file to discover all available pages before exploring further.

This endpoint updates the name fields on the authenticated user’s profile. Supply the new values in the JSON body; the response includes the full updated user object. To change the account password, use the companion endpoint PUT /api/user/v1/reset-password/update/ described below.
Both first_name and last_name are required even if you are only changing one field. Send the existing value for any field you do not wish to change.

Request

Method: PUT
URL: http://localhost:8000/api/user/v1/edit/
Authentication: X-OTAS-USER-TOKEN header

Headers

X-OTAS-USER-TOKEN
string
required
Signed JWT returned by /api/user/v1/login/ or /api/user/v1/create/.

Body parameters

first_name
string
required
Updated first name.
last_name
string
required
Updated last name.
middle_name
string
Updated middle name. Pass an empty string to clear it.

Response

status
integer
required
1 on success, 0 on failure.
status_description
string
required
user_profile_updated on success.
response_body
object

Example

curl --request PUT \
  --url http://localhost:8000/api/user/v1/edit/ \
  --header 'Content-Type: application/json' \
  --header 'X-OTAS-USER-TOKEN: <your-token>' \
  --data '{
    "first_name": "Ada",
    "last_name": "King",
    "middle_name": "Byron"
  }'
{
  "status": 1,
  "status_description": "user_profile_updated",
  "response_body": {
    "user": {
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "first_name": "Ada",
      "middle_name": "Byron",
      "last_name": "King",
      "email": "ada@example.com",
      "created_at": "2026-04-16T10:00:00.000000",
      "updated_at": "2026-04-16T11:30:00.000000"
    }
  }
}

Updating the password

To change the authenticated user’s password, send a PUT request to PUT /api/user/v1/reset-password/update/ with the same X-OTAS-USER-TOKEN header.

Body parameters

password
string
required
New password. Minimum 6 characters.
On success the server returns { "status": 1, "status_description": "password_updated", "response_body": null }.

Error responses

status_descriptionHTTP statusCause
missing_token400The X-OTAS-USER-TOKEN header was absent.
invalid_token401The token is malformed, expired, or not associated with a user.
missing_required_fields400first_name or last_name was empty or missing from the body.
password_too_short400Password supplied to the password-update endpoint is fewer than 6 characters.

Build docs developers (and LLMs) love