PutPut Files API

File listing, download, stats, and deletion

GitHub OpenAPI

Operations 4

GET /api/v1/files List uploaded files #
DELETE /api/v1/files/{id} Delete a file #
GET /api/v1/files/{id}/download Get a download URL for a file #
GET /api/v1/files/{id}/stats Get file statistics #

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/putput-io:putput-io-files-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

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

OpenAPI Specification

putput-io-files-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: PutPut Files API
  version: '1.0'
  description: Tee up your files. $0 egress, 10 GB free, no signup required.
  contact:
    name: PutPut
    url: https://putput.io
    email: support@putput.io
servers:
- url: https://putput.io
  description: Production
tags:
- name: Files
  description: File listing, download, stats, and deletion
paths:
  /api/v1/files:
    get:
      operationId: listFiles
      summary: List uploaded files
      description: Returns a paginated list of confirmed files for the authenticated user. Uses cursor-based pagination. Default page size is 50, max 100.
      tags:
      - Files
      security:
      - bearerAuth: []
      parameters:
      - name: cursor
        in: query
        required: false
        description: Opaque cursor from a previous response for fetching the next page.
        schema:
          type: string
      - name: limit
        in: query
        required: false
        description: Number of files per page (1-100). Defaults to 50.
        schema:
          type: integer
          minimum: 1
          maximum: 100
          default: 50
      - name: prefix
        in: query
        required: false
        description: Filter files by prefix (exact match).
        schema:
          type: string
      - name: project_id
        in: query
        required: false
        description: Filter files by project ID.
        schema:
          type: string
      - name: tag
        in: query
        required: false
        description: Filter files by tag (substring match).
        schema:
          type: string
      responses:
        '200':
          description: Paginated file list
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileListResponse'
              example:
                files:
                - id: file_xyz789
                  original_name: photo.jpg
                  public_name: up_abc123/photo.jpg
                  public_url: https://cdn.putput.io/user123/up_abc123/photo.jpg
                  content_type: image/jpeg
                  size_bytes: 102400
                  visibility: public
                  prefix: null
                  metadata: null
                  tags: null
                  download_count: 42
                  expires_at: null
                  project_id: null
                  created_at: '2026-02-22T00:00:00.000Z'
                cursor: eyJjcmVhdGVkX2F0IjoiMjAyNi0wMi0yMlQwMDowMDowMC4wMDBaIiwiaWQiOiJmaWxlX3h5ejc4OSJ9
                has_more: true
        '401':
          description: Missing or invalid bearer token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/v1/files/{id}:
    delete:
      operationId: deleteFile
      summary: Delete a file
      description: Soft-deletes the file record and hard-deletes it from R2 storage. Decrements the user's storage usage. Cannot be undone.
      tags:
      - Files
      security:
      - bearerAuth: []
      parameters:
      - name: id
        in: path
        required: true
        description: The file ID (UUID) to delete.
        schema:
          type: string
      responses:
        '200':
          description: File deleted successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    const: true
                required:
                - success
              example:
                success: true
        '401':
          description: Missing or invalid bearer token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: File not found or already deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: NOT_FOUND
                  message: File not found or already deleted.
  /api/v1/files/{id}/download:
    get:
      operationId: downloadFile
      summary: Get a download URL for a file
      description: Returns a CDN URL for public files or a time-limited presigned URL for private files. Presigned URLs expire in 1 hour. Increments the file's download count.
      tags:
      - Files
      security:
      - bearerAuth: []
      parameters:
      - name: id
        in: path
        required: true
        description: The file ID (UUID) to download.
        schema:
          type: string
      responses:
        '200':
          description: Download URL returned
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DownloadResponse'
              example:
                download_url: https://cdn.putput.io/user123/up_abc123/photo.jpg
        '401':
          description: Missing or invalid bearer token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: File not found or deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: NOT_FOUND
                  message: File not found or deleted.
  /api/v1/files/{id}/stats:
    get:
      operationId: getFileStats
      summary: Get file statistics
      description: Returns download count, file size, visibility, and creation date for a file.
      tags:
      - Files
      security:
      - bearerAuth: []
      parameters:
      - name: id
        in: path
        required: true
        description: The file ID (UUID) to get stats for.
        schema:
          type: string
      responses:
        '200':
          description: File statistics returned
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileStats'
              example:
                id: file_xyz789
                download_count: 42
                size_bytes: 102400
                visibility: public
                created_at: '2026-02-22T00:00:00.000Z'
        '401':
          description: Missing or invalid bearer token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: File not found or deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: NOT_FOUND
                  message: File not found or deleted.
