Logo
Search
Docs

Workspace invitations create

POST https://app.sulus.ai/api/workspaces/{workspace}/invitations

Invite a teammate by email

Authentication

Send a bearer token created on your dashboard's Developer page:

Authorization: Bearer <YOUR_API_KEY>

Path parameters

workspace string Required

Workspace id.

Validation: UUID of a workspace the caller can access
Stored in workspaces.id

Request body

email string Required

Invitee email.

Validation: required|email|max:255
Stored in workspace_invitations.email
role string Required

Role granted on accept.

Validation: required|string|in:admin,member,viewer
Stored in workspace_invitations.role

Errors

StatusMeaningBody
401 Missing or invalid bearer token
403 Feature workspaces not enabled {"message":"This feature is not enabled for your account. Please contact your administrator.","feature":"workspaces"}
403 Policy denied {"message":"This action is unauthorized."}
422 Validation failed {"message":"The given data was invalid.","errors":{"email":["The email field is required."]}}
422 Business rule from invitation service {"message":"The given data was invalid.","errors":{"email":["An invitation has already been sent to this email address."]}}

Notes

  • Service 422 email errors include: Only the workspace owner can invite team members.; You cannot invite yourself.; This workspace has reached the maximum number of team members.; This user is already a member of your team.; An invitation has already been sent to this email address.
  • Plain invite token is emailed; only token_hash is stored.
curl --request POST \
  --url https://app.sulus.ai/api/workspaces/{workspace}/invitations \
  --header 'Authorization: Bearer <YOUR_API_KEY>' \
  --header 'Content-Type: application/json' \
  --data '{
  "email": "[email protected]",
  "role": "member"
}'
import requests

url = "https://app.sulus.ai/api/workspaces/{workspace}/invitations"
headers = {"Authorization": "Bearer <YOUR_API_KEY>"}
payload = {
  "email": "[email protected]",
  "role": "member"
}

response = requests.post(url, json=payload, headers=headers)
print(response.json())
package main

import (
	"fmt"
	"io"
	"net/http"
	"strings"
)

func main() {
	url := "https://app.sulus.ai/api/workspaces/{workspace}/invitations"
	payload := strings.NewReader(`{
  "email": "[email protected]",
  "role": "member"
}`)
	req, _ := http.NewRequest("POST", url, payload)
	req.Header.Add("Authorization", "Bearer <YOUR_API_KEY>")
	req.Header.Add("Content-Type", "application/json")
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
Response 201
{
    "message": "Invitation sent.",
    "data": {
        "id": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
        "email": "[email protected]",
        "role": "member",
        "expires_at": "2026-08-06T12:00:00.000000Z"
    }
}