> ## Documentation Index
> Fetch the complete documentation index at: https://docs.paradime.io/llms.txt
> Use this file to discover all available pages before exploring further.

# createWarehouseConnection

> Tests a new connection, then saves it. A refused connection is a `CONNECTION_TEST_FAILED` error and saves nothing. One that exists with the same settings is returned unchanged; with other settings it is `CONFLICT`. Saving redeploys the workspace's Bolt schedules; a `COST` connection also starts Radar's cost sync. A `DEVELOPMENT_SHARED` connection is saved without a test and rewrites every user's dbt profile; each user's own connection is tested in their IDE onboarding. Needs `connections:write`.



**mutation** `createWarehouseConnection(input: CreateWarehouseConnectionInput!): CreateWarehouseConnectionPayload!`

## Arguments

**`input`**: `CreateWarehouseConnectionInput!` (required)

The connection.

## Returns

`CreateWarehouseConnectionPayload!`

**`warehouseConnection`**: `WarehouseConnection!`

The created connection.

## Examples

```graphql Mutation
mutation CreateWarehouseConnection($input: CreateWarehouseConnectionInput!) {
  createWarehouseConnection(input: $input) {
    warehouseConnection {
      scope
      environment {
        slug
        type
        name
        isDefault
        branch
        dbtVersion
      }
      connectionId
      type
      isDefault
      name
    }
  }
}
```

```json Variables
{
  "input": {
    "scope": "SCHEDULER",
    "adapter": {}
  }
}
```

```json Response
{
  "data": {
    "createWarehouseConnection": {
      "warehouseConnection": {
        "scope": "SCHEDULER",
        "environment": {
          "slug": "string",
          "type": "SCHEDULER",
          "name": "string",
          "isDefault": true,
          "branch": "string",
          "dbtVersion": "string"
        },
        "connectionId": "string",
        "type": "SNOWFLAKE",
        "isDefault": true,
        "name": "string"
      }
    }
  }
}
```


## Related topics

- [Administration API: Warehouse connections](https://docs.paradime.io/developers/graphql-api/admin-api/warehouse-connections.md)
- [Administration API: Environments](https://docs.paradime.io/developers/graphql-api/admin-api/environments.md)
- [Administration API: Workspaces](https://docs.paradime.io/developers/graphql-api/admin-api/workspaces.md)
- [Admin client: warehouse connections](https://docs.paradime.io/developers/python-sdk/modules/admin/connections.md)
- [Create a workspace](https://docs.paradime.io/guides/paradime-101/getting-started-with-your-paradime-workspace/creating-a-workspace.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.