# Create account (tenant) invite Create a general or account (tenant)-specific invitation token. Use this endpoint to generate invitation tokens for accounts (tenants) or individual users. To create a general invitation token, send the request without specifying an account (tenant) or user. To create an account (tenant)-specific token, include the account (tenant) ID in the request body. To create a token for a specific user of an account (tenant), also include the user ID in the body parameters. If a user ID is provided, you can control whether an invitation email is sent by setting the shouldSendEmail parameter. To set a custom expiration time for the invitation, use the expiresInMinutes parameter to define when the token will expire. A valid environment token is required to call this endpoint. You can obtain it from the environment authentication route. Endpoint: POST /resources/tenants/invites/v1 Security: bearer ## Request fields (application/json): - `tenantId` (string, required) - `userId` (string) - `expiresInMinutes` (number) - `shouldSendEmail` (boolean) - `roleIds` (array) Array of role IDs to assign to invited users ## Response 201 fields (application/json): - `id` (string, required) - `vendorId` (string, required) - `tenantId` (string, required) - `userId` (string) - `token` (string, required) - `expires` (string, required) - `shouldSendEmail` (boolean, required) - `name` (string) - `roleIds` (array)