@wildix/xbees-conversations-client > InviteCommand
InviteCommand class
Invite a list of users to x-bees. This operation creates an account for specified emails or phone numbers. Use this method to create users who can be added to conversations later.
Signature:
export declare class InviteCommand extends InviteCommand_base
Extends: InviteCommand_base
Example
Use a bare-bones client and the command you need to make an API call.
import { ConversationsClient, InviteCommand } from "@wildix/xbees-conversations-client"; // ES Modules import
// const { ConversationsClient, InviteCommand } = require("@wildix/xbees-conversations-client"); // CommonJS import
const client = new ConversationsClient(config);
const input = { // InviteInput
invitees: [ // UsersToInviteList // required
{ // UserToInvite
email: "STRING_VALUE",
phone: "STRING_VALUE",
name: "STRING_VALUE",
colleague: true || false,
},
],
};
const command = new InviteCommand(input);
const response = await client.send(command);
// { // InviteOutput
// users: [ // UsersList // required
// { // User
// id: "STRING_VALUE", // required
// name: "STRING_VALUE",
// email: "STRING_VALUE",
// phone: "STRING_VALUE",
// picture: "STRING_VALUE",
// locale: "STRING_VALUE",
// timeZone: "STRING_VALUE",
// company: "STRING_VALUE",
// bot: true || false,
// pbxDomain: "STRING_VALUE",
// pbxPort: "STRING_VALUE",
// pbxExtension: "STRING_VALUE",
// pbxSerial: "STRING_VALUE",
// pbxUserId: "STRING_VALUE",
// createdAt: "STRING_VALUE",
// updatedAt: "STRING_VALUE",
// },
// ],
// };