Repository Public
1---2title: Invites3url: https://platform.claude.com/docs/en/api/beta/organization/invites4---56# Invites78## Create Invite910**POST** `/v1/organizations/invites`1112Invite a user to join the organization by email.1314On plans that draw members from a finite pool of purchased seats, the invite automatically consumes a seat from the lowest tier with availability; there is no seat-tier parameter. When no seat is free the request fails with a 400 error rather than purchasing a seat.1516### Body parameters1718- `email: string`1920 Email of the User.2122 format: email2324- `role: "billing" or "claude_code_user" or "developer" or 2 more`2526 Role for the invited User.2728 The accepted values depend on the organization type. Console and API organizations accept `user`, `developer`, `billing`, and `claude_code_user`; `admin` cannot be assigned through the API. Claude Enterprise organizations accept `user` and `managed`.2930 - `"billing"`3132 - `"claude_code_user"`3334 - `"developer"`3536 - `"managed"`3738 - `"user"`3940- `rbac_group_ids: optional array of string`4142 RBAC group IDs to assign to the User when the Invite is accepted. A non-empty array is accepted only for a Claude Enterprise organization with RBAC groups, and requires the key to carry the `write:rbac_groups` scope.4344 maxItems: 1004546### Returns4748- `BetaOrganizationInvite object`4950 - `type: "invite"`5152 Object type.5354 For Invites, this is always `"invite"`.5556 default: invite5758 - `id: string`5960 ID of the Invite.6162 - `accepted_at: string or null`6364 RFC 3339 datetime string indicating when the Invite was accepted, or null.6566 format: date-time6768 - `email: string`6970 Email of the User being invited.7172 - `expires_at: string`7374 RFC 3339 datetime string indicating when the Invite expires.7576 format: date-time7778 - `invited_at: string`7980 RFC 3339 datetime string indicating when the Invite was created.8182 format: date-time8384 - `rbac_group_ids: array of string`8586 RBAC group IDs recorded on the Invite (Claude Enterprise organizations), to be assigned to the User when the Invite is accepted. `[]` when none.8788 - `role: BetaOrganizationRole`8990 Organization role of the User.9192 - `"admin"`9394 - `"billing"`9596 - `"claude_code_user"`9798 - `"developer"`99100 - `"managed"`101102 - `"membership_admin"`103104 - `"owner"`105106 - `"primary_owner"`107108 - `"user"`109110 - `status: "accepted" or "deleted" or "expired" or "pending"`111112 Status of the Invite.113114 - `"accepted"`115116 - `"deleted"`117118 - `"expired"`119120 - `"pending"`121122### Example123124```bash125curl https://api.anthropic.com/v1/organizations/invites \126 -H 'Content-Type: application/json' \127 -H 'anthropic-version: 2023-06-01' \128 -H "X-Api-Key: $ANTHROPIC_API_KEY" \129 -d '{130 "email": "user@emaildomain.com",131 "role": "user"132 }'133```134135#### Response (200)136137```json138{139 "id": "invite_015gWxCN9Hfg2QhZwTK7Mdeu",140 "accepted_at": "2019-12-27T18:11:19.117Z",141 "email": "user@emaildomain.com",142 "expires_at": "2024-11-20T23:58:27.427722Z",143 "invited_at": "2024-10-30T23:58:27.427722Z",144 "rbac_group_ids": [145 "string"146 ],147 "role": "admin",148 "status": "pending",149 "type": "invite"150}151```152153## List Invites154155**GET** `/v1/organizations/invites`156157List the organization's invites.158159### Query parameters160161- `after_id: optional string`162163 ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately after this object.164165- `before_id: optional string`166167 ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately before this object.168169- `email: optional string`170171 Filter by the email address the Invite was sent to. Matches the same way as the Users list's `email` filter (normalized, case-insensitive).172173 format: email174175- `limit: optional number`176177 Number of items to return per page.178179 Defaults to `20`. Ranges from `1` to `1000`.180181 default: 20, maximum: 1000, minimum: 1182183- `roles: optional array of string`184185 Filter to items whose `role` equals one of the supplied values. Repeatable; values are OR'ed together.186187 Accepted values depend on the organization type: Console and API organizations accept `user`, `developer`, `billing`, `admin`, and `claude_code_user`; Claude Enterprise organizations accept `user`, `owner`, `primary_owner`, `membership_admin`, and `managed`.188189- `statuses: optional array of "accepted" or "expired" or "pending"`190191 Filter by Invite status. Repeatable; values are OR'ed together. Omit to return `pending`, `accepted`, and `expired` Invites alike.192193 - `"accepted"`194195 - `"expired"`196197 - `"pending"`198199### Returns200201- `data: array of BetaOrganizationInvite`202203 - `type: "invite"`204205 Object type.206207 For Invites, this is always `"invite"`.208209 default: invite210211 - `id: string`212213 ID of the Invite.214215 - `accepted_at: string or null`216217 RFC 3339 datetime string indicating when the Invite was accepted, or null.218219 format: date-time220221 - `email: string`222223 Email of the User being invited.224225 - `expires_at: string`226227 RFC 3339 datetime string indicating when the Invite expires.228229 format: date-time230231 - `invited_at: string`232233 RFC 3339 datetime string indicating when the Invite was created.234235 format: date-time236237 - `rbac_group_ids: array of string`238239 RBAC group IDs recorded on the Invite (Claude Enterprise organizations), to be assigned to the User when the Invite is accepted. `[]` when none.240241 - `role: BetaOrganizationRole`242243 Organization role of the User.244245 - `"admin"`246247 - `"billing"`248249 - `"claude_code_user"`250251 - `"developer"`252253 - `"managed"`254255 - `"membership_admin"`256257 - `"owner"`258259 - `"primary_owner"`260261 - `"user"`262263 - `status: "accepted" or "deleted" or "expired" or "pending"`264265 Status of the Invite.266267 - `"accepted"`268269 - `"deleted"`270271 - `"expired"`272273 - `"pending"`274275- `first_id: string or null`276277 First ID in the `data` list. Can be used as the `before_id` for the previous page.278279- `has_more: boolean`280281 Indicates if there are more results in the requested page direction.282283- `last_id: string or null`284285 Last ID in the `data` list. Can be used as the `after_id` for the next page.286287### Example288289```bash290curl https://api.anthropic.com/v1/organizations/invites \291 -H 'anthropic-version: 2023-06-01' \292 -H "X-Api-Key: $ANTHROPIC_API_KEY"293```294295#### Response (200)296297```json298{299 "data": [300 {301 "id": "invite_015gWxCN9Hfg2QhZwTK7Mdeu",302 "accepted_at": "2019-12-27T18:11:19.117Z",303 "email": "user@emaildomain.com",304 "expires_at": "2024-11-20T23:58:27.427722Z",305 "invited_at": "2024-10-30T23:58:27.427722Z",306 "rbac_group_ids": [307 "string"308 ],309 "role": "admin",310 "status": "pending",311 "type": "invite"312 }313 ],314 "first_id": "first_id",315 "has_more": true,316 "last_id": "last_id"317}318```319320## Get Invite321322**GET** `/v1/organizations/invites/{invite_id}`323324Retrieve an invite by ID.325326### Path parameters327328- `invite_id: string`329330 ID of the Invite.331332### Returns333334- `BetaOrganizationInvite object`335336 - `type: "invite"`337338 Object type.339340 For Invites, this is always `"invite"`.341342 default: invite343344 - `id: string`345346 ID of the Invite.347348 - `accepted_at: string or null`349350 RFC 3339 datetime string indicating when the Invite was accepted, or null.351352 format: date-time353354 - `email: string`355356 Email of the User being invited.357358 - `expires_at: string`359360 RFC 3339 datetime string indicating when the Invite expires.361362 format: date-time363364 - `invited_at: string`365366 RFC 3339 datetime string indicating when the Invite was created.367368 format: date-time369370 - `rbac_group_ids: array of string`371372 RBAC group IDs recorded on the Invite (Claude Enterprise organizations), to be assigned to the User when the Invite is accepted. `[]` when none.373374 - `role: BetaOrganizationRole`375376 Organization role of the User.377378 - `"admin"`379380 - `"billing"`381382 - `"claude_code_user"`383384 - `"developer"`385386 - `"managed"`387388 - `"membership_admin"`389390 - `"owner"`391392 - `"primary_owner"`393394 - `"user"`395396 - `status: "accepted" or "deleted" or "expired" or "pending"`397398 Status of the Invite.399400 - `"accepted"`401402 - `"deleted"`403404 - `"expired"`405406 - `"pending"`407408### Example409410```bash411curl https://api.anthropic.com/v1/organizations/invites/$INVITE_ID \412 -H 'anthropic-version: 2023-06-01' \413 -H "X-Api-Key: $ANTHROPIC_API_KEY"414```415416#### Response (200)417418```json419{420 "id": "invite_015gWxCN9Hfg2QhZwTK7Mdeu",421 "accepted_at": "2019-12-27T18:11:19.117Z",422 "email": "user@emaildomain.com",423 "expires_at": "2024-11-20T23:58:27.427722Z",424 "invited_at": "2024-10-30T23:58:27.427722Z",425 "rbac_group_ids": [426 "string"427 ],428 "role": "admin",429 "status": "pending",430 "type": "invite"431}432```433434## Delete Invite435436**DELETE** `/v1/organizations/invites/{invite_id}`437438Delete a pending invite.439440### Path parameters441442- `invite_id: string`443444 ID of the Invite.445446### Returns447448- `type: "invite_deleted"`449450 Deleted object type.451452 For Invites, this is always `"invite_deleted"`.453454 default: invite_deleted455456- `id: string`457458 ID of the Invite.459460### Example461462```bash463curl https://api.anthropic.com/v1/organizations/invites/$INVITE_ID \464 -X DELETE \465 -H 'anthropic-version: 2023-06-01' \466 -H "X-Api-Key: $ANTHROPIC_API_KEY"467```468469#### Response (200)470471```json472{473 "id": "invite_015gWxCN9Hfg2QhZwTK7Mdeu",474 "type": "invite_deleted"475}476```477478## Domain types479480### Beta Organization Invite481482- `BetaOrganizationInvite object`483484 - `type: "invite"`485486 Object type.487488 For Invites, this is always `"invite"`.489490 default: invite491492 - `id: string`493494 ID of the Invite.495496 - `accepted_at: string or null`497498 RFC 3339 datetime string indicating when the Invite was accepted, or null.499500 format: date-time501502 - `email: string`503504 Email of the User being invited.505506 - `expires_at: string`507508 RFC 3339 datetime string indicating when the Invite expires.509510 format: date-time511512 - `invited_at: string`513514 RFC 3339 datetime string indicating when the Invite was created.515516 format: date-time517518 - `rbac_group_ids: array of string`519520 RBAC group IDs recorded on the Invite (Claude Enterprise organizations), to be assigned to the User when the Invite is accepted. `[]` when none.521522 - `role: BetaOrganizationRole`523524 Organization role of the User.525526 - `"admin"`527528 - `"billing"`529530 - `"claude_code_user"`531532 - `"developer"`533534 - `"managed"`535536 - `"membership_admin"`537538 - `"owner"`539540 - `"primary_owner"`541542 - `"user"`543544 - `status: "accepted" or "deleted" or "expired" or "pending"`545546 Status of the Invite.547548 - `"accepted"`549550 - `"deleted"`551552 - `"expired"`553554 - `"pending"`555556### Invite Delete Response557558- `InviteDeleteResponse object`559560 - `type: "invite_deleted"`561562 Deleted object type.563564 For Invites, this is always `"invite_deleted"`.565566 default: invite_deleted567568 - `id: string`569570 ID of the Invite.571