Files
bookhoard/bruno/user/Update Username.bru
T

46 lines
650 B
Plaintext

meta {
name: Update Username
type: http
seq: 1
}
put {
url: {{base_url}}/api/auth/username
body: json
auth: inherit
}
body {
{
"username": "newusername"
}
}
settings {
encodeUrl: true
timeout: 0
}
docs {
## Update Username
Updates the authenticated user's username.
**Method:** PUT
**Endpoint:** /api/auth/username
**Authentication:** Required
**Request Body:**
- `username` (string, required): New username (3-50 characters)
**Response:**
- `message` (string): Success message
**Status Codes:**
- 200: Success
- 400: Invalid username
- 401: Unauthorized
- 409: Username already taken
}