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

# Stage a private chat candidate in the platform Library



## OpenAPI

````yaml https://raw.githubusercontent.com/agentsfleet/agentsfleet/main/public/openapi.json post /v1/admin/fleet-libraries
openapi: 3.1.0
info:
  title: agentsfleet Control Plane API
  description: API for managing workspaces, fleets, triggers, and runs.
  contact:
    name: agentsfleet
    url: https://agentsfleet.net
  license:
    name: MIT
    identifier: MIT
  version: 1.0.0
servers:
  - url: https://api.agentsfleet.net
    description: Production
security: []
paths:
  /v1/admin/fleet-libraries:
    post:
      tags:
        - Fleet library
      summary: Stage a private chat candidate in the platform Library
      operationId: stage_platform_fleet_library
      parameters:
        - name: Idempotency-Key
          in: header
          description: Required UUIDv7 replay key
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Stage'
        required: true
      responses:
        '201':
          description: Native revision staged; explicit publication is separate
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Published'
        '400':
          description: Invalid candidate or label
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
        '401':
          description: Unauthorized
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
        '403':
          description: Platform scope required
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
        '404':
          description: Creator-owned source unavailable
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
        '409':
          description: Busy draft, occupied slug or changed replay
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
        '410':
          description: Staged entry purged
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
        '413':
          description: Body too large
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
        '429':
          description: Too many requests
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
        '500':
          description: Internal failure
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
        '503':
          description: Dependency unavailable
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
      security:
        - BearerAuth: []
components:
  schemas:
    Stage:
      type: object
      description: Stage an authorized creator-owned current candidate, initially hidden.
      required:
        - workspace_id
        - draft_candidate_id
        - label
      properties:
        draft_candidate_id:
          type: string
          description: >-
            Exact current candidate, resolved under creator and workspace
            authority.
        label:
          type: string
          description: Human display label; the stable slug comes from validated setup.
        workspace_id:
          type: string
          description: Workspace containing the authenticated person's private draft.
      additionalProperties: false
    Published:
      type: object
      description: Publication receipt retains the original accepted revision on retry.
      required:
        - library_id
        - revision_id
        - head_revision_id
        - etag
      properties:
        etag:
          type: string
          description: Current Library strong tag.
        head_revision_id:
          type: string
          description: Current head `UUIDv7`.
        library_id:
          type: string
          description: Entry `UUIDv7`.
        revision_id:
          type: string
          description: Accepted immutable revision `UUIDv7`.
    ProblemBody:
      type: object
      description: The body every refusal carries, under `application/problem+json`.
      required:
        - docs_uri
        - title
        - detail
        - error_code
        - request_id
      properties:
        action_id:
          type:
            - string
            - 'null'
          description: 'On that 409 only: the action the gate held.'
        current_state:
          type:
            - string
            - 'null'
          description: 'On a 409 only: the state that forbade the transition.'
        detail:
          type: string
          description: One sentence on what was refused and why.
        docs_uri:
          type: string
          description: Where the error code is documented.
        error_code:
          type: string
          description: The registry code, stable across releases.
        etag:
          type:
            - string
            - 'null'
          description: >-
            On a 412 only: the resource's current entity tag, to refetch and
            retry.
        gate_id:
          type:
            - string
            - 'null'
          description: 'On an answered approval gate''s 409 only: the gate that was answered.'
        outcome:
          type:
            - string
            - 'null'
          description: 'On that 409 only: the answer that stands.'
        request_id:
          type: string
          description: The request this refusal answers, for support.
        resolved_at:
          type:
            - integer
            - 'null'
          format: int64
          description: 'On that 409 only: when the standing answer was given.'
        resolved_by:
          type:
            - string
            - 'null'
          description: 'On that 409 only: who gave it.'
        title:
          type: string
          description: A short name for the refusal, safe to show a person.
        user_message:
          type:
            - string
            - 'null'
          description: A curated sentence for end users, where the code has one.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Obtain a token via the CLI auth flow (POST /v1/auth/sessions) or GitHub
        OAuth

````

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