Get Profile
curl -X GET "https://panel.example.com/api/account/profile" \
-H "Authorization: Bearer YOUR_API_KEY"
Retrieve the authenticated user’s profile information.
Response
The user profile object.
The unique identifier of the user.
The username of the account.
The email address of the account.
The role of the user. Can be admin or user.
{
"data": {
"id": "clx1a2b3c4d5e6f7g8h9i0j1",
"username": "johndoe",
"email": "[email protected]",
"role": "user"
}
}
Update Profile
curl -X PUT "https://panel.example.com/api/account/profile" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"username": "newusername",
"email": "[email protected]"
}'
Update the authenticated user’s profile information.
Request Body
New username for the account. Must be between 3 and 191 characters.
New email address for the account. Must be a valid email and under 191 characters.If email configuration is enabled, a verification email will be sent and the change will be pending until verified.
At least one field (username or email) must be provided.
Response
The updated user profile object.
The unique identifier of the user.
The updated username of the account.
The email address of the account.
{
"data": {
"id": "clx1a2b3c4d5e6f7g8h9i0j1",
"username": "newusername",
"email": "[email protected]",
"role": "user"
}
}
Error Codes
Username is already in use by another account.
Invalid request body or validation failed.