REST API
Programmatic access to a connic project with API keys for runs, retrieval, cost data, and deployments. Connectors run agents in response to events.
On this page
Overview
The connic REST API provides project access outside of the dashboard. It pulls run results into external monitoring, manages retrieval programmatically, and queries cost data for billing dashboards.
All API requests are authenticated with project-scoped API keys and rate-limited per project. The full endpoint reference includes request and response schemas plus example requests. Open API endpoints.
Authentication
API requests are authenticated using API keys. Each key is scoped to a single project and can only access endpoints within that project. Pass the key as a Bearer token in the Authorization header:
Authorization: Bearer cnc_your_api_keyCreate and manage API keys in Project Settings → API Keys & MCP Auth. Keys start with the cnc_ prefix and are shown only once when created. Store them securely.
CONNIC_API_KEY).API Key Permissions
Each API key has an environment scope and the same action-level project permissions shown in Team & Permissions. By default, it covers all current and future environments and every API-supported permission available to its owner. Select an environment subset or individual permissions to narrow access; either selection can be edited later.
Permission Model
The permission picker shows API-supported permissions available to the account creating or editing the key.
| Concept | Details |
|---|---|
| Environments | All environments is the default and includes environments created later. Selecting a subset limits the key to those environments; project-wide operations require access to all environments. If a selected environment is deleted, the key stays inactive until its scope is updated. |
| All permissions | The default. Includes every API-supported permission available to the key owner. |
| Individual permissions | Includes the selected action-level permissions and may be empty. A manage permission includes its matching view permission. |
| Owner permissions | A key never exceeds its owner's project access, even if the key has broader permissions selected. |
| Editing | The key owner can change its name, environment scope, and permissions without rotating it. Project members with permission to delete API keys can revoke it. |
Rate Limiting
API requests are rate-limited per project. All API keys belonging to the same project share the limit. When the limit is exceeded, the API responds with:
| Response | Details |
|---|---|
| Status Code | 429 Too Many Requests |
| Retry-After Header | Number of seconds to wait before retrying |
Successful and 429 responses also carry X-RateLimit-Limit (requests per window), X-RateLimit-Remaining (requests left in the current window) and X-RateLimit-Reset (Unix time in seconds when the next request slot frees up).
Contact the connic team for higher limits.
Quick Examples
Get Run Details
curl https://api.connic.co/v1/projects/{project_id}/runs/{run_id} \
-H "Authorization: Bearer cnc_your_api_key"Upload Text to Retrieval
Retrieval endpoints require an environment_id query parameter to scope the request to a specific environment.
curl -X POST "https://api.connic.co/v1/projects/{project_id}/retrieval/text?environment_id={env_id}" \
-H "Authorization: Bearer cnc_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"content": "Document text goes here...",
"namespace": "docs.api",
"entry_id": "my-custom-id"
}'Connector Settings
Requests that create or update a connector take the fields of a connectors/*.yaml file: mode, connection and bridge by name or ID, domain by hostname or ID, and the config that each connector's page lists. Responses return connection, bridge, and domain as IDs. connic MCP takes the same fields.
Kafka, PostgreSQL, email, SQS, and S3 connectors use the Bridge of their Connection; set it on the Connection. Their responses return that Bridge in bridge, and a request may send it back unchanged. bridge on the connector is for outbound HTTP webhooks.
To create a Twilio Voice or Telnyx Voice connector, name its voice agent in the agent_name query parameter. A Slack connector can be created once its Slack Connection's setup is complete. At the plan's active connector limit, a new connector is created paused, except Telegram, Twilio, and Telnyx connectors, which return 403.
curl -X POST "https://api.connic.co/v1/projects/{project_id}/connectors?environment_id={env_id}" \
-H "Authorization: Bearer cnc_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"name": "support-api",
"type": "http",
"mode": "sync",
"domain": "hooks.example.com",
"config": {
"require_auth": true,
"rate_limit": { "total": 600, "per_ip": 60 }
}
}'An update changes only the fields it sends and keeps the rest. This differs from a deploy of a connectors/*.yaml file, which makes the connector match the file. To reset a config key to its default, or clear it if it has none, send it as null. domain: null detaches the connector from its custom domain, and bridge: null detaches an outbound webhook from its Bridge. Changing mode returns 400 while agents are linked.
Until April 30, 2027, requests can still use the earlier fields below, and responses return them next to the new ones. Responses to requests that use them carry Deprecation and Sunset headers. So do requests whose config has fields the connector type doesn't have or that don't apply to its mode, and requests that create a connector of a type with several modes without mode; connic then uses the type's default mode. After that date, these fail. Link responses return outbound in the earlier form until then. A connector-level bridge or S3 config.endpoint_url is accepted only when it matches the Connection; otherwise the request returns 400. A config.region sent for an S3 or SQS Connection is ignored.
| Earlier field | Use instead |
|---|---|
| config.mode | mode |
| config.connection_id, or Connection credentials in config | connection |
| config.bridge_id | bridge |
| bridge or config.bridge_id on Kafka, PostgreSQL, email, SQS, and S3 connectors | bridge on the Connection |
| config.endpoint_url on S3 connectors | config.endpoint_url on the Connection |
| config.region on S3 and SQS Connections | config.region on the S3 connector; SQS reads the region from the endpoint or queue URL |
| domain_id | domain |
| config.rate_limit_per_minute, rate_limit_per_ip_per_minute, rate_limit_key, rate_limit_per_key_per_minute | config.rate_limit.total, per_ip, key, per_key |
| config.phone_number_sid, config.phone_number_id | config.phone_number |
| Link outbound.version and outbound.source {mode, connector_ids} | outbound.source as a list of connector IDs |
Connections
Connections are reusable credential sets that connectors reference, shared by the whole project. These endpoints need the connections.view, connections.create, connections.update, or connections.delete permission.
| Method | Path | Purpose |
|---|---|---|
| GET | /v1/projects/{project_id}/connections | List Connections with the connectors that use them. |
| POST | /v1/projects/{project_id}/connections | Create a Connection. |
| GET | /v1/projects/{project_id}/connections/{connection_id} | Get one Connection. |
| PATCH | /v1/projects/{project_id}/connections/{connection_id} | Rename a Connection or change its settings and Bridge. Changes apply to every connector that uses it. |
| DELETE | /v1/projects/{project_id}/connections/{connection_id} | Delete a Connection. Returns 409 while a connector uses it. |
| GET | /v1/projects/{project_id}/connections/-/schema/{connector_type} | Get the Connection fields for a connector type. |
A request sends the Connection's fields in config, as the schema endpoint lists them, and the Bridge of a Kafka, PostgreSQL, email, SQS, or S3 Connection as the top-level bridge, by name or ID. connic checks the values on every create and update: a missing required field or an unknown field returns 400. An update is also checked against every connector that uses the Connection and returns 400, naming the connector, when one of them couldn't run with the new values.
An update changes only what it sends: fields left out of config keep their values, and null removes an optional field, such as a CA certificate. bridge: null connects directly. Secret fields are write-only and come back masked. Sending a secret as ******** or leaving it empty keeps the stored value, except when the update changes a field the secret belongs with, such as a host, server address, endpoint URL, or the Bridge; then the secret must be sent again, or the update returns 400. Slack Connections can only be created in the dashboard.
Connector Failures on Activation
Activating a deployment applies the connectors it declares in connectors/*.yaml. If a connector change fails, POST /v1/projects/{project_id}/deployments/{deployment_id}/activate returns 409 with the failures in detail.connector_failures and activates nothing. Add ?force=true to activate anyway; the failing connectors keep their current state.
Error Responses
The API uses standard HTTP status codes. Most error responses include a JSON body with a detail field describing the issue; proxied retrieval errors use error instead.
| Code | Meaning |
|---|---|
| 401 | Missing or invalid API key |
| 403 | Key lacks permission for this endpoint, or the endpoint is not part of the public API |
| 404 | Resource not found |
| 408 | Retrieval query timed out |
| 429 | Rate limit exceeded. Check the Retry-After header. |
| 500 | Internal server error |
Explore all endpoints with full request/response schemas and example code snippets.
Open API endpoints