Claude Platform Docs

Inviti

Crea invito
client.organization.invites.create(body, options?): OrganizationInvite
POST/v1/organizations/invites

Invita un utente a unirsi all'organizzazione tramite email.

Elenca gli inviti
client.organization.invites.list(query?, options?): Page<OrganizationInvite>
GET/v1/organizations/invites

Elenca gli inviti dell'organizzazione.

Ottieni invito
client.organization.invites.retrieve(inviteID, options?): OrganizationInvite
GET/v1/organizations/invites/{invite_id}

Recupera un invito tramite ID.

Elimina invito
client.organization.invites.delete(inviteID, options?): InviteDeleteResponse
DELETE/v1/organizations/invites/{invite_id}

Elimina un invito in sospeso.

Models
interface AlreadyMemberErrorDetails { error_code }
error_code: "already_member"
interface CannotInviteEmailsWithUnverifiedDomainsErrorDetails { error_code }
error_code: "cannot_invite_emails_with_unverified_domains"
interface EmailDomainNotAllowedErrorDetails { error_code }
error_code: "email_domain_not_allowed"
interface InviteAlreadyExistsErrorDetails { error_code }
error_code: "invite_already_exists"
interface OrganizationInvite { type: "invite"; id; accepted_at; /* 6 more */ }
interface InviteDeleteResponse { type: "invite_deleted"; id }
type: "invite_deleted"

Deleted object type.

For Invites, this is always "invite_deleted".

defaultinvite_deleted
id: string

ID of the Invite.

Errors
class AlreadyMemberError extends BadRequestError { errorCode; details }⁠HTTP status 400

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

errorCode: "already_member"
details: AlreadyMemberErrorDetails { error_code }
error_code: "already_member"
class CannotInviteEmailsWithUnverifiedDomainsError extends BadRequestError { errorCode; details }⁠HTTP status 400

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

errorCode: "cannot_invite_emails_with_unverified_domains"
error_code: "cannot_invite_emails_with_unverified_domains"
class EmailDomainNotAllowedError extends BadRequestError { errorCode; details }⁠HTTP 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.

errorCode: "email_domain_not_allowed"
details: EmailDomainNotAllowedErrorDetails { error_code }
error_code: "email_domain_not_allowed"
class InviteAlreadyExistsError extends BadRequestError { errorCode; details }⁠HTTP status 400

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

errorCode: "invite_already_exists"
details: InviteAlreadyExistsErrorDetails { error_code }
error_code: "invite_already_exists"