Members & Roles
Read members, manage invitations, and assign roles with scoped permissions
Set variables to auto-fill all examples and run requests in-browser.
Members are users who can access a tenant. Roles define their permissions. Send these requests to https://api.laserdata.cloud.
Listing members requires member:read. Invitations and removal require member:manage. Reading roles requires role:read, and creating or deleting them requires role:manage.
Members
List Members
GET/tenants/{tenant_id}/membersList all members of a tenant with their assigned roles.
curl "https://api.laserdata.cloud/tenants/{tenant_id}/members?page=1&results=10" \
-H "ld-api-key: YOUR_API_KEY"{
"items": [
{
"id": 1,
"email": "alice@example.com",
"name": "Alice",
"active": true,
"roles": ["developer"],
"created_at": "2025-01-15T10:00:00Z"
}
],
"page": 1,
"total_results": 1,
"total_pages": 1
}Update Member Role
PUT/tenants/{tenant_id}/members/{member_id}Change the roles of a tenant member, or activate or deactivate the member. Requires member:manage.
curl -X PUT https://api.laserdata.cloud/tenants/{tenant_id}/members/{member_id} \
-H "ld-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"active": true,
"roles": [123, 456]
}'roles replaces the member's roles. Each role the request adds must be one you hold yourself in the same scope: organization, workspace, or environment. Otherwise it answers 403 with insufficient_permissions. Roles the member already holds can stay in the list. Setting active to false suspends the API keys the member created in the organization until the member is active again.
Remove Member
DELETE/tenants/{tenant_id}/members/{member_id}Remove a member from the tenant. The API keys they created in the organization are deleted with them.
curl -X DELETE https://api.laserdata.cloud/tenants/{tenant_id}/members/{member_id} \
-H "ld-api-key: YOUR_API_KEY"Invitations
Invite a Member
POST/tenants/{tenant_id}/invitationsSend an invitation email to a new member with a specified role.
curl -X POST https://api.laserdata.cloud/tenants/{tenant_id}/invitations \
-H "ld-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"email": "bob@example.com",
"roles": [100]
}'Every role of the invitation must be one you hold yourself in the same scope. Otherwise it answers 403 with insufficient_permissions and no invitation is created.
The tenant configuration determines these domain-restriction errors:
| Status / Code | Cause |
|---|---|
400 invitee_domain_locked | The invitee's email domain belongs to another tenant that has set block_external_invitations: true. |
400 invitee_domain_not_allowed | This tenant has enforce_domain_only_invitations: true and the invitee's email domain is outside the tenant's claimed email_domain (and any workspace subdomains). |
List Invitations
GET/tenants/{tenant_id}/invitationsList all pending invitations.
curl "https://api.laserdata.cloud/tenants/{tenant_id}/invitations?page=1&results=10" \
-H "ld-api-key: YOUR_API_KEY"Cancel Invitation
DELETE/tenants/{tenant_id}/invitations/{invitation_id}Cancel a pending invitation before it is accepted.
curl -X DELETE https://api.laserdata.cloud/tenants/{tenant_id}/invitations/{invitation_id} \
-H "ld-api-key: YOUR_API_KEY"Roles
List Roles
GET/tenants/{tenant_id}/rolesList all roles defined in the tenant, including built-in and custom roles.
curl "https://api.laserdata.cloud/tenants/{tenant_id}/roles?page=1&results=10" \
-H "ld-api-key: YOUR_API_KEY"{
"items": [
{
"id": 1,
"name": "admin",
"kind": "system"
},
{
"id": 2,
"name": "developer",
"kind": "custom"
}
],
"page": 1,
"total_results": 2,
"total_pages": 1
}Role kind identifies how the role was created:
systemidentifiesadmin,developer,viewer, orbilling. These four built-in roles cannot be deleted. Tenant ownership is stored separately.customidentifies a role created through the API or Console.api_keyidentifies a dedicated role created from inline key permissions instead of an existingrole_id.
Get Role
GET/tenants/{tenant_id}/roles/{role_id}Get a role by ID.
curl https://api.laserdata.cloud/tenants/{tenant_id}/roles/{role_id} \
-H "ld-api-key: YOUR_API_KEY"List Role Members
GET/tenants/{tenant_id}/roles/{role_id}/membersList all members assigned to a role.
curl "https://api.laserdata.cloud/tenants/{tenant_id}/roles/{role_id}/members?page=1&results=10" \
-H "ld-api-key: YOUR_API_KEY"Create Role
POST/tenants/{tenant_id}/rolesCreate a custom role with tenant, workspace, and environment permission scopes.
curl -X POST https://api.laserdata.cloud/tenants/{tenant_id}/roles \
-H "ld-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "developer",
"permissions": {
"tenant": ["info:read", "member:read", "workspace:read"],
"workspace": ["environment:read", "environment:manage"],
"environment": ["deployment:read"],
"workspaces": {
"1": {
"permissions": ["environment:read"],
"environment": ["deployment:read", "deployment:manage"],
"environments": {
"2": ["deployment:read", "deployment:manage", "deployment:telemetry:read"]
}
}
}
}
}'| Field | Required | Description |
|---|---|---|
name | Yes | Unique role name within the tenant |
permissions.tenant | No | Tenant-level permission strings (e.g. info:read, member:manage) |
permissions.workspace | No | Default workspace permissions applied to all workspaces |
permissions.environment | No | Default environment permissions applied to every environment in every workspace. The blanket "all environments" knob: spares you per-workspace overrides for read-only or developer-style roles |
permissions.workspaces | No | Per-workspace overrides keyed by workspace ID. Each entry takes its own permissions, environment (default for that workspace's environments), and environments map (per-environment overrides) |
Environment permissions use the most specific grant: the environment override, workspace environment default, then global permissions.environment. Without a matching grant, access is denied. Workspace permissions use per-workspace permissions, then global permissions.workspace, then none.
A new role can hold only permissions you hold yourself in the same scope: organization, workspace, or environment. Otherwise it answers 403 with insufficient_permissions and no role is created.
Assign Role to Members
PUT/tenants/{tenant_id}/roles/{role_id}/members/assignAssign one or more members to a role.
curl -X PUT https://api.laserdata.cloud/tenants/{tenant_id}/roles/{role_id}/members/assign \
-H "ld-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"members": [1, 2, 3]
}'You can assign only a role you hold yourself in the same scope. Otherwise it answers 403 with insufficient_permissions and nobody is assigned.
Revoke Role from Members
PUT/tenants/{tenant_id}/roles/{role_id}/members/revokeRemove one or more members from a role.
curl -X PUT https://api.laserdata.cloud/tenants/{tenant_id}/roles/{role_id}/members/revoke \
-H "ld-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"members": [2]
}'Delete Role
DELETE/tenants/{tenant_id}/roles/{role_id}Delete a custom role. Built-in roles cannot be deleted. Members assigned to this role will need a new role assigned.
curl -X DELETE https://api.laserdata.cloud/tenants/{tenant_id}/roles/{role_id} \
-H "ld-api-key: YOUR_API_KEY"