Connectors in Code
Declare connectors as YAML files in your project. Every deploy creates, updates, or retires them for its environment, and a rollback restores them.
On this page
Connectors can be created in the dashboard, through the REST API or connic MCP, or declared in your project under connectors/. Deploys create, update, and retire connectors declared in code, so their settings are versioned with the agents they link. Every connector type can be declared in code; Slack, Microsoft Teams, and GitHub connectors name a Connection whose setup was finished in the dashboard.
Each file declares one connector. The file name without .yaml is the connector's key and identity: connectors/order-events.yaml has the key order-events.
Declare a connector
type: kafka
mode: inbound
name: Order events # optional, defaults to the file name
connection: orders-kafka-staging # saved Connection, by name or ID; it holds the Bridge too
config: # connector settings, as in the REST API and connic MCP
topic: ${ORDER_EVENTS_TOPIC}
agents:
- order-processor
- name: audit-logger
files_required: true
environments: # omit to deploy to every environment
Staging: {}
Production:
connection: orders-kafka-prod # another Connection, with the production Bridge
config:
group_id: connic-orders-prod
dev: # connic dev environments the list doesn't name
config:
topic: orders-dev
group_id: connic-orders-dev| Field | Type | Status | Description |
|---|---|---|---|
| type | string | Required | Connector type, such as webhook, kafka, or email. Each connector's page lists its type. |
| mode | string | Optional | inbound, outbound, or sync. Required when the type supports more than one mode; otherwise it defaults to the only mode. |
| name | string | Optional | Display name, 1 to 200 characters.Default: file name |
| connection | string | Optional | Name or ID of a saved Connection. Required for the types that use one; see Connections and Bridges. |
| bridge | string | Optional | Name or ID of a Bridge, for an outbound webhook. Kafka, RabbitMQ, MQTT, SQS, S3, PostgreSQL, and email connectors use the Bridge of their Connection; see Connections and Bridges. |
| domain | string | Optional | Hostname or ID of an active custom domain, for types that support custom domains. |
| config | object | Optional | The connector's settings. Each connector's page lists them under Configuration. The deploy rejects unknown fields. |
| agents | list | Required | Linked agents, at least one. Each entry is an agent name or an object with the fields below. Every agent must exist in agents/. |
| name | string | Required | Agent name. |
| files_required | boolean | Optional | Fail the run before it starts when the input has no files or a file was omitted. Only on connectors whose events can carry files, never on outbound connectors.Default: false |
| outbound | object | Optional | Outbound connectors only. How the agent uses the connector. Without it, the connector sends after every completed run. See Link agents. |
| usage | string | Required | automatic, agent_tool, or middleware. |
| action_name | string | Optional | Required for agent_tool and middleware. Starts with a lowercase letter and contains only lowercase letters, digits, and underscores, up to 64 characters. |
| source | string[] | Optional | automatic only. Keys of other connector files; the connector then sends only for runs they started. |
| environments | map | Optional | Environment names that get the connector, each with optional overrides of name, connection, bridge, domain, agents, and config. Omit it to deploy to every environment. See Environments and overrides. |
| dev | object | Optional | Overrides for the connic dev environments that environments doesn't name. With environments, those get the connector only when dev is set. See Environments and overrides. |
The REST API and connic MCP take the same fields to create or update a connector: type, mode, name, connection, bridge, domain, and config. Instead of environments, a request names one environment, and agents are linked one at a time. A link's config takes the fields of an agents entry, with source listing connector IDs instead of file keys.
A deploy makes the connector match its file: a key you leave out goes back to its default; see What deploys change. An update through the REST API or connic MCP changes only the fields it sends and keeps the rest. To reset a config key there, send it as null.
Files must sit directly in connectors/ and use the .yaml extension. A file name starts with a letter or digit, contains only letters, digits, -, and _, and has at most 100 characters.
Link agents
List agents by name, or as objects with files_required and, on outbound connectors, outbound. With files_required: true, a run fails before it starts when the input has no files or a file was omitted. connic lint rejects it on outbound connectors and on types whose events carry no files, such as cron or PostgreSQL.
type: webhook
mode: outbound
config:
outbound_url: ${ORDER_RESULTS_URL}
agents:
- name: order-processor
outbound: { usage: automatic, source: [order-events] } # keys of other connector files
- name: invoice-checker
outbound: { usage: middleware, action_name: send_invoice_result }
environments: # the source must exist in the same environments
Staging: {}
Production: {}outbound.usage is automatic, agent_tool, or middleware, matching the outbound usages. Agent-tool and middleware links need an action_name that starts with a lowercase letter and contains only lowercase letters, digits, and underscores. An automatic link can set source to the keys of other connector files; it then sends only for runs those connectors started. Each source must be an inbound or sync connector that is declared in the same environment and linked to the same agent; otherwise connic lint or the deploy fails. In each environment, an agent can use an action name on only one connector, and agent_tool links need an llm agent. Without outbound, an outbound connector sends after every successfully completed run.
Environments and overrides
Without environments, the connector is deployed to every environment with the same settings. With it, the connector exists only in the listed environments. Keys are environment names and must match exactly. Staging: {} deploys the file unchanged.
An override can set name, connection, bridge, domain, agents, and config. agents replaces the list. config is merged key by key, so Production in the example keeps topic and adds group_id. Only top-level keys are merged: a nested block such as rate_limit in an override replaces the whole block. To remove a connection, bridge, domain, or config key that the top of the file sets, set it to null in the override. An environment key that matches no environment in the project fails every deploy of the project.
dev takes the same fields and applies to every connic dev environment that environments doesn't name, quick tests included. With environments, those dev environments get the connector only when dev is set; dev: {} uses the top of the file unchanged. Dev environments have Variables of their own, and a quick test starts without any, so the example sets topic there and reads with a consumer group of its own.
Variables and secrets
${NAME} reads a Variable of the target environment. References work in config, connection, bridge, and domain; ${context.*} isn't available in connector files. connic resolves them once, when the deploy starts. A missing Variable fails the deploy, and a changed Variable takes effect with the next deploy.
When the deploy starts, connic converts each reference to the type of its field: true or false for booleans and a whole number for numbers. A value that doesn't fit, such as yes for a boolean or a number out of range, fails the deploy. Fields that take text need quotes around values that YAML would read as numbers, such as phone numbers and the Telegram user IDs in an allowed_user_ids list; connic lint rejects them without quotes. A Telegram chat_id may be an unquoted whole number.
Secrets that you supply, such as a Telegram bot_token or a Stripe webhook_secret, must be a ${NAME} reference. A literal value fails the deploy. The REST API and connic MCP take the secret itself and return it as ********; sending ******** back keeps the stored secret.
Connections and Bridges
Kafka, RabbitMQ, MQTT, Azure Service Bus, SQS, S3, PostgreSQL, Email, Twilio Voice, Twilio Messaging, Telnyx Voice, Telnyx Messaging, Jira, Linear, Notion, Shopify, GitLab, Pipedrive, Microsoft Teams, Gmail, Google Sheets, and Google Pub/Sub connectors take their credentials from a Connection, so the file never contains them. Reference the Connection by name or ID with connection. These types require one, except S3, which needs a Connection only to download file content, and Google Pub/Sub, which needs one only to publish. Fields that belong to the Connection, such as Kafka bootstrap servers, are rejected in config.
Connections are reusable credential sets for the whole project. Manage them in Project Settings → Connections, which lists the connectors using each Connection per environment, or through the REST API and connic MCP. Rotating a Connection updates every connector that uses it, without a deploy. A Connection can't be deleted while a connector uses it. To give each environment its own credentials, set connection in the environment overrides.
connic checks a Connection when you save it: required fields must be filled in, and unknown fields are rejected. An update is also checked against every connector that uses the Connection and fails, naming the connector, when one of them couldn't run with the new values. Secrets come back masked. To change a host, server address, endpoint URL, or Bridge of a saved Connection, enter the secrets that belong with it again; otherwise the update is rejected.
domain takes the hostname or ID of an active custom domain of the project.
Bridges
Kafka, RabbitMQ, MQTT, SQS, S3, PostgreSQL, and email connectors reach a private network through the Bridge of their Connection. Select it in the Connection, or send it as the Connection's bridge through the REST API or connic MCP. Every connector that uses the Connection goes through that Bridge, so to use a different Bridge per environment, give each environment its own Connection with a connection override, as Production does in the example above.
An outbound webhook sets bridge on the connector itself. For these Connection types, a bridge on the connector, and config.endpoint_url on an S3 connector, are deprecated and accepted until April 30, 2027 only when they match the Connection. connic lint warns about them, and a deploy fails when they differ.
Values connic generates
connic generates some values itself: webhook URLs, the secrets of webhook, WebSocket, and MCP connectors, the outbound webhook signing secret, the S3 URL secret, and the Telegram secret token. Leave them out of the file; connic lint or the deploy rejects them. connic creates them on the first deploy, keeps them across later deploys, and shows them on the connector in the dashboard as usual. An omitted Kafka group_id is generated as well, and removing group_id from the file keeps the consumer group the connector already uses.
Voice connectors
Twilio Voice and Telnyx Voice connectors set config.phone_number in E.164 format, or as the number's Twilio SID starting with PN or its Telnyx ID. The deploy looks an E.164 number up in the referenced Connection. A voice connector links exactly one agent, and that agent needs voice_config.
type: twilio
connection: support-twilio
config:
phone_number: "+4930123456"
agents:
- support-voiceWhat deploys change
Every deploy resolves the files for its environment into a snapshot that is stored with the deployment. At this point connic checks environment names, Connections, Bridges, Variables, phone numbers, outbound sources, and action names, and checks every config value against its field: unknown, missing, or out-of-range values, fields that don't apply to the mode, cron expressions, time zones, Stripe signing secrets, literal secrets, an outbound webhook URL without a Bridge that isn't HTTPS on port 443 or contains credentials, and a deprecated connector-level Bridge or S3 endpoint that doesn't match the Connection. An error fails the deploy before the build starts. Whether a callback URL's host is public, and the provider setup, are checked when the deployment is activated; see When a connector change fails. The deployment log lists the changes the snapshot makes when it goes live:
Connector changes on activation:
create: connectors/order-events.yaml (kafka)
update: connectors/support-inbox.yaml (email)
retire: connectors/legacy-orders.yaml (sqs)Activating a deployment applies its snapshot. This happens when a new deploy goes live, when you redeploy an older commit (Variables are resolved again), and when you activate an older deployment as a rollback. connic dev applies the connector files to its dev environment the same way, when the session starts and whenever a connector file changes; see Local development. Test runs and the deploy gate never change connectors.
A deploy gives the connector exactly the settings in its file. A key you remove from config goes back to its default, or is cleared if it has none. Removing domain detaches the custom domain, and removing bridge from an outbound webhook detaches its Bridge. A rollback restores the settings of the older file. Values connic generates stay; see Values connic generates.
Retired connectors
A connector that the active deployment no longer declares is retired. A deployment without a connectors/ folder retires every code connector in its environment. A retired connector is paused and keeps its URL, secrets, agent links, provider bindings, and run history. It doesn't count against the active connector limit and can't be resumed. connic doesn't delete retired connectors; delete one from the dashboard when you no longer need it.
When a later deployment declares the file again with the same type, the connector comes back with its URL, secrets, and previous pause state. A rollback to a deployment that declared it restores that deployment's links and settings, using the Variable values captured at that deploy. Deleting a retired connector is final: declaring the file again creates a new connector with a new URL and new secrets.
Type changes and renames
name instead.Changing a file's type also retires the old connector and creates a new one. Changing mode updates the connector in place and keeps its URL and secrets.
Pause state and limits
New code connectors start active, including types that the dashboard creates paused. To hold off consuming in an environment, leave that environment out of environments until it is ready. Deploys never change the pause state of an existing connector; pause and resume it in the dashboard. The active connector limit still applies, and a new connector over the limit stays paused. Telegram, Twilio, Telnyx, Jira, Linear, Shopify, GitLab, Pipedrive, and WhatsApp connectors change settings at the provider, so a deploy that would create one or bring one back at the limit fails instead.
Phone numbers, senders, and bots
Two connectors can't use the same voice number, and two inbound connectors can't use the same messaging sender or Telegram bot, even in different environments. Paused connectors count; retired ones don't. A deploy that would cause a clash fails. A retired connector gives up its number, sender, or bot when a deploy needs it for another code connector, and takes it back when it returns, unless another connector holds it then.
If creating or updating a connector replaces provider settings that connic didn't create, such as an existing Twilio incoming-call webhook, connic writes the previous values to the connector logs and the project's audit log, which keeps them after the connector is deleted. The Twilio Voice, Twilio Messaging, Telnyx Voice, Telnyx Messaging, and Telegram pages list what each one replaces.
Name rules
A code connector and a dashboard connector can't share a name in the same environment. A deploy that would create the clash fails. The dashboard, REST API, and connic MCP refuse to create or rename a dashboard connector to a name that a code connector uses, including retired ones. connic lint reports two files that use the same name in the same environment.
When a connector change fails
Activation is all or nothing. If a provider call fails, for example because the Twilio API returns an error, nothing is activated and the previous deployment stays live.
To go live without the failing connectors, click Deploy anyway on the deployment page. It redeploys the commit and skips the connectors that fail. For a rollback, choose Activate anyway in the activate dialog, or call POST /v1/projects/{project_id}/deployments/{deployment_id}/activate?force=true. Skipped connectors keep their previous state, and the next activation tries them again.
Before a rollback, the activate dialog lists the connectors it would create, update, bring back, or retire.
In the dashboard
Code connectors show an In code badge. The dashboard disables editing, deleting, and linking agents for them, and the REST API and connic MCP return 409. Pause and resume stay available. Retired connectors also show a Retired badge and can be deleted.
Validate with connic lint
connic lint checks connector files offline: their shape, types and modes, config fields and their values, fields that don't apply to the mode, generated fields, literal secrets, ${NAME} syntax, whether linked agents exist, outbound sources and action names, and name clashes between files. The value checks cover, for example, a cron schedule with five fields or a macro, a rate_limit.key when per_key is set, numeric Telegram IDs, and an outbound webhook URL without a Bridge that must use HTTPS on port 443 without credentials. Lint also warns about deprecated settings, such as a connector-level bridge on a Kafka, SQS, S3, PostgreSQL, or email connector. Environment names, Connections, Bridges, Variables and the values they fill in, whether a cron expression is valid, and phone-number availability are checked when the deploy starts, and provider setup when the deployment is activated. connic deploy runs lint first and uploads connectors/ with the rest of the project.