Mabl File Upload API

The FileUpload API from Mabl — 7 operation(s) for fileupload.

Operations 10

POST /files/fileUpload Start a FileUpload #
GET /files/fileUpload Retrieve a set of fileUploads by query #
POST /recover/files/fileUpload/{id} Recover File Upload #
GET /files/fileUpload/{id} Retrieve fileUpload #
DELETE /files/fileUpload/{id} Remove FileUpload #
PATCH /files/fileUpload/{id} Update FileUpload #
GET /files/fileUpload/download/{id} Download file fileUpload refers to #
GET /files/fileUpload/url/{id} Signed url of the file this fileUpload refers to #
GET /files/fileUpload/{id}/usedBy Retrieve tests and flows that use this file upload #
POST /files/fileUpload/usedBy/batch Retrieve tests and flows that use any of the provided file uploads #

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/mabl:mabl-fileupload-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. See our Privacy Policy and Terms.

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

OpenAPI Specification

mabl-fileupload-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: mabl File Upload API
  description: APIs for interacting with mabl services
  version: 0.599.3.1792436330
  x-readme-id: 62c896636916ce01d2ff4f5a
servers:
- url: /
security:
- basicAuth: []
- bearerAuth: []
tags:
- name: FileUpload
paths:
  /files/fileUpload:
    post:
      tags:
      - FileUpload
      summary: Start a FileUpload
      operationId: createFileUpload
      requestBody:
        content:
          multipart/form-data:
            schema:
              required:
              - name
              - organization_id
              type: object
              properties:
                organization_id:
                  type: string
                name:
                  type: string
                extension:
                  type: string
                content_type:
                  type: string
                file:
                  type: string
                  description: base64 encoded file data
                uri:
                  type: string
                  description: URI of the file that was previously uploaded
                file_size:
                  type: integer
                  description: file size in bytes
                  format: int64
                journeys:
                  type: array
                  description: file size in bytes
                  format: csv
                  items:
                    type: string
                  default: []
      responses:
        '201':
          description: The complete fileUpload that was created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileUpload'
        '400':
          description: Invalid file was supplied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseGeneric'
        default:
          $ref: '#/components/responses/ErrorResponse'
      x-mabl-action: Create::FileUpload
    get:
      tags:
      - FileUpload
      summary: Retrieve a set of fileUploads by query
      description: Used to query fileUploads
      operationId: queryFileUploads
      parameters:
      - name: organization_id
        in: query
        description: The organization id to query
        required: false
        style: form
        explode: true
        schema:
          type: string
      - name: journey_id
        in: query
        description: optional journey id
        required: false
        style: form
        explode: true
        schema:
          type: string
      - name: limit
        in: query
        description: The limit to use for pagination
        required: false
        style: form
        explode: true
        schema:
          minimum: 1
          type: integer
          format: int32
      - name: cursor
        in: query
        description: The cursor to use for pagination
        required: false
        style: form
        explode: true
        schema:
          type: string
      responses:
        '200':
          description: Array of fileUploads matching the query
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileUploadQueryResult'
        default:
          $ref: '#/components/responses/ErrorResponse'
      x-mabl-action: Read::FileUpload
  /recover/files/fileUpload/{id}:
    post:
      tags:
      - FileUpload
      summary: Recover File Upload
      description: Undeletes a File Upload
      operationId: recoverFileUpload
      parameters:
      - name: id
        in: path
        description: file upload identifier
        required: true
        style: simple
        explode: false
        schema:
          type: string
      responses:
        '200':
          description: The recovered file upload
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileUpload'
        '404':
          description: File upload not found, non-recoverable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseGeneric'
        default:
          $ref: '#/components/responses/ErrorResponse'
      x-mabl-action: Recover::FileUpload
  /files/fileUpload/{id}:
    get:
      tags:
      - FileUpload
      summary: Retrieve fileUpload
      description: Used to retrieve an existing fileUpload
      operationId: getFileUpload
      parameters:
      - name: id
        in: path
        description: The fileUpload ID.
        required: true
        style: simple
        explode: false
        schema:
          type: string
      responses:
        '200':
          description: The fileUpload that was retrieved
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileUpload'
        '404':
          description: FileUpload not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseGeneric'
        default:
          $ref: '#/components/responses/ErrorResponse'
      x-mabl-action: Read::FileUpload
    delete:
      tags:
      - FileUpload
      summary: Remove FileUpload
      description: Used to remove existing fileUploads
      operationId: removeFileUpload
      parameters:
      - name: id
        in: path
        description: The ID of the fileUpload to remove
        required: true
        style: simple
        explode: false
        schema:
          type: string
      responses:
        '204':
          description: Confirms the fileUpload does not exist
        '404':
          description: FileUpload not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseGeneric'
        default:
          $ref: '#/components/responses/ErrorResponse'
      x-mabl-action: Delete::FileUpload
    patch:
      tags:
      - FileUpload
      summary: Update FileUpload
      description: Used to update certain writable properties of a FileUpload, such as the filename.
      operationId: updateFileUpload
      parameters:
      - name: id
        in: path
        description: The ID of the fileUpload to update
        required: true
        style: simple
        explode: false
        schema:
          type: string
      - name: ifMatch
        in: header
        description: DEPRECATED - use If-Match
        required: false
        style: simple
        explode: false
        schema:
          type: string
      - name: If-Match
        in: header
        description: If-Match header according to http/1.1 spec section 14.24
        required: false
        style: simple
        explode: false
        schema:
          type: string
      requestBody:
        description: The fileUpload fields to update
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FileUpload'
        required: true
      responses:
        '200':
          description: The updated fileUpload
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileUpload'
        '404':
          description: FileUpload not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseGeneric'
        default:
          $ref: '#/components/responses/ErrorResponse'
      x-mabl-action: Edit::FileUpload
  /files/fileUpload/download/{id}:
    get:
      tags:
      - FileUpload
      summary: Download file fileUpload refers to
      description: Used to download the file an existing fileUpload points to
      operationId: downloadFileUpload
      parameters:
      - name: id
        in: path
        description: The fileUpload ID.
        required: true
        style: simple
        explode: false
        schema:
          type: string
      responses:
        '303':
          description: Redirect to storage location
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RedirectResponse'
        '404':
          description: FileUpload not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseGeneric'
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RedirectResponse'
      x-mabl-action: Read::FileUpload
  /files/fileUpload/url/{id}:
    get:
      tags:
      - FileUpload
      summary: Signed url of the file this fileUpload refers to
      description: Used to get the signed url of the file an existing fileUpload points to
      operationId: signedFileUploadUrl
      parameters:
      - name: id
        in: path
        description: The fileUpload ID.
        required: true
        style: simple
        explode: false
        schema:
          type: string
      responses:
        '200':
          description: JSON blob containing signed URL for retrieving the file
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RedirectResponse'
        '404':
          description: FileUpload not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseGeneric'
        default:
          $ref: '#/components/responses/ErrorResponse'
      x-mabl-action: Read::FileUpload
  /files/fileUpload/{id}/usedBy:
    get:
      tags:
      - FileUpload
      summary: Retrieve tests and flows that use this file upload
      description: Used to retrieve tests and flows that use a specific file upload
      operationId: getFileUploadUsedBy
      parameters:
      - name: id
        in: path
        description: The fileUpload ID to find used-by entities for
        required: true
        style: simple
        explode: false
        schema:
          type: string
      - name: limit
        in: query
        description: The limit to use for pagination
        required: false
        style: form
        explode: true
        schema:
          maximum: 1000
          minimum: 1
          type: integer
          format: int32
          default: 100
      - name: cursor
        in: query
        description: The cursor to use for pagination
        required: false
        style: form
        explode: true
        schema:
          type: string
      responses:
        '200':
          description: Paginated results of tests and flows that use the file upload
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileUploadUsedByQueryResult'
        '404':
          description: FileUpload not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseGeneric'
        default:
          $ref: '#/components/responses/ErrorResponse'
      x-mabl-action: Read::FileUpload
  /files/fileUpload/usedBy/batch:
    post:
      tags:
      - FileUpload
      summary: Retrieve tests and flows that use any of the provided file uploads
      description: Used to retrieve tests and flows that use any of the provided file uploads in a single request
      operationId: getFileUploadUsedByBatch
      parameters:
      - name: limit
        in: query
        description: The limit to use for pagination
        required: false
        style: form
        explode: true
        schema:
          maximum: 1000
          minimum: 1
          type: integer
          format: int32
          default: 100
      - name: cursor
        in: query
        description: The cursor to use for pagination
        required: false
        style: form
        explode: true
        schema:
          type: string
      requestBody:
        description: The file upload IDs to find used-by entities for
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FileUploadUsedByBatchRequest'
        required: true
      responses:
        '200':
          description: Paginated results of tests and flows that use any of the provided file uploads
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileUploadUsedByBatchQueryResult'
        '400':
          description: Invalid request - too many file upload IDs or invalid IDs
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseGeneric'
        default:
          $ref: '#/components/responses/ErrorResponse'
      x-mabl-action: Read::FileUpload
