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

> ## Agent Instructions
> Melso product MCP: https://melso.ai/api/mcp (OAuth; one company per grant). REST: https://melso.ai. Documentation-search MCP: https://docs.melso.ai/mcp. The docs search server does not act on customer accounts.
>
> Use the live tool schema and respect company membership. Ask the person to authorize the exact fiscal document version in the signed-in app. A professional prepares and files included returns after authorization; AI does not file alone. A prepared file or approval receipt is not evidence of filing. Never claim completion from an accepted Task or Run. Keep credentials out of chat and logs. Agents features are internal or by private invitation.

# List task message page

> Workspace member with access to this resource.

Request: Path: Task UUID. Query: `limit?:integer`, `before_created_at?:RFC3339Nano`, `before_id?:UUID` (cursor pair).

Response: TaskMessagesPageResponse; default limit 50, valid range 1–100, chronological order within each page. The first page, without a cursor, holds the newest messages. For older ones, pass `next_cursor.created_at` and `next_cursor.id` as `before_created_at` and `before_id` while `has_more` is true. Queued follow-ups that are not yet next in line are omitted.

Status: 200; 400 invalid limit or cursor. Authentication and resource-access errors follow [Overview](/api-reference/errors).



## OpenAPI

````yaml /api-reference/openapi.json get /api/tasks/{id}/messages/page
openapi: 3.1.0
info:
  title: Melso API
  version: '2026-10-12'
  description: >-
    Customer integration contracts for Melso. Agents access is internal or by
    private invitation. Fiscal approval remains in the authenticated app.
  contact:
    name: Melso
    url: https://melso.ai/en
servers:
  - url: https://melso.ai
    description: Production API origin
security: []
tags:
  - name: Areas
    description: >-
      <Info>Melso Agents is available only internally or by private invitation.
      Agents-specific features require existing access. For the autónomo fiscal
      service, see [Get started](/essentials/quickstart).</Info>


      Areas operations available within the caller's documented permissions.
  - name: Artifacts
    description: >-
      <Info>Melso Agents is available only internally or by private invitation.
      Agents-specific features require existing access. For the autónomo fiscal
      service, see [Get started](/essentials/quickstart).</Info>


      Artifacts operations available within the caller's documented permissions.
  - name: Authentication
    description: >-
      <Info>Melso Agents is available only internally or by private invitation.
      Agents-specific features require existing access. For the autónomo fiscal
      service, see [Get started](/essentials/quickstart).</Info>


      Authentication operations available within the caller's documented
      permissions.
  - name: Automations
    description: >-
      <Info>Melso Agents is available only internally or by private invitation.
      Agents-specific features require existing access. For the autónomo fiscal
      service, see [Get started](/essentials/quickstart).</Info>


      Automations operations available within the caller's documented
      permissions.
  - name: Companies
    description: >-
      <Info>Melso Agents is available only internally or by private invitation.
      Agents-specific features require existing access. For the autónomo fiscal
      service, see [Get started](/essentials/quickstart).</Info>


      Companies operations available within the caller's documented permissions.
  - name: Execution funding
    description: >-
      <Info>Melso Agents is available only internally or by private invitation.
      Agents-specific features require existing access. For the autónomo fiscal
      service, see [Get started](/essentials/quickstart).</Info>


      Execution funding operations available within the caller's documented
      permissions.
  - name: Files
    description: >-
      <Info>Melso Agents is available only internally or by private invitation.
      Agents-specific features require existing access. For the autónomo fiscal
      service, see [Get started](/essentials/quickstart).</Info>


      Files operations available within the caller's documented permissions.
  - name: GitHub
    description: >-
      <Info>Melso Agents is available only internally or by private invitation.
      Agents-specific features require existing access. For the autónomo fiscal
      service, see [Get started](/essentials/quickstart).</Info>


      GitHub operations available within the caller's documented permissions.
  - name: Interactions
    description: >-
      <Info>Melso Agents is available only internally or by private invitation.
      Agents-specific features require existing access. For the autónomo fiscal
      service, see [Get started](/essentials/quickstart).</Info>


      Interactions operations available within the caller's documented
      permissions.
  - name: Knowledge
    description: >-
      <Info>Melso Agents is available only internally or by private invitation.
      Agents-specific features require existing access. For the autónomo fiscal
      service, see [Get started](/essentials/quickstart).</Info>


      Knowledge operations available within the caller's documented permissions.
  - name: MCP
    description: MCP operations available within the caller's documented permissions.
  - name: Messages
    description: >-
      <Info>Melso Agents is available only internally or by private invitation.
      Agents-specific features require existing access. For the autónomo fiscal
      service, see [Get started](/essentials/quickstart).</Info>


      Messages operations available within the caller's documented permissions.
  - name: OAuth
    description: OAuth operations available within the caller's documented permissions.
  - name: Private network
    description: >-
      <Info>Melso Agents is available only internally or by private invitation.
      Agents-specific features require existing access. For the autónomo fiscal
      service, see [Get started](/essentials/quickstart).</Info>


      Private network operations available within the caller's documented
      permissions.
  - name: Runs
    description: >-
      <Info>Melso Agents is available only internally or by private invitation.
      Agents-specific features require existing access. For the autónomo fiscal
      service, see [Get started](/essentials/quickstart).</Info>


      Runs operations available within the caller's documented permissions.
  - name: Skills
    description: >-
      <Info>Melso Agents is available only internally or by private invitation.
      Agents-specific features require existing access. For the autónomo fiscal
      service, see [Get started](/essentials/quickstart).</Info>


      Skills operations available within the caller's documented permissions.
  - name: Tasks
    description: >-
      <Info>Melso Agents is available only internally or by private invitation.
      Agents-specific features require existing access. For the autónomo fiscal
      service, see [Get started](/essentials/quickstart).</Info>


      Tasks operations available within the caller's documented permissions.
  - name: Vault
    description: >-
      <Info>Melso Agents is available only internally or by private invitation.
      Agents-specific features require existing access. For the autónomo fiscal
      service, see [Get started](/essentials/quickstart).</Info>


      Vault operations available within the caller's documented permissions.
  - name: Webhooks
    description: >-
      <Info>Melso Agents is available only internally or by private invitation.
      Agents-specific features require existing access. For the autónomo fiscal
      service, see [Get started](/essentials/quickstart).</Info>


      Webhooks operations available within the caller's documented permissions.
