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

# Create presigned URL for request file upload to S3

> Generates a presigned URL for uploading a file to S3. This endpoint handles deduplication by checking if a file with the same MD5 hash already exists.



## OpenAPI

````yaml api-reference/openapi-v3.json POST /api/v3/files/upload/request
openapi: 3.0.0
info:
  version: 3.0.0
  title: Composio Platform API
  description: >-
    Composio v3 API — legacy endpoints under /api/v3/. Use v3.1 for new
    integrations.
  contact:
    name: Composio Support
    url: https://composio.dev/support
    email: support@composio.dev
  license:
    name: Proprietary
    url: https://composio.dev/terms
servers:
  - url: https://backend.composio.dev
    description: Composio production API
security:
  - ApiKeyAuth: []
tags:
  - name: Authentication
    description: Authentication related endpoints
    x-group: Authentication
  - name: Auth Configs
    description: Authentication configuration management
    x-group: Auth Configs
  - name: Connected Accounts
    description: Connected account management
    x-group: Connected Accounts
  - name: Logs
    description: Logging and monitoring
    x-group: Logs
  - name: OpenAPI
    description: OpenAPI specification management
    x-group: OpenAPI
  - name: Organization
    description: Organization management
    x-group: Organization
  - name: API Keys
    description: API key management
    x-group: API Keys
  - name: Webhooks
    description: Webhook configuration
    x-group: Webhooks
  - name: Webhook Endpoints
    description: >-
      Per-OAuth-app webhook ingress endpoints. Inbound URLs the provider posts
      to, plus signing secret storage and verification.
    x-group: Webhook Endpoints
  - name: Webhook Subscriptions
    description: >-
      Webhook delivery subscriptions. Outbound URLs Composio posts trigger
      events to, plus signing secret rotation and event-type filters.
    x-group: Webhook Subscriptions
  - name: Team
    description: Team member management
    x-group: Team
  - name: Consumer Skills
    description: Organization-authored Skill management
    x-group: Consumer Skills
  - name: Toolkits
    description: Toolkit and tool management
    x-group: Toolkits
  - name: Tools
    description: Tool execution endpoints
    x-group: Tools
  - name: Triggers
    description: Trigger management and execution
    x-group: Triggers
  - name: Payments
    description: Payment and subscription management
    x-group: Payments
  - name: Billing
    description: Dashboard billing state — usage, subscription, contract (cookie-auth only)
    x-group: Billing
  - name: Compliance
    description: Organization compliance agreements and acceptance state
    x-group: Compliance
  - name: Files
    description: File management
    x-group: Files
  - name: MCP
    description: MCP server management
    x-group: MCP
  - name: MCP Partner
    description: MCP partner management
    x-group: MCP Partner
  - name: Stripe Projects
    description: Stripe Projects provisioning
    x-group: Stripe Projects
  - name: Tool Router
    description: (Labs) Tool router endpoints
    x-group: Sessions (Prev Tool Router)
  - name: Playground
    description: Dashboard playground chat
    x-group: Playground
  - name: Arena
    description: Arena conversations, messages and terms
    x-group: Arena
  - name: Organization Management
    description: Organization Management API endpoints.
    x-group: Organization Management
  - name: Projects
    description: Projects API endpoints.
    x-group: Projects
paths:
  /api/v3/files/upload/request:
    post:
      tags:
        - Files
      summary: Create presigned URL for request file upload to S3
      description: >-
        Generates a presigned URL for uploading a file to S3. This endpoint
        handles deduplication by checking if a file with the same MD5 hash
        already exists.
      operationId: postFilesUploadRequest
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                toolkit_slug:
                  type: string
                  description: >-
                    Slug of the app where this file belongs to. Example:
                    "gmail", "slack", "github"
                tool_slug:
                  type: string
                  description: >-
                    Slug of the action where this file belongs to. Example:
                    "GMAIL_SEND_EMAIL", "SLACK_UPLOAD_FILE"
                filename:
                  type: string
                  description: 'Name of the original file. Example: "quarterly_report.pdf"'
                mimetype:
                  type: string
                  description: >-
                    Mime type of the original file. Example: "application/pdf",
                    "image/png"
                md5:
                  type: string
                  description: >-
                    MD5 hash of the file for deduplication and integrity
                    verification. Example: "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6"
              required:
                - toolkit_slug
                - tool_slug
                - filename
                - mimetype
                - md5
            examples:
              Gmail Email Attachment:
                value:
                  toolkit_slug: gmail
                  tool_slug: GMAIL_SEND_EMAIL
                  filename: quarterly_report.pdf
                  mimetype: application/pdf
                  md5: a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6
              Slack File Upload:
                value:
                  toolkit_slug: slack
                  tool_slug: SLACK_SEND_MESSAGE
                  filename: meeting_notes.docx
                  mimetype: >-
                    application/vnd.openxmlformats-officedocument.wordprocessingml.document
                  md5: b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7
              GitHub Issue Screenshot:
                value:
                  toolkit_slug: github
                  tool_slug: GITHUB_CREATE_AN_ISSUE
                  filename: bug_screenshot.png
                  mimetype: image/png
                  md5: c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8
              Notion Page Image:
                value:
                  toolkit_slug: notion
                  tool_slug: NOTION_ADD_PAGE_CONTENT
                  filename: diagram.svg
                  mimetype: image/svg+xml
                  md5: d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9
              Jira Attachment:
                value:
                  toolkit_slug: jira
                  tool_slug: JIRA_ADD_ATTACHMENT_TO_ISSUE
                  filename: error_logs.txt
                  mimetype: text/plain
                  md5: e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0
      responses:
        '200':
          description: Successfully created upload URL for request file
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: 'ID of the request file. Example: "req_file_9mZn4qR8sXwT"'
                  key:
                    type: string
                    description: >-
                      Object storage upload location. Example:
                      "projects/pr_1a2b3c4d5e6f/requests/slack/SLACK_UPLOAD_FILE/document_9mZn4q.docx"
                  new_presigned_url:
                    type: string
                    description: >-
                      Presigned URL for upload. Example:
                      "https://storage.composio.dev/projects/pr_1a2b3c4d5e6f/requests/slack/document_9mZn4q.docx?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=3600..."
                  newPresignedUrl:
                    type: string
                    description: >-
                      [DEPRECATED] Use new_presigned_url instead. Presigned URL
                      for upload. Example:
                      "https://storage.composio.dev/projects/pr_1a2b3c4d5e6f/requests/slack/document_9mZn4q.docx?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=3600..."
                    deprecated: true
                  type:
                    type: string
                    enum:
                      - new
                    description: >-
                      [DEPRECATED] Indicates this is a new file that needs to be
                      uploaded
                    deprecated: true
                  metadata:
                    type: object
                    properties:
                      storage_backend:
                        type: string
                        enum:
                          - s3
                          - azure_blob_storage
                        description: >-
                          Storage backend used for the file. If this is azure,
                          use `x-ms-blob-type` header to set the blob type to
                          `BlockBlob` while uploading the file
                    required:
                      - storage_backend
                required:
                  - id
                  - key
                  - new_presigned_url
                  - newPresignedUrl
                  - type
                  - metadata
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '410':
          description: Gone
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Not Implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
            code:
              type: number
            slug:
              type: string
            status:
              type: number
            request_id:
              type: string
            suggested_fix:
              type: string
            errors:
              type: array
              items:
                type: string
          required:
            - message
            - code
            - slug
            - status
      required:
        - error
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Your Composio project API key. Create or copy it from the Composio
        dashboard.
      x-default: your-project-api-key

````