openapi: 3.2.0 info: title: Keploy Public Clusters API version: 1.0.0 description: 'Programmatic access to the Keploy platform for CI/CD pipelines, scripts, and AI agents. See the full guide at . **Scopes and 403 errors:** Every endpoint requires a minimum scope (`read`, `write`, or `admin`). If the API key lacks the required scope the server returns `403 Forbidden` with error code `INSUFFICIENT_SCOPE`.' contact: email: support@keploy.io termsOfService: https://keploy.io/terms servers: - url: https://api.keploy.io/client/v1 description: Production - url: https://api.staging.keploy.io/client/v1 description: Staging security: - apiKeyAuth: [] tags: - name: Clusters paths: /clusters: get: operationId: listClusters summary: List clusters description: 'Returns all clusters for the authenticated company. Requires scope: `read`.' x-required-scope: read tags: - Clusters responses: '200': description: Cluster list content: application/json: schema: $ref: '#/components/schemas/EnvelopeClusterList' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '429': $ref: '#/components/responses/RateLimited' '500': $ref: '#/components/responses/InternalError' post: operationId: createCluster summary: Create a cluster description: 'Provisions a new cluster in the authenticated company and returns its access key. The access key is shown only once. Requires scope: `admin`.' x-required-scope: admin tags: - Clusters requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreateClusterRequest' responses: '201': description: Cluster created (includes access key, shown only once) content: application/json: schema: $ref: '#/components/schemas/EnvelopeClusterCreated' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '409': $ref: '#/components/responses/Conflict' '413': $ref: '#/components/responses/PayloadTooLarge' '429': $ref: '#/components/responses/RateLimited' '500': $ref: '#/components/responses/InternalError' /apps/by-cluster/{clusterId}: parameters: - $ref: '#/components/parameters/clusterId' get: operationId: listAppsByCluster summary: List apps in a cluster description: 'Returns apps belonging to a specific cluster. More efficient than iterating all apps. Requires scope: `read`.' x-required-scope: read tags: - Clusters responses: '200': description: Apps in cluster content: application/json: schema: $ref: '#/components/schemas/EnvelopeAppByClusterList' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '429': $ref: '#/components/responses/RateLimited' '500': $ref: '#/components/responses/InternalError' components: responses: Unauthorized: description: Authentication required content: application/json: schema: $ref: '#/components/schemas/EnvelopeError' PayloadTooLarge: description: 'Request body exceeded the 5 MB cap enforced by the validation middleware (and decodeJSONBody as defence-in-depth). Returned for any body-accepting operation when the wrapped reader trips MaxBytesReader. The body is the standard error envelope with code `VALIDATION_ERROR`. ' content: application/json: schema: $ref: '#/components/schemas/EnvelopeError' RateLimited: description: Too many requests content: application/json: schema: $ref: '#/components/schemas/EnvelopeError' BadRequest: description: Validation error content: application/json: schema: $ref: '#/components/schemas/EnvelopeError' Conflict: description: Resource conflict (e.g., duplicate name) content: application/json: schema: $ref: '#/components/schemas/EnvelopeError' InternalError: description: Internal server error content: application/json: schema: $ref: '#/components/schemas/EnvelopeError' Forbidden: description: 'Insufficient scope or role (error code: INSUFFICIENT_SCOPE)' content: application/json: schema: $ref: '#/components/schemas/EnvelopeError' schemas: CreateClusterRequest: type: object required: - name properties: name: type: string description: Cluster name. Must be unique within the company. deployment_type: type: string enum: - saas - self-hosted default: self-hosted description: Defaults to self-hosted when omitted. APIError: type: object properties: code: type: string message: type: string details: type: array items: $ref: '#/components/schemas/ErrorDetail' ClusterResponse: type: object properties: id: type: string name: type: string deployment_type: type: string enum: - saas - self-hosted Origin: type: object properties: type: type: string clusterId: type: string namespace: type: string deployment: type: string clusterName: type: string AppByClusterResponse: type: object properties: id: type: string name: type: string origin: $ref: '#/components/schemas/Origin' EnvelopeClusterCreated: type: object properties: data: $ref: '#/components/schemas/ClusterCreatedResponse' error: $ref: '#/components/schemas/APIError' meta: $ref: '#/components/schemas/Meta' ErrorDetail: type: object properties: field: type: string message: type: string EnvelopeAppByClusterList: type: object properties: data: type: array items: $ref: '#/components/schemas/AppByClusterResponse' error: $ref: '#/components/schemas/APIError' meta: $ref: '#/components/schemas/Meta' ClusterCreatedResponse: type: object properties: cluster_id: type: string access_key: type: string description: Cluster access key. Returned only once at creation — store it securely. name: type: string deployment_type: type: string enum: - saas - self-hosted Meta: type: object properties: request_id: type: string trace_id: type: string timestamp: type: string format: date-time pagination: $ref: '#/components/schemas/Pagination' EnvelopeClusterList: type: object properties: data: type: array items: $ref: '#/components/schemas/ClusterResponse' error: $ref: '#/components/schemas/APIError' meta: $ref: '#/components/schemas/Meta' Pagination: type: object properties: has_next_page: type: boolean has_previous_page: type: boolean next_cursor: type: - string - 'null' previous_cursor: type: - string - 'null' total_count: type: - integer - 'null' EnvelopeError: type: object properties: error: $ref: '#/components/schemas/APIError' meta: $ref: '#/components/schemas/Meta' parameters: clusterId: name: clusterId in: path required: true schema: type: string securitySchemes: apiKeyAuth: type: apiKey in: header name: X-API-Key description: Personal Access Token (`kep_`-prefixed). Generate from Settings > API Keys.