---
title: "Integrations hooks"
description: "Hand-written shim. Generated CRUD hooks via ./integrations.gen.
Custom-op hooks (publish, listVersions, install) stay hand-written
until the React gen learns to emit kind: \"custom\" ops."
section: "Libraries"
group: "React hooks"
order: 431
---

## Hooks

### `useCreateIntegration` `mutation`

Create a draft integration in the source workspace.

```ts
useCreateIntegration(options?: MutationOpts<Integration, CreateIntegrationParams>)
```

**Types:** [Integration](/types/integration) · [CreateIntegrationParams](/types/create-integration-params)

### `useDeleteIntegration` `mutation`

Soft-delete the integration. Existing installs keep working — they pin to an immutable integration_version.

```ts
useDeleteIntegration(options?: MutationOpts<SuccessResponse, string>)
```

**Types:** [SuccessResponse](/types/success-response)

### `useInstallIntegration` `composite`

```ts
useInstallIntegration(options?: MutationOpts<IntegrationInstall, InstallIntegrationParams>)
```

**Types:** [IntegrationInstall](/types/integration-install) · [InstallIntegrationParams](/types/install-integration-params)

### `useInstallMembers` `composite`

```ts
useInstallMembers(params: InstallMembersParams, options?: QueryOpts<InstallMembersResponse>)
```

**Types:** [InstallMembersParams](/types/install-members-params) · [InstallMembersResponse](/types/install-members-response)

### `useIntegrationMembers` `composite`

```ts
useIntegrationMembers(params: IntegrationMembersParams, options?: QueryOpts<IntegrationMembersResponse>)
```

**Types:** [IntegrationMembersParams](/types/integration-members-params) · [IntegrationMembersResponse](/types/integration-members-response)

### `useListIntegrations` `query`

List integrations.

```ts
useListIntegrations(params?: Omit<ListIntegrationsParams, | > & { filter?: IntegrationFilter; orderBy?: IntegrationOrderBy[]; } & IntegrationShorthands, options?: QueryOpts<Page<Integration>>)
```

**Types:** [ListIntegrationsParams](/types/list-integrations-params) · [IntegrationFilter](/types/integration-filter) · [IntegrationOrderBy](/types/integration-order-by) · [IntegrationShorthands](/types/integration-shorthands) · [Page](/types/page) · [Integration](/types/integration)

### `usePublishIntegration` `composite`

```ts
usePublishIntegration(options?: MutationOpts<IntegrationVersion, PublishIntegrationParams>)
```

**Types:** [IntegrationVersion](/types/integration-version) · [PublishIntegrationParams](/types/publish-integration-params)

### `usePurgeIntegration` `composite`

Permanently delete a soft-deleted integration.

```ts
usePurgeIntegration(options?: MutationOpts<SuccessResponse, PurgeIntegrationParams>)
```

**Types:** [SuccessResponse](/types/success-response) · [PurgeIntegrationParams](/types/purge-integration-params)

### `useRestoreIntegration` `composite`

Restore a soft-deleted integration.

```ts
useRestoreIntegration(options?: MutationOpts<Integration, string>)
```

**Types:** [Integration](/types/integration)

### `useRetrieveIntegration` `query`

Get an integration by ID.

```ts
useRetrieveIntegration(id: string, options?: QueryOpts<Integration>)
```

**Types:** [Integration](/types/integration)

### `useSetMemberDetached` `composite`

```ts
useSetMemberDetached(options?: MutationOpts<SuccessResponse, SetMemberDetachedParams>)
```

**Types:** [SuccessResponse](/types/success-response) · [SetMemberDetachedParams](/types/set-member-detached-params)

### `useUpdateIntegration` `mutation`

Update the draft integration's metadata or manifest.

```ts
useUpdateIntegration(options?: MutationOpts<Integration, UpdateIntegrationParams>)
```

**Types:** [Integration](/types/integration) · [UpdateIntegrationParams](/types/update-integration-params)

### `useUpgradeIntegrationInstall` `composite`

```ts
useUpgradeIntegrationInstall(options?: MutationOpts<IntegrationUpgradeResult, UpgradeIntegrationInstallParams>)
```

**Types:** [IntegrationUpgradeResult](/types/integration-upgrade-result) · [UpgradeIntegrationInstallParams](/types/upgrade-integration-install-params)
