Claude Platform Docs

Приглашения

Создать приглашение
organization.invites.create(**kwargs) -> OrganizationInvite
POST/v1/organizations/invites

Приглашает пользователя присоединиться к организации по электронной почте.

Список приглашений
organization.invites.list(**kwargs) -> SyncPage[OrganizationInvite]
GET/v1/organizations/invites

Возвращает список приглашений организации.

Получить приглашение
organization.invites.retrieve(invite_id) -> OrganizationInvite
GET/v1/organizations/invites/{invite_id}

Возвращает приглашение по идентификатору.

Удалить приглашение
organization.invites.delete(invite_id) -> InviteDeleteResponse
DELETE/v1/organizations/invites/{invite_id}

Удаляет ожидающее приглашение.

Models
class AlreadyMemberErrorDetails: error_code
error_code: Literal["already_member"]
class CannotInviteEmailsWithUnverifiedDomainsErrorDetails: error_code
error_code: Literal["cannot_invite_emails_with_unverified_domains"]
class EmailDomainNotAllowedErrorDetails: error_code
error_code: Literal["email_domain_not_allowed"]
class InviteAlreadyExistsErrorDetails: error_code
error_code: Literal["invite_already_exists"]
class OrganizationInvite: type: "invite"; id; accepted_at; ... # 6 more
class InviteDeleteResponse: type: "invite_deleted"; id
type: Literal["invite_deleted"]

Deleted object type.

For Invites, this is always "invite_deleted".

defaultinvite_deleted
id: str

ID of the Invite.

Errors
class AlreadyMemberError(BadRequestError): error_code; details⁠HTTP status 400

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

error_code: Literal["already_member"]
error_code: Literal["already_member"]
class CannotInviteEmailsWithUnverifiedDomainsError(BadRequestError): error_code; details⁠HTTP status 400

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

error_code: Literal["cannot_invite_emails_with_unverified_domains"]
error_code: Literal["cannot_invite_emails_with_unverified_domains"]
class EmailDomainNotAllowedError(BadRequestError): error_code; 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.

error_code: Literal["email_domain_not_allowed"]
error_code: Literal["email_domain_not_allowed"]
class InviteAlreadyExistsError(BadRequestError): error_code; details⁠HTTP status 400

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

error_code: Literal["invite_already_exists"]
error_code: Literal["invite_already_exists"]