Skip to main content
POST
/
workspace
/
invite-user
Invite a user to a workspace
curl --request POST \
  --url https://app.myhero.so/workspace/invite-user \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "email": "jsmith@example.com",
  "workspaceId": "<string>",
  "role": "owner"
}
'
{
  "data": {
    "_id": "<string>",
    "email": "<string>",
    "invitedBy": "<string>",
    "status": "pending",
    "expires": 123,
    "createdAt": 123,
    "updatedAt": 123,
    "data": "<unknown>"
  }
}

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.

Sends a workspace invitation to the given email address at the specified role. Creates an invitation link and sends an email; if the user is not yet registered, a signup link is included. Returns the created invitation or null.

Authorizations

Authorization
string
header
required

HERO personal access token

Body

application/json
email
string<email>
required
workspaceId
string
required
Minimum string length: 1
role
enum<string>
required
Available options:
owner,
admin,
member,
editor,
viewer

Response

200 response

data
object
required