Replicas API Keys API

The API Keys API from Replicas — 2 operation(s) for api keys.

OpenAPI Specification

replicas-api-keys-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Replica Analytics API Keys API
  version: 2.0.0
  description: The Replica API allows you to programmatically manage cloud workspaces for AI agents. Use this API to manage environments (the org-scoped primitive workspaces are created from — including variables, files, skills, MCPs, warm hooks, start hooks, and warm pools), create and manage replicas, send messages, manage chats, stream events, read connected repositories and repository sets, and configure automations.
servers:
- url: https://api.tryreplicas.com
  description: Production API
security:
- apiKey: []
tags:
- name: API Keys
paths:
  /v1/user/api-keys:
    post:
      operationId: createPersonalApiKey
      summary: Create Personal API Key
      description: Creates a personal API key scoped to the authenticated user. Requires JWT authentication.
      tags:
      - API Keys
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - name
              properties:
                name:
                  type: string
                  description: Display name for the API key
      responses:
        '201':
          description: API key created. The `key` field is only returned once.
        '400':
          description: Invalid request
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalServerError'
    get:
      operationId: listPersonalApiKeys
      summary: List Personal API Keys
      description: Returns a paginated list of personal API keys for the authenticated user.
      tags:
      - API Keys
      parameters:
      - name: page
        in: query
        schema:
          type: integer
          default: 1
      - name: limit
        in: query
        schema:
          type: integer
          default: 10
      responses:
        '200':
          description: Successful response
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /v1/user/api-keys/{apiKeyId}:
    delete:
      operationId: deletePersonalApiKey
      summary: Delete Personal API Key
      description: Deletes a personal API key owned by the authenticated user.
      tags:
      - API Keys
      parameters:
      - name: apiKeyId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: API key deleted
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          description: API key not found or does not belong to this user
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
          description: Error message
        details:
          type:
          - string
          - 'null'
          description: Additional error details
      required:
      - error
  responses:
    Unauthorized:
      description: Unauthorized - Invalid or missing API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    InternalServerError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: API key authentication. Obtain your API key from the Replicas dashboard under Organization → Settings → API Keys.
    engineSecret:
      type: http
      scheme: bearer
      description: Workspace engine secret used by agent-mode workspace requests.
    workspaceId:
      type: apiKey
      in: header
      name: X-Workspace-Id
      description: Workspace ID used with the engine secret for agent-mode workspace requests.