AppDirect Files API

Upload and manage files for chat sessions

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/appdirect-files-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

appdirect-files-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  description: The Companies API allows developers to manage marketplace companies and their user memberships.
  title: Companies AI Embed Files API
  license:
    name: Apache License, Version 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0
  version: v296.0-SNAPSHOT
servers:
- url: https://marketplace.appdirect.com/api
- url: https://virtserver.swaggerhub.com
tags:
- name: Files
  description: Upload and manage files for chat sessions
paths:
  /api/v1/chats/{chatId}/files:
    post:
      tags:
      - Files
      summary: Upload a file to a chat session
      description: 'Uploads a file that can be referenced in messages sent to this chat. Max file size: 5MB. After uploading, use the returned file ID to reference it in the prompt field using ComplexMessageContent.'
      operationId: uploadChatFile
      parameters:
      - name: chatId
        in: path
        required: true
        description: The unique identifier of the chat session.
        schema:
          type: string
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
              - file
              properties:
                file:
                  type: string
                  format: binary
                  description: The file to upload.
                source:
                  type: string
                  enum:
                  - USER
                  - SYSTEM
                  description: The source of the file. Defaults to USER if not specified.
      responses:
        '201':
          description: File successfully uploaded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileDto'
        '400':
          description: Bad request - No file found or invalid file data.
        '403':
          description: Forbidden, the user is not authorized to upload files to this chat.
        '404':
          description: Chat not found with the given identifier.
        '500':
          description: Internal Server Error.
      security:
      - ApiKeyAuth: []
    get:
      tags:
      - Files
      summary: List files in a chat session
      description: Retrieves a list of all files associated with the specified chat session.
      operationId: listChatFiles
      parameters:
      - name: chatId
        in: path
        required: true
        description: The unique identifier of the chat session.
        schema:
          type: string
      responses:
        '200':
          description: List of files in the chat session.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FilesResponseDto'
        '400':
          description: Bad request - Chat ID required.
        '403':
          description: Forbidden, the user is not authorized to access this chat.
        '404':
          description: Chat not found with the given identifier.
        '500':
          description: Internal Server Error.
      security:
      - ApiKeyAuth: []
  /api/v1/files:
    post:
      tags:
      - Files
      summary: Create a file record or upload a file
      description: 'This endpoint supports two modes: 1) Create a file record with metadata (application/json), or 2) Upload a file directly (multipart/form-data). When creating a record, you''ll need to upload the actual file separately. When uploading directly, the file is uploaded immediately.'
      operationId: createOrUploadFile
      requestBody:
        required: true
        description: 'This endpoint supports two modes: Create a file record with metadata (application/json), or upload a file directly (multipart/form-data).'
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateFileRequestDto'
          multipart/form-data:
            schema:
              type: object
              required:
              - file
              properties:
                file:
                  type: string
                  format: binary
                  description: The file to upload directly.
      responses:
        '201':
          description: File successfully created or uploaded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileDto'
        '400':
          description: Bad request - Missing required fields or invalid file data.
        '403':
          description: Forbidden, the user is not authorized to upload files.
        '500':
          description: Internal Server Error.
      security:
      - ApiKeyAuth: []
components:
  schemas:
    FilesResponseDto:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/FileDto'
    FileDto:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the file.
        createdAt:
          type: string
          format: date-time
          description: The date and time when the file was created.
        source:
          $ref: '#/components/schemas/FileSource'
        filename:
          type: string
          description: The name of the file.
        size:
          type: integer
          description: The size of the file in bytes.
        mimeType:
          type: string
          description: The MIME type of the file.
        url:
          type: string
          nullable: true
          description: The URL where the file can be accessed.
        metadata:
          type: object
          nullable: true
          description: Additional metadata associated with the file.
        deletedAt:
          type: string
          format: date-time
          nullable: true
          description: The date and time when the file was deleted, if applicable.
        status:
          $ref: '#/components/schemas/FileStatus'
    FileSource:
      type: string
      description: The source of the file.
      enum:
      - USER
      - SYSTEM
    CreateFileRequestDto:
      type: object
      required:
      - filename
      - size
      - mimeType
      properties:
        filename:
          type: string
          description: The name of the file.
        size:
          type: integer
          description: The size of the file in bytes.
        mimeType:
          type: string
          description: The MIME type of the file.
        metadata:
          type: object
          nullable: true
          description: Additional metadata associated with the file.
    FileStatus:
      type: string
      description: The status of the file.
      enum:
      - UPLOADED
      - UPLOADING
      - DELETING
      - DELETED