---
title: "Rotate Connection"
method: POST
path: "/v1/connections/{connection_id}/rotate"
tags: ["public_api", "external", "connections"]
---

# Rotate Connection

`POST /v1/connections/{connection_id}/rotate`

## Request

- Base URL: `https://api.hydracept.com`
- URL: `https://api.hydracept.com/v1/connections/{connection_id}/rotate`
- Auth: HTTP bearer

Replace credential via new secret (manual) or provisioned secret from CLI complete.

## Path parameters

- `connection_id` string, required

## Request body

- ConnectionCreate
  - `provider` string, required
  - `label` string
  - `consent` ConnectionConsent
    - `source` string, required
    - `clientVersion` string, required
    - `confirmedAt` string, required
  - `credentials` union
    - object
    - string
  - `secret` string, nullable
  - `bootstrapMode` string, nullable
  - `endpointUrl` string, nullable
  - `autoBind` boolean
  - `replaceExisting` boolean
  - `projectId` string, nullable
  - `environment` string
  - `userGuardrails` object, nullable

## Response `200`

Successful Response

- object

## Other responses

- `401`: Structured public error envelope (`code`, `message`, `requestId`, …)
- `403`: Structured public error envelope (`code`, `message`, `requestId`, …)
- `404`: Structured public error envelope (`code`, `message`, `requestId`, …)
- `422`: Validation failure: public envelope plus Pydantic `detail` / `validationErrors`
- `429`: Structured public error envelope (`code`, `message`, `requestId`, …)
- `500`: Structured public error envelope (`code`, `message`, `requestId`, …)
- `502`: Structured public error envelope (`code`, `message`, `requestId`, …)
- `503`: Structured public error envelope (`code`, `message`, `requestId`, …)

---

[API](https://skmtc.dev/hydracept/apis/hydracept-public-api.md) · [All operations](https://skmtc.dev/hydracept/apis/hydracept-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/hydracept/apis/hydracept-public-api/revisions/2d41a8069ede?raw)
