Module access
Per-person grants on private modules — separate from workspace role, which only decides whether a grant is even necessary.
GET
/module-access/{workspaceId}/{userId}Get a member's module access
Every module in the workspace, each with granted/openToRole/canAccess already decided server-side.
Path parameters
| workspaceId* | string | Workspace id. |
| userId* | string | The member's user id. |
bash
curl -X GET 'https://api.conexus-x.example/api/module-access/{workspaceId}/{userId}' \
-H 'x-api-key: YOUR_PIT_KEY'Example response
json
{
"role": "member",
"modules": [
{
"_id": "66f1a2b3c4d5e6f7a8b9c1a1",
"name": "Deals",
"icon": "briefcase",
"color": "#6a00ff",
"visibility": "private",
"granted": true,
"openToRole": false,
"canAccess": true,
"isCreator": false
}
]
}PUT
/module-access/{workspaceId}/{userId}Set a member's module access
Replaces the WHOLE grant set for that person in one call — send every module id they should have, not just the one changing.
Path parameters
| workspaceId* | string | Workspace id. |
| userId* | string | The member's user id. |
Body
| moduleIds* | string[] | The complete set of module ids this person may access. |
bash
curl -X PUT 'https://api.conexus-x.example/api/module-access/{workspaceId}/{userId}' \
-H 'x-api-key: YOUR_PIT_KEY'
-H 'Content-Type: application/json' \
-d '{"moduleIds":["66f1a2b3c4d5e6f7a8b9c1a1"]}'Example response
json
{
"message": "Access updated.",
"moduleIds": [
"66f1a2b3c4d5e6f7a8b9c1a1"
]
}