> ## Documentation Index
> Fetch the complete documentation index at: https://agency-swarm.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Create agency upload

> Signs a 15-minute, size-limited upload form for an API integration with persistent agency storage. Call this from your server after checking which app member owns the file. POST multipart/form-data to uploadUrl with every uploadFields entry followed by the file field. Uploads are limited to 20 MiB. Pass resource as a sandboxFiles path when starting a completion.



## OpenAPI

````yaml /openapi.json post /create_agency_upload
openapi: 3.0.3
info:
  title: Agencii Platform API
  version: 1.0.0
  description: >-
    Reference documentation for the Agencii Platform API. Provides endpoints
    allowing you to run your agents on custom backends or on other unsupported
    channels. ⚡ Live Postman Example:
    https://www.postman.com/vrsen-ai/agencii-api/overview
servers:
  - url: https://agency-swarm-app-japboyzddq-uc.a.run.app
    description: Production server
security:
  - BearerAuth: []
paths:
  /create_agency_upload:
    post:
      summary: Create agency upload
      description: >-
        Signs a 15-minute, size-limited upload form for an API integration with
        persistent agency storage. Call this from your server after checking
        which app member owns the file. POST multipart/form-data to uploadUrl
        with every uploadFields entry followed by the file field. Uploads are
        limited to 20 MiB. Pass resource as a sandboxFiles path when starting a
        completion.
      operationId: createAgencyUpload
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - apiIntegrationId
                - folder
                - filename
                - contentType
                - sizeBytes
              properties:
                apiIntegrationId:
                  type: string
                folder:
                  type: string
                  description: >-
                    Canonical folder below /app/mnt/, chosen by your server for
                    the app member.
                filename:
                  type: string
                  description: >-
                    A nonblank filename without directory separators or control
                    characters.
                contentType:
                  type: string
                  example: image/png
                sizeBytes:
                  type: integer
                  minimum: 1
                  maximum: 20971520
                  description: Number of file bytes to upload.
      responses:
        '200':
          description: Upload destination reserved.
          content:
            application/json:
              schema:
                type: object
                required:
                  - resource
                  - uploadUrl
                  - uploadFields
                properties:
                  resource:
                    type: string
                    description: Persistent /app/mnt/ file path for sandboxFiles.
                  uploadUrl:
                    type: string
                    format: uri
                    description: >-
                      Short-lived signed POST destination. Keep it on your
                      server.
                  uploadFields:
                    type: object
                    additionalProperties:
                      type: string
                    description: Form fields to include unchanged before the file field.
        '400':
          description: Invalid path or persistent storage is unavailable.
        '401':
          description: Missing or invalid platform API key.
        '403':
          description: The API key does not own this integration.
        '404':
          description: Integration or agency not found.
      servers:
        - url: https://api-integration-v2-qd6wo466iq-uc.a.run.app
          description: Staging API v2 server
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Platform token required for authentication. Find or create one inside
        Profile Icon > API Keys. Example: Bearer sk-agencii-...

````

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