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

# connector.secret.rotate({ name?, secret? }): sets a secret at once, creating it when the connector has none of that name



## OpenAPI

````yaml /api-reference/openapi.json post /connectors/{idOrName}/secret
openapi: 3.1.0
info:
  title: paddock API
  version: 1.0.0
  description: >-
    The paddock API. Send an API key, or a session token on its own session, as
    a bearer token.
servers:
  - url: https://api.paddock.build/v1
security:
  - bearer: []
paths:
  /connectors/{idOrName}/secret:
    post:
      summary: >-
        connector.secret.rotate({ name?, secret? }): sets a secret at once,
        creating it when the connector has none of that name
      operationId: rotateConnectorSecret
      parameters:
        - $ref: '#/components/parameters/ConnectorIdOrName'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SecretRotateRequest'
      responses:
        '200':
          description: The new secret
          headers:
            Request-Id:
              $ref: '#/components/headers/RequestId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectorSecret'
        default:
          $ref: '#/components/responses/Error'
components:
  parameters:
    ConnectorIdOrName:
      name: idOrName
      in: path
      required: true
      description: The connector's ID, or for connectors.get its name
      schema:
        type: string
  schemas:
    SecretRotateRequest:
      type: object
      additionalProperties: false
      properties:
        name:
          description: >-
            1 to 64 of [A-Za-z0-9_]; default "default". A name the connector
            lacks is created.
          type: string
        secret:
          description: 16 to 256 printable ASCII characters; generated when omitted.
          type: string
    ConnectorSecret:
      type: object
      required:
        - name
        - secret
      properties:
        name:
          type: string
        secret:
          type: string
    ErrorBody:
      description: The body of every non-2xx response.
      type: object
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/ErrorObject'
    ErrorObject:
      type: object
      required:
        - code
        - message
      properties:
        code:
          $ref: '#/components/schemas/ErrorCode'
        message:
          type: string
        details:
          type: object
    ErrorCode:
      type: string
      enum:
        - invalid_request
        - unauthorized
        - forbidden
        - not_found
        - conflict
        - payload_too_large
        - unsupported
        - unavailable
        - internal
  headers:
    RequestId:
      description: The request's ID, for support and logs
      schema:
        type: string
  responses:
    Error:
      description: Every non-2xx response
      headers:
        Request-Id:
          $ref: '#/components/headers/RequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorBody'
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: An API key, or a session token on its own session

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.