Authentication & Scope
Requires theworkspace-users-write ability.
Request
Path Parameters
Body Parameters
Response
200 OK – User added or invitation sent.
422 Unprocessable Entity – User is already a member or validation error.Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Add an existing user to the workspace or send an invitation if the user doesn’t exist.
workspace-users-write ability.
POST /workspaces/1/users/add HTTP/1.1
Host: api.raydocs.com
Authorization: Bearer <token>
Content-Type: application/json
{
"email": "newuser@example.com",
"role": "user"
}
| Parameter | Type | Required | Description |
|---|---|---|---|
workspaceId | integer | Yes | The workspace ID |
| Parameter | Type | Required | Description |
|---|---|---|---|
email | string | Yes | Email address of the user to add |
role | string | Yes | Role to assign: admin, user, or readonly |
200 OK – User added or invitation sent.
{
"message": "User added successfully"
}
{
"message": "Invitation sent",
"invite_id": 123
}
422 Unprocessable Entity – User is already a member or validation error.