PUT/organizations/{organization_id}/metadata

Replace metadata for an organization

Replace an organization's metadata attributes with the provided values. Unlike PATCH /v1/organizations/{organization_id}/metadata (merge semantics), this endpoint replaces the supplied metadata fields entirely — the prior contents of each supplied field are discarded. Fields omitted from the request body are left unchanged. Prefer the PATCH endpoint for partial updates. Use PUT only when you explicitly intend to overwrite a metadata field wholesale.

1 parameter · 2 body fields
organization_idstringrequired
The ID of the organization whose metadata will be replaced
public_metadataobjectoptional
Metadata saved on the organization, that is visible to both your frontend and backend. The existing value will be replaced entirely with the new object.
private_metadataobjectoptional
Metadata saved on the organization that is only visible to your backend. The existing value will be replaced entirely with the new object.

5 status codes
200An organization
objectstringrequired
Allowed:organization
idstringrequired
namestringrequired
slugstringrequired
image_urlstringoptional
has_imagebooleanrequired
members_countintegeroptional
missing_member_with_elevated_permissionsbooleanoptional
pending_invitations_countintegeroptional
max_allowed_membershipsintegerrequired
admin_delete_enabledbooleanrequired
self_serve_sso_enabledbooleanoptional
Whether this organization can configure self-serve enterprise SSO.
self_serve_directory_sync_enabledbooleanoptional
Whether this organization can configure self-serve Directory Sync (SCIM).
public_metadataobjectrequired
private_metadataobjectoptional
created_bystringoptional
created_atintegerrequired
Unix timestamp of creation.
updated_atintegerrequired
Unix timestamp of last update.
last_active_atintegeroptional
Unix timestamp of last activity.
role_set_keystringoptional
The key of the [role set](https://clerk.com/docs/guides/organizations/control-access/role-sets) assigned to this organization.
400Request was not successful
errorsarray<object>required
metaobjectoptional
clerk_trace_idstringoptional
401Authentication invalid
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 401 is returned: Authentication invalid. A 404 is returned: Resource not found. A 422 is returned: Invalid request parameters.