# `Ory.Api.Project`

API calls for all endpoints tagged `Project`.

# `create_organization`

```elixir
@spec create_organization(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, Ory.Model.ErrorGeneric.t()}
  | {:ok, Ory.Model.Organization.t()}
  | {:error, Tesla.Env.t()}
```

Create an Enterprise SSO Organization
Deprecated: use setProject or patchProjectWithRevision instead  Creates an Enterprise SSO Organization in a project.

### Parameters

- `connection` (Ory.Connection): Connection to server
- `project_id` (String.t): Project ID  The project's ID.
- `opts` (keyword): Optional parameters
  - `:body` (OrganizationBody): 

### Returns

- `{:ok, Ory.Model.Organization.t}` on success
- `{:error, Tesla.Env.t}` on failure

# `create_organization_onboarding_portal_link`

```elixir
@spec create_organization_onboarding_portal_link(
  Tesla.Env.client(),
  String.t(),
  String.t(),
  keyword()
) ::
  {:ok, Ory.Model.ErrorGeneric.t()}
  | {:ok, Ory.Model.OnboardingPortalLink.t()}
  | {:error, Tesla.Env.t()}
```

Create organization onboarding portal link
Create a onboarding portal link for an organization.

### Parameters

- `connection` (Ory.Connection): Connection to server
- `project_id` (String.t): Project ID  The project's ID.
- `organization_id` (String.t): Organization ID  The Organization's ID.
- `opts` (keyword): Optional parameters
  - `:body` (CreateOrganizationOnboardingPortalLinkBody): 

### Returns

- `{:ok, Ory.Model.OnboardingPortalLink.t}` on success
- `{:error, Tesla.Env.t}` on failure

# `create_project`

```elixir
@spec create_project(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, Ory.Model.Project.t()}
  | {:ok, Ory.Model.ErrorGeneric.t()}
  | {:error, Tesla.Env.t()}
```

Create a Project
Creates a new project.

### Parameters

- `connection` (Ory.Connection): Connection to server
- `opts` (keyword): Optional parameters
  - `:body` (CreateProjectBody): 

### Returns

- `{:ok, Ory.Model.Project.t}` on success
- `{:error, Tesla.Env.t}` on failure

# `create_project_api_key`

```elixir
@spec create_project_api_key(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, Ory.Model.ProjectApiKey.t()}
  | {:ok, Ory.Model.ErrorGeneric.t()}
  | {:error, Tesla.Env.t()}
```

Create project API key
Create an API key for a project.

### Parameters

- `connection` (Ory.Connection): Connection to server
- `project` (String.t): The Project ID or Project slug
- `opts` (keyword): Optional parameters
  - `:body` (CreateProjectApiKeyRequest): 

### Returns

- `{:ok, Ory.Model.ProjectApiKey.t}` on success
- `{:error, Tesla.Env.t}` on failure

# `delete_organization`

```elixir
@spec delete_organization(Tesla.Env.client(), String.t(), String.t(), keyword()) ::
  {:ok, nil} | {:ok, Ory.Model.ErrorGeneric.t()} | {:error, Tesla.Env.t()}
```

Delete Enterprise SSO Organization
Deprecated: use setProject or patchProjectWithRevision instead  Irrecoverably deletes an Enterprise SSO Organization in a project by its ID.

### Parameters

- `connection` (Ory.Connection): Connection to server
- `project_id` (String.t): Project ID  The project's ID.
- `organization_id` (String.t): Organization ID  The Organization's ID.
- `opts` (keyword): Optional parameters

### Returns

- `{:ok, nil}` on success
- `{:error, Tesla.Env.t}` on failure

# `delete_organization_onboarding_portal_link`

```elixir
@spec delete_organization_onboarding_portal_link(
  Tesla.Env.client(),
  String.t(),
  String.t(),
  String.t(),
  keyword()
) :: {:ok, nil} | {:ok, Ory.Model.ErrorGeneric.t()} | {:error, Tesla.Env.t()}
```

Delete an organization onboarding portal link
Deletes a onboarding portal link for an organization.

### Parameters

- `connection` (Ory.Connection): Connection to server
- `project_id` (String.t): 
- `organization_id` (String.t): 
- `onboarding_portal_link_id` (String.t): 
- `opts` (keyword): Optional parameters

### Returns

- `{:ok, nil}` on success
- `{:error, Tesla.Env.t}` on failure

# `delete_project_api_key`

