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

# List task files



## OpenAPI

````yaml /openapi/v1.json get /v1/tasks/{taskId}/files
openapi: 3.1.0
info:
  title: Adam API
  description: >-
    Create projects, start and continue AI engineering tasks, run harness tools
    directly in externally controlled tasks, and retrieve their files.


    ## External task tools


    Create an external task with `POST /v1/tasks/external`; creation performs no
    inference or compute provisioning. Discover tool schemas with `GET
    /v1/tasks/{taskId}/tools`, submit calls to `POST
    /v1/tasks/{taskId}/tool-calls`, and poll `GET
    /v1/tasks/{taskId}/tool-calls/{callId}` for their durable outcomes. Calls
    run tools without an Adam agent loop; individual tools may use compute,
    connected accounts, credentials or billable model services. The explicit
    `tools:execute` scope grants full harness authority beyond individual
    read/write scopes. Invocation also requires `tasks:write`. Discovery
    requires `tasks:read`; result reads require both `tasks:read` and
    `tools:execute` because outputs can contain workspace and connected-account
    data. Only external tasks owned by the caller are supported. Reuse the same
    idempotency key for an identical call. If its outcome is `unknown`, do not
    automatically retry with a new key: the operation may already have taken
    effect.


    ## Authentication


    Every endpoint accepts either a personal API key or an Adam ID OAuth 2.0
    access token. OAuth clients must request the RFC 8707 resource indicator
    `https://api.adam.new/v1`; tokens for other Adam resources are rejected.


    ## Versioning and deprecation


    The API is versioned in the URL path (`/v1`). Backwards-compatible additions
    ship within `/v1`; breaking changes ship as a new major version (`/v2`)
    alongside the old one. When an endpoint or version is scheduled for removal,
    its responses carry `Deprecation` and `Sunset` headers at least 90 days
    before the retirement date, and the change is announced at
    https://adam.new/changelog.


    ## Rate limits


    Every response reports quota via the standard `RateLimit` and
    `RateLimit-Policy` headers (draft-ietf-httpapi-ratelimit-headers) and the
    `X-RateLimit-*` set. A `429` includes `Retry-After` in seconds: wait that
    long before retrying.


    ## Errors


    All 4xx/5xx responses use one JSON shape: `{ "error": { "type", "message",
    "requestId" } }`, where `type` is a stable machine-readable code (e.g.
    `invalid_request`, `rate_limit_error`) and `requestId` can be quoted to
    support.
  version: 1.0.0
  contact: {}
servers:
  - description: Production
    url: https://api.adam.new
security: []
tags: []
externalDocs:
  description: Adam API versioning and deprecation policy
  url: https://docs.adam.new/api-reference/introduction#versioning-and-deprecation
paths:
  /v1/tasks/{taskId}/files:
    get:
      tags:
        - Adam API
      summary: List task files
      operationId: listTaskFiles
      parameters:
        - name: limit
          required: false
          in: query
          schema:
            default: 50
            maximum: 50
            minimum: 1
            type: integer
        - name: cursor
          required: false
          in: query
          description: Opaque cursor returned by the previous page
          schema:
            type: string
            minLength: 1
        - name: taskId
          required: true
          in: path
          schema:
            format: uuid
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListPublicApiFilesResponseDto'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiErrorDto'
        '401':
          description: Missing or invalid Bearer credential
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiErrorDto'
        '402':
          description: Payment or subscription required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiErrorDto'
        '403':
          description: Credential is missing a required scope
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiErrorDto'
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiErrorDto'
        '409':
          description: Request conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiErrorDto'
        '429':
          description: Rate limit exceeded
          headers:
            Retry-After:
              description: >-
                Seconds until both the policy and global buckets can accept
                another request.
              schema:
                type: integer
            RateLimit:
              description: >-
                Live state of the most-constrained quota policy
                (draft-ietf-httpapi-ratelimit-headers).
              schema:
                type: string
            RateLimit-Policy:
              description: >-
                The quota policies applied to this request: capacity (q) and
                window seconds (w).
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiErrorDto'
        '500':
          description: Internal API error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiErrorDto'
      security:
        - personalApiKey: []
        - adamId:
            - tasks:read
            - files:read
components:
  schemas:
    ListPublicApiFilesResponseDto:
      type: object
      properties:
        files:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              versionId:
                type: string
                format: uuid
                pattern: >-
                  ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
              name:
                type: string
              mediaType:
                type: string
              size:
                type: number
              taskId:
                anyOf:
                  - type: string
                  - type: 'null'
              projectId:
                anyOf:
                  - type: string
                  - type: 'null'
              downloadUrl:
                type: string
                format: uri
              createdAt:
                type: string
              updatedAt:
                type: string
            required:
              - id
              - name
              - mediaType
              - size
              - taskId
              - projectId
              - downloadUrl
              - createdAt
              - updatedAt
        nextCursor:
          anyOf:
            - type: string
            - type: 'null'
      required:
        - files
        - nextCursor
    PublicApiErrorDto:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
            message:
              type: string
            requestId:
              type: string
          required:
            - type
            - message
      required:
        - error
  securitySchemes:
    personalApiKey:
      scheme: bearer
      bearerFormat: adam_pk_…
      description: >-
        A personal API key created in Adam. Send it as `Authorization: Bearer
        <key>`.
      type: http
    adamId:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://api.adam.new/auth/oauth2/authorize
          refreshUrl: https://api.adam.new/auth/oauth2/token
          scopes:
            offline_access: >-
              Issue a refresh token so access can be renewed without a new
              sign-in.
            automations:read: List and inspect automations in the selected workspace.
            automations:write: >-
              Create, edit, pause, resume, and delete automations in the
              selected workspace.
            billing:read: >-
              Read subscription, entitlement, and usage information for the
              selected workspace.
            files:read: List files produced by projects and tasks.
            files:write: Upload task attachments and project files.
            integrations:read: >-
              List available and connected integrations in the selected
              workspace.
            projects:read: List and read projects in the selected workspace.
            projects:write: Create and update projects in the selected workspace.
            tasks:read: List tasks, task status, and task messages.
            tasks:write: >-
              Create, update, message, answer, and cancel tasks in the selected
              workspace.
            tools:execute: >-
              Run the full Adam harness in your external tasks, including shell
              commands, workspace files, connected accounts, paired devices,
              stored credentials, and billable tools. This grants broad
              execution authority beyond the individual read and write scopes.
          tokenUrl: https://api.adam.new/auth/oauth2/token
      description: >-
        Adam ID OAuth 2.0 authorization code flow with PKCE (S256). Send
        resource=https://api.adam.new/v1 on the authorization request and every
        token request, including refresh-token grants. Protected-resource
        metadata: https://api.adam.new/.well-known/oauth-protected-resource/v1.

````

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