PATCH
/organizations/{organization_id}/memberships/{user_id}/metadataMerge and update organization membership metadata
Update an organization membership's metadata attributes by merging existing values with the provided parameters.
Metadata values will be updated via a deep merge. Deep means that any nested JSON objects will be merged as well.
You can remove metadata keys at any level by setting their value to null.
- IdempotentThe SDK sends
Idempotency-Key, so a retried request is only applied once.
organization_idstringrequired
The ID of the organization to which this membership belongs
user_idstringrequired
The ID of the user to which this membership belongs
public_metadataobjectoptional
Metadata saved on the organization membership, that is visible to both your frontend and backend.
The new object will be merged with the existing value.
private_metadataobjectoptional
Metadata saved on the organization membership that is only visible to your backend.
The new object will be merged with the existing value.
200Success
idstringrequired
objectstringrequired
String representing the object's type. Objects of the same type share the same value.
rolestringrequired
role_namestringoptional
permissionsarray<string>required
public_metadataobjectrequired
Metadata saved on the organization membership, accessible from both Frontend and Backend APIs
private_metadataobjectoptional
Metadata saved on the organization membership, accessible only from the Backend API
organizationobjectrequired
public_user_dataobjectoptional
An organization membership with public user data populated
created_atintegerrequired
Unix timestamp of creation.
updated_atintegerrequired
Unix timestamp of last update.
400Request was not successful
errorsarray<object>required
metaobjectoptional
clerk_trace_idstringoptional
404Resource not found
errorsarray<object>required
metaobjectoptional
clerk_trace_idstringoptional
422Invalid request parameters
errorsarray<object>required
metaobjectoptional
clerk_trace_idstringoptional
Error handling
A 400 is returned: Request was not successful. A 404 is returned: Resource not found. A 422 is returned: Invalid request parameters.