Repository Public
1---2title: RBAC Groups3url: https://platform.claude.com/docs/en/api/beta/organization/rbac_groups4---56# RBAC Groups78## List RBAC Groups910**GET** `/v1/organizations/rbac_groups`1112List RBAC Groups in the Claude Enterprise tenant.1314The RBAC Groups API is available to Claude Enterprise organizations only.1516### Query parameters1718- `limit: optional number`1920 Number of items to return per page.2122 Defaults to `20`. Ranges from `1` to `1000`.2324 default: 20, maximum: 1000, minimum: 12526- `page: optional string`2728 Optionally set to the `next_page` token from the previous response.2930### Returns3132- `data: array of BetaRBACGroup`3334 - `type: "rbac_group"`3536 Object type.3738 For RBAC Groups, this is always `"rbac_group"`.3940 default: rbac_group4142 - `id: string`4344 ID of the RBAC Group.4546 - `created_at: string`4748 RFC 3339 timestamp of when the RBAC Group was created.4950 format: date-time5152 - `name: string`5354 Name of the RBAC Group. Not uniqueness-enforced.5556 - `roles: array of string or null`5758 RBAC Role IDs attached to this RBAC Group. Role attachment is managed in the admin settings and is read-only on this API. `null` means role data was temporarily unavailable — retry to distinguish from an empty list.5960 - `source_type: "direct" or "scim"`6162 How the RBAC Group was created: `"direct"` for groups created directly (for example, in the organization's admin settings), `"scim"` for groups provisioned by the identity provider.6364 - `"direct"`6566 - `"scim"`6768 - `updated_at: string`6970 RFC 3339 timestamp of when the RBAC Group was last updated.7172 format: date-time7374- `has_more: boolean`7576 Indicates if there are more results in the requested page direction.7778- `next_page: string or null`7980 Token to provide in as `page` in the subsequent request to retrieve the next page of data.8182### Example8384```bash85curl https://api.anthropic.com/v1/organizations/rbac_groups \86 -H 'anthropic-version: 2023-06-01' \87 -H "X-Api-Key: $ANTHROPIC_API_KEY"88```8990#### Response (200)9192```json93{94 "data": [95 {96 "id": "rbac_group_012rppKaSVsmTo6NqRDXQXNF",97 "created_at": "2024-10-30T23:58:27.427722Z",98 "name": "Engineering",99 "roles": [100 "rbac_role_016J8xVtKpDq3Wy9ZmN2hR4s"101 ],102 "source_type": "direct",103 "type": "rbac_group",104 "updated_at": "2024-10-30T23:58:27.427722Z"105 }106 ],107 "has_more": false,108 "next_page": "eyJjdXJzb3IiOiAicmJhY19ncm91cF8wMSJ9"109}110```111112## Get RBAC Group113114**GET** `/v1/organizations/rbac_groups/{group_id}`115116Retrieve an RBAC Group by ID.117118The RBAC Groups API is available to Claude Enterprise organizations only.119120### Path parameters121122- `group_id: string`123124 ID of the RBAC Group.125126### Returns127128- `BetaRBACGroup object`129130 - `type: "rbac_group"`131132 Object type.133134 For RBAC Groups, this is always `"rbac_group"`.135136 default: rbac_group137138 - `id: string`139140 ID of the RBAC Group.141142 - `created_at: string`143144 RFC 3339 timestamp of when the RBAC Group was created.145146 format: date-time147148 - `name: string`149150 Name of the RBAC Group. Not uniqueness-enforced.151152 - `roles: array of string or null`153154 RBAC Role IDs attached to this RBAC Group. Role attachment is managed in the admin settings and is read-only on this API. `null` means role data was temporarily unavailable — retry to distinguish from an empty list.155156 - `source_type: "direct" or "scim"`157158 How the RBAC Group was created: `"direct"` for groups created directly (for example, in the organization's admin settings), `"scim"` for groups provisioned by the identity provider.159160 - `"direct"`161162 - `"scim"`163164 - `updated_at: string`165166 RFC 3339 timestamp of when the RBAC Group was last updated.167168 format: date-time169170### Example171172```bash173curl https://api.anthropic.com/v1/organizations/rbac_groups/$GROUP_ID \174 -H 'anthropic-version: 2023-06-01' \175 -H "X-Api-Key: $ANTHROPIC_API_KEY"176```177178#### Response (200)179180```json181{182 "id": "rbac_group_012rppKaSVsmTo6NqRDXQXNF",183 "created_at": "2024-10-30T23:58:27.427722Z",184 "name": "Engineering",185 "roles": [186 "rbac_role_016J8xVtKpDq3Wy9ZmN2hR4s"187 ],188 "source_type": "direct",189 "type": "rbac_group",190 "updated_at": "2024-10-30T23:58:27.427722Z"191}192```193194## Create RBAC Group195196**POST** `/v1/organizations/rbac_groups`197198Create an RBAC Group in the Claude Enterprise tenant. Groups created via the API have source type `"direct"`.199200The RBAC Groups API is available to Claude Enterprise organizations only.201202### Body parameters203204- `name: string`205206 Name of the RBAC Group. Not uniqueness-enforced.207208 maxLength: 255, minLength: 1209210### Returns211212- `BetaRBACGroup object`213214 - `type: "rbac_group"`215216 Object type.217218 For RBAC Groups, this is always `"rbac_group"`.219220 default: rbac_group221222 - `id: string`223224 ID of the RBAC Group.225226 - `created_at: string`227228 RFC 3339 timestamp of when the RBAC Group was created.229230 format: date-time231232 - `name: string`233234 Name of the RBAC Group. Not uniqueness-enforced.235236 - `roles: array of string or null`237238 RBAC Role IDs attached to this RBAC Group. Role attachment is managed in the admin settings and is read-only on this API. `null` means role data was temporarily unavailable — retry to distinguish from an empty list.239240 - `source_type: "direct" or "scim"`241242 How the RBAC Group was created: `"direct"` for groups created directly (for example, in the organization's admin settings), `"scim"` for groups provisioned by the identity provider.243244 - `"direct"`245246 - `"scim"`247248 - `updated_at: string`249250 RFC 3339 timestamp of when the RBAC Group was last updated.251252 format: date-time253254### Example255256```bash257curl https://api.anthropic.com/v1/organizations/rbac_groups \258 -H 'Content-Type: application/json' \259 -H 'anthropic-version: 2023-06-01' \260 -H "X-Api-Key: $ANTHROPIC_API_KEY" \261 -d '{262 "name": "Engineering"263 }'264```265266#### Response (200)267268```json269{270 "id": "rbac_group_012rppKaSVsmTo6NqRDXQXNF",271 "created_at": "2024-10-30T23:58:27.427722Z",272 "name": "Engineering",273 "roles": [274 "rbac_role_016J8xVtKpDq3Wy9ZmN2hR4s"275 ],276 "source_type": "direct",277 "type": "rbac_group",278 "updated_at": "2024-10-30T23:58:27.427722Z"279}280```281282## Update RBAC Group283284**POST** `/v1/organizations/rbac_groups/{group_id}`285286Update an RBAC Group's name. Groups provisioned by an identity provider (source type `"scim"`) cannot be modified via the API while an organization in the tenant uses SCIM provisioning.287288The RBAC Groups API is available to Claude Enterprise organizations only.289290### Path parameters291292- `group_id: string`293294 ID of the RBAC Group.295296### Body parameters297298- `name: optional string or null`299300 Name of the RBAC Group. Not uniqueness-enforced.301302 maxLength: 255, minLength: 1303304### Returns305306- `BetaRBACGroup object`307308 - `type: "rbac_group"`309310 Object type.311312 For RBAC Groups, this is always `"rbac_group"`.313314 default: rbac_group315316 - `id: string`317318 ID of the RBAC Group.319320 - `created_at: string`321322 RFC 3339 timestamp of when the RBAC Group was created.323324 format: date-time325326 - `name: string`327328 Name of the RBAC Group. Not uniqueness-enforced.329330 - `roles: array of string or null`331332 RBAC Role IDs attached to this RBAC Group. Role attachment is managed in the admin settings and is read-only on this API. `null` means role data was temporarily unavailable — retry to distinguish from an empty list.333334 - `source_type: "direct" or "scim"`335336 How the RBAC Group was created: `"direct"` for groups created directly (for example, in the organization's admin settings), `"scim"` for groups provisioned by the identity provider.337338 - `"direct"`339340 - `"scim"`341342 - `updated_at: string`343344 RFC 3339 timestamp of when the RBAC Group was last updated.345346 format: date-time347348### Example349350```bash351curl https://api.anthropic.com/v1/organizations/rbac_groups/$GROUP_ID \352 -H 'Content-Type: application/json' \353 -H 'anthropic-version: 2023-06-01' \354 -H "X-Api-Key: $ANTHROPIC_API_KEY" \355 -d '{356 "name": "Engineering"357 }'358```359360#### Response (200)361362```json363{364 "id": "rbac_group_012rppKaSVsmTo6NqRDXQXNF",365 "created_at": "2024-10-30T23:58:27.427722Z",366 "name": "Engineering",367 "roles": [368 "rbac_role_016J8xVtKpDq3Wy9ZmN2hR4s"369 ],370 "source_type": "direct",371 "type": "rbac_group",372 "updated_at": "2024-10-30T23:58:27.427722Z"373}374```375376## Delete RBAC Group377378**DELETE** `/v1/organizations/rbac_groups/{group_id}`379380Delete an RBAC Group. Groups provisioned by an identity provider (source type `"scim"`) cannot be deleted via the API while an organization in the tenant uses SCIM provisioning.381382The RBAC Groups API is available to Claude Enterprise organizations only.383384### Path parameters385386- `group_id: string`387388 ID of the RBAC Group.389390### Returns391392- `BetaRBACGroupDeleted object`393394 - `type: "rbac_group_deleted"`395396 Deleted object type.397398 For RBAC Groups, this is always `"rbac_group_deleted"`.399400 default: rbac_group_deleted401402 - `id: string`403404 ID of the RBAC Group.405406### Example407408```bash409curl https://api.anthropic.com/v1/organizations/rbac_groups/$GROUP_ID \410 -X DELETE \411 -H 'anthropic-version: 2023-06-01' \412 -H "X-Api-Key: $ANTHROPIC_API_KEY"413```414415#### Response (200)416417```json418{419 "id": "rbac_group_012rppKaSVsmTo6NqRDXQXNF",420 "type": "rbac_group_deleted"421}422```423424## Domain types425426### Beta RBAC Group427428- `BetaRBACGroup object`429430 - `type: "rbac_group"`431432 Object type.433434 For RBAC Groups, this is always `"rbac_group"`.435436 default: rbac_group437438 - `id: string`439440 ID of the RBAC Group.441442 - `created_at: string`443444 RFC 3339 timestamp of when the RBAC Group was created.445446 format: date-time447448 - `name: string`449450 Name of the RBAC Group. Not uniqueness-enforced.451452 - `roles: array of string or null`453454 RBAC Role IDs attached to this RBAC Group. Role attachment is managed in the admin settings and is read-only on this API. `null` means role data was temporarily unavailable — retry to distinguish from an empty list.455456 - `source_type: "direct" or "scim"`457458 How the RBAC Group was created: `"direct"` for groups created directly (for example, in the organization's admin settings), `"scim"` for groups provisioned by the identity provider.459460 - `"direct"`461462 - `"scim"`463464 - `updated_at: string`465466 RFC 3339 timestamp of when the RBAC Group was last updated.467468 format: date-time469470### Beta RBAC Group Deleted471472- `BetaRBACGroupDeleted object`473474 - `type: "rbac_group_deleted"`475476 Deleted object type.477478 For RBAC Groups, this is always `"rbac_group_deleted"`.479480 default: rbac_group_deleted481482 - `id: string`483484 ID of the RBAC Group.485486## RBAC Groups › Members487488### List RBAC Group Members489490**GET** `/v1/organizations/rbac_groups/{group_id}/members`491492List members of an RBAC Group.493494The RBAC Groups API is available to Claude Enterprise organizations only.495496#### Path parameters497498- `group_id: string`499500 ID of the RBAC Group.501502#### Query parameters503504- `limit: optional number`505506 Number of items to return per page.507508 Defaults to `20`. Ranges from `1` to `1000`.509510 default: 20, maximum: 1000, minimum: 1511512- `page: optional string`513514 Optionally set to the `next_page` token from the previous response.515516#### Returns517518- `data: array of BetaRBACGroupMember`519520 - `type: "rbac_group_member"`521522 Object type.523524 For RBAC Group Members, this is always `"rbac_group_member"`.525526 default: rbac_group_member527528 - `created_at: string`529530 RFC 3339 timestamp of when the User was added to the RBAC Group.531532 format: date-time533534 - `email: string`535536 Email of the User.537538 - `group_id: string`539540 ID of the RBAC Group.541542 - `user_id: string`543544 ID of the User.545546- `has_more: boolean`547548 Indicates if there are more results in the requested page direction.549550- `next_page: string or null`551552 Token to provide in as `page` in the subsequent request to retrieve the next page of data.553554#### Example555556```bash557curl https://api.anthropic.com/v1/organizations/rbac_groups/$GROUP_ID/members \558 -H 'anthropic-version: 2023-06-01' \559 -H "X-Api-Key: $ANTHROPIC_API_KEY"560```561562##### Response (200)563564```json565{566 "data": [567 {568 "created_at": "2024-10-30T23:58:27.427722Z",569 "email": "user@emaildomain.com",570 "group_id": "rbac_group_012rppKaSVsmTo6NqRDXQXNF",571 "type": "rbac_group_member",572 "user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q"573 }574 ],575 "has_more": false,576 "next_page": "eyJjdXJzb3IiOiAicmJhY19ncm91cF8wMSJ9"577}578```579580### Add RBAC Group Member581582**POST** `/v1/organizations/rbac_groups/{group_id}/members`583584Add a User to an RBAC Group. Membership of groups provisioned by an identity provider (source type `"scim"`) cannot be modified via the API while an organization in the tenant uses SCIM provisioning.585586The RBAC Groups API is available to Claude Enterprise organizations only.587588#### Path parameters589590- `group_id: string`591592 ID of the RBAC Group.593594#### Body parameters595596- `user_id: string`597598 ID of the User.599600#### Returns601602- `BetaRBACGroupMember object`603604 - `type: "rbac_group_member"`605606 Object type.607608 For RBAC Group Members, this is always `"rbac_group_member"`.609610 default: rbac_group_member611612 - `created_at: string`613614 RFC 3339 timestamp of when the User was added to the RBAC Group.615616 format: date-time617618 - `email: string`619620 Email of the User.621622 - `group_id: string`623624 ID of the RBAC Group.625626 - `user_id: string`627628 ID of the User.629630#### Example631632```bash633curl https://api.anthropic.com/v1/organizations/rbac_groups/$GROUP_ID/members \634 -H 'Content-Type: application/json' \635 -H 'anthropic-version: 2023-06-01' \636 -H "X-Api-Key: $ANTHROPIC_API_KEY" \637 -d '{638 "user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q"639 }'640```641642##### Response (200)643644```json645{646 "created_at": "2024-10-30T23:58:27.427722Z",647 "email": "user@emaildomain.com",648 "group_id": "rbac_group_012rppKaSVsmTo6NqRDXQXNF",649 "type": "rbac_group_member",650 "user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q"651}652```653654### Remove RBAC Group Member655656**DELETE** `/v1/organizations/rbac_groups/{group_id}/members/{user_id}`657658Remove a User from an RBAC Group. Membership of groups provisioned by an identity provider (source type `"scim"`) cannot be modified via the API while an organization in the tenant uses SCIM provisioning.659660The RBAC Groups API is available to Claude Enterprise organizations only.661662#### Path parameters663664- `group_id: string`665666 ID of the RBAC Group.667668- `user_id: string`669670 ID of the User.671672#### Returns673674- `BetaRBACGroupMemberDeleted object`675676 - `type: "rbac_group_member_deleted"`677678 Deleted object type. For RBAC Group Members, this is always `"rbac_group_member_deleted"`.679680 default: rbac_group_member_deleted681682 - `group_id: string`683684 ID of the RBAC Group.685686 - `user_id: string`687688 ID of the User.689690#### Example691692```bash693curl https://api.anthropic.com/v1/organizations/rbac_groups/$GROUP_ID/members/$USER_ID \694 -X DELETE \695 -H 'anthropic-version: 2023-06-01' \696 -H "X-Api-Key: $ANTHROPIC_API_KEY"697```698699##### Response (200)700701```json702{703 "group_id": "rbac_group_012rppKaSVsmTo6NqRDXQXNF",704 "type": "rbac_group_member_deleted",705 "user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q"706}707```708