NewWacht Bench is live — AI-assisted development for Wacht

inviteUser()

Creates an invitation for a future user account.

Usage

The following example shows a basic usage of the backend client from @wacht/nextjs/server.

import { wachtClient } from '@wacht/nextjs/server';export async function inviteUser(email: string) {  const client = await wachtClient();  return client.invitations.inviteUser({    first_name: 'Ada',    last_name: 'Lovelace',    email_address: email,    expiry_days: 7,  });}

Signature

function inviteUser(  request: InviteUserRequest,): Promise<DeploymentInvitation>

Parameters

first_name: string;
Invitee first name.
last_name: string;
Invitee last name.
email_address: string;
Invitee email address.

Return value

result?: DeploymentInvitation | undefined;
Operation result payload.

Behavior

  • Wraps the corresponding backend endpoint for this capability.
  • Use the returned payload as canonical backend state for follow-up operations.

On this page