Kullanıcı Güncelle
Kullanıcı bilgilerini günceller.
Endpoint
PUT /api/v1/users/\{uuid\}
PATCH /api/v1/users/\{uuid\}
Authentication
Bu endpoint authentication gerektirir.
Header: Authorization: Bearer \{token\}
Permission
users.update- Tüm kullanıcıları güncellemeusers.update.own- Sadece kendi profilini güncelleme
Request
Headers
| Header | Değer | Zorunlu |
|---|---|---|
Authorization | Bearer \{token\} | Evet |
Content-Type | application/json | Evet |
Path Parameters
| Parametre | Tip | Zorunlu | Açıklama |
|---|---|---|---|
uuid | string | Evet | Kullanıcı UUID'si |
Request Body
| Parametre | Tip | Zorunlu | Açıklama |
|---|---|---|---|
email | string | Hayır | E-posta adresi |
password | string | Hayır | Şifre |
is_active | boolean | Hayır | Aktif durumu |
role_ids | array | Hayır | Rol ID'leri |
Example Request
{
"email": "member+updated@example.com",
"is_active": true,
"role_ids": [2, 3]
}
Response
Success Response (200 OK)
{
"id": 1,
"uuid": "550e8400-e29b-41d4-a716-446655440000",
"email": "member+updated@example.com",
"is_active": true,
"updated_at": "2025-11-20T12:00:00.000000Z"
}
Code Examples
cURL
curl -X PATCH https://api.example.com/api/v1/users/550e8400-e29b-41d4-a716-446655440000 \
-H "Authorization: Bearer \{token\}" \
-H "Content-Type: application/json" \
-d '{
"email": "member+updated@example.com",
"is_active": true
}'
Notes
.ownpermission'ı olan kullanıcılar sadece kendi profilini güncelleyebilirPUTtüm alanları günceller,PATCHsadece gönderilen alanları günceller
Related Endpoints
- User Detail - Kullanıcı detayı
- Delete User - Kullanıcı sil