Claude Platform Docs

Crea invito

POST/v1/organizations/invites

Invita un utente a unirsi all'organizzazione tramite email.

Nei piani in cui i membri attingono da un numero limitato di posti acquistati, l'invito consuma automaticamente un posto dal livello più basso con disponibilità; non esiste un parametro per il livello del posto. Quando non ci sono posti liberi, la richiesta non riesce con un errore 400 anziché acquistare un posto.

Headers
"anthropic-version": optional string

The version of the Claude API you want to use.

Read more about versioning and our version history here.

Body
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_ids: 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
BetaOrganizationInvite 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.

HTTP status 400error_code: "already_member"

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

HTTP status 400error_code: "cannot_invite_emails_with_unverified_domains"

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

HTTP status 400error_code: "email_domain_not_allowed"

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.

HTTP status 400error_code: "invite_already_exists"

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

HTTP status 400error_code: "org_member_limit_exceeded"

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

HTTP status 400error_code: "rbac_group_grants_owner_access"

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.

HTTP status 400error_code: "rbac_group_owner_access_unconfirmed"

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.

HTTP status 403error_code: "sandbox_egress_restricted"

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

Crea invito
curl https://api.anthropic.com/v1/organizations/invites \
    -H 'Content-Type: application/json' \
    -H 'anthropic-version: 2026-10-21' \
    -H "Authorization: Bearer $ANTHROPIC_API_KEY" \
    -d '{
          "email": "user@example.com",
          "role": "user"
        }'
Returns Examples
Response 200
{
  "id": "invite_015gWxCN9Hfg2QhZwTK7Mdeu",
  "accepted_at": "2019-12-27T18:11:19.117Z",
  "email": "user@example.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"
}