Claude Platform Docs

Create Invite

$ ant beta:organization:invites create
POST/v1/organizations/invites

Invite a user to join the organization by email.

On 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.

Parameters
--email: string

Email of the User.

formatemail
--role: "billing" or "claude_code_user" or "developer" or 2 more

Role for the invited User.

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; inviting with the managed role requires the write:rbac_groups scope in addition to write:members.

One of the following:
"billing"
"claude_code_user"
"developer"
"managed"
"user"
--rbac-group-id: optional array of string

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.

maxItems100
Returns
beta_organization_invite: object{ type: "invite", id, accepted_at, 6 more }
Errors

Any method can also return the general HTTP errors.

Each code below is the value of error.details.error_code in the response body.

error code already_memberHTTP status 400

The email address already belongs to a user in the organization. The message names the user.

The email address's domain is not one of the verified domains of the organization's parent organization.

error code email_domain_not_allowedHTTP status 400

The organization restricts invites to an allowed list of email domains, and the list is empty or does not include the email address's domain.

error code invite_already_existsHTTP status 400

A pending invite already exists for the email address. The message names the invite.

error code org_member_limit_exceededHTTP status 400

The organization has reached the member limit that Anthropic set for it. Pending invites count toward the limit.

error code rbac_group_grants_owner_accessHTTP status 400

A role attached to an RBAC Group in the request grants owner access, so this API does not add members to that group (directly or through an invite), remove its members, or delete it. Make the change in the organization's admin settings in Claude.

error code rbac_group_owner_access_unconfirmedHTTP status 400

The API could not finish checking whether an RBAC Group in the request grants owner access, so it made no change. Retrying the same request will not help. Make the change in the organization's admin settings in Claude.

error code sandbox_egress_restrictedHTTP status 403

The request came from a Claude sandbox with restricted network access, which is not allowed to make this change. Send it from outside the sandbox, or from a sandbox with unrestricted network access.

Create Invite
ant beta:organization:invites create \
  --email user@emaildomain.com \
  --role user
Returns Examples
Response 200
{
  "id": "invite_015gWxCN9Hfg2QhZwTK7Mdeu",
  "accepted_at": "2019-12-27T18:11:19.117Z",
  "email": "user@emaildomain.com",
  "expires_at": "2024-11-20T23:58:27.427722Z",
  "invited_at": "2024-10-30T23:58:27.427722Z",
  "rbac_group_ids": [
    "string"
  ],
  "role": "admin",
  "status": "pending",
  "type": "invite"
}