{"slug": "automate-role-management-in-coderabbit-with-the-new-custom-roles-api", "title": "Automate role management in CodeRabbit with the new Custom Roles API", "summary": "CodeRabbit launched a Custom Roles API for Enterprise customers, enabling programmatic creation, configuration, and assignment of user roles via REST endpoints. The API automates access management, allowing organizations to standardize onboarding, manage roles as code, and sync with identity systems like Rippling. It is available now for Enterprise users with Admin API keys.", "body_md": "Henry Lau\n\nYiwen Xu\n\nJune 05, 2026\n\n2 min read\n\nJune 05, 2026\n\n2 min read\n\nCut code review time & bugs by 50%\n\nMost installed AI app on GitHub and GitLab\n\nFree 14-day trial\n\nUntil now, every custom role in CodeRabbit lived in the dashboard. An admin opened the Permissions page, built a role, set its read and write permissions, and assigned it to each user by hand. That's fine when you're onboarding a few people. It doesn't scale when you're a large organization with engineers joining, switching teams, and leaving every week.\n\nToday we're introducing the [Custom Roles API for Enterprise](https://docs.coderabbit.ai/api-reference/roles-create) which are REST endpoints that let you create, configure, and assign custom roles programmatically. Everything you can do on the Permissions page can now be automated, so access scales with your headcount and you can get the most out of every CodeRabbit subscription.\n\n**Standardize every new user.** Set a role as the default with `is_default`\n\n, and every new member starts with the right baseline access automatically.\n\n**Manage roles as code.** Define your org's roles in version control and create them through the API. Use `duplicate_from`\n\nto base a new role like *Security Reviewer* on an existing one (`cr_member`\n\nby default), then adjust only the permissions that differ.\n\n**Sync roles with your identity system.** Connect the API to an HRIS like Rippling so the right role is granted the moment someone joins and revoked the moment they leave.\n\nCreating a new custom role takes a single call:\n\n```\nPOST https://api.coderabbit.ai/v1/roles\nx-coderabbitai-api-key: <your-key>\n\n{\n  \"name\": \"Security Reviewer\",\n  \"duplicate_from\": \"cr_member\",\n  \"permissions\": [\n    { \"resource_id\": \"user_management\", \"access_type\": \"read\" }\n  ]\n}\n```\n\nOther new API endpoints include:\n\nThe Custom Roles API turns access management from a click-by-click chore into something your systems handle on their own, provisioned consistently, updated instantly, and easy to govern as your team grows.\n\nIt's available now for Enterprise customers. Generate an API key with Admin permissions from your CodeRabbit dashboard, and wire role management into the workflows you already run.\n\n**Learn more:** [Create a custom role API reference](https://docs.coderabbit.ai/api-reference/roles-create)", "url": "https://wpnews.pro/news/automate-role-management-in-coderabbit-with-the-new-custom-roles-api", "canonical_source": "https://coderabbit.ai/blog/automate-role-management-with-coderabbit", "published_at": "2026-06-05 00:00:00+00:00", "updated_at": "2026-06-29 07:02:55.398606+00:00", "lang": "en", "topics": ["developer-tools", "ai-products"], "entities": ["CodeRabbit", "Rippling", "GitHub", "GitLab"], "alternates": {"html": "https://wpnews.pro/news/automate-role-management-in-coderabbit-with-the-new-custom-roles-api", "markdown": "https://wpnews.pro/news/automate-role-management-in-coderabbit-with-the-new-custom-roles-api.md", "text": "https://wpnews.pro/news/automate-role-management-in-coderabbit-with-the-new-custom-roles-api.txt", "jsonld": "https://wpnews.pro/news/automate-role-management-in-coderabbit-with-the-new-custom-roles-api.jsonld"}}