---
title: "Rotate a connection's API key"
locale: en
url: https://tlg.builera.app/en/docs/reference/rest/connections.rotate_key
verified: 2026-10-24
app_version: "2.0"
generated: true
---

# Rotate a connection's API key

Issue a new API key for another connection (old key stops working).

Issue a new API key for another connection (old key stops working).

## Overview

| Name | Value |
| --- | --- |
| Code | `connections.rotate_key` |
| Scope needed | `integrations.manage` |
| Risk | Dangerous |
| May need confirmation | Yes |
| Runs as | Answers right away |
| Needs `Idempotency-Key` | No |
| Member roles allowed | `owner`, `manager` |
| In the app | Settings → AI connections → Rotate key |

## Input fields

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `uuid` | Yes |   |

## Example request

```bash
curl -X POST https://tlg.builera.app/api/public/v2/ops/connections.rotate_key \
  -H "Authorization: Bearer $TELEGRAM_AUTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"id":"00000000-0000-0000-0000-000000000000"}'
```

## Output fields (`data`)

| Field | Type | Required |
| --- | --- | --- |
| `ok` | `true` | Yes |
| `apiKey` | `text` | Yes |

## Example answer

```json
{
  "data": {
    "ok": true,
    "apiKey": "text"
  }
}
```

## Using it over MCP

Not listed on any profile: call `tools_describe` then `tools_run` with `code: "connections.rotate_key"`. Tool name when listed: `connections_rotate_key`.
