REST API
Access your Connic project programmatically with API keys: query runs, manage retrieval, pull cost data, and manage deployments. To run agents in response to events, use a connector.
On this page
Overview
Connic exposes a REST API that lets you interact with your project outside of the dashboard. Use it to pull run results into external monitoring, manage your retrieval programmatically, and query 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 uses the same action-level project permissions shown in Team & Permissions. Keep all available permissions selected or choose individual permissions, then edit that selection at any time.
Permission Model
The permission picker shows API-supported permissions available to the account creating or editing the key.
| Concept | Details |
|---|---|
| All permissions | The default. Includes every API-supported permission available to the key owner. |
| Individual permissions | Includes only the selected action-level permissions and may be empty. |
| 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 and permissions. 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 |
If you need higher limits, contact the Connic team.
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": "Your document text here...",
"namespace": "docs.api",
"entry_id": "my-custom-id"
}'Error Responses
The API uses standard HTTP status codes. Error responses include a JSON body with a detail field describing the issue.
| 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 |
| 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