/v1/apps/{app_id}/roles/{role_name}AuthUpdate role name or description
Path parameters
app_id*stringId of the app.
role_name*stringName of the role (e.g. `admin`).
Request body
descriptionstringFree-text description of the update role, or `null`.
Example: "Updated description"
Response · 200
id*stringRole UUID.
app_id*stringApp scope (UUID).
name*stringRole name slug.
Example: "admin"
description*stringFree-text description.
is_system*booleanWhether this is a system role (owner / admin / member).
created_at*string · date-timeWhen the role was created (ISO 8601).
updated_at*string · date-timeWhen the role was last changed (ISO 8601).
Example
Request
PATCH https://api.auth.productcraft.co/v1/apps/{app_id}/roles/{role_name}
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json
{
"description": "Updated description"
}import { Auth } from "@productcraft/auth";
// Admin routes read PRODUCTCRAFT_API_KEY; consumer routes need no key
const auth = new Auth();
const role = await auth.admin.app("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f").roles.update("admin", { description: "Updated description" });auth.admin.app(…).roles.update(roleName, params?, options?): Auth.Role
Response
{
"id": "string",
"app_id": "string",
"name": "admin",
"description": "string",
"is_system": false,
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z"
}