---
title: "Rotate Connection Api Key"
method: POST
path: "/admin/angi/connections/{connection_id}/rotate-api-key"
tags: ["admin"]
---

# Rotate Connection Api Key

`POST /admin/angi/connections/{connection_id}/rotate-api-key`

## Request

- Base URL: `https://api-docs.upsmith.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api-docs.upsmith.com/admin/angi/connections/{connection_id}/rotate-api-key`
- Auth: one of:
  - API key in header `x-api-key`
  - HTTP bearer

## Path parameters

- `connection_id` string, required

## Headers

- `organization-id` string, nullable
- `timezone` string
- `x-user-id` string, nullable
- `x-actor-email` string, nullable
- `x-request-source` string, nullable
- `x-operation-id` string, nullable
- `x-commit-message` string, nullable
- `x-confirmation-id` string, nullable
- `x-chat-id` string, nullable

## Request body

- AngiRotateApiKeyRequest
  - `api_key` string, nullable
  - `require_api_key` boolean, nullable

## Response `200`

Successful Response

- AngiConnectionWithApiKeyResponse
  - `connection` AngiConnectionResponse, required
    - `id` string, required
    - `organization_id` string, required
    - `organization_name` string, nullable
    - `company_name` string, required
    - `brand_name` string, nullable
    - `spids` string[]
    - `contact_email` string, nullable
    - `crm_key` string, nullable
    - `api_key_last4` string, nullable
    - `require_api_key` boolean, required
    - `status` 'pending' | 'active' | 'disabled' | 'error', required
    - `environment` 'test' | 'production', required
    - `last_webhook_received_at` string, date-time, nullable
    - `last_error_at` string, date-time, nullable
    - `last_error_summary` string, nullable
    - `lead_trigger_configured` boolean, nullable
    - `can_activate` boolean, nullable
    - `activation_blockers` string[], nullable
    - `created_at` string, date-time, nullable
    - `updated_at` string, date-time, nullable
    - `deleted_at` string, date-time, nullable
  - `api_key` string, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/upsmith/apis/upsmith-api.md) - [All operations](https://skmtc.dev/upsmith/apis/upsmith-api/llms.txt) - [OpenAPI document](https://skmtc.dev/upsmith/apis/upsmith-api/revisions/cce8b07a5787?raw)