paths:
  /api/tasks/{id}/messages/page:
    get:
      tags:
        - Messages
      summary: List task message page
      description: >-
        Workspace member with access to this resource.


        Request: Path: Task UUID. Query: `limit?:integer`,
        `before_created_at?:RFC3339Nano`, `before_id?:UUID` (cursor pair).


        Response: TaskMessagesPageResponse; default limit 50, valid range 1–100,
        chronological order within each page. The first page, without a cursor,
        holds the newest messages. For older ones, pass `next_cursor.created_at`
        and `next_cursor.id` as `before_created_at` and `before_id` while
        `has_more` is true. Queued follow-ups that are not yet next in line are
        omitted.


        Status: 200; 400 invalid limit or cursor. Authentication and
        resource-access errors follow [Overview](/api-reference/errors).
      operationId: listTaskMessagePage
      parameters:
        - name: id
          in: path
          required: true
          description: id from the corresponding authorized response.
          schema:
            type: string
        - name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 50
          description: Messages per page.
        - name: before_created_at
          in: query
          schema:
            type: string
            format: date-time
          description: next_cursor.created_at from the previous page. Send with before_id.
        - name: before_id
          in: query
          schema:
            type: string
            format: uuid
          description: next_cursor.id from the previous page. Send with before_created_at.
        - name: X-Workspace-ID
          in: header
          required: false
          description: >-
            Company UUID for a personal token on company-scoped operations. A
            company API key already binds its company.
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: >-
            TaskMessagesPageResponse; default limit 50, valid range 1–100,
            chronological order within each page. The first page, without a
            cursor, holds the newest messages. For older ones, pass
            `next_cursor.created_at` and `next_cursor.id` as `before_created_at`
            and `before_id` while `has_more` is true. Queued follow-ups that are
            not yet next in line are omitted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskMessagesPageResponse'
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication required.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Credential, company or resource access denied.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Resource unavailable to this caller.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limited; respect Retry-After when present.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    TaskMessagesPageResponse:
      type: object
      properties:
        messages:
          type: array
          items:
            $ref: '#/components/schemas/TaskMessageResponse'
        limit:
          type: integer
        has_more:
          type: boolean
        next_cursor:
          anyOf:
            - $ref: '#/components/schemas/TaskMessagesCursorResponse'
            - type: 'null'
      required:
        - messages
        - limit
        - has_more
    Error:
      type: object
      properties:
        error:
          type: string
        code:
          type: string
      required:
        - error
      additionalProperties: true
    TaskMessageResponse:
      type: object
      properties:
        id:
          type: string
        task_id:
          type: string
        author_type:
          type: string
        author_id:
          type: string
        content:
          type: string
        role:
          type: string
        kind:
          type: string
        run_id:
          anyOf:
            - type: string
            - type: 'null'
        failure_reason:
          anyOf:
            - type: string
            - type: 'null'
        elapsed_ms:
          anyOf:
            - type: integer
            - type: 'null'
        created_at:
          type: string
        updated_at:
          type: string
        reactions:
          type: array
          items:
            $ref: '#/components/schemas/ReactionResponse'
        attachments:
          type: array
          items:
            $ref: '#/components/schemas/AttachmentResponse'
        final:
          anyOf:
            - type: boolean
            - type: 'null'
      required:
        - id
        - task_id
        - author_type
        - author_id
        - content
        - role
        - kind
        - created_at
        - updated_at
        - reactions
        - attachments
    TaskMessagesCursorResponse:
      type: object
      properties:
        created_at:
          type: string
        id:
          type: string
      required:
        - created_at
        - id
    ReactionResponse:
      type: object
      properties:
        id:
          type: string
        message_id:
          type: string
        actor_type:
          type: string
        actor_id:
          type: string
        emoji:
          type: string
        created_at:
          type: string
      required:
        - id
        - message_id
        - actor_type
        - actor_id
        - emoji
        - created_at
    AttachmentResponse:
      type: object
      properties:
        id:
          type: string
        workspace_id:
          type: string
        task_id:
          anyOf:
            - type: string
            - type: 'null'
        message_id:
          anyOf:
            - type: string
            - type: 'null'
        run_id:
          anyOf:
            - type: string
            - type: 'null'
        uploader_type:
          type: string
        uploader_id:
          type: string
        filename:
          type: string
        url:
          type: string
        download_url:
          type: string
        attachment_download_url:
          type: string
        markdown_url:
          type: string
        content_type:
          type: string
        size_bytes:
          type: integer
        created_at:
          type: string
      required:
        - id
        - workspace_id
        - task_id
        - message_id
        - run_id
        - uploader_type
        - uploader_id
        - filename
        - url
        - download_url
        - markdown_url
        - content_type
        - size_bytes
        - created_at
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Company API key (mwk_) or personal access token (mel_). A PAT requires
        X-Workspace-ID on company-scoped routes. An API key implies its own
        company.

````

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