curl --request POST \
--url https://cloud.cdata.com/api/v1/admin/workspaces/{id}/members \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"member_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"member_type": "user"
}
'import requests
url = "https://cloud.cdata.com/api/v1/admin/workspaces/{id}/members"
payload = {
"member_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"member_type": "user"
}
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({member_id: 'a1b2c3d4-e5f6-7890-abcd-ef1234567890', member_type: 'user'})
};
fetch('https://cloud.cdata.com/api/v1/admin/workspaces/{id}/members', 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://cloud.cdata.com/api/v1/admin/workspaces/{id}/members",
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([
'member_id' => 'a1b2c3d4-e5f6-7890-abcd-ef1234567890',
'member_type' => 'user'
]),
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://cloud.cdata.com/api/v1/admin/workspaces/{id}/members"
payload := strings.NewReader("{\n \"member_id\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n \"member_type\": \"user\"\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://cloud.cdata.com/api/v1/admin/workspaces/{id}/members")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"member_id\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n \"member_type\": \"user\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://cloud.cdata.com/api/v1/admin/workspaces/{id}/members")
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 \"member_id\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n \"member_type\": \"user\"\n}"
response = http.request(request)
puts response.read_body{
"id": "e5f6a7b8-c9d0-4123-8efa-456789012345",
"workspace_id": "2b6c1f6e-3a7d-4c8e-9d0a-5e4f3a2b1c00",
"member_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"member_type": "user",
"grant_type": "direct",
"group_id": null,
"group_name": null,
"added_at": "2026-06-01T12:00:00Z",
"added_by": "00000000-0000-0000-0000-000000000001"
}Add Workspace Member
Add a user, service account, or group to a workspace. When member_type is group, all current members of the group gain effective access to the workspace. These members appear in GET /workspaces/{id}/members with grant_type: group_derived. Adding a member does not grant any role. Assign roles separately with the workspace-scoped role endpoints for the user, service account, or group.
curl --request POST \
--url https://cloud.cdata.com/api/v1/admin/workspaces/{id}/members \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"member_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"member_type": "user"
}
'import requests
url = "https://cloud.cdata.com/api/v1/admin/workspaces/{id}/members"
payload = {
"member_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"member_type": "user"
}
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({member_id: 'a1b2c3d4-e5f6-7890-abcd-ef1234567890', member_type: 'user'})
};
fetch('https://cloud.cdata.com/api/v1/admin/workspaces/{id}/members', 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://cloud.cdata.com/api/v1/admin/workspaces/{id}/members",
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([
'member_id' => 'a1b2c3d4-e5f6-7890-abcd-ef1234567890',
'member_type' => 'user'
]),
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://cloud.cdata.com/api/v1/admin/workspaces/{id}/members"
payload := strings.NewReader("{\n \"member_id\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n \"member_type\": \"user\"\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://cloud.cdata.com/api/v1/admin/workspaces/{id}/members")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"member_id\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n \"member_type\": \"user\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://cloud.cdata.com/api/v1/admin/workspaces/{id}/members")
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 \"member_id\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n \"member_type\": \"user\"\n}"
response = http.request(request)
puts response.read_body{
"id": "e5f6a7b8-c9d0-4123-8efa-456789012345",
"workspace_id": "2b6c1f6e-3a7d-4c8e-9d0a-5e4f3a2b1c00",
"member_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"member_type": "user",
"grant_type": "direct",
"group_id": null,
"group_name": null,
"added_at": "2026-06-01T12:00:00Z",
"added_by": "00000000-0000-0000-0000-000000000001"
}Authorizations
OAuth 2.0 client credentials. Alternatively, you can authenticate with a personal access token (PAT) by sending Authorization: Basic base64(email:PAT).
Scopes
Write access to workspace resources.
Path Parameters
Workspace identifier (UUID).
Body
Response
Created
Membership record identifier.
The workspace.
The user, service account, or group.
user, service_account, group direct for members added explicitly. group_derived for members who gain access through a group.
direct, group_derived Set on group-derived records in list responses. null for direct members.
Set on group-derived records in list responses. null for direct members.
ISO 8601 UTC.
The user who added the member.
Was this page helpful?