---
title: "Create presigned URL for request file upload to S3"
method: POST
path: "/api/v3.1/files/upload/request"
tags: ["Files", "Upload"]
---

# Create presigned URL for request file upload to S3

`POST /api/v3.1/files/upload/request`

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.

## Request body

- object
  - `toolkit_slug` string, required — Slug of the app where this file belongs to. Example: "gmail", "slack", "github"
  - `tool_slug` string, required — Slug of the action where this file belongs to. Example: "GMAIL_SEND_EMAIL", "SLACK_UPLOAD_FILE"
  - `filename` string, required — Name of the original file. Example: "quarterly_report.pdf"
  - `mimetype` string, required — Mime type of the original file. Example: "application/pdf", "image/png"
  - `md5` string, required — MD5 hash of the file for deduplication and integrity verification. Example: "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6"

## Response `200`

Successfully created upload URL for request file

- object
  - `id` string, required — ID of the request file. Example: "req_file_9mZn4qR8sXwT"
  - `key` string, required — Object storage upload location. Example: "projects/pr_1a2b3c4d5e6f/requests/slack/SLACK_UPLOAD_FILE/document_9mZn4q.docx"
  - `new_presigned_url` string, required — 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` string, required — [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..."
  - `type` 'new', required — [DEPRECATED] Indicates this is a new file that needs to be uploaded
  - `metadata` object, required
    - `storage_backend` 's3' | 'azure_blob_storage', required — 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

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `410` — Gone
- `429` — Too Many Requests
- `500` — Internal Server Error
- `501` — Not Implemented

---

[API](https://skmtc.net/composiohq/apis/composio-platform-api-v3-1.md) · [All operations](https://skmtc.net/composiohq/apis/composio-platform-api-v3-1/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/composiohq/composio-platform-api-v3-1/versions/4239836857f8/schema)
