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

# Read your private authoring messages



## OpenAPI

````yaml https://raw.githubusercontent.com/agentsfleet/agentsfleet/main/public/openapi.json get /v1/workspaces/{workspace_id}/drafts/{draft_id}/messages
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/workspaces/{workspace_id}/drafts/{draft_id}/messages:
    get:
      tags:
        - Drafts
      summary: Read your private authoring messages
      operationId: list_workspace_draft_messages
      parameters:
        - name: workspace_id
          in: path
          description: '`UUIDv7` of the workspace.'
          required: true
          schema:
            type: string
        - name: draft_id
          in: path
          description: '`UUIDv7` of the draft.'
          required: true
          schema:
            type: string
        - name: limit
          in: query
          description: Page size, 1..25; default 20.
          required: false
          schema:
            type: integer
            format: int32
            minimum: 0
        - name: starting_after
          in: query
          description: Opaque creator/draft/page-size bound cursor.
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Sequence then role order
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CursorPage_Message'
        '400':
          description: Invalid input or cursor
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
        '401':
          description: No credential, or one this route does not accept
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
        '403':
          description: The credential is good and lacks the capability this route requires
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
        '404':
          description: Private draft unavailable
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
        '429':
          description: The instance is at its ceiling
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
        '500':
          description: The daemon failed to answer
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
        '503':
          description: A dependency this route needs is unreachable
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
      security:
        - BearerAuth: []
components:
  schemas:
    CursorPage_Message:
      type: object
      description: A bounded keyset page; unavailable totals and final cursors are null.
      required:
        - items
      properties:
        items:
          type: array
          items:
            type: object
            description: One user or assistant role in a durable request sequence.
            required:
              - sequence
              - operation_id
              - role
              - state
              - created_at
            properties:
              candidate_id:
                type:
                  - string
                  - 'null'
                description: Accepted assistant proposal, when present.
              created_at:
                type: integer
                format: int64
                description: Acceptance time, Unix milliseconds.
              failure:
                oneOf:
                  - type: 'null'
                  - $ref: '#/components/schemas/Failure'
                    description: Daemon-derived bounded failure and recovery action.
              finished_at:
                type:
                  - integer
                  - 'null'
                format: int64
                description: Terminal time, Unix milliseconds.
              operation_id:
                type: string
                description: Accepted body replay key.
              role:
                type: string
                description: user or assistant.
              sequence:
                type: string
                description: Decimal request sequence.
              state:
                type: string
                description: Durable queued/running/terminal state.
              text:
                type:
                  - string
                  - 'null'
                description: Text, when this role has private content.
              usage:
                oneOf:
                  - type: 'null'
                  - $ref: '#/components/schemas/Usage'
                    description: >-
                      Provider usage and cumulative runtime charge, when
                      recorded.
          description: Current bounded rows.
        next_cursor:
          type:
            - string
            - 'null'
          description: Opaque continuation, or null.
        total:
          type:
            - integer
            - 'null'
          format: int64
          description: Known total, or null.
          minimum: 0
    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.
    Failure:
      type: object
      description: Safe durable failure; callers cannot supply diagnostics or action links.
      required:
        - reason
        - error_code
        - recovery_action
      properties:
        error_code:
          type: string
          description: Stable central registry code.
        reason:
          $ref: '#/components/schemas/FailureReason'
          description: Bounded daemon-owned reason.
        recovery_action:
          type: string
          description: Stable recovery action for the authorized client to render.
    Usage:
      type: object
      description: Creator-visible usage; unknown provider figures remain absent.
      required:
        - knowledge
        - runtime_cost_nanos
      properties:
        input_tokens:
          type:
            - integer
            - 'null'
          format: int64
          description: Cumulative input, absent while unknown.
          minimum: 0
        knowledge:
          $ref: '#/components/schemas/Knowledge'
          description: Daemon-derived knowledge, independent of a runner estimate.
        output_tokens:
          type:
            - integer
            - 'null'
          format: int64
          description: Cumulative output, absent while unknown.
          minimum: 0
        provider_cost_nanos:
          type:
            - string
            - 'null'
          description: Physical provider cost, absent while unknown.
        runtime_cost_nanos:
          type: string
          description: Upward-rounded cumulative runtime cost.
    FailureReason:
      type: string
      description: >-
        Bounded daemon-owned failure vocabulary, without caller diagnostics or
        links.
      enum:
        - insufficient_balance
        - model_unavailable
        - context_too_large
        - provider_failed
        - provider_usage_unknown
        - attempt_timed_out
        - policy_changed
    Knowledge:
      type: string
      description: Whether all reported provider usage is known.
      enum:
        - known
        - unknown
  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.