API reference
Groups
Groups of people. Access rules and apps are usually granted to groups.
List groups
GET/v0/tenants/{tenant_id}/groups
Returns every group in the workspace — created in Cloudraw, imported from Active Directory, or synced by your directory — with its members and how many rules use it. Not paginated; sorted by name.
Token: read-only or full access · Created by: owner or security admin
Path parameters
- tenant_idstringrequired
Your workspace id (Settings → Workspace in the console; it is also in every console URL).
Responses
200 All groups.
application/json
- itemsarray of GroupListItemrequired
- directory_sourcestring | null
The connected directory, if any.
401 unauthorized invalid-token token-expired
unauthorized: No Authorization: Bearer crw_… header was sent.
invalid-token: The token is unknown or was revoked.
token-expired: The token is past its expiry date. Create a new one.
403 insufficient-role tenant-assertion-mismatch
insufficient-role: The token's role ceiling does not allow this call.
tenant-assertion-mismatch: The token belongs to another workspace than {tenant_id}.
404 tenant-not-found
tenant-not-found: No workspace with this id.
curl -sS -X GET "https://cdapi.cloudraw.com/v0/tenants/tq7x2m9k4ab/groups" \
-H "Authorization: Bearer $CLOUDRAW_TOKEN"$headers = @{ Authorization = "Bearer $env:CLOUDRAW_TOKEN" }
Invoke-RestMethod -Method Get -Uri "https://cdapi.cloudraw.com/v0/tenants/tq7x2m9k4ab/groups" -Headers $headersimport os, uuid, requests
r = requests.get(
"https://cdapi.cloudraw.com/v0/tenants/tq7x2m9k4ab/groups",
headers={"Authorization": f"Bearer {os.environ['CLOUDRAW_TOKEN']}"},
timeout=30,
)
r.raise_for_status()
print(r.json())const res = await fetch("https://cdapi.cloudraw.com/v0/tenants/tq7x2m9k4ab/groups", {
method: "GET",
headers: {
Authorization: `Bearer ${process.env.CLOUDRAW_TOKEN}`,
},
});
if (!res.ok) throw new Error((await res.json()).code);
console.log(await res.json());{
"items": [
{
"id": "g3k9d0s7aa",
"display_name": "Finance",
"source": "local",
"member_count": 2,
"members": [
{
"id": "pz81kd03mna",
"name": "Dana Levi",
"email": "dana.levi@example.com"
},
{
"id": "p4hd8s0qk2l",
"name": "Omer Katz",
"email": "omer.katz@example.com"
}
],
"created_at": "2026-09-21T10:00:00.000Z",
"updated_at": "2026-10-13T09:24:11.000Z",
"used_by_rules": 2
}
],
"directory_source": null
}Create a group
POST/v0/tenants/{tenant_id}/groups
Creates a group managed in Cloudraw (source: local), optionally with members. Members' devices get the group's access at once. Use the group in access rules to grant it apps or networks. Audited.
Token: full access · Created by: owner
Path parameters
- tenant_idstringrequired
Your workspace id (Settings → Workspace in the console; it is also in every console URL).
Request body application/json
- namestringrequired
Name, 1-80 characters, no control characters or
< >. Unique in the workspace (case-insensitive).display_nameis accepted as an alias. - membersarray of string
Person ids (up to 500); each must exist.
Responses
201 The new group.
application/json
- idstringrequired
Group id.
- display_namestringrequired
Name, 1-80 characters, unique in the workspace (case-insensitive).
- sourcestringrequired
local= created in Cloudraw (editable here);ad= imported from Active Directory;scim/directory= managed by your directory. - dnstring
Only for
adgroups: the distinguished name in Active Directory. - member_countintegerrequired
- membersarray of objectrequired
members fields
- idstring
- namestring | null
- emailstring | null
- created_atstring | null (date-time)
- updated_atstring | null (date-time)
400 invalid-name unknown-people
invalid-name: The name is missing, longer than 80 characters or contains a forbidden character.
unknown-people: Some members are not people in this workspace.
401 unauthorized invalid-token token-expired
unauthorized: No Authorization: Bearer crw_… header was sent.
invalid-token: The token is unknown or was revoked.
token-expired: The token is past its expiry date. Create a new one.
403 insufficient-scope insufficient-role tenant-assertion-mismatch
insufficient-scope: The token is read-only and this call changes something.
insufficient-role: The token's role ceiling does not allow this call.
tenant-assertion-mismatch: The token belongs to another workspace than {tenant_id}.
404 tenant-not-found
tenant-not-found: No workspace with this id.
409 group-exists
group-exists: A group with this name already exists.
503 busy
busy: Cloudraw is switching servers or cannot save right now. Retry after Retry-After seconds.
curl -sS -X POST "https://cdapi.cloudraw.com/v0/tenants/tq7x2m9k4ab/groups" \
-H "Authorization: Bearer $CLOUDRAW_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Finance",
"members": [
"pz81kd03mna",
"p4hd8s0qk2l"
]
}'$body = @'
{
"name": "Finance",
"members": [
"pz81kd03mna",
"p4hd8s0qk2l"
]
}
'@
$headers = @{ Authorization = "Bearer $env:CLOUDRAW_TOKEN" }
Invoke-RestMethod -Method Post -Uri "https://cdapi.cloudraw.com/v0/tenants/tq7x2m9k4ab/groups" -Headers $headers -ContentType "application/json" -Body $bodyimport os, uuid, requests
r = requests.post(
"https://cdapi.cloudraw.com/v0/tenants/tq7x2m9k4ab/groups",
headers={"Authorization": f"Bearer {os.environ['CLOUDRAW_TOKEN']}"},
json={
"name": "Finance",
"members": [
"pz81kd03mna",
"p4hd8s0qk2l"
]
},
timeout=30,
)
r.raise_for_status()
print(r.json())const res = await fetch("https://cdapi.cloudraw.com/v0/tenants/tq7x2m9k4ab/groups", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.CLOUDRAW_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"name": "Finance",
"members": [
"pz81kd03mna",
"p4hd8s0qk2l"
]
}),
});
if (!res.ok) throw new Error((await res.json()).code);
console.log(await res.json());{
"id": "g3k9d0s7aa",
"display_name": "Finance",
"source": "local",
"member_count": 2,
"members": [
{
"id": "pz81kd03mna",
"name": "Dana Levi",
"email": "dana.levi@example.com"
},
{
"id": "p4hd8s0qk2l",
"name": "Omer Katz",
"email": "omer.katz@example.com"
}
],
"created_at": "2026-09-21T10:00:00.000Z",
"updated_at": "2026-09-21T10:00:00.000Z"
}Get a group
GET/v0/tenants/{tenant_id}/groups/{group_id}
Returns one group with its members and the access and trust rules that use it.
Token: read-only or full access · Created by: owner or security admin
Path parameters
- tenant_idstringrequired
Your workspace id (Settings → Workspace in the console; it is also in every console URL).
- group_idstringrequired
Group id (from List groups).
Responses
200 The group.
application/json
401 unauthorized invalid-token token-expired
unauthorized: No Authorization: Bearer crw_… header was sent.
invalid-token: The token is unknown or was revoked.
token-expired: The token is past its expiry date. Create a new one.
403 insufficient-role tenant-assertion-mismatch
insufficient-role: The token's role ceiling does not allow this call.
tenant-assertion-mismatch: The token belongs to another workspace than {tenant_id}.
404 group-not-found tenant-not-found
group-not-found: No group with this id (or it was deleted).
tenant-not-found: No workspace with this id.
curl -sS -X GET "https://cdapi.cloudraw.com/v0/tenants/tq7x2m9k4ab/groups/g3k9d0s7aa" \
-H "Authorization: Bearer $CLOUDRAW_TOKEN"$headers = @{ Authorization = "Bearer $env:CLOUDRAW_TOKEN" }
Invoke-RestMethod -Method Get -Uri "https://cdapi.cloudraw.com/v0/tenants/tq7x2m9k4ab/groups/g3k9d0s7aa" -Headers $headersimport os, uuid, requests
r = requests.get(
"https://cdapi.cloudraw.com/v0/tenants/tq7x2m9k4ab/groups/g3k9d0s7aa",
headers={"Authorization": f"Bearer {os.environ['CLOUDRAW_TOKEN']}"},
timeout=30,
)
r.raise_for_status()
print(r.json())const res = await fetch("https://cdapi.cloudraw.com/v0/tenants/tq7x2m9k4ab/groups/g3k9d0s7aa", {
method: "GET",
headers: {
Authorization: `Bearer ${process.env.CLOUDRAW_TOKEN}`,
},
});
if (!res.ok) throw new Error((await res.json()).code);
console.log(await res.json());{
"id": "g3k9d0s7aa",
"display_name": "Finance",
"source": "local",
"member_count": 2,
"members": [
{
"id": "pz81kd03mna",
"name": "Dana Levi",
"email": "dana.levi@example.com"
},
{
"id": "p4hd8s0qk2l",
"name": "Omer Katz",
"email": "omer.katz@example.com"
}
],
"created_at": "2026-09-21T10:00:00.000Z",
"updated_at": "2026-10-13T09:24:11.000Z",
"used_by_rules": [
{
"id": "pr_7xk2m9c0d1",
"name": "Finance to ERP"
},
{
"id": "tr_4m8s2k0x9q",
"name": "Finance laptops",
"kind": "trust"
}
]
}Update a group
PATCH/v0/tenants/{tenant_id}/groups/{group_id}
Renames a group and/or adds and removes members. Only groups created in Cloudraw (source: local) can be changed; directory groups are changed in your directory. Members' device access is recalculated at once. Ids in remove that are not members are ignored. Audited.
Token: full access · Created by: owner
Path parameters
- tenant_idstringrequired
Your workspace id (Settings → Workspace in the console; it is also in every console URL).
- group_idstringrequired
Group id (from List groups).
Request body application/json
- namestring
New name (same rules as on create).
display_nameis accepted as an alias. - addarray of string
Person ids to add (up to 500); each must exist.
- removearray of string
Person ids to remove (up to 500).
Responses
200 The updated group.
application/json
- idstringrequired
Group id.
- display_namestringrequired
Name, 1-80 characters, unique in the workspace (case-insensitive).
- sourcestringrequired
local= created in Cloudraw (editable here);ad= imported from Active Directory;scim/directory= managed by your directory. - dnstring
Only for
adgroups: the distinguished name in Active Directory. - member_countintegerrequired
- membersarray of objectrequired
members fields
- idstring
- namestring | null
- emailstring | null
- created_atstring | null (date-time)
- updated_atstring | null (date-time)
400 invalid-name unknown-people
invalid-name: The new name is empty, longer than 80 characters or contains a forbidden character.
unknown-people: Some ids in add are not people in this workspace.
401 unauthorized invalid-token token-expired
unauthorized: No Authorization: Bearer crw_… header was sent.
invalid-token: The token is unknown or was revoked.
token-expired: The token is past its expiry date. Create a new one.
403 insufficient-scope insufficient-role tenant-assertion-mismatch
insufficient-scope: The token is read-only and this call changes something.
insufficient-role: The token's role ceiling does not allow this call.
tenant-assertion-mismatch: The token belongs to another workspace than {tenant_id}.
404 group-not-found tenant-not-found
group-not-found: No group with this id (or it was deleted).
tenant-not-found: No workspace with this id.
409 group-managed-elsewhere group-exists
group-managed-elsewhere: The group comes from your directory; change it there.
group-exists: Another group already has this name.
503 busy
busy: Cloudraw is switching servers or cannot save right now. Retry after Retry-After seconds.
curl -sS -X PATCH "https://cdapi.cloudraw.com/v0/tenants/tq7x2m9k4ab/groups/g3k9d0s7aa" \
-H "Authorization: Bearer $CLOUDRAW_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"add": [
"p4hd8s0qk2l"
],
"remove": []
}'$body = @'
{
"add": [
"p4hd8s0qk2l"
],
"remove": []
}
'@
$headers = @{ Authorization = "Bearer $env:CLOUDRAW_TOKEN" }
Invoke-RestMethod -Method Patch -Uri "https://cdapi.cloudraw.com/v0/tenants/tq7x2m9k4ab/groups/g3k9d0s7aa" -Headers $headers -ContentType "application/json" -Body $bodyimport os, uuid, requests
r = requests.patch(
"https://cdapi.cloudraw.com/v0/tenants/tq7x2m9k4ab/groups/g3k9d0s7aa",
headers={"Authorization": f"Bearer {os.environ['CLOUDRAW_TOKEN']}"},
json={
"add": [
"p4hd8s0qk2l"
],
"remove": []
},
timeout=30,
)
r.raise_for_status()
print(r.json())const res = await fetch("https://cdapi.cloudraw.com/v0/tenants/tq7x2m9k4ab/groups/g3k9d0s7aa", {
method: "PATCH",
headers: {
Authorization: `Bearer ${process.env.CLOUDRAW_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"add": [
"p4hd8s0qk2l"
],
"remove": []
}),
});
if (!res.ok) throw new Error((await res.json()).code);
console.log(await res.json());{
"id": "g3k9d0s7aa",
"display_name": "Finance",
"source": "local",
"member_count": 2,
"members": [
{
"id": "pz81kd03mna",
"name": "Dana Levi",
"email": "dana.levi@example.com"
},
{
"id": "p4hd8s0qk2l",
"name": "Omer Katz",
"email": "omer.katz@example.com"
}
],
"created_at": "2026-09-21T10:00:00.000Z",
"updated_at": "2026-10-13T09:24:11.000Z"
}Delete a group
DELETE/v0/tenants/{tenant_id}/groups/{group_id}
Deletes a group created in Cloudraw, or un-imports an Active Directory group (the group in Active Directory is not touched). Its members lose the access it gave. Refused while any access or trust rule still uses the group: remove it from those rules first. Groups synced by SCIM or another directory are removed there. Audited.
Token: full access · Created by: owner
Path parameters
- tenant_idstringrequired
Your workspace id (Settings → Workspace in the console; it is also in every console URL).
- group_idstringrequired
Group id (from List groups).
Responses
204 Deleted.
401 unauthorized invalid-token token-expired
unauthorized: No Authorization: Bearer crw_… header was sent.
invalid-token: The token is unknown or was revoked.
token-expired: The token is past its expiry date. Create a new one.
403 insufficient-scope insufficient-role tenant-assertion-mismatch
insufficient-scope: The token is read-only and this call changes something.
insufficient-role: The token's role ceiling does not allow this call.
tenant-assertion-mismatch: The token belongs to another workspace than {tenant_id}.
404 group-not-found tenant-not-found
group-not-found: No group with this id (or it was deleted).
tenant-not-found: No workspace with this id.
409 group-managed-elsewhere group-in-use
group-managed-elsewhere: The group is managed by your directory; remove it there.
group-in-use: Rules still use this group; the problem body lists them in rules.
503 busy
busy: Cloudraw is switching servers or cannot save right now. Retry after Retry-After seconds.
curl -sS -X DELETE "https://cdapi.cloudraw.com/v0/tenants/tq7x2m9k4ab/groups/g3k9d0s7aa" \
-H "Authorization: Bearer $CLOUDRAW_TOKEN"$headers = @{ Authorization = "Bearer $env:CLOUDRAW_TOKEN" }
Invoke-RestMethod -Method Delete -Uri "https://cdapi.cloudraw.com/v0/tenants/tq7x2m9k4ab/groups/g3k9d0s7aa" -Headers $headersimport os, uuid, requests
r = requests.delete(
"https://cdapi.cloudraw.com/v0/tenants/tq7x2m9k4ab/groups/g3k9d0s7aa",
headers={"Authorization": f"Bearer {os.environ['CLOUDRAW_TOKEN']}"},
timeout=30,
)
r.raise_for_status()
print(r.status_code)const res = await fetch("https://cdapi.cloudraw.com/v0/tenants/tq7x2m9k4ab/groups/g3k9d0s7aa", {
method: "DELETE",
headers: {
Authorization: `Bearer ${process.env.CLOUDRAW_TOKEN}`,
},
});
if (!res.ok) throw new Error((await res.json()).code);
console.log(res.status);