Organization

@Serializable
data class Organization(val id: String, val name: String, val slug: String? = null, val imageUrl: String, val hasImage: Boolean, val membersCount: Int? = null, val pendingInvitationsCount: Int? = null, val maxAllowedMemberships: Int, val adminDeleteEnabled: Boolean, val createdAt: Long, val updatedAt: Long, val publicMetadata: JsonElement? = null)

The Organization object holds information about an organization, as well as methods for managing it.

Constructors

Link copied to clipboard
constructor(id: String, name: String, slug: String? = null, imageUrl: String, hasImage: Boolean, membersCount: Int? = null, pendingInvitationsCount: Int? = null, maxAllowedMemberships: Int, adminDeleteEnabled: Boolean, createdAt: Long, updatedAt: Long, publicMetadata: JsonElement? = null)

Properties

Link copied to clipboard

A getter boolean to check if the admin of the organization can delete it.

Link copied to clipboard

The date when the organization was created.

Link copied to clipboard

A getter boolean to check if the organization has an uploaded image. Returns false if Clerk is displaying an avatar for the organization.

Link copied to clipboard
val id: String

The unique identifier of the related organization.

Link copied to clipboard

Holds the organization logo or default logo. Compatible with Clerk's Image Optimization.

Link copied to clipboard

The maximum number of memberships allowed for the organization.

Link copied to clipboard
val membersCount: Int? = null

The number of members the associated organization contains.

Link copied to clipboard

The name of the related organization.

Link copied to clipboard

The number of pending invitations to users to join the organization.

Link copied to clipboard
val publicMetadata: JsonElement? = null

Metadata that can be read from the Frontend API and Backend API and can be set only from the Backend API.

Link copied to clipboard
val slug: String? = null

The organization slug. If supplied, it must be unique for the instance.

Link copied to clipboard

The date when the organization was last updated.