components:
  schemas:
    FileUploadUsedByQueryResult:
      type: object
      properties:
        entities:
          type: array
          description: Combined list of tests and flows that use the file upload, ordered by entity invariant ID
          readOnly: true
          items:
            $ref: '#/components/schemas/UsedByEntity'
        cursor:
          type: string
          description: Cursor used for pagination
          readOnly: true
      description: result envelope for fileUpload used-by query results
    FileUpload:
      type: object
      properties:
        id:
          maxLength: 50
          type: string
          description: Object id.  Set by system.
        organization_id:
          type: string
          description: The ID of the organization that this fileUpload belongs to
        last_updated_time:
          type: integer
          description: time the fileUpload object was last updated
          format: int64
        last_updated_by_id:
          type: string
          description: The ID of the user who last updated this fileUpload
        created_time:
          type: integer
          description: time the fileUpload was created
          format: int64
        created_by_id:
          type: string
          description: The ID of the user who created this fileUpload
        name:
          type: string
          description: The display name of the fileUpload
        extension:
          type: string
          description: extension of the file
        content_type:
          type: string
          description: content-type of the file
        file_size:
          type: integer
          description: The fileSize in bytes
          format: int64
        uri:
          type: string
          description: the uri of the uploaded file object
        journeys:
          type: array
          description: Array of journey IDs that this fileUpload is used in
          items:
            type: string
        crc32c_hex:
          type: string
          description: The CRC32C checksum for this file upload, encoded as a hex string
      description: FileUploads represent a single file uploaded for use in journeys
      x-implements-interface:
      - ActivityTrackingBaseEntity
      - HasName
      - HasOrganizationId
    GuardrailApprovalKind:
      type: string
      description: Who decides a guardrail approval. SELF is decided by the person the agent acts for; WORKSPACE, for an agent acting for an API key, by a workspace owner or editor.
      enum:
      - SELF
      - WORKSPACE
    GuardrailRefusal:
      type: object
      properties:
        id:
          type: string
          description: The id of the guardrail policy that decided the refusal.
        reason:
          type: string
          description: Why the policy refuses the request, written for the person the agent acts for.
        decision_id:
          type: string
          description: The id of this decision in the guardrail decision log.
        action:
          type: string
          description: The action the request was evaluated as, written Verb::Resource (for example Delete::Test), as declared by the operation's x-mabl-action extension.
        policy_source:
          type: string
          description: 'Who set the deciding policy: workspace for a rule the workspace''s owners wrote, account for a rule set for the workspace''s account, mabl_agent_type for the agent type''s ceiling, and mabl_default for mabl''s own defaults.'
        approval:
          description: The approval for this request; present when error_code is approval_required and the approval could be recorded. Without it the request cannot be approved.
          allOf:
          - $ref: '#/components/schemas/GuardrailApprovalRef'
      description: The guardrail policy that refused an agent request.
    FileUploadUsedByBatchQueryResult:
      type: object
      properties:
        entities:
          type: array
          description: Combined list of tests and flows that use any of the provided file uploads, ordered by file upload ID and then entity invariant ID
          readOnly: true
          items:
            $ref: '#/components/schemas/UsedByEntity'
        cursor:
          type: string
          description: Cursor used for pagination
          readOnly: true
      description: result envelope for batch fileUpload used-by query results
    GuardrailApprovalState:
      type: string
      description: Where a guardrail approval stands. PENDING awaits a decision and expires undecided after 24 hours; APPROVED lets the agent repeat the request, as often as it does, for 20 minutes; DENIED refuses the same request for 20 minutes after the decision, after which asking again opens a new approval; CANCELLED means a person withdrew it while pending or revoked it while approved. EXPIRED and CANCELLED are final.
      enum:
      - PENDING
      - APPROVED
      - DENIED
      - EXPIRED
      - CANCELLED
    RedirectResponse:
      type: object
      properties:
        redirectUrl:
          type: string
          x-mabl-scope: public
    UsedByEntity:
      type: object
      properties:
        resource_id:
          type: string
          description: The ID of the resource used by this entity
        entity_invariant_id:
          type: string
          description: The invariant ID of the entity
        entity_type:
          type: string
          description: The type of entity (test or flow)
          enum:
          - test
          - flow
        entity_name:
          type: string
          description: The name of the entity
        workspace_id:
          type: string
          description: The workspace ID of the entity
        created_time:
          type: integer
          description: When the entity was created
          format: int64
        last_updated_time:
          type: integer
          description: When the entity was last updated
          format: int64
        branches:
          type: array
          description: Branches of the test or flow that use this resource
          items:
            type: string
          default: []
      description: A description of an entity (test or flow) that uses a resource (file upload, etc.)
    GuardrailApprovalRef:
      type: object
      properties:
        id:
          type: string
          description: The approval's id.
        state:
          description: Where the approval stands.
          allOf:
          - $ref: '#/components/schemas/GuardrailApprovalState'
        kind:
          description: Who decides the approval.
          allOf:
          - $ref: '#/components/schemas/GuardrailApprovalKind'
        request_expires_time:
          type: integer
          description: When the approval expires if nobody decides it, in epoch milliseconds.
          format: int64
        url:
          type: string
          description: The mabl app page where a person reviews the approval.
      description: 'An approval a guardrail policy asks for. While it is PENDING, stop: give the person the url, tell them the request is waiting for approval, and do not repeat the request or poll in a loop. Once a person tells you it is APPROVED, repeat the identical request with the header X-Mabl-Approval set to id. DENIED means a person said no, so do not work around it.'
    FileUploadUsedByBatchRequest:
      required:
      - file_upload_ids
      type: object
      properties:
        file_upload_ids:
          maxItems: 100
          minItems: 1
          type: array
          description: Array of file upload IDs to find used-by entities for
          items:
            type: string
      description: Request body for batch file upload used-by query
    ErrorResponseGeneric:
      type: object
      properties:
        id:
          type: string
          x-mabl-scope: public
        code:
          maximum: 599
          minimum: 100
          type: integer
          format: int32
          x-mabl-scope: public
        message:
          type: string
          x-mabl-scope: public
        error_code:
          type: string
          description: Machine-readable reason for the error, present only when the API names one. Values are guardrail_blocked (a guardrail policy refused an agent request), approval_required (a guardrail policy requires a person to approve the request first).
        guardrail:
          description: The guardrail policy that refused the request; present only when error_code is guardrail_blocked or approval_required.
          allOf:
          - $ref: '#/components/schemas/GuardrailRefusal'
    FileUploadQueryResult:
      type: object
      properties:
        fileUploads:
          type: array
          description: All fileUploads that matched the query
          readOnly: true
          items:
            $ref: '#/components/schemas/FileUpload'
        cursor:
          type: string
          description: Cursor used for pagination
          readOnly: true
      description: result envelope for fileUpload query results
  responses:
    ErrorResponse:
      description: Unknown error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponseGeneric'
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
    bearerAuth:
      type: apiKey
      name: Authorization
      in: header