components:
  schemas:
    DownloadResponse:
      type: object
      description: Response containing a download URL for a file.
      properties:
        download_url:
          type: string
          format: uri
          description: CDN URL for public files, or a time-limited presigned URL for private files.
        expires_at:
          type: string
          format: date-time
          description: When the presigned URL expires. Only present for private files.
      required:
      - download_url
    FileItem:
      type: object
      description: A file stored in PutPut. Returned in file listings and after upload confirmation.
      properties:
        id:
          type: string
          description: Unique file identifier (UUID).
        original_name:
          type: string
          description: Original filename as provided during upload.
        public_name:
          type: string
          description: Server-assigned unique path used in the CDN URL.
        public_url:
          type:
          - string
          - 'null'
          format: uri
          description: Public CDN URL. null for private files -- use GET /api/v1/files/{id}/download for a presigned URL.
        content_type:
          type: string
          description: MIME type of the file.
        size_bytes:
          type: integer
          description: File size in bytes.
        visibility:
          type: string
          enum:
          - public
          - private
          description: File visibility.
        prefix:
          type:
          - string
          - 'null'
          description: Path prefix if set during upload.
        metadata:
          type:
          - object
          - 'null'
          additionalProperties:
            type: string
          description: User-defined key-value metadata. null if not set.
        tags:
          type:
          - array
          - 'null'
          items:
            type: string
          description: User-defined tags. null if not set.
        download_count:
          type: integer
          description: Number of times this file has been downloaded.
        expires_at:
          type:
          - string
          - 'null'
          format: date-time
          description: ISO 8601 datetime when this file expires. null if no expiry.
        project_id:
          type:
          - string
          - 'null'
          description: Project ID if the file belongs to a project.
        created_at:
          type: string
          format: date-time
          description: ISO 8601 datetime when the file was uploaded.
      required:
      - id
      - original_name
      - public_name
      - public_url
      - content_type
      - size_bytes
      - visibility
      - created_at
    FileStats:
      type: object
      description: Statistics for a single file.
      properties:
        id:
          type: string
          description: Unique file identifier (UUID).
        download_count:
          type: integer
          description: Total number of times this file has been downloaded.
        size_bytes:
          type: integer
          description: File size in bytes.
        visibility:
          type: string
          enum:
          - public
          - private
          description: File visibility.
        created_at:
          type: string
          format: date-time
          description: ISO 8601 datetime when this file was uploaded.
      required:
      - id
      - download_count
      - size_bytes
      - visibility
      - created_at
    ErrorResponse:
      type: object
      description: Canonical error response shape used by all API errors.
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: Machine-readable error code in SCREAMING_SNAKE_CASE.
              examples:
              - UNAUTHORIZED
              - VALIDATION_ERROR
              - RATE_LIMITED
              - NOT_FOUND
              - FILE_TOO_LARGE
              - STORAGE_LIMIT_EXCEEDED
              - CONTENT_TYPE_BLOCKED
              - FILE_NOT_UPLOADED
              - FILE_LIMIT_EXCEEDED
              - MIME_MISMATCH
              - FETCH_FAILED
              - FORBIDDEN
              - SERVER_ERROR
            message:
              type: string
              description: Human-readable error description.
            hint:
              type: string
              description: Actionable suggestion for resolving the error. Optional.
          required:
          - code
          - message
      required:
      - error
    FileListResponse:
      type: object
      description: Paginated list of files.
      properties:
        files:
          type: array
          items:
            $ref: '#/components/schemas/FileItem'
          description: Array of files matching the query.
        cursor:
          type:
          - string
          - 'null'
          description: Opaque cursor for fetching the next page. null when there are no more pages.
        has_more:
          type: boolean
          description: true if there are more files beyond this page.
      required:
      - files
      - cursor
      - has_more
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: token
      description: 'API token starting with "pp_". Obtain one via POST /api/v1/auth/guest (no signup required) or create scoped tokens in the dashboard. Pass as: Authorization: Bearer pp_...'