<!-- llms.txt: https://workos.com/llms.txt -->
<!-- feedback.md: https://workos.com/docs/feedback.md -->

# Pipes

Pipes provides OAuth integrations with third-party providers that allow your users to securely connect their accounts to your application. Pipes handles the complete OAuth lifecycle including token refresh and credential storage.

Read more in the [Pipes guide](https://workos.com/docs/pipes).

## Delete an organization-owned data integration

Deletes the organization-owned data integration for a provider and all of its connected installations. For a custom provider, the provider definition is deleted once no user-owned root references it either. The `/organization` suffix selects the environment-level organization-owned root for the provider; it does not name a particular organization.

:::code-group

```bash language="curl" title="Request" tab="1"
curl --request DELETE \
  --url "https://api.workos.com/data-integrations/github/organization" \
  --header "Authorization: Bearer sk_example_123456789"
```

```rb language="ruby" title="Request" tab="1"
require "workos"

WorkOS.configure do |config|
  config.api_key = "sk_example_123456789"
end

WorkOS.client.pipes.delete_data_integration_organization(slug: "github")
```

```py language="python" title="Request" tab="1"
from workos import WorkOSClient

client = WorkOSClient(api_key="sk_example_123456789", client_id="client_123456789")

client.pipes.delete_data_integration_organization(slug="github")
```

```go language="go" title="Request" tab="1"
package main

import (
	"context"

	"github.com/workos/workos-go/v10"
)

func main() {
	client := workos.NewClient("sk_example_123456789")

	_, err := client.Pipes().DeleteDataIntegrationOrganization(context.Background(), "github")
	if err != nil {
		panic(err)
	}
}
```

```php language="php" title="Request" tab="1"
<?php

use WorkOS\WorkOS;

$workos = new WorkOS(
    apiKey: "sk_example_123456789",
    clientId: "client_123456789",
);

$workos->pipes()->deleteDataIntegrationOrganization(slug: "github");
```

```java language="java" title="Request" tab="1"
import com.workos.WorkOS;

WorkOS workos = new WorkOS("sk_example_123456789");

workos.pipes.deleteDataIntegrationOrganization("github");
```

```cs language="dotnet" title="Request" tab="1"
using WorkOS;

var client = new WorkOSClient(new WorkOSOptions {
    ApiKey = "sk_example_123456789",
    ClientId = "client_123456789",
});

await client.Pipes.DeleteDataIntegrationOrganizationAsync("github");
```

```rust language="rust" title="Request" tab="1"
use workos::Client;

#[tokio::main]
async fn main() -> Result<(), workos::Error> {
    let client = Client::builder()
        .api_key("sk_example_123456789")
        .client_id("client_123456789")
        .build();

    let _result = client
        .pipes()
        .delete_data_integration_organization("github")
        .await?;

    Ok(())
}
```

:::

## Get an organization-owned data integration

Retrieves the organization-owned data integration for a provider by its slug. The `/organization` suffix selects the environment-level organization-owned root for the provider; it does not name a particular organization.

:::code-group

```bash language="curl" title="Request" tab="1"
curl "https://api.workos.com/data-integrations/github/organization" \
  --header "Authorization: Bearer sk_example_123456789"
```

```rb language="ruby" title="Request" tab="1"
require "workos"

WorkOS.configure do |config|
  config.api_key = "sk_example_123456789"
end

WorkOS.client.pipes.list_data_integration_organization(slug: "github")
```

```py language="python" title="Request" tab="1"
from workos import WorkOSClient

client = WorkOSClient(api_key="sk_example_123456789", client_id="client_123456789")

client.pipes.list_data_integration_organization(slug="github")
```

```go language="go" title="Request" tab="1"
package main

import (
	"context"

	"github.com/workos/workos-go/v10"
)

func main() {
	client := workos.NewClient("sk_example_123456789")

	_, err := client.Pipes().ListDataIntegrationOrganization(context.Background(), "github")
	if err != nil {
		panic(err)
	}
}
```

```php language="php" title="Request" tab="1"
<?php

use WorkOS\WorkOS;

$workos = new WorkOS(
    apiKey: "sk_example_123456789",
    clientId: "client_123456789",
);

$workos->pipes()->listDataIntegrationOrganization(slug: "github");
```

```java language="java" title="Request" tab="1"
import com.workos.WorkOS;

WorkOS workos = new WorkOS("sk_example_123456789");

workos.pipes.listDataIntegrationOrganization("github");
```

```cs language="dotnet" title="Request" tab="1"
using WorkOS;

var client = new WorkOSClient(new WorkOSOptions {
    ApiKey = "sk_example_123456789",
    ClientId = "client_123456789",
});

await client.Pipes.ListDataIntegrationOrganizationAsync("github");
```

```rust language="rust" title="Request" tab="1"
use workos::Client;

#[tokio::main]
async fn main() -> Result<(), workos::Error> {
    let client = Client::builder()
        .api_key("sk_example_123456789")
        .client_id("client_123456789")
        .build();

    let _result = client
        .pipes()
        .list_data_integration_organization("github")
        .await?;

    Ok(())
}
```

```json language="json" title="Response" tab="2"
{
  "object": "data_integration",
  "id": "data_integration_01EHZNVPK3SFK441A1RGBFSHRT",
  "slug": "github",
  "integration_type": "github",
  "ownership": "organization",
  "description": "Production GitHub app",
  "enabled": true,
  "state": "valid",
  "scopes": [
    "repo",
    "read:org"
  ],
  "redirect_uri": "https://api.workos.com/data-integrations/github/dik_01EHZNVPK3SFK441A1RGBFSHRT/callback",
  "auth_methods": [
    "oauth"
  ],
  "credentials": {
    "type": "custom",
    "client_id": "Iv1.abc123",
    "redacted_client_secret": "6789"
  },
  "installation": null,
  "config": {
    "account": "myorg-myaccount"
  },
  "custom_provider": {
    "name": "My OAuth App",
    "authorization_url": "https://provider.example.com/oauth/authorize",
    "token_url": "https://provider.example.com/oauth/token",
    "refresh_token_url": "https://provider.example.com/oauth/token",
    "pkce_enabled": true,
    "request_scope_separator": " ",
    "scopes_required": false,
    "client_secret_required": true,
    "additional_authorization_parameters": {
      "prompt": "consent"
    },
    "token_body_content_type": "application/x-www-form-urlencoded",
    "authenticate_via": "request_body"
  },
  "created_at": "2026-01-15T12:00:00.000Z",
  "updated_at": "2026-01-15T12:00:00.000Z"
}
```

:::

## Update an organization-owned data integration

Updates the description, enabled state, or custom credentials of the organization-owned data integration for a provider. For custom providers, `custom_provider` updates the OAuth definition, which is shared with the user-owned root. The `/organization` suffix selects the environment-level organization-owned root for the provider; it does not name a particular organization.

:::code-group

```bash language="curl" title="Request" tab="1"
curl --request PUT \
  --url "https://api.workos.com/data-integrations/github/organization" \
  --header "Authorization: Bearer sk_example_123456789" \
  --header "Content-Type: application/json" \
  -d @- <<'BODY'
    {
        "description": "Production GitHub app",
        "enabled": true,
        "scopes": [
            "repo",
            "read:org"
        ],
        "credentials": {
            "type": "custom",
            "client_id": "Iv1.abc123",
            "client_secret": "secret_…"
        },
        "custom_provider": {
            "name": "My OAuth App",
            "authorization_url": "https://provider.example.com/oauth/authorize",
            "token_url": "https://provider.example.com/oauth/token",
            "refresh_token_url": "https://provider.example.com/oauth/token",
            "pkce_enabled": true,
            "request_scope_separator": " ",
            "scopes_required": false,
            "client_secret_required": true,
            "additional_authorization_parameters": {
                "prompt": "consent"
            },
            "token_body_content_type": "application/x-www-form-urlencoded",
            "authenticate_via": "request_body"
        }
    }
BODY
```

```rb language="ruby" title="Request" tab="1"
require "workos"

WorkOS.configure do |config|
  config.api_key = "sk_example_123456789"
end

WorkOS.client.pipes.update_data_integration_organization(slug: "github")
```

```py language="python" title="Request" tab="1"
from workos import WorkOSClient

client = WorkOSClient(api_key="sk_example_123456789", client_id="client_123456789")

client.pipes.update_data_integration_organization(slug="github")
```

```go language="go" title="Request" tab="1"
package main

import (
	"context"

	"github.com/workos/workos-go/v10"
)

func main() {
	client := workos.NewClient("sk_example_123456789")

	_, err := client.Pipes().UpdateDataIntegrationOrganization(context.Background(), "github")
	if err != nil {
		panic(err)
	}
}
```

```php language="php" title="Request" tab="1"
<?php

use WorkOS\WorkOS;

$workos = new WorkOS(
    apiKey: "sk_example_123456789",
    clientId: "client_123456789",
);

$workos->pipes()->updateDataIntegrationOrganization(slug: "github");
```

```java language="java" title="Request" tab="1"
import com.workos.WorkOS;

WorkOS workos = new WorkOS("sk_example_123456789");

workos.pipes.updateDataIntegrationOrganization("github");
```

```cs language="dotnet" title="Request" tab="1"
using WorkOS;

var client = new WorkOSClient(new WorkOSOptions {
    ApiKey = "sk_example_123456789",
    ClientId = "client_123456789",
});

await client.Pipes.UpdateDataIntegrationOrganizationAsync("github");
```

```rust language="rust" title="Request" tab="1"
use workos::Client;

#[tokio::main]
async fn main() -> Result<(), workos::Error> {
    let client = Client::builder()
        .api_key("sk_example_123456789")
        .client_id("client_123456789")
        .build();

    let _result = client
        .pipes()
        .update_data_integration_organization("github")
        .await?;

    Ok(())
}
```

```json language="json" title="Response" tab="2"
{
  "object": "data_integration",
  "id": "data_integration_01EHZNVPK3SFK441A1RGBFSHRT",
  "slug": "github",
  "integration_type": "github",
  "ownership": "organization",
  "description": "Production GitHub app",
  "enabled": true,
  "state": "valid",
  "scopes": [
    "repo",
    "read:org"
  ],
  "redirect_uri": "https://api.workos.com/data-integrations/github/dik_01EHZNVPK3SFK441A1RGBFSHRT/callback",
  "auth_methods": [
    "oauth"
  ],
  "credentials": {
    "type": "custom",
    "client_id": "Iv1.abc123",
    "redacted_client_secret": "6789"
  },
  "installation": null,
  "config": {
    "account": "myorg-myaccount"
  },
  "custom_provider": {
    "name": "My OAuth App",
    "authorization_url": "https://provider.example.com/oauth/authorize",
    "token_url": "https://provider.example.com/oauth/token",
    "refresh_token_url": "https://provider.example.com/oauth/token",
    "pkce_enabled": true,
    "request_scope_separator": " ",
    "scopes_required": false,
    "client_secret_required": true,
    "additional_authorization_parameters": {
      "prompt": "consent"
    },
    "token_body_content_type": "application/x-www-form-urlencoded",
    "authenticate_via": "request_body"
  },
  "created_at": "2026-01-15T12:00:00.000Z",
  "updated_at": "2026-01-15T12:00:00.000Z"
}
```

:::

### DELETE /data-integrations/{slug}/organization

#### Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `slug` | string | Yes | The slug identifier of the data integration. |

#### Returns

| Field | Type | Description |
| --- | --- | --- |
| `empty` | empty | Returns an empty response on success. |

### GET /data-integrations/{slug}/organization

#### Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `slug` | string | Yes | The slug identifier of the data integration. |

#### Returns

| Field | Type | Description |
| --- | --- | --- |
| `data_integration` | object | Distinguishes the Data Integration object. |

### PUT /data-integrations/{slug}/organization

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `description` | string | No | An optional description of the Data Integration. |
| `enabled` | boolean | No | Whether the Data Integration is enabled. |
| `scopes` | string[] | No | The OAuth scopes to request for the Data Integration. Pass `null` to reset to the provider's configured scopes. |
| `credentials` | object | No | New OAuth credentials for the Data Integration. When provided, rotates the stored client secret. Mutually exclusive with `api_key`. |
| `api_key` | object | No | An API key to install or rotate for a tenant on an `api_key` integration. Upserts the tenant installation identified by `user_id` (and optional `organization_id`). |
| `custom_provider` | object | No | Updates to a custom provider's OAuth definition. Only valid for custom-provider integrations. |

#### Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `slug` | string | Yes | The slug identifier of the data integration. |

#### Returns

| Field | Type | Description |
| --- | --- | --- |
| `data_integration` | object | Distinguishes the Data Integration object. |