> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vern.so/llms.txt
> Use this file to discover all available pages before exploring further.

# Mint signed upload URLs

> Request one signed upload target per file (at most 25 per request), then PUT each file's bytes to its `signed_url`, or run a resumable (TUS) upload with the `resumable` block. Files are workbook-level — not mapped to templates; if two share a name, a run reads the newest. Accepted: spreadsheets and CSV (csv, xlsx, xls, xlsm, xltx, xltm), SQL dumps (sql, bak), XML (xml) and ZIP archives. Documents (pdf, docx, png, jpg, jpeg, tif, tiff) are currently refused with 503 `DOCUMENT_EXTRACTION_DISABLED` while document extraction is unavailable. An unsupported file rejects the whole batch with 400.



## OpenAPI

````yaml /api-reference/openapi.json post /migrations/{migration_id}/files
openapi: 3.1.0
info:
  title: Vern Migration API
  version: 1.0.0
  description: >-
    Run Vern as a headless migration engine. Create a migration, upload a
    customer's files, run the managed agent to generate a preview, then execute
    and export clean data. See the Migration API guides for concepts and
    walkthroughs.


    **Rate limits** are counted per account (company), not per key or IP, in
    four classes: reads 30/minute, writes 30/minute, jobs (starting an export)
    15/hour, and agent calls (starting a run, answering, submitting credentials)
    30/hour. Creating a migration and starting a `generate` run each also have a
    30/hour cap. A `429` carries `Retry-After` plus `X-RateLimit-Limit`,
    `X-RateLimit-Remaining` and `X-RateLimit-Reset`.


    **Errors** are `{"error": "..."}`; some add a machine-readable `code` (e.g.
    `migration_archived`, `imports_in_flight`, `knowledge_too_long`,
    `storage_quota_exceeded`, `DOCUMENT_EXTRACTION_DISABLED`,
    `run_concurrency_limit`). An archived migration stays readable and
    exportable, but every call that changes it returns `409` with `code:
    migration_archived`.


    **Region**: accounts hosted in Australia use
    `https://au.app.vern.so/api/v1`. A key sent to the other region's base URL
    is answered `421` with `{"error", "code": "wrong_region", "region",
    "base_url", "mcp_url", "app_url"}` — switch to `base_url`.
servers:
  - url: https://app.vern.so/api/v1
    description: US-hosted accounts
  - url: https://au.app.vern.so/api/v1
    description: Australia-hosted accounts
security:
  - apiKey: []
tags:
  - name: Catalog
    description: Discover the sources and templates you set up in the Vern UI.
  - name: Migrations
    description: >-
      Create, list, update and archive migration workspaces, and upload a
      customer's files.
  - name: Runs
    description: 'Drive the managed agent: generate, refine, execute, answer, and observe.'
  - name: Export
    description: Download a migration's validated data as CSV.
  - name: Log
    description: The settled record of what a migration did.
  - name: Knowledge
    description: Durable context the agent reads before every run.
  - name: Exports
    description: Download imported data.
