Docs

UserOrganizationInvitation

The OrganizationInvitation object is the model around an organization invitation.

Properties

  • Name
    id
    Type
    string
    Description

    A unique identifier for this organization invitation.

  • Name
    emailAddress
    Type
    string
    Description

    The email address the invitation has been sent to.

  • Name
    publicOrganizationData
    Type
    object
    Description

    Information about the organization the invitation is for. It includes the following properties:

    • hasImage
    • imageUrl
    • name
    • id
    • slug
  • Name
    publicMetadata
    Type
    object
    Description

    The public metadata of the organization invitation.

  • Name
    role
    Type
    OrganizationCustomRoleKey
    Description

    The role of the current user in the organization.

  • Name
    status
    Type
    'pending' | 'accepted' | 'revoked'
    Description

    The status of the invitation.

  • Name
    createdAt
    Type
    Date
    Description

    Date of the time the invitation was created.

  • Name
    updatedAt
    Type
    Date
    Description

    Date of the last time the invitation was updated.

OrganizationCustomRoleKey

OrganizationCustomRoleKey is a string that represents the user's role in the organization. Clerk provides the default roles org:admin and org:member. However, you can create custom roles as well.

Methods

accept()

Accepts the invitation to the organization.

function accept(): Promise<UserOrganizationInvitation>

Example

To see an example of how to use the accept() method, check out the Manage invitations custom flow guide.

Feedback

What did you think of this content?

Last updated on