Add User to Workspace
curl --request POST \
--url https://be.datagol.ai/noCo/api/v2/workspaces/{workspaceId}/bulkUsers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"workSpaceUsers": [
{
"email": "user1@datagol.com",
"role": "EDITOR"
},
{
"email": "user2@datagol.com",
"role": "VIEWER"
}
]
}
'import requests
url = "https://be.datagol.ai/noCo/api/v2/workspaces/{workspaceId}/bulkUsers"
payload = { "workSpaceUsers": [
{
"email": "user1@datagol.com",
"role": "EDITOR"
},
{
"email": "user2@datagol.com",
"role": "VIEWER"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
workSpaceUsers: [
{email: 'user1@datagol.com', role: 'EDITOR'},
{email: 'user2@datagol.com', role: 'VIEWER'}
]
})
};
fetch('https://be.datagol.ai/noCo/api/v2/workspaces/{workspaceId}/bulkUsers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://be.datagol.ai/noCo/api/v2/workspaces/{workspaceId}/bulkUsers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'workSpaceUsers' => [
[
'email' => 'user1@datagol.com',
'role' => 'EDITOR'
],
[
'email' => 'user2@datagol.com',
'role' => 'VIEWER'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://be.datagol.ai/noCo/api/v2/workspaces/{workspaceId}/bulkUsers"
payload := strings.NewReader("{\n \"workSpaceUsers\": [\n {\n \"email\": \"user1@datagol.com\",\n \"role\": \"EDITOR\"\n },\n {\n \"email\": \"user2@datagol.com\",\n \"role\": \"VIEWER\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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))
}HttpResponse<String> response = Unirest.post("https://be.datagol.ai/noCo/api/v2/workspaces/{workspaceId}/bulkUsers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"workSpaceUsers\": [\n {\n \"email\": \"user1@datagol.com\",\n \"role\": \"EDITOR\"\n },\n {\n \"email\": \"user2@datagol.com\",\n \"role\": \"VIEWER\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://be.datagol.ai/noCo/api/v2/workspaces/{workspaceId}/bulkUsers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"workSpaceUsers\": [\n {\n \"email\": \"user1@datagol.com\",\n \"role\": \"EDITOR\"\n },\n {\n \"email\": \"user2@datagol.com\",\n \"role\": \"VIEWER\"\n }\n ]\n}"
response = http.request(request)
puts response.read_bodyWorkspaces
Add User to Workspace
1️⃣ Overview
Purpose: Allows adding multiple users to a specific workspace in a single request.
Each user is assigned a role within the workspace.
Upon being added, the invited user receives an email containing a registration link with a unique hash and type as query parameters:
http://<app-domain>/register?hash=e0754cfc-f7d1-4cc3-8690-e34a2f17291d&type=WORK_SPACE
hash— A unique UUID tied to the workspace invitation. Must be passed in the sign-up API to complete registration.type— Indicates the invitation context.WORK_SPACEmeans the user is being invited to a workspace.
2️⃣ Endpoint
POST /noCo/api/v2/workspaces/{workspaceId}/bulkUsers
3️⃣ Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| workspaceId | UUID | ✅ Yes | Identifier of the workspace |
4️⃣ Authentication
Requires authentication using:
Authorization: Bearer <token>
5️⃣ Request Headers
| Header | Required |
|---|---|
| Authorization | ✅ Yes |
| Content-Type: application/json | ✅ Yes |
6️⃣ Request Body Schema
{
"workSpaceUsers": [
{
"email": "string",
"role": "string"
}
],
"message": "string"
}
7️⃣ Field Descriptions
Workspace Users
| Parameter | Type | Required | Description |
|---|---|---|---|
| workSpaceUsers | array | ✅ Yes | List of users to be added to the workspace |
| workSpaceUsers.email | string | ✅ Yes | Email ID of the user |
| workSpaceUsers.role | string | ✅ Yes | Role assigned in the workspace (CREATOR, EDITOR, VIEWER) |
| message | string | ❌ No | Optional message sent along with the invite |
8️⃣ Invitation Flow
Once this API is called successfully, the invited user receives an email with a registration link:
http://<app-domain>/register?hash=e0754cfc-f7d1-4cc3-8690-e34a2f17291d&type=WORK_SPACE
The user must use this link to complete their registration by calling:
POST /idp/api/v1/user/sign-up
With the hash extracted from the link:
{
"email": "user@example.com",
"password": "Demo12#$",
"firstname": "John",
"lastname": "Doe",
"hash": "e0754cfc-f7d1-4cc3-8690-e34a2f17291d"
}
⚠️ The
hashis single-use and time-limited. If expired, the workspace admin must re-invite the user.
9️⃣ Example Request
curl -X POST https://be.datagol.ai/noCo/api/v2/workspaces/{workspaceId}/bulkUsers \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"workSpaceUsers": [
{
"email": "user1@datagol.com",
"role": "EDITOR"
},
{
"email": "user2@datagol.com",
"role": "VIEWER"
}
],
"message": "Workspace access invitation"
}'
🔟 Behavior Summary
Enables bulk addition of users to a workspace and assigns roles to each user.
• Role Assignment — Each user is assigned CREATOR, EDITOR, or VIEWER role.
• Invitation Email — Each invited user receives an email with a registration link containing a unique hash and type=WORK_SPACE.
• Hash-Based Registration — The invited user must use the hash from the email link to complete sign-up via POST /idp/api/v1/user/sign-up.
• OTP Not Required — Workspace-invited users are activated via hash validation and do not go through the OTP verification step.
POST
/
noCo
/
api
/
v2
/
workspaces
/
{workspaceId}
/
bulkUsers
Add User to Workspace
curl --request POST \
--url https://be.datagol.ai/noCo/api/v2/workspaces/{workspaceId}/bulkUsers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"workSpaceUsers": [
{
"email": "user1@datagol.com",
"role": "EDITOR"
},
{
"email": "user2@datagol.com",
"role": "VIEWER"
}
]
}
'import requests
url = "https://be.datagol.ai/noCo/api/v2/workspaces/{workspaceId}/bulkUsers"
payload = { "workSpaceUsers": [
{
"email": "user1@datagol.com",
"role": "EDITOR"
},
{
"email": "user2@datagol.com",
"role": "VIEWER"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
workSpaceUsers: [
{email: 'user1@datagol.com', role: 'EDITOR'},
{email: 'user2@datagol.com', role: 'VIEWER'}
]
})
};
fetch('https://be.datagol.ai/noCo/api/v2/workspaces/{workspaceId}/bulkUsers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://be.datagol.ai/noCo/api/v2/workspaces/{workspaceId}/bulkUsers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'workSpaceUsers' => [
[
'email' => 'user1@datagol.com',
'role' => 'EDITOR'
],
[
'email' => 'user2@datagol.com',
'role' => 'VIEWER'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://be.datagol.ai/noCo/api/v2/workspaces/{workspaceId}/bulkUsers"
payload := strings.NewReader("{\n \"workSpaceUsers\": [\n {\n \"email\": \"user1@datagol.com\",\n \"role\": \"EDITOR\"\n },\n {\n \"email\": \"user2@datagol.com\",\n \"role\": \"VIEWER\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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))
}HttpResponse<String> response = Unirest.post("https://be.datagol.ai/noCo/api/v2/workspaces/{workspaceId}/bulkUsers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"workSpaceUsers\": [\n {\n \"email\": \"user1@datagol.com\",\n \"role\": \"EDITOR\"\n },\n {\n \"email\": \"user2@datagol.com\",\n \"role\": \"VIEWER\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://be.datagol.ai/noCo/api/v2/workspaces/{workspaceId}/bulkUsers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"workSpaceUsers\": [\n {\n \"email\": \"user1@datagol.com\",\n \"role\": \"EDITOR\"\n },\n {\n \"email\": \"user2@datagol.com\",\n \"role\": \"VIEWER\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body