```elixir
@spec delete_project_api_key(Tesla.Env.client(), String.t(), String.t(), keyword()) ::
  {:ok, nil} | {:ok, Ory.Model.ErrorGeneric.t()} | {:error, Tesla.Env.t()}
```

Delete project API key
Deletes an API key and immediately removes it.

### Parameters

- `connection` (Ory.Connection): Connection to server
- `project` (String.t): The Project ID or Project slug
- `token_id` (String.t): The Token ID
- `opts` (keyword): Optional parameters

### Returns

- `{:ok, nil}` on success
- `{:error, Tesla.Env.t}` on failure

# `get_organization`

```elixir
@spec get_organization(Tesla.Env.client(), String.t(), String.t(), keyword()) ::
  {:ok, Ory.Model.ErrorGeneric.t()}
  | {:ok, Ory.Model.GetOrganizationResponse.t()}
  | {:error, Tesla.Env.t()}
```

Get Enterprise SSO Organization by ID
Deprecated: use getProject instead  Retrieves an Enterprise SSO Organization for a project by its ID

### Parameters

- `connection` (Ory.Connection): Connection to server
- `project_id` (String.t): Project ID  The project's ID.
- `organization_id` (String.t): Organization ID  The Organization's ID.
- `opts` (keyword): Optional parameters

### Returns

- `{:ok, Ory.Model.GetOrganizationResponse.t}` on success
- `{:error, Tesla.Env.t}` on failure

# `get_organization_onboarding_portal_links`

```elixir
@spec get_organization_onboarding_portal_links(
  Tesla.Env.client(),
  String.t(),
  String.t(),
  keyword()
) ::
  {:ok, Ory.Model.OrganizationOnboardingPortalLinksResponse.t()}
  | {:ok, Ory.Model.ErrorGeneric.t()}
  | {:error, Tesla.Env.t()}
```

Get the organization onboarding portal links
Retrieves the organization onboarding portal links.

### Parameters

- `connection` (Ory.Connection): Connection to server
- `project_id` (String.t): Project ID  The project's ID.
- `organization_id` (String.t): Organization ID  The Organization's ID.
- `opts` (keyword): Optional parameters

### Returns

- `{:ok, Ory.Model.OrganizationOnboardingPortalLinksResponse.t}` on success
- `{:error, Tesla.Env.t}` on failure

# `get_project`

```elixir
@spec get_project(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, Ory.Model.Project.t()}
  | {:ok, Ory.Model.ErrorGeneric.t()}
  | {:error, Tesla.Env.t()}
```

Get a Project
Get a project you have access to by its ID.

### Parameters

- `connection` (Ory.Connection): Connection to server
- `project_id` (String.t): Project ID  The project's ID.
- `opts` (keyword): Optional parameters

### Returns

- `{:ok, Ory.Model.Project.t}` on success
- `{:error, Tesla.Env.t}` on failure

# `get_project_members`

```elixir
@spec get_project_members(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, [Ory.Model.ProjectMember.t()]}
  | {:ok, Ory.Model.GenericError.t()}
  | {:error, Tesla.Env.t()}
```

Get all members associated with this project
This endpoint requires the user to be a member of the project with the role `OWNER` or `DEVELOPER`.

### Parameters

- `connection` (Ory.Connection): Connection to server
- `project` (String.t): 
- `opts` (keyword): Optional parameters

### Returns

- `{:ok, [%ProjectMember{}, ...]}` on success
- `{:error, Tesla.Env.t}` on failure

# `list_organizations`

```elixir
@spec list_organizations(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, Ory.Model.ListOrganizationsResponse.t()}
  | {:ok, Ory.Model.ErrorGeneric.t()}
  | {:error, Tesla.Env.t()}
```

List all Enterprise SSO organizations
Deprecated: use getProject instead  Lists all Enterprise SSO organizations in a project.

### Parameters

- `connection` (Ory.Connection): Connection to server
- `project_id` (String.t): Project ID  The project's ID.
- `opts` (keyword): Optional parameters
  - `:page_size` (integer()): Items per Page  This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.com/docs/ecosystem/api-design#pagination).
  - `:page_token` (String.t): Next Page Token  The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.com/docs/ecosystem/api-design#pagination).
  - `:domain` (String.t): Domain  If set, only organizations with that domain will be returned.

### Returns

- `{:ok, Ory.Model.ListOrganizationsResponse.t}` on success
- `{:error, Tesla.Env.t}` on failure

