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

# Set or rotate a workspace credential



## OpenAPI

````yaml /openapi.json put /api/v1/workspaces/{workspace}/credentials
openapi: 3.0.3
info:
  title: ai-cmo.dev Services API
  version: 1.0.0
servers: []
security: []
paths:
  /api/v1/workspaces/{workspace}/credentials:
    put:
      summary: Set or rotate a workspace credential
      operationId: putWorkspaceCredential
      parameters:
        - name: workspace
          in: path
          required: true
          schema:
            type: string
            pattern: ^[a-z0-9-]+$
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CredentialWrite'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MaskedCredential'
      security:
        - cookieAuth: []
components:
  schemas:
    CredentialWrite:
      type: object
      properties:
        connector:
          type: string
          pattern: ^[a-z0-9-]{2,40}$
        key:
          type: string
          pattern: ^[A-Z][A-Z0-9_]{1,80}$
        value:
          type: string
          minLength: 1
          maxLength: 16384
        rotate:
          type: boolean
          default: false
      required:
        - connector
        - key
        - value
      additionalProperties: false
    MaskedCredential:
      type: object
      properties:
        workspace:
          type: string
        connector:
          type: string
          pattern: ^[a-z0-9-]{2,40}$
        key:
          type: string
          pattern: ^[A-Z][A-Z0-9_]{1,80}$
        maskedValue:
          type: string
        createdAt:
          type: string
        updatedAt:
          type: string
      required:
        - workspace
        - connector
        - key
        - maskedValue
        - createdAt
        - updatedAt
      additionalProperties: false
  securitySchemes:
    cookieAuth:
      type: apiKey
      in: cookie
      name: geo.session
      description: Signed HttpOnly browser session cookie

````