---
title: "Update a connection"
method: PATCH
path: "/v1/connections/:connection_key"
---

# Update a connection

`PATCH /v1/connections/:connection_key`

Update fields on a connection.

## Path parameters

- `connection_key` string, required

## Request body

- object — Connection fields to update.
  - `agent_context` string — Agent-specific context for this connection.
  - `color` string — The default color for this connection.
  - `description` string — A description of the connection.
  - `name` string — The display name for the connection
  - `schema_refresh_frequency` string — How often the schema is refreshed (as a [cron expression](https://crontab.guru)).

## Response `200`

Successful response

- object — Base response envelope for all successful API responses.
  - `success` true, required
  - `request_id` string, required
  - `result` Connection, required — A data connection, usually a SQL database
    - `key` string, required — The unique identifier for the connection
    - `name` string, required — The display name for the connection
    - `created_at` string, date-time, required — An ISO 8601 date-time string.
    - `description` string, required — A description of the connection.
    - `modified_at` string, date-time, required — An ISO 8601 date-time string.
    - `permissions` object[], required — The list of actors with assigned permissions for this connection.
      - `key` string, required — The unique identifier for the actor.
      - `role` union, required — A connection role.
        - 'viewer' — Connection viewer.
        - 'editor' — Connection editor.
        - 'admin' — Connection admin.
      - `type` union, required — The type of actor.
        - 'user' — A workspace member
        - 'group' — A workspace group
        - 'service_account' — A service account
        - 'workspace' — All workspace members
    - `projects` string[], required — Projects where this connection is available.
    - `type` union, required — The type of connection
      - 'athena' — Athena
      - 'bigquery' — BigQuery
      - 'clickhouse' — ClickHouse
      - 'databricks' — Databricks
      - 'mcp' — MCP server
      - 'mssql' — Microsoft SQL Server
      - 'mysql' — MySQL
      - 'postgresql' — PostgreSQL
      - 'redshift' — Redshift
      - 'snowflake' — Snowflake
      - 'synapse' — Synapse
      - 'googlesheets' — Google Sheets
    - `agent_context` string — Agent-specific context for this connection.
    - `color` string — The default color for this connection.
    - `last_schema_refresh_at` string, date-time — An ISO 8601 date-time string.
    - `schema_refresh_frequency` string — How often the schema is refreshed (as a [cron expression](https://crontab.guru)).

## Other responses

- `4XX` — Client error. Possible status codes include: 400 (invalid request), 401 (missing or invalid API key), 403 (insufficient permissions), 404 (resource not found), 429 (rate limit exceeded).
- `5XX` — Internal server error.

---

[API](https://skmtc.net/count/apis/count-public-api.md) · [All operations](https://skmtc.net/count/apis/count-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/count/count-public-api/versions/858ed44750ff/schema)
