Ana içeriğe geç

Ü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önetme
  • organizations.manage.members.own - Sadece kendi organizasyonlarının üyelerini yönetme

Request

Headers

HeaderDeğerZorunlu
AuthorizationBearer \{token\}Evet
Content-Typeapplication/jsonEvet

Path Parameters

ParametreTipZorunluAçıklama
uuidstringEvetOrganizasyon UUID'si
userinteger/stringEvetKullanıcı ID veya UUID

Request Body

ParametreTipZorunluAçıklama
rolestringHayırÜye rolü
is_activebooleanHayırAktif 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

  • PUT tüm alanları günceller, PATCH sadece gönderilen alanları günceller
  • Üye bulunamazsa 404 döner