createInvitation

@FormUrlEncoded
@POST(value = "organizations/{organization_id}/invitations")
abstract suspend fun createInvitation(@Path(value = "organization_id") organizationId: String, @Field(value = "email_address") emailAddress: String, @Field(value = "role") role: String): ClerkResult<OrganizationInvitation, ClerkErrorResponse>

Create an invitation for a user to join an organization.

Parameters

organizationId

The id of the organization for which the invitation will be created

emailAddress

The email address the invitation will be sent to.

role

The role that will be assigned to the user after joining. This can be one of the predefined roles "org:admin", "org:member" or a custom role.