API ReferenceFiles
Create presigned URL for request file upload to S3v3.1
Generates a presigned URL for uploading a file to S3. Every request returns a new file ID and storage key, including repeat uploads of the same file.
Authorization
ApiKeyAuth x-api-key<token>
Project API key authentication
In: header
Request Body
application/json
toolkit_slugstringRequired
Slug of the app where this file belongs to. Example: "gmail", "slack", "github"
tool_slugstringRequired
Slug of the action where this file belongs to. Example: "GMAIL_SEND_EMAIL", "SLACK_UPLOAD_FILE"
filenamestringRequired
Name of the original file. Example: "quarterly_report.pdf"
mimetypestringRequired
Mime type of the original file. Example: "application/pdf", "image/png"
md5stringRequired
MD5 hash of the file for integrity verification. Example: "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6"
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
import requestsurl = "https://example.com/api/v3.1/files/upload/request"body = """{ "toolkit_slug": "gmail", "tool_slug": "GMAIL_SEND_EMAIL", "filename": "quarterly_report.pdf", "mimetype": "application/pdf", "md5": "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6"}"""response = requests.request("POST", url, data = body, headers = { "Content-Type": "application/json"})print(response.text){ "id": "string", "key": "string", "new_presigned_url": "string", "newPresignedUrl": "string", "type": "new", "metadata": { "storage_backend": "s3" }}