paths:
  /migrations/{migration_id}/files:
    parameters:
      - $ref: '#/components/parameters/MigrationId'
    post:
      tags:
        - Migrations
      summary: Mint signed upload URLs
      description: >-
        Request one signed upload target per file (at most 25 per request), then
        PUT each file's bytes to its `signed_url`, or run a resumable (TUS)
        upload with the `resumable` block. Files are workbook-level — not mapped
        to templates; if two share a name, a run reads the newest. Accepted:
        spreadsheets and CSV (csv, xlsx, xls, xlsm, xltx, xltm), SQL dumps (sql,
        bak), XML (xml) and ZIP archives. Documents (pdf, docx, png, jpg, jpeg,
        tif, tiff) are currently refused with 503 `DOCUMENT_EXTRACTION_DISABLED`
        while document extraction is unavailable. An unsupported file rejects
        the whole batch with 400.
      operationId: createUploads
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - files
              properties:
                files:
                  type: array
                  minItems: 1
                  items:
                    type: object
                    required:
                      - name
                    properties:
                      name:
                        type: string
                      content_type:
                        type: string
                      size:
                        type: integer
                        description: >-
                          Optional size in bytes. When given it counts toward
                          the account's 50 GB storage limit, and an upload that
                          would exceed it is refused up front with 413.
            example:
              files:
                - name: contacts.csv
                  content_type: text/csv
      responses:
        '201':
          description: One signed upload per requested file.
          content:
            application/json:
              schema:
                type: object
                properties:
                  files:
                    type: array
                    items:
                      $ref: '#/components/schemas/SignedUpload'
              example:
                files:
                  - name: contacts.csv
                    storage_path: workbooks/b3d9.../<uuid>-contacts.csv
                    signed_url: https://storage.vern.so/object/upload/sign/...&token=...
                    token: ey...
                    content_type: text/csv
                    resumable:
                      endpoint: >-
                        https://<project>.supabase.co/storage/v1/upload/resumable/sign
                      bucket: workbook-files
                      object_name: workbooks/b3d9.../<uuid>-contacts.csv
                      x_signature: ey...
                      chunk_size: 6291456
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/MigrationArchived'
        '413':
          description: >-
            The account is at its 50 GB storage limit for uploads, or the
            declared `size`s would take it over (`code:
            storage_quota_exceeded`).
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Error'
                  - type: object
                    properties:
                      usedBytes:
                        type: integer
                      limitBytes:
                        type: integer
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/ServerError'
        '503':
          description: >-
            A document (PDF, Word or image) was requested while document
            extraction is unavailable (`code: DOCUMENT_EXTRACTION_DISABLED`).
            Nothing was minted; resend without the documents.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: >-
                  Document extraction (PDF, image and presentation files) is
                  temporarily unavailable. CSV and Excel files are supported.
                  Refused: invoice.pdf.
                code: DOCUMENT_EXTRACTION_DISABLED
components:
  parameters:
    MigrationId:
      name: migration_id
      in: path
      required: true
      description: The migration ID returned by Create a migration.
      schema:
        type: string
        format: uuid
      example: c0a8012e-4f1b-4d3a-9b2c-7e6f5a4b3c2d
  schemas:
    SignedUpload:
      type: object
      properties:
        name:
          type: string
        storage_path:
          type: string
        signed_url:
          type: string
          description: PUT the file's bytes here.
        token:
          type: string
        content_type:
          type: string
        resumable:
          type: object
          description: >-
            For a chunked, resumable (TUS) upload instead of one PUT: point a
            TUS client at `endpoint`, send `x_signature` in the `x-signature`
            header, use `chunk_size`-byte chunks, and set metadata `{
            bucketName: bucket, objectName: object_name, contentType }`.
          properties:
            endpoint:
              type: string
            bucket:
              type: string
            object_name:
              type: string
            x_signature:
              type: string
            chunk_size:
              type: integer
              example: 6291456
    Error:
      type: object
      properties:
        error:
          type: string
          description: A human-readable error message.
        code:
          type: string
          description: >-
            A machine-readable code, on errors whose status alone is ambiguous
            (e.g. migration_archived, imports_in_flight, knowledge_too_long).
      required:
        - error
  responses:
    BadRequest:
      description: Malformed request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: API key missing, malformed, or revoked.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: The referenced resource isn't in your account.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    MigrationArchived:
      description: >-
        The migration is archived (`code: migration_archived`). Archived
        migrations stay readable and exportable but refuse every change. Restore
        it from the Archived page in Vern.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: >-
              This migration is archived. Restore it from the Archived page in
              Vern before changing it.
            code: migration_archived
    RateLimited:
      description: >-
        Rate limit hit. Counted per account (company), not per API key or IP.
        Each endpoint is in one class: reads 30/minute, writes 30/minute, jobs
        (starting an export) 15/hour, agent (starting a run, answering,
        submitting credentials) 30/hour. Creating a migration and starting a
        `generate` run also have their own 30/hour caps. A separate per-IP
        ceiling absorbs floods before authentication. `Retry-After` gives the
        seconds until the window resets, alongside `X-RateLimit-Limit`,
        `X-RateLimit-Remaining` and `X-RateLimit-Reset`.
      headers:
        Retry-After:
          description: Seconds until the rate-limit window resets.
          schema:
            type: integer
        X-RateLimit-Limit:
          description: Requests allowed in the current window.
          schema:
            type: integer
        X-RateLimit-Remaining:
          description: Requests remaining in the current window.
          schema:
            type: integer
        X-RateLimit-Reset:
          description: Unix time (seconds) when the window resets.
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Too many requests
    ServerError:
      description: Unexpected server error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: Your Vern API key. Create one at Settings → API keys.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.