{
  "openapi": "3.0.0",
  "info": {
    "title": "Pipecat Cloud - List Secret Sets",
    "version": "1.0.0",
    "description": "List all secret sets via Pipecat Cloud Private API"
  },
  "servers": [
    {
      "url": "https://api.pipecat.daily.co/v1",
      "description": "API server"
    }
  ],
  "paths": {
    "/secrets": {
      "get": {
        "summary": "List all secret sets",
        "description": "Retrieve a list of all secret sets for the organization.",
        "operationId": "listSecretSets",
        "security": [
          {
            "PrivateKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List of secret sets",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "sets": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SecretSetSummary"
                      }
                    }
                  }
                },
                "example": {
                  "sets": [
                    {
                      "name": "my-app-secrets",
                      "type": "secret",
                      "region": "us-west",
                      "status": "ready"
                    },
                    {
                      "name": "dockerhub-credentials",
                      "type": "imagePullSecret",
                      "region": "us-west",
                      "status": "pending"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "Unauthorized",
                  "code": "UNAUTHORIZED"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "PrivateKeyAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Authentication requires a Pipecat Cloud Private API token.\n\nGenerate a Private API key from your Dashboard (Settings > API Keys > Private > Create key) and include it as a Bearer token in the Authorization header."
      }
    },
    "schemas": {
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "description": "Error message"
          },
          "code": {
            "type": "string",
            "description": "Error code"
          }
        }
      },
      "SecretSetSummary": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the secret set"
          },
          "type": {
            "type": "string",
            "enum": [
              "secret",
              "imagePullSecret"
            ],
            "description": "Type of the secret set"
          },
          "region": {
            "type": "string",
            "description": "The region where the secret set is stored"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "ready",
              "failed"
            ],
            "description": "Readiness state. `pending` while provisioning is in flight, `ready` once the set can be bound to a deploy, `failed` if provisioning could not complete."
          },
          "errorMessage": {
            "type": "string",
            "description": "Customer-facing message returned only when `status` is `failed`."
          }
        }
      }
    }
  },
  "security": [
    {
      "PrivateKeyAuth": []
    }
  ]
}