Skip to main content

updateOrganizationLogo()

Updates the logo of the given Organization.

Returns the updated Organization.

function updateOrganizationLogo(organizationId: string, params: { file: Blob | File; uploaderUserId?: string }): Promise<Organization>
  • Name
    organizationId
    Type
    string
    Description

    The ID of the Organization to update the logo for.

  • Name
    params
    Type
    { file: Blob | File; uploaderUserId?: string; }
    Description

    The parameters to update the logo with.

  • Name
    params.file
    Type
    Blob | File
    Description

    The file to upload as the logo.

  • Name
    params.uploaderUserId?
    Type
    string
    Description

    The ID of the user uploading the logo.

Note

Using clerkClient varies based on the SDK you're using. Refer to the overview for usage details, including guidance on how to access the userId and other properties.

Warning

Using clerkClient 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)

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