corestack_ team_ role_ create
Create a custom role.
When to use it
Create a custom role for your company that gives a set of permissions. You may only give permissions the person you act
for holds (corestack_team_permissions_list). Give it to people with corestack_team_member_role_attach. This is
POST /api/roles/create.
Ask for it
Using the Corefinity MCP server, call corestack_team_role_create with name Release managers, permissions ["viewWebsites","deployEnvironments"]. (Create a custom role.) Tell me what it returned.Inputs
namestringRequired
Up to 255 characters.
permissionsarray of stringsRequired
Permission slugs from corestack_team_permissions_list.
scopeinteger
Always 4 (Custom); leave it out or send 4. It cannot be changed.
Example call
{
"name": "corestack_team_role_create",
"arguments": {
"name": "Release managers",
"permissions": ["viewWebsites", "deployEnvironments"]
}
}If it is refused
| Reason | What to do |
|---|---|
forbidden | Only an owner may create roles. |
invalid_arguments | On permissions: "… is not a permission." for a name that is not one ("… is not a permission (it was removed)." for a retired one, such as assignRoles), or "You are not allowed to add … permission." for one you do not hold, or "… is a Corefinity staff permission: a company's custom role cannot hold it." for a staff permission, even one you hold; or on name. |
tenant_mismatch | The object does not exist or the token may not see it. Check the id. |
scope_required | The token lacks a scope this call needs. Open the link in the answer to add it, then call again. |
pin_refused | The grant is limited to chosen clusters, sites or environments, and this call is outside them. Open the link in the answer to widen it. |
rate_limited | Too many calls. Wait for the number of seconds the answer names. |
temporarily_unavailable | The Control Panel could not answer just now. Nothing was started; try again shortly. |
internal_error | Something went wrong on our side. Quote the trace id to support. |
The same task elsewhere
Was this helpful?