> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stella-commerce.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Rotate Sync Key

> Zero-downtime rotation per SHARED-CONTRACT §4.4: revoke older
active key first if 2 are active (frees the trigger's 2-slot cap),
create a new key, push it to Z6 (which moves the previous one to
its own standby for the 24h overlap window). Plaintext is NOT
returned — Zunkiree got it via push_sync_credentials, Stella has no
need to expose it again.



## OpenAPI

````yaml /api-reference/openapi.json post /api/dashboard/integrations/zunkiree/rotate-sync-key
openapi: 3.1.0
info:
  title: Agentic Commerce API
  description: |2-

        Agentic Commerce API - E-commerce Backend

        ## APIs

        ### Dashboard API (`/api/dashboard`)
        Authenticated endpoints for merchant management:
        - Products, Variants, Options
        - Inventory management
        - Orders and fulfillment
        - Customers
        - Collections

        ### Storefront API (`/api/storefront`)
        Public endpoints for client websites:
        - Product catalog
        - Collections
        - Cart management
        - Checkout

        ### Sync API (`/api/sync`)
        Integration endpoints for zunkiree-search:
        - Product sync
        - Availability checks
        - Order creation from AI widget
        
  version: 1.0.0
servers: []
security: []
paths:
  /api/dashboard/integrations/zunkiree/rotate-sync-key:
    post:
      tags:
        - Dashboard
        - Integrations
      summary: Rotate Sync Key
      description: |-
        Zero-downtime rotation per SHARED-CONTRACT §4.4: revoke older
        active key first if 2 are active (frees the trigger's 2-slot cap),
        create a new key, push it to Z6 (which moves the previous one to
        its own standby for the 24h overlap window). Plaintext is NOT
        returned — Zunkiree got it via push_sync_credentials, Stella has no
        need to expose it again.
      operationId: rotate_sync_key_api_dashboard_integrations_zunkiree_rotate_sync_key_post
      parameters:
        - name: authorization
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
        - name: X-API-Key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Api-Key
        - name: X-Stella-Merchant-Id
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Stella-Merchant-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RotateSyncKeyResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    RotateSyncKeyResponse:
      properties:
        key_id:
          type: string
          title: Key Id
        secret_prefix:
          type: string
          title: Secret Prefix
        created_at:
          type: string
          format: date-time
          title: Created At
        push_pending:
          type: boolean
          title: Push Pending
          description: >-
            True iff push_sync_credentials failed after the new key was created.
            The new key is active on Stella; Zunkiree still uses the previous
            one. Caller can retry by calling rotate again — but the migration
            003 trigger caps active keys at 2, so they'll need to revoke first.
          default: false
      type: object
      required:
        - key_id
        - secret_prefix
        - created_at
      title: RotateSyncKeyResponse
      description: |-
        Response from `POST /rotate-sync-key`. Plaintext secret is NOT
        in the response — Zunkiree received it via `push_sync_credentials`,
        Stella has no need to surface it again. UI displays the new prefix
        as a confirmation.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````