āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā ā š shadcn/directory/clerk/clerk-docs/reference/backend/organization/update-organization-logo ā āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā
updateOrganizationLogo()'
description: Use Clerk's JS Backend SDK to update an organization's logo.
sdk: js-backend{/* clerk/javascript file: https://github.com/clerk/javascript/blob/main/packages/backend/src/api/endpoints/OrganizationApi.ts#L136 */}
Updates the organization's logo. Returns an Organization object.
function updateOrganizationLogo(
organizationId: string,
params: UpdateLogoParams,
): Promise<Organization>
UpdateLogoParamsThe file to upload as the organization's logo.
uploaderUserId?stringThe ID of the user uploading the logo. </Properties>
[!WARNING] Using JS Backend SDK methods can contribute towards rate limiting. To set an organization's logo, it's recommended to use the frontend
organization.setLogo()method instead.
const organizationId = 'org_123'
const uploaderUserId = 'user_123'
const fileBits = ['logo-pic-content']
const fileName = 'logo.png'
const file = new File(fileBits, fileName, { type: 'image/png' })
const params = {
file,
uploaderUserId,
}
const response = await clerkClient.organizations.updateOrganizationLogo(organizationId, params)
This method in the SDK is a wrapper around the BAPI endpoint PUT/organizations/{organization_id}/logo. See the BAPI reference{{ target: '_blank' }} for more information.
ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā