> ## Documentation Index
> Fetch the complete documentation index at: https://developers.myhero.so/llms.txt
> Use this file to discover all available pages before exploring further.

# Invite to workspace

> Invite someone to a workspace by email, as a member (the default), admin or owner; members can open every project in it. They are emailed an invitation…

`invite_to_workspace`

Invite someone to a workspace by email, as a member (the default), admin or owner; members can open every project in it. They are emailed an invitation, which can't be unsent: first tell the user who and as what, and invite only after their explicit go-ahead. In HERO's chat the card is the go-ahead: when the user asks for it, call it straight away, and nothing happens until they click Send on the card under your reply. Needs a workspace owner or admin; only an owner can invite an owner.

## Parameters

**workspaceId** `string` *required*

**email** `string` *required*

**role** `string, enum: 'member' | 'admin' | 'owner'`

member unless the user asked for more.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.