Skip to main content
POST
/
user
/
details
cURL
curl --request POST \
  --url https://our-secret-api-url.com/user/details \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --header 'X-API-KEY: <x-api-key>' \
  --form 'name=<string>' \
  --form 'username=<string>' \
  --form 'email=<string>' \
  --form 'phone=<string>' \
  --form 'bio=<string>' \
  --form 'image=<string>' \
  --form newImage='@example-file'
{
  "status": 123,
  "id": 123,
  "username": "<string>",
  "name": "<string>",
  "image": "<string>",
  "bio": "<string>",
  "email": "<string>",
  "phone": "<string>",
  "verifiedAt": "2023-11-07T05:31:56Z",
  "role": "user"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

X-API-KEY
string
required

API key required for authentication

Body

multipart/form-data
name
string

Name of the user

username
string

Username of the user

email
string

User's email

phone
string

User's phone number

bio
string

User's bio

Maximum string length: 160
image
string

Previously uploaded profile image URL

newImage
file

New profile image to upload

Response

User details updated successfully

status
integer

HTTP status code

id
integer

User ID

username
string

Updated username of the user

name
string

Updated name of the user

image
string

Updated profile image URL

bio
string

Updated biography of the user

email
string

Updated email of the user

phone
string

Updated phone number of the user

verifiedAt
string<date-time> | null

Verification timestamp if the user is verified

role
enum<string>

Role of the user

Available options:
user,
admin