Purpose
Invite a user to a workspace (by email or user ID). Triggers notification and permission assignment.
Auth / Scope
workspace:invite permission required (typically admin+).
Headers
Content-Type: application/json
Authorization: Bearer <USER_JWT>
curl --location --request GET 'http://localhost:3000/api/workspaces//members' \
--header 'Content-Type: application/json' \
--data-raw '{
"userId": "u-newuser-123",
"role": "member"
}'{
"message": "User invited successfully",
"data": {
"workspaceId": "w-abc",
"userId": "u-newuser-123",
"role": "member",
"invitedAt": "2025-10-22T17:00:00Z"
}
}