Multi-Role Feature
Update role configuration
Partial update of an app role. **`featurePermissions`** keys must match the app-role gate map (`services/appRoleFeatureMap.js`); schema: `components/schemas/AppRoleFeaturePermissions`.
/api/projects/{projectId}/multi-role/roles/{roleSlug}SDK setup
Create a client and set credentials (JWT and/or API key) before calling the API. Match the authentication type shown above.
import { Configuration, MultiRoleFeatureApi } from 'mudbase-sdk';
const configuration = new Configuration({
basePath: 'https://cloud.mudbase.dev',
accessToken: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJ1c3JfbW9yZ2FuX2RlIiwiZW1haWwiOiJtb3JnYW4uY2hlbkBub3J0aHdpbmQuZGV2IiwiZXhwIjoxODI1MTI5NjAwfQ.doc_preview_sig',
});
const multirolefeature = new MultiRoleFeatureApi(configuration);import { Configuration, MultiRoleFeatureApi } from 'mudbase-sdk';
const configuration = new Configuration({
basePath: 'https://cloud.mudbase.dev',
accessToken: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJ1c3JfbW9yZ2FuX2RlIiwiZW1haWwiOiJtb3JnYW4uY2hlbkBub3J0aHdpbmQuZGV2IiwiZXhwIjoxODI1MTI5NjAwfQ.doc_preview_sig',
});
const multirolefeature = new MultiRoleFeatureApi(configuration);Example request
Call this endpoint using the client from SDK setup. Use View HTTP for a raw cURL example.
const { data: result } = await multirolefeature.updateProjectRole(
"proj_7uTN8WEJe0xm",
"primary-hippodrome-bfun",
{
name: "Olivia Kuhn",
description: "Ondricka and Sons's most advanced Bike technology increases live capabilities",
signupEndpoint: "circuit reboot",
requiresApproval: false,
requiresPayment: true,
requiresKYC: true,
defaultPermissions: "panel navigate",
collectionPermissions: "system transmit",
metadata: "microchip program",
featurePermissions: "feed back up"
}
);const { data: result } = await multirolefeature.updateProjectRole(
"proj_7uTN8WEJe0xm",
"primary-hippodrome-bfun",
{
name: "Olivia Kuhn",
description: "Ondricka and Sons's most advanced Bike technology increases live capabilities",
signupEndpoint: "circuit reboot",
requiresApproval: false,
requiresPayment: true,
requiresKYC: true,
defaultPermissions: "panel navigate",
collectionPermissions: "system transmit",
metadata: "microchip program",
featurePermissions: "feed back up"
}
);Playground
liveTest this endpoint with your own credentials. Your requests will be sent to the live API.
No Request Yet
Send a request to see the full inspector
Authentication
Authorization: Bearer YOUR_TOKEN header (user-facing apps, RBAC). View authentication guide →Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes | — |
roleSlug | string | Yes | Role slug to update (e.g. starter `customer` or a role you added). |
Request Body
Same fields as **Add custom role** — send only fields you want to change. `defaultPermissions` / `collectionPermissions` are normalized the same way as on create. **`featurePermissions`:** `components/schemas/AppRoleFeaturePermissions` (aligned with `services/appRoleFeatureMap.js`).
{
"name": "App user",
"description": "End users of the app",
"signupEndpoint": "customer",
"requiresApproval": false,
"requiresPayment": false,
"requiresKYC": false,
"defaultPermissions": [
{}
],
"collectionPermissions": {},
"metadata": {},
"featurePermissions": {
"messaging": {
"email": true,
"sms": true,
"push": false,
"history": true,
"stats": true
},
"integration": {
"read": true,
"execute": true
},
"storage": {
"read": true,
"upload": true
}
}
}{
"name": "App user",
"description": "End users of the app",
"signupEndpoint": "customer",
"requiresApproval": false,
"requiresPayment": false,
"requiresKYC": false,
"defaultPermissions": [
{}
],
"collectionPermissions": {},
"metadata": {},
"featurePermissions": {
"messaging": {
"email": true,
"sms": true,
"push": false,
"history": true,
"stats": true
},
"integration": {
"read": true,
"execute": true
},
"storage": {
"read": true,
"upload": true
}
}
}Responses
{
"success": true,
"message": "Role updated",
"data": {
"slug": "customer",
"name": "App user",
"description": "End users of the app",
"isEnabled": true,
"isCustom": true,
"signupEndpoint": "customer",
"requiresApproval": false,
"requiresPayment": false,
"requiresKYC": false,
"defaultPermissions": [],
"collectionPermissions": [],
"featurePermissions": {
"messaging": {
"email": true,
"sms": false,
"push": false
},
"integration": {
"read": true,
"execute": true
}
}
}
}{
"success": true,
"message": "Role updated",
"data": {
"slug": "customer",
"name": "App user",
"description": "End users of the app",
"isEnabled": true,
"isCustom": true,
"signupEndpoint": "customer",
"requiresApproval": false,
"requiresPayment": false,
"requiresKYC": false,
"defaultPermissions": [],
"collectionPermissions": [],
"featurePermissions": {
"messaging": {
"email": true,
"sms": false,
"push": false
},
"integration": {
"read": true,
"execute": true
}
}
}
}