> ## 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 setup 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 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 setup messages
      operationId: list_workspace_draft_messages
      parameters:
        - name: workspace_id
          in: path
          description: >-
            Workspace identifier (version 7 universally unique identifier, or
            UUID).
          required: true
          schema:
            type: string
        - name: draft_id
          in: path
          description: Draft identifier (version 7 universally unique identifier, or UUID).
          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: >-
            Use the previous `next_cursor` unchanged, for the same creator,
            draft, and page size.
          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: 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: Private draft unavailable
          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:
    CursorPage_Message:
      type: object
      description: >-
        One page of results. `total` is null when unavailable; `next_cursor` is
        null on the last

        page.
      required:
        - items
      properties:
        items:
          type: array
          items:
            type: object
            description: One user or assistant role in a durable request sequence.
            required:
              - save_requested
              - sequence
              - operation_id
              - role
              - state
              - created_at
            properties:
              candidate_id:
                type:
                  - string
                  - 'null'
                description: Accepted assistant proposal, when present.
              created_at:
                type: string
                format: date-time
                description: Acceptance timestamp, such as `2026-10-24T05:00:00.000Z`.
              failure:
                oneOf:
                  - $ref: '#/components/schemas/Failure'
                    description: >-
                      Server-reported failure reason and suggested recovery
                      action.
                  - type: 'null'
              finished_at:
                type:
                  - string
                  - 'null'
                format: date-time
                description: Finish timestamp, such as `2026-10-24T05:00:00.000Z`.
              operation_id:
                type: string
                description: Accepted body replay key.
              role:
                type: string
                description: user or assistant.
              save_error_code:
                type:
                  - string
                  - 'null'
                description: >-
                  A stable error code when the setup could not be saved. The
                  conversation remains available.
              save_requested:
                type: boolean
                description: >-
                  True when this accepted message requests saving after
                  successful completion.
              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:
                  - $ref: '#/components/schemas/Usage'
                    description: >-
                      Provider usage and cumulative runtime charge, when
                      recorded.
                  - type: 'null'
          description: Current bounded rows.
        next_cursor:
          type:
            - string
            - 'null'
          description: Use this value unchanged for the next page, or stop when 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:
            - 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.
    Failure:
      type: object
      description: Safe durable failure; callers cannot supply diagnostics or action links.
      required:
        - reason
        - error_code
        - recovery_action
      properties:
        cause:
          type:
            - string
            - 'null'
          description: Model-stream failure category, without request or response content.
        error_code:
          type: string
          description: Stable central registry code.
        reason:
          $ref: '#/components/schemas/FailureReason'
          description: Server-reported failure 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: >-
            Context knowledge measured by the server, independent of runner
            estimates.
        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: Allowed failure reasons, excluding user-supplied diagnostics and 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: >-
        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.