# `list_project_api_keys`

```elixir
@spec list_project_api_keys(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, [Ory.Model.ProjectApiKey.t()]}
  | {:ok, Ory.Model.ErrorGeneric.t()}
  | {:error, Tesla.Env.t()}
```

List a project's API keys
A list of all the project's API keys.

### Parameters

- `connection` (Ory.Connection): Connection to server
- `project` (String.t): The Project ID or Project slug
- `opts` (keyword): Optional parameters

### Returns

- `{:ok, [%ProjectApiKey{}, ...]}` on success
- `{:error, Tesla.Env.t}` on failure

# `list_projects`

```elixir
@spec list_projects(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, [Ory.Model.ProjectMetadata.t()]}
  | {:ok, Ory.Model.ErrorGeneric.t()}
  | {:error, Tesla.Env.t()}
```

List All Projects
Lists all projects you have access to.

### Parameters

- `connection` (Ory.Connection): Connection to server
- `opts` (keyword): Optional parameters

### Returns

- `{:ok, [%ProjectMetadata{}, ...]}` on success
- `{:error, Tesla.Env.t}` on failure

# `patch_project`

```elixir
@spec patch_project(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, Ory.Model.ErrorGeneric.t()}
  | {:ok, Ory.Model.SuccessfulProjectUpdate.t()}
  | {:error, Tesla.Env.t()}
```

Patch an Ory Network Project Configuration
Deprecated: Use the `patchProjectWithRevision` endpoint instead to specify the exact revision the patch was generated for.  This endpoints allows you to patch individual Ory Network project configuration keys for Ory's services (identity, permission, ...). The configuration format is fully compatible with the open source projects for the respective services (e.g. Ory Kratos for Identity, Ory Keto for Permissions).  This endpoint expects the `version` key to be set in the payload. If it is unset, it will try to import the config as if it is from the most recent version.  If you have an older version of a configuration, you should set the version key in the payload!  While this endpoint is able to process all configuration items related to features (e.g. password reset), it does not support operational configuration items (e.g. port, tracing, logging) otherwise available in the open source.  For configuration items that can not be translated to the Ory Network, this endpoint will return a list of warnings to help you understand which parts of your config could not be processed.

### Parameters

- `connection` (Ory.Connection): Connection to server
- `project_id` (String.t): Project ID  The project's ID.
- `opts` (keyword): Optional parameters
  - `:body` ([Ory.Model.JsonPatch.t]): 

### Returns

- `{:ok, Ory.Model.SuccessfulProjectUpdate.t}` on success
- `{:error, Tesla.Env.t}` on failure

# `patch_project_with_revision`

```elixir
@spec patch_project_with_revision(
  Tesla.Env.client(),
  String.t(),
  String.t(),
  keyword()
) ::
  {:ok, Ory.Model.ErrorGeneric.t()}
  | {:ok, Ory.Model.SuccessfulProjectUpdate.t()}
  | {:error, Tesla.Env.t()}
```

Patch an Ory Network Project Configuration based on a revision ID
This endpoints allows you to patch individual Ory Network Project configuration keys for Ory's services (identity, permission, ...). The configuration format is fully compatible with the open source projects for the respective services (e.g. Ory Kratos for Identity, Ory Keto for Permissions).  This endpoint expects the `version` key to be set in the payload. If it is unset, it will try to import the config as if it is from the most recent version.  If you have an older version of a configuration, you should set the version key in the payload!  While this endpoint is able to process all configuration items related to features (e.g. password reset), it does not support operational configuration items (e.g. port, tracing, logging) otherwise available in the open source.  For configuration items that can not be translated to the Ory Network, this endpoint will return a list of warnings to help you understand which parts of your config could not be processed.

### Parameters

- `connection` (Ory.Connection): Connection to server
- `project_id` (String.t): Project ID  The project's ID.
- `revision_id` (String.t): Revision ID  The revision ID that this patch was generated for.
- `opts` (keyword): Optional parameters
  - `:body` ([Ory.Model.JsonPatch.t]): 

### Returns

- `{:ok, Ory.Model.SuccessfulProjectUpdate.t}` on success
- `{:error, Tesla.Env.t}` on failure

# `purge_project`

```elixir
@spec purge_project(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, nil} | {:ok, Ory.Model.GenericError.t()} | {:error, Tesla.Env.t()}
```

