Skip to main content
PATCH
cURL

Path Parameters

id
string<uuid>
required
user_pk
string<uuid>
required

Body

Used for POST (add member) and PATCH (change role).

user_id
string<uuid>
role
enum<string>
  • member - Member
  • admin - Admin
Available options:
member,
admin

Response

200 - application/json

Read-only membership row shown inside org member lists.

id
integer
required
read-only
user
object
required

Resolve user.person once per serialization pass.

user.person memoizes per instance, but distinct users in a list are distinct instances — so a list serializer would still issue one Person query per row. When used many=True this mixin routes through :class:_PersonReadThroughListSerializer, which calls User.attach_persons to batch the whole page into a single query; the per-render context cache below then dedups the name+email double-read for each user.

The context cache lives only for the lifetime of the serializer tree, so one .data render resolves each distinct user's Person at most once and re-batches fresh on the next render.

role
enum<string>
required
  • member - Member
  • admin - Admin
Available options:
member,
admin
created_at
string<date-time>
required
read-only