> ## 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.

# Publish a revision to an owned Plugin



## OpenAPI

````yaml https://raw.githubusercontent.com/agentsfleet/agentsfleet/main/public/openapi.json post /v1/workspaces/{workspace_id}/plugins/{plugin_id}/revisions
openapi: 3.1.0
info:
  title: agentsfleet 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/workspaces/{workspace_id}/plugins/{plugin_id}/revisions:
    post:
      tags:
        - Plugins
      summary: Publish a revision to an owned Plugin
      operationId: publish_plugin_revision
      parameters:
        - name: workspace_id
          in: path
          description: >-
            Workspace identifier (version 7 universally unique identifier, or
            UUID).
          required: true
          schema:
            type: string
        - name: plugin_id
          in: path
          description: >-
            Plugin identifier (version 7 universally unique identifier, or
            UUID).
          required: true
          schema:
            type: string
            format: uuid
        - name: Idempotency-Key
          in: header
          description: |-
            `UUIDv7` key. The same key and body replay the accepted result; a
            changed body under the same key conflicts.
          required: true
          schema:
            type: string
        - name: If-Match
          in: header
          description: >-
            Current `ETag` from the resource's GET response. An outdated value
            returns 412 with

            the current `etag`; omitting it returns 428.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PublishRevision'
        required: true
      responses:
        '201':
          description: Explicit immutable revision
          headers:
            ETag:
              schema:
                type: string
            Location:
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Published'
        '400':
          description: The request is invalid
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
        '401':
          description: Authentication is missing, invalid, or not accepted by this endpoint
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
        '403':
          description: You do not have permission for this action
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
        '404':
          description: Entry or candidate unavailable
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
        '409':
          description: Busy or changed operation
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
        '410':
          description: The resource is gone and will not return
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
        '412':
          description: Stale Plugin tag
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
        '413':
          description: The request body exceeds this endpoint's size limit
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
        '428':
          description: Missing Plugin tag
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
        '429':
          description: A request or capacity limit has been reached
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
        '500':
          description: An internal server error occurred
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
        '503':
          description: A required service is unavailable
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
      security:
        - BearerAuth: []
components:
  schemas:
    PublishRevision:
      type: object
      description: Explicitly append a chat candidate to the selected owned entry.
      required:
        - draft_candidate_id
      properties:
        draft_candidate_id:
          type: string
          description: Current creator-private idle candidate `UUIDv7`.
      additionalProperties: false
    Published:
      type: object
      description: Publication receipt retains the original accepted revision on retry.
      required:
        - plugin_id
        - revision_id
        - head_revision_id
        - etag
      properties:
        etag:
          type: string
          description: Current Plugin `ETag` for conditional updates.
        head_revision_id:
          type: string
          description: Current head `UUIDv7`.
        plugin_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:
            - string
            - 'null'
          format: date-time
          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: >-
        Send a dashboard session token, an account API key (`agt_t`), or a
        command-line credential (`afc_`) as a Bearer token. Each endpoint lists
        accepted credential types.

````

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