Irrecoverably purge a project
!! Use with extreme caution !!  Using this API endpoint you can purge (completely delete) a project and its data. This action can not be undone and will delete ALL your data.  Calling this endpoint will additionally delete custom domains and other related data.  If the project is linked to a subscription, the subscription needs to be unlinked first.

### Parameters

- `connection` (Ory.Connection): Connection to server
- `project_id` (String.t): Project ID  The project's ID.
- `opts` (keyword): Optional parameters

### Returns

- `{:ok, nil}` on success
- `{:error, Tesla.Env.t}` on failure

# `remove_project_member`

```elixir
@spec remove_project_member(Tesla.Env.client(), String.t(), String.t(), keyword()) ::
  {:ok, nil} | {:ok, Ory.Model.GenericError.t()} | {:error, Tesla.Env.t()}
```

Remove a member associated with this project
This also sets their invite status to `REMOVED`. This endpoint requires the user to be a member of the project with the role `OWNER`.

### Parameters

- `connection` (Ory.Connection): Connection to server
- `project` (String.t): 
- `member` (String.t): 
- `opts` (keyword): Optional parameters

### Returns

- `{:ok, nil}` on success
- `{:error, Tesla.Env.t}` on failure

# `set_project`

```elixir
@spec set_project(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, Ory.Model.ErrorGeneric.t()}
  | {:ok, Ory.Model.SuccessfulProjectUpdate.t()}
  | {:error, Tesla.Env.t()}
```

Update an Ory Network Project Configuration
This endpoints allows you to update the Ory Network project configuration for individual services (identity, permission, ...). The configuration is fully compatible with the open source projects for the respective services (e.g. Ory Kratos for Identity, Ory Keto for Permissions).  This endpoint expects the `version` key to be set in the payload. If it is unset, it will try to import the config as if it is from the most recent version.  If you have an older version of a configuration, you should set the version key in the payload!  While this endpoint is able to process all configuration items related to features (e.g. password reset), it does not support operational configuration items (e.g. port, tracing, logging) otherwise available in the open source.  For configuration items that can not be translated to the Ory Network, this endpoint will return a list of warnings to help you understand which parts of your config could not be processed.  Be aware that updating any service's configuration will completely override your current configuration for that service!

### Parameters

- `connection` (Ory.Connection): Connection to server
- `project_id` (String.t): Project ID  The project's ID.
- `opts` (keyword): Optional parameters
  - `:body` (SetProject): 

### Returns

- `{:ok, Ory.Model.SuccessfulProjectUpdate.t}` on success
- `{:error, Tesla.Env.t}` on failure

# `update_organization`

```elixir
@spec update_organization(Tesla.Env.client(), String.t(), String.t(), keyword()) ::
  {:ok, Ory.Model.ErrorGeneric.t()}
  | {:ok, Ory.Model.Organization.t()}
  | {:error, Tesla.Env.t()}
```

Update an Enterprise SSO Organization
Deprecated: use setProject or patchProjectWithRevision instead  Updates an Enterprise SSO Organization in a project by its ID.

### Parameters

- `connection` (Ory.Connection): Connection to server
- `project_id` (String.t): Project ID  The project's ID.
- `organization_id` (String.t): Organization ID  The Organization's ID.
- `opts` (keyword): Optional parameters
  - `:body` (OrganizationBody): 

### Returns

- `{:ok, Ory.Model.Organization.t}` on success
- `{:error, Tesla.Env.t}` on failure

# `update_organization_onboarding_portal_link`

```elixir
@spec update_organization_onboarding_portal_link(
  Tesla.Env.client(),
  String.t(),
  String.t(),
  String.t(),
  keyword()
) ::
  {:ok, Ory.Model.ErrorGeneric.t()}
  | {:ok, Ory.Model.OnboardingPortalLink.t()}
  | {:error, Tesla.Env.t()}
```

Update organization onboarding portal link
Update a onboarding portal link for an organization.

### Parameters

- `connection` (Ory.Connection): Connection to server
- `project_id` (String.t): Project ID  The project's ID.
- `organization_id` (String.t): Organization ID  The Organization's ID.
- `onboarding_portal_link_id` (String.t): 
- `opts` (keyword): Optional parameters
  - `:body` (UpdateOrganizationOnboardingPortalLinkBody): 

### Returns

- `{:ok, Ory.Model.OnboardingPortalLink.t}` on success
- `{:error, Tesla.Env.t}` on failure

---

*Consult [api-reference.md](api-reference.md) for complete listing*
