---
title: "Organization invitation SDK reference"
description: "Customer-hosted cloud features"
---

# Organization invitation SDK reference

#### Customer-hosted cloud features

:::note
Some features are only available on customer-hosted clouds. Reach out to [support@anyscale.com](mailto:support@anyscale.com) for info.
:::

## Organization invitation SDK

### `anyscale.organization_invitation.create`

Creates organization invitations for the provided emails.

Returns a tuple of successful emails and error messages.

**Arguments**

-   **`emails` (List\[str\])**: The emails to send the organization invitations to.

**Returns**: Tuple\[List\[str\], List\[str\]\]

#### Examples

::::tabs

:::tab[Python]
```python
import anyscale

anyscale.organization_invitation.create(emails=["test1@anyscale.com","test2@anyscale.com"])
```
:::

::::

### `anyscale.organization_invitation.list`

Lists organization invitations.

Returns a list of organization invitations.

**Arguments**

**Returns**: List\[[OrganizationInvitation](#organizationinvitation)\]

#### Examples

::::tabs

:::tab[Python]
```python
import anyscale

anyscale.organization_invitation.list()
```
:::

::::

### `anyscale.organization_invitation.delete`

Deletes an organization invitation.

Returns the email of the deleted organization invitation.

**Arguments**

-   **`email` (str)**: The email of the organization invitation to delete.

**Returns**: str

#### Examples

::::tabs

:::tab[Python]
```python
import anyscale

anyscale.organization_invitation.delete(email="test@anyscale.com")
```
:::

::::

## Organization invitation models

### `OrganizationInvitation`

Organization invitation model.

#### Fields

-   **`id` (str)**: ID of the organization invitation.
-   **`email` (str)**: Email of the organization invitation.
-   **`created_at` (datetime)**: Creation time of the organization invitation.
-   **`expires_at` (datetime)**: Expiration time of the organization invitation.

#### Python Methods

```python
def to_dict(self) -> Dict[str, Any]
    """Return a dictionary representation of the model."""
```

#### Examples

::::tabs

:::tab[Python]
```python
import anyscale
from anyscale.organization_invitation.models import OrganizationInvitation

organization_invitations: List[OrganizationInvitation] = anyscale.organization_invitation.list()
```
:::

::::

---

Previous: [Job](/reference/sdk/job.md) | Next: [Policy](/reference/sdk/policy.md)