roles

Embed
Preview of the card
<a href="https://lucidace.com/docs/ref-roles"><img src="https://lucidace.com/docs/_api/public/orgs/af34862a-c837-4478-8335-0505efe40459/spaces/da916cd3-c0fc-4b63-b971-b3c13623daf3/pages/40bac54a-b953-4da2-9820-d8ed12a72940/social-card.svg?v=3e7ae33eec8b" alt="roles" width="600" height="315"></a>
PUThttps://lucidace.com/v1/orgs/{org_id}/members/{user_id}/roleScope roles:write

Parameters

org_idstringpathrequired
user_idstringpathrequired

Request body

application/json
role_idstringrequired
{
  "role_id": "string"
}

Code samples

cURL
curl -X PUT "https://lucidace.com/v1/orgs/{org_id}/members/{user_id}/role" \
  -H "Content-Type: application/json" \
  -d '{"role_id":"string"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

204
403
404
409 would leave the org without an owner
GEThttps://lucidace.com/v1/orgs/{org_id}/rolesScope roles:read

Parameters

org_idstringpathrequired

Code samples

cURL
curl -X GET "https://lucidace.com/v1/orgs/{org_id}/roles"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Page of RoleRow (built-ins first)
Example
{
  "data": [
    {
      "builtin": true,
      "created_at": "2024-01-01T00:00:00Z",
      "id": "string",
      "name": "string",
      "permissions": {}
    }
  ],
  "next_cursor": "string"
}
Schema
dataRoleRow[]required
Show child parameters
builtinbooleanrequired
created_atstringrequired
idstringrequired
namestringrequired
permissionsobjectrequired
{resource: none|read|write|admin}
next_cursorstring
404
POSThttps://lucidace.com/v1/orgs/{org_id}/rolesScope roles:write

Parameters

org_idstringpathrequired

Request body

application/json
namestringrequired
permissionsobjectrequired
{resource: none|read|write|admin}; resources: insight, dashboard, replay, flag, experiment, survey, cohort, person, connector, settings, members, billing, pii, toolbar.
{
  "name": "string",
  "permissions": {}
}

Code samples

cURL
curl -X POST "https://lucidace.com/v1/orgs/{org_id}/roles" \
  -H "Content-Type: application/json" \
  -d '{"name":"string","permissions":{}}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

201
Example
{
  "builtin": true,
  "created_at": "2024-01-01T00:00:00Z",
  "id": "string",
  "name": "string",
  "permissions": {}
}
Schema
builtinbooleanrequired
created_atstringrequired
idstringrequired
namestringrequired
permissionsobjectrequired
{resource: none|read|write|admin}
400
403
404
409
GEThttps://lucidace.com/v1/orgs/{org_id}/roles/{id}Scope roles:read

Parameters

org_idstringpathrequired
idstringpathrequired

Code samples

cURL
curl -X GET "https://lucidace.com/v1/orgs/{org_id}/roles/{id}"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

403
404
DELETEhttps://lucidace.com/v1/orgs/{org_id}/roles/{id}Scope roles:write

Parameters

org_idstringpathrequired
idstringpathrequired

Code samples

cURL
curl -X DELETE "https://lucidace.com/v1/orgs/{org_id}/roles/{id}"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

204
404 unknown role, or a built-in
409 still assigned
PATCHhttps://lucidace.com/v1/orgs/{org_id}/roles/{id}Scope roles:write

Parameters

org_idstringpathrequired
idstringpathrequired

Request body

application/json
namestringrequired
permissionsobjectrequired
{resource: none|read|write|admin}; resources: insight, dashboard, replay, flag, experiment, survey, cohort, person, connector, settings, members, billing, pii, toolbar.
{
  "name": "string",
  "permissions": {}
}

Code samples

cURL
curl -X PATCH "https://lucidace.com/v1/orgs/{org_id}/roles/{id}" \
  -H "Content-Type: application/json" \
  -d '{"name":"string","permissions":{}}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

404 unknown role, or a built-in
409
PUThttps://lucidace.com/v1/projects/{project_id}/members/{user_id}/roleScope admin

Override one member's role in one project (e.g. replay access for a single product).

Parameters

project_idstringpathrequired
user_idstringpathrequired

Request body

application/json
role_idstring
null clears the override.
{
  "role_id": "string"
}

Code samples

cURL
curl -X PUT "https://lucidace.com/v1/projects/{project_id}/members/{user_id}/role" \
  -H "Content-Type: application/json" \
  -d '{"role_id":"string"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

204
403
404
GEThttps://lucidace.com/v1/projects/{project_id}/rolesScope settings:read

The roles of the project's org, for project-scoped clients (MCP `list_roles`): the same read permission as the project member list, so nobody learns roles of an org they cannot see.

Parameters

project_idstringpathrequired

Code samples

cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/roles"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Page of RoleRow (built-ins first)

Same as 200 · GET /v1/orgs/{org_id}/roles

404
Updated