Skip to main content
connic
Reference

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.

Last updated

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.

To start an agent from HTTP, queues, email, schedules, or a custom application, use a connector. The REST API is for managing and observing a project.

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:

HTTP header
Authorization: Bearer cnc_your_api_key

Create 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.

Security
Never commit API keys to version control or expose them in client-side code. For CI/CD, store them as encrypted secrets (e.g. 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.

ConceptDetails
EnvironmentsAll 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 permissionsThe default. Includes every API-supported permission available to the key owner.
Individual permissionsIncludes only the selected action-level permissions and may be empty.
Owner permissionsA key never exceeds its owner's project access, even if the key has broader permissions selected.
EditingThe key owner can change its name, environment scope, and permissions without rotating it. Project members with permission to delete API keys can revoke it.
The environment scope and permissions can only narrow the owner's project access.

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:

ResponseDetails
Status Code429 Too Many Requests
Retry-After HeaderNumber of seconds to wait before retrying

Contact the connic team for higher limits.

Quick Examples

Get Run Details

terminal
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.

terminal
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"
  }'

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.

MethodPathPurpose
GET/v1/projects/{project_id}/connectionsList Connections with the connectors that use them.
POST/v1/projects/{project_id}/connectionsCreate 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 replace its settings. New credentials 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.

Secret fields are write-only and come back masked. 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.

CodeMeaning
401Missing or invalid API key
403Key lacks permission for this endpoint, or the endpoint is not part of the public API
404Resource not found
408Retrieval query timed out
429Rate limit exceeded. Check the Retry-After header.
500Internal server error
API endpoints

Explore all endpoints with full request/response schemas and example code snippets.

Open API endpoints