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

# Generate Upload Url

> Generate presigned upload URL for file upload.

Generates a secure, time-limited URL that clients can use to upload files
directly to Azure Blob Storage without going through the API server.

Authentication: Requires X-API-Key header with valid workspace-scoped API key.
The workspace is automatically determined from the API key.

Args:
    request_data: Upload URL generation request (filename, content_type)
    identity: Authenticated API key identity with workspace context

Returns:
    GenerateUploadUrlResponse with upload URL and metadata

Raises:
    401: If API key missing or invalid
    403: If filename invalid
    415: If content_type is not in the configured allowlist
    422: If request validation fails



## OpenAPI

````yaml /openapi.json post /api/integrations/uploads/url
openapi: 3.1.0
info:
  title: Midmarket Integrations API
  description: An API for Midmarket integrations.
  version: 0.1.0
servers:
  - url: https://mm-midmarket-integrations-api-preview.azurewebsites.net
    description: preview
security: []
paths:
  /api/integrations/uploads/url:
    post:
      tags:
        - uploads
      summary: Generate Upload Url
      description: >-
        Generate presigned upload URL for file upload.


        Generates a secure, time-limited URL that clients can use to upload
        files

        directly to Azure Blob Storage without going through the API server.


        Authentication: Requires X-API-Key header with valid workspace-scoped
        API key.

        The workspace is automatically determined from the API key.


        Args:
            request_data: Upload URL generation request (filename, content_type)
            identity: Authenticated API key identity with workspace context

        Returns:
            GenerateUploadUrlResponse with upload URL and metadata

        Raises:
            401: If API key missing or invalid
            403: If filename invalid
            415: If content_type is not in the configured allowlist
            422: If request validation fails
      operationId: generate_upload_url_api_integrations_uploads_url_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GenerateUploadUrlRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenerateUploadUrlResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - apiKey: []
components:
  schemas:
    GenerateUploadUrlRequest:
      properties:
        filename:
          type: string
          minLength: 1
          title: Filename
          description: Original filename
        contentType:
          type: string
          title: Contenttype
          description: MIME type (e.g., video/mp4)
      type: object
      required:
        - filename
        - contentType
      title: GenerateUploadUrlRequest
      description: Request model for generating upload URL.
    GenerateUploadUrlResponse:
      properties:
        uploadUrl:
          type: string
          title: Uploadurl
          description: Presigned upload URL
        blobPath:
          type: string
          title: Blobpath
          description: Storage path for the uploaded file
        expiresAt:
          type: string
          title: Expiresat
          description: ISO 8601 expiration timestamp
      type: object
      required:
        - uploadUrl
        - blobPath
        - expiresAt
      title: GenerateUploadUrlResponse
      description: Response model for upload URL generation.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: 'Workspace-scoped API key. Format: sk_live_{64 hex chars}'
      x-default: sk_live_your_api_key_here

````