Üye Güncelle
Organizasyon üyesinin bilgilerini günceller.
Endpoint
PUT /api/v1/organizations/\{uuid\}/members/\{user\}
PATCH /api/v1/organizations/\{uuid\}/members/\{user\}
Authentication
Bu endpoint authentication gerektirir.
Header: Authorization: Bearer \{token\}
Permission
organizations.manage.members- Tüm organizasyonların üyelerini yönetmeorganizations.manage.members.own- Sadece kendi organizasyonlarının üyelerini yönetme
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 | Organizasyon UUID'si |
user | integer/string | Evet | Kullanıcı ID veya UUID |
Request Body
| Parametre | Tip | Zorunlu | Açıklama |
|---|---|---|---|
role | string | Hayır | Üye rolü |
is_active | boolean | Hayır | Aktif durumu |
Example Request
{
"role": "admin",
"is_active": true
}
Response
Success Response (200 OK)
{
"message": "Member updated",
"member": {
"id": 1,
"uuid": "550e8400-e29b-41d4-a716-446655440001",
"email": "user@example.com",
"pivot": {
"organization_id": 1,
"user_id": 1,
"role": "admin",
"is_active": true,
"updated_at": "2025-11-20T12:00:00.000000Z"
}
}
}
Error Responses
404 Not Found
{
"message": "Organization not found"
}
403 Forbidden
{
"message": "Forbidden"
}
Code Examples
cURL
curl -X PATCH https://api.example.com/api/v1/organizations/550e8400-e29b-41d4-a716-446655440000/members/550e8400-e29b-41d4-a716-446655440001 \
-H "Authorization: Bearer \{token\}" \
-H "Content-Type: application/json" \
-d '{
"role": "admin",
"is_active": true
}'
Notes
PUTtüm alanları günceller,PATCHsadece gönderilen alanları günceller- Üye bulunamazsa 404 döner
Related Endpoints
- Organizasyon Üyeleri - Organizasyon üyelerini listele
- Üye Çıkar - Organizasyondan üye çıkar