This section details the API endpoints available for managing user profiles within the system. These endpoints allow for retrieval, creation, and modification of user data.
| Name | Type | Required | Description |
|---|---|---|---|
userId |
string | Yes | The unique identifier of the user whose profile is to be retrieved. |
| Field | Type | Description |
|---|---|---|
username |
string | The user's chosen username. |
displayName |
string | The user's full display name. |
bio |
string | A short biography or description provided by the user. |
avatarUrl |
string | URL to the user's profile picture. |
joinedDate |
string (ISO 8601) | The date and time the user account was created. |
GET /api/v1/users/a1b2c3d4-e5f6-7890-1234-abcdef123456/profile
{
"username": "coder_gal",
"displayName": "Alex Johnson",
"bio": "Enthusiastic about clean code and open-source projects.",
"avatarUrl": "https://example.com/avatars/alexj.png",
"joinedDate": "2023-01-15T10:30:00Z"
}
| Field | Type | Required | Description |
|---|---|---|---|
username |
string | Yes | The desired username for the new profile. Must be unique. |
email |
string | Yes | The user's email address. |
password |
string | Yes | The user's chosen password. |
displayName |
string | No | The user's full display name (optional). |
| Field | Type | Description |
|---|---|---|
userId |
string | The unique identifier generated for the new user. |
message |
string | Confirmation message. |
POST /api/v1/users/profiles
Content-Type: application/json
{
"username": "new_developer",
"email": "new.dev@example.com",
"password": "securePassword123!",
"displayName": "Jane Doe"
}
{
"userId": "f9e8d7c6-b5a4-3210-fedc-ba9876543210",
"message": "User profile created successfully."
}
| Name | Type | Required | Description |
|---|---|---|---|
userId |
string | Yes | The unique identifier of the user whose profile is to be updated. |
| Field | Type | Required | Description |
|---|---|---|---|
bio |
string | No | New biography for the user. |
avatarUrl |
string | No | New URL for the user's avatar. |
| Field | Type | Description |
|---|---|---|
message |
string | Confirmation message. |
updatedFields |
array of strings | List of fields that were successfully updated. |
PUT /api/v1/users/a1b2c3d4-e5f6-7890-1234-abcdef123456/profile
Content-Type: application/json
{
"bio": "Updated my bio to reflect my new role!",
"avatarUrl": "https://example.com/avatars/alexj_new.png"
}
{
"message": "User profile updated successfully.",
"updatedFields": ["bio", "avatarUrl"]
}
| Name | Type | Required | Description |
|---|---|---|---|
userId |
string | Yes | The unique identifier of the user whose profile is to be deleted. |
No content is returned upon successful deletion.
DELETE /api/v1/users/a1b2c3d4-e5f6-7890-1234-abcdef123456/profile