Cognito Forms Files API

The Files API from Cognito Forms — 2 operation(s) for files.

Operations 2

GET /api/files/{id} Get File #
POST /api/files Upload 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/cognito-forms-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 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

cognito-forms-files-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Cognito Forms Entries Files API
  version: '1.1'
  description: Cognito Forms is an online form builder for collecting and managing submission data. This API enables automated flows to trigger when entries are created, updated, or deleted and provides actions to create, update, and retrieve entries. Integrate Cognito Forms with other services to route data, process uploaded files, and automate business workflows.
  contact:
    name: Cognito Forms Support
    email: support@cognitoforms.com
    url: https://www.cognitoforms.com/support
servers:
- url: https://cognitoforms.com
  description: Cognito Forms API Server
security:
- oauth2Auth:
  - admin
tags:
- name: Files
paths:
  /api/files/{id}:
    get:
      tags:
      - Files
      summary: Get File
      description: Gets a file by id.
      operationId: GetFile
      parameters:
      - name: id
        in: path
        description: The unique identifier of the file
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/octet-stream:
              schema:
                $ref: '#/components/schemas/FileDataRef'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /api/files:
    post:
      tags:
      - Files
      summary: Upload File
      description: Uploads a file to be used in form entries.
      operationId: UploadFile
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
              - File
              properties:
                File:
                  type: string
                  format: binary
                  description: The file to upload.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileUploadResult'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '415':
          description: Unsupported Media Type
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    FileDataRef:
      description: A file reference that includes file data and metadata
      type: object
      properties:
        Id:
          description: The unique id of the file.
          type: string
        Name:
          description: The name of the file
          type: string
        ContentType:
          description: The content type of the file.
          type: string
        Size:
          description: The size of the file.
          type: integer
        File:
          description: The URL of the file.
          type: string
        Content:
          description: The file content
          type: string
          format: byte
    Error:
      description: An error
      type: object
      properties:
        Message:
          description: A message describing the error
          type: string
        Type:
          description: The type of the error
          type: string
        SupportCode:
          description: A support code identifying the specific error
          type: string
        Data:
          description: Data related to the error
          type: object
    FileUploadResult:
      description: Result of a file upload
      type: object
      properties:
        Id:
          description: The unique id of the file.
          type: string
        Name:
          description: The name of the file
          type: string
        ContentType:
          description: The content type of the file.
          type: string
        Size:
          description: The size of the file in bytes.
          type: integer
  responses:
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Not Found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    InternalServerError:
      description: Internal Server Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    BadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    oauth2Auth:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://cognitoforms.com/api-connection
          tokenUrl: https://cognitoforms.com/admin/oauthtoken
          scopes:
            admin: Full administrative access