Strapi Upload API

File upload and media library management endpoints powered by the Upload plugin.

Operations 4

POST /api/upload Upload files #
GET /api/upload/files List uploaded files #
GET /api/upload/files/{id} Get an uploaded file #
DELETE /api/upload/files/{id} Delete an uploaded file #

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/strapi-upload-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 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. See our Privacy Policy and Terms.

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

OpenAPI Specification

strapi-upload-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Strapi REST Upload API
  description: The Strapi REST API provides endpoints for accessing and managing content-types created within the Strapi headless CMS.
  version: 5.0.0
  contact:
    name: Strapi Support
    url: https://strapi.io/support
  termsOfService: https://strapi.io/terms
servers:
- url: https://{host}
  description: Strapi Server
  variables:
    host:
      default: localhost:1337
      description: The hostname and port of your Strapi instance
security:
- bearerAuth: []
- apiTokenAuth: []
tags:
- name: Upload
  description: File upload and media library management endpoints powered by the Upload plugin.
paths:
  /api/upload:
    post:
      operationId: uploadFiles
      summary: Upload files
      description: Uploads one or more files to the Strapi media library. Files can optionally be linked to a content-type entry by providing ref, refId, and field parameters. Uploaded files are placed in the API Uploads folder by default.
      tags:
      - Upload
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
              - files
              properties:
                files:
                  type: array
                  items:
                    type: string
                    format: binary
                  description: The file(s) to upload
                ref:
                  type: string
                  description: The API identifier of the content-type to link the file to
                refId:
                  type: string
                  description: The document ID of the entry to link the file to
                field:
                  type: string
                  description: The field name on the entry where the file should be linked
                fileInfo:
                  type: string
                  description: JSON string containing file metadata such as name, alternativeText, and caption
      responses:
        '200':
          description: Files uploaded successfully
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/UploadFile'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
  /api/upload/files:
    get:
      operationId: listUploadFiles
      summary: List uploaded files
      description: Returns a list of all files stored in the Strapi media library.
      tags:
      - Upload
      responses:
        '200':
          description: A list of uploaded files
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/UploadFile'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
  /api/upload/files/{id}:
    get:
      operationId: getUploadFile
      summary: Get an uploaded file
      description: Returns a single file from the Strapi media library by its ID.
      tags:
      - Upload
      parameters:
      - name: id
        in: path
        required: true
        description: The ID of the uploaded file
        schema:
          type: string
      responses:
        '200':
          description: The uploaded file details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UploadFile'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
    delete:
      operationId: deleteUploadFile
      summary: Delete an uploaded file
      description: Deletes a file from the Strapi media library by its ID.
      tags:
      - Upload
      parameters:
      - name: id
        in: path
        required: true
        description: The ID of the uploaded file
        schema:
          type: string
      responses:
        '204':
          description: File deleted successfully
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  responses:
    Forbidden:
      description: Forbidden - insufficient permissions
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Not found - the requested resource does not exist
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Unauthorized - missing or invalid authentication
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    BadRequest:
      description: Bad request - invalid input or validation error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    UploadFile:
      type: object
      description: A file object stored in the Strapi media library
      properties:
        id:
          type: integer
          description: The unique ID of the file
        name:
          type: string
          description: The original name of the file
        alternativeText:
          type: string
          nullable: true
          description: Alternative text for accessibility
        caption:
          type: string
          nullable: true
          description: A caption for the file
        width:
          type: integer
          nullable: true
          description: The width in pixels for image files
        height:
          type: integer
          nullable: true
          description: The height in pixels for image files
        formats:
          type: object
          nullable: true
          description: Responsive image format variants (thumbnail, small, medium, large)
        hash:
          type: string
          description: A unique hash identifier for the file
        ext:
          type: string
          description: The file extension
        mime:
          type: string
          description: The MIME type of the file
        size:
          type: number
          description: The file size in kilobytes
        url:
          type: string
          description: The URL path to access the file
        previewUrl:
          type: string
          nullable: true
          description: A preview URL for the file
        provider:
          type: string
          description: The storage provider (e.g., local, aws-s3, cloudinary)
        createdAt:
          type: string
          format: date-time
          description: The timestamp when the file was uploaded
        updatedAt:
          type: string
          format: date-time
          description: The timestamp when the file was last updated
    Error:
      type: object
      properties:
        data:
          nullable: true
        error:
          type: object
          properties:
            status:
              type: integer
              description: The HTTP status code
            name:
              type: string
              description: The error name
            message:
              type: string
              description: A human-readable error message
            details:
              type: object
              description: Additional error details
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'JWT token obtained from the Users and Permissions authentication endpoint. Include as Authorization: Bearer {token}.'
    apiTokenAuth:
      type: apiKey
      in: header
      name: Authorization
      description: 'API token created in the Strapi admin panel under Settings > Global settings > API Tokens. Include as Authorization: Bearer {token}.'
externalDocs:
  description: Strapi REST API Documentation
  url: https://docs.strapi.io/cms/api/rest