Skip to main content
POST
/
team-invitations
/
send-code
Send an email to invite a user to a team
curl --request POST \
  --url https://api.stack-auth.com/api/v1/team-invitations/send-code \
  --header 'Content-Type: application/json' \
  --data '
{
  "team_id": "ad962777-8244-496a-b6a2-e0c6a449c79e",
  "email": "johndoe@example.com",
  "callback_url": "https://example.com/handler/team-invitation"
}
'
{
  "success": true,
  "id": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://stackauth-e0affa27-chore-move-mcp-to-a-sep-app.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Body

application/json
team_id
string
required

The unique identifier of the team

Example:

"ad962777-8244-496a-b6a2-e0c6a449c79e"

email
string
required

The email of the user to invite.

Example:

"johndoe@example.com"

callback_url
string
required

The base callback URL to construct an invite link with. A query parameter code with the verification code will be appended to it. The page should then make a request to the /team-invitations/accept endpoint.

Example:

"https://example.com/handler/team-invitation"

Response

200 - application/json

Successful response

success
boolean
required
id
string
required