---
title: "Create connection"
method: POST
path: "/v1/projects/{project_id}/connections"
tags: ["connections"]
---

# Create connection

`POST /v1/projects/{project_id}/connections`

## Request

- Base URL: `https://api.connic.co`
- URL: `https://api.connic.co/v1/projects/{project_id}/connections`
- Auth: HTTP bearer

Create a reusable set of credentials for the project.

Connector types that need an app setup flow return 400 and must be connected in the dashboard.

Required permission: `connections.create`.

## Path parameters

- `project_id` string, uuid, required

## Request body

- ConnectionCreateRequest: Reusable credentials to create.
  - `name` string, required: Unique per connection type in the project.
  - `type` 'http' | 'cron' | 'kafka' | 'sqs' | 'postgres' | 'websocket' | 'mcp' | 'email' | 's3' | 'stripe' | 'telegram' | 'slack' | 'twilio' | 'twilio_messaging' | 'telnyx' | 'telnyx_messaging', required: Connector type, which sets the event source or destination and the fields accepted in `config`.
  - `config` object, required: Credential fields from `GET /connections/-/schema/{connector_type}`. Other fields are dropped.

## Response `201`

Successful Response

- ConnectionResponse: Reusable credentials shared by compatible connectors in the project.
  - `id` string, uuid, required
  - `project_id` string, uuid, required: Project the connection belongs to.
  - `name` string, required
  - `type` string, required: Connection type. Related connector types that share credentials use the same type.
  - `config` object, required: Credential fields, with secret fields masked as `********`.
  - `created_at` string, required
  - `updated_at` string, required
  - `connector_ids` string[]: IDs of the connectors that use this connection, in any environment.
  - `connectors` ConnectionConnectorResponse[]: Connectors that use this connection, in any environment. A connection in use can't be deleted.
    - `id` string, uuid, required
    - `name` string, required
    - `environment_id` string, uuid, required: Environment the connector runs in.
    - `managed_key` string, nullable: Key of the `connectors/<key>.yaml` file that defines the connector in code, or null.

## Other responses

- `401`: Missing or invalid API key.
- `403`: The API key lacks the required permission or access to the environment.
- `422`: Validation Error
- `429`: Rate limit exceeded.

---

[API](https://skmtc.dev/connic/apis/connic-api.md) · [All operations](https://skmtc.dev/connic/apis/connic-api/llms.txt) · [OpenAPI document](https://skmtc.dev/connic/apis/connic-api/revisions/482932da5fbe?raw)
