---
title: "Add Connection"
method: POST
path: "/v1/accounts/{account_id}/environments/{environment_id}/connections"
tags: ["Connections", "MCP"]
---

# Add Connection

`POST /v1/accounts/{account_id}/environments/{environment_id}/connections`

**Authorization scope:** `connection:edit` 
 
 **Creates a new connection entity.**
****
**The connection type is resolved from the required ``source_name`` (the name of a data source**
**or target). A ``connection_type`` may still be provided explicitly, in which case it is**
**validated and takes precedence. An optional ``segment`` disambiguates a ``source_name``**
**available as both a source and a target (e.g. "snowflake").**

---

### 📖 Instructions for usage

`create_connection`

```
Create a new connection. body must match the CreateConnection API schema.

NOT ALL CONNECTION TYPES CAN BE CREATED HERE. Connections that authenticate
via OAuth (e.g. Google services, Salesforce, HubSpot, Facebook/Meta, LinkedIn,
and similar — anything that needs a browser sign-in / "Connect with..." flow)
CANNOT be created through this tool, because OAuth requires an interactive
browser consent step. For those, tell the user:
"This connection uses OAuth — please create it in the Boomi Data Integration
console, then I can use it here."

REQUIRED before calling this tool:
1. Confirm with the user whether the connection will be used as a source or a
   target — ask if the intent is not already clear from context.
2. Call get_connection_source_names to obtain the list of valid source_names
   and their connection_types per segment.
3. Select the exact source_name (and segment when the name appears for both
   source and target) from that list, and use the returned connection_type.
Do not guess or invent source_name or connection_type values (e.g. "postgres"
is not a valid source_name unless it was returned by get_connection_source_names).
Build the request body only from values that came back from that call.

This tool works for connections that authenticate with credentials you can
supply directly (host/port/user/password/keys), e.g. databases like mysql,
postgresql, mssql, snowflake, bigquery, redshift, mongodb.
```

## Path parameters

- `account_id` string, required
- `environment_id` string, required

## Request body

- AddConnectionInput — The request body for creating a connection. Provide either a ``source_name`` (the name of a data source or target - call the ``get_connection_source_names`` endpoint to list them) or an explicit ``connection_type``; the connection type is resolved from whichever is given. The connection-type-specific properties (host, password, warehouse, etc.) are passed as extra top-level fields. To discover exactly which properties a connection type needs, call the ``get_connection_type`` endpoint (GET /connections_types/{connection_type}).
  - `source_name` string, nullable — Optional. The source_name of the data source or target the connection is created for; the connection type is resolved from it. Provide this or 'connection_type'. Do not guess this value: call the 'get_connection_source_names' endpoint first and use one of the returned source_names verbatim.
  - `connection_name` string, required — The name of the connection
  - `segment` 'source' | 'target' — The segment a connection is created for, used to disambiguate a source_name that is available as both a source and a target (e.g. "snowflake").
  - `connection_type` string, nullable — Optional. The connection type. When omitted it is resolved from 'source_name'. When provided it is validated to exist and takes precedence. Do not guess this value: resolve it from 'source_name' by calling 'get_connection_source_names' and using the 'connection_type' on the matching entry.

## Response `201`

Successful Response

- object

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/rivery/apis/boomi-data-integration-api.md) · [All operations](https://skmtc.net/rivery/apis/boomi-data-integration-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/rivery/boomi-data-integration-api/revisions/ab98f5b95139/schema)
