createOrganizationInvitation()
Creates an invitation for new users to join an organization.
const organizationId = 'my-organization-id';
const inviterUserId = 'my-user-id';
const emailAddress = 'user-email-address';
const role = 'role-to-assign-user';
const organization = await clerkClient.organizations.createOrganizationInvitation({organizationId, inviterUserId, emailAddress, role});
- Name
organizationId
- Type
string
- Description
The organization ID of the organization a user is being invited to.
- Name
inviterUserId
- Type
string
- Description
The user ID of the user creating the invitation.
- Name
emailAddress
- Type
string
- Description
The email address to send the invitation to.
- Name
role
- Type
string
- Description
The role to assign the invited user within the organization.
- Name
redirectUrl?
- Type
string
- Description
The URL users will land at once the organization invitation has been accepted.
- Name
publicMetadata?
- Type
Record<string, unknown>
- Description
Metadata saved on the invitation that is visible to both your Frontend and Backend APIs.
Feedback
Last updated on