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.
Authorization
ApiKeyAuth API key authentication
In: header
Request Body
application/json
Slug of the app where this file belongs to. Example: "gmail", "slack", "github"
Slug of the action where this file belongs to. Example: "GMAIL_SEND_EMAIL", "SLACK_UPLOAD_FILE"
Name of the original file. Example: "quarterly_report.pdf"
Mime type of the original file. Example: "application/pdf", "image/png"
MD5 hash of the file for deduplication and integrity verification. Example: "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6"
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://backend.composio.dev/api/v3/files/upload/request" \ -H "Content-Type: application/json" \ -d '{ "toolkit_slug": "gmail", "tool_slug": "GMAIL_SEND_EMAIL", "filename": "quarterly_report.pdf", "mimetype": "application/pdf", "md5": "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6" }'{
"id": "string",
"key": "string",
"new_presigned_url": "string",
"newPresignedUrl": "string",
"type": "new",
"metadata": {
"storage_backend": "s3"
}
}{
"error": {
"message": "string",
"code": 0,
"slug": "string",
"status": 0,
"request_id": "string",
"suggested_fix": "string",
"errors": [
"string"
]
}
}{
"error": {
"message": "string",
"code": 0,
"slug": "string",
"status": 0,
"request_id": "string",
"suggested_fix": "string",
"errors": [
"string"
]
}
}{
"error": {
"message": "string",
"code": 0,
"slug": "string",
"status": 0,
"request_id": "string",
"suggested_fix": "string",
"errors": [
"string"
]
}
}{
"error": {
"message": "string",
"code": 0,
"slug": "string",
"status": 0,
"request_id": "string",
"suggested_fix": "string",
"errors": [
"string"
]
}
}{
"error": {
"message": "string",
"code": 0,
"slug": "string",
"status": 0,
"request_id": "string",
"suggested_fix": "string",
"errors": [
"string"
]
}
}{
"error": {
"message": "string",
"code": 0,
"slug": "string",
"status": 0,
"request_id": "string",
"suggested_fix": "string",
"errors": [
"string"
]
}
}{
"error": {
"message": "string",
"code": 0,
"slug": "string",
"status": 0,
"request_id": "string",
"suggested_fix": "string",
"errors": [
"string"
]
}
}{
"error": {
"message": "string",
"code": 0,
"slug": "string",
"status": 0,
"request_id": "string",
"suggested_fix": "string",
"errors": [
"string"
]
}
}