Overview
PUT/access/assignmentsaccess

Grant (or replace) a role for a subject at a scope — requires M + no-escalation

Replace a record in assignments.

Auth: bearerAuth — calls run as the authenticated user.

Parameters
  • workspacequerystring
Request body

application/json · optional

  • subjectKind"customer" | "persona" | "team"
  • subjectIdstring
  • featureoptionalstring

    with itemId: scope the grant to one item

  • itemIdoptionalstring
  • roleIdstring
Example
{
  "subjectKind": "customer",
  "subjectId": "string",
  "feature": "string",
  "itemId": "string",
  "roleId": "string"
}
Responses
200

Replaced assignment

  • assignmentAccessAssignment
Example
{
  "assignment": {
    "id": "string",
    "subjectKind": "customer",
    "subjectId": "string",
    "scopeFeature": "string",
    "scopeItemId": "string",
    "roleId": "string",
    "roleSlug": "string",
    "roleName": "string",
    "grantedBy": "string",
    "grantedAt": "string"
  }
}
201

Created assignment

  • assignmentAccessAssignment
Example
{
  "assignment": {
    "id": "string",
    "subjectKind": "customer",
    "subjectId": "string",
    "scopeFeature": "string",
    "scopeItemId": "string",
    "roleId": "string",
    "roleSlug": "string",
    "roleName": "string",
    "grantedBy": "string",
    "grantedAt": "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"
  }
}
Code examples
cURL
curl -X PUT "https://api.agenticdeveloperhub.com/access/assignments" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "subjectKind": "customer",
  "subjectId": "string",
  "feature": "string",
  "itemId": "string",
  "roleId": "string"
}'
JavaScript
const res = await fetch("https://api.agenticdeveloperhub.com/access/assignments", {
  method: "PUT",
  headers: {
    "Authorization": "Bearer YOUR_TOKEN",
    "Content-Type": "application/json"
  },
  body: "{\n  \"subjectKind\": \"customer\",\n  \"subjectId\": \"string\",\n  \"feature\": \"string\",\n  \"itemId\": \"string\",\n  \"roleId\": \"string\"\n}",
});
const data = await res.json();