Overview
PATCH/access/roles/{id}access

Edit a role (name/description/default/grants; the system admin role is immutable)

Update fields of a record in roles by id.

Auth: bearerAuth — calls run as the authenticated user.

Parameters
  • idpathstring
  • workspacequerystring
Request body

application/json · optional

  • nameoptionalstring
  • descriptionoptionalstring
  • defaultForoptional"" | "customer" | "persona"
  • grantsoptionalAccessGrant[]
Example
{
  "name": "string",
  "description": "string",
  "defaultFor": "",
  "grants": [
    {
      "feature": "string",
      "itemVerbs": "string",
      "subitemVerbs": "string"
    }
  ]
}
Responses
200

Updated role

  • roleAccessRole
Example
{
  "role": {
    "id": "string",
    "slug": "string",
    "name": "string",
    "description": "string",
    "isSystem": true,
    "defaultFor": "",
    "grants": [
      {
        "feature": "string",
        "itemVerbs": "string",
        "subitemVerbs": "string"
      }
    ]
  }
}
400

Error

  • erroroptionalobject
Example
{
  "error": {
    "message": "string",
    "code": "string"
  }
}
401

Error

  • erroroptionalobject
Example
{
  "error": {
    "message": "string",
    "code": "string"
  }
}
403

Error

  • erroroptionalobject
Example
{
  "error": {
    "message": "string",
    "code": "string"
  }
}
404

Error

  • erroroptionalobject
Example
{
  "error": {
    "message": "string",
    "code": "string"
  }
}
409

Error

  • erroroptionalobject
Example
{
  "error": {
    "message": "string",
    "code": "string"
  }
}
Code examples
cURL
curl -X PATCH "https://api.agenticdeveloperhub.com/access/roles/{id}" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "string",
  "description": "string",
  "defaultFor": "",
  "grants": [
    {
      "feature": "string",
      "itemVerbs": "string",
      "subitemVerbs": "string"
    }
  ]
}'
JavaScript
const res = await fetch("https://api.agenticdeveloperhub.com/access/roles/{id}", {
  method: "PATCH",
  headers: {
    "Authorization": "Bearer YOUR_TOKEN",
    "Content-Type": "application/json"
  },
  body: "{\n  \"name\": \"string\",\n  \"description\": \"string\",\n  \"defaultFor\": \"\",\n  \"grants\": [\n    {\n      \"feature\": \"string\",\n      \"itemVerbs\": \"string\",\n      \"subitemVerbs\": \"string\"\n    }\n  ]\n}",
});
const data = await res.json();