Skip to main content
Docs

updateOrganizationLogo()

Updates the organization's logo. Returns an object.

function updateOrganizationLogo(
  organizationId: string,
  params: UpdateLogoParams,
): Promise<Organization>
  • Name
    file
    Type
    Blob | File
    Description

    The file to upload as the organization's logo.

  • Name
    uploaderUserId?
    Type
    string
    Description

    The ID of the user uploading the logo.

Note

Importing clerkClient varies based on your framework. Refer to the for usage details, including guidance on .

Warning

Using Backend SDK methods can contribute towards rate limiting. To set an organization's logo, it's recommended to use the frontend 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)

Backend API (BAPI) endpoint

This method in the SDK is a wrapper around the BAPI endpoint PUT/organizations/{organization_id}/logo. See the BAPI reference for more information.

Feedback

What did you think of this content?

Last updated on