---
title: "Get a signed URL for uploading a file to Definite Drive"
method: POST
path: "/v3/teams/{team_id}/drive/upload-url"
tags: ["v3", "Drive"]
---

# Get a signed URL for uploading a file to Definite Drive

`POST /v3/teams/{team_id}/drive/upload-url`

Generate a signed URL for directly uploading a file to Definite Drive (GCS).

    The file will be accessible in E2B sandboxes at `/home/user/drive/{file_name}`
    via the gcsfuse mount. Files persist across sessions and are shared with all
    team members.

## Path parameters

- `team_id` string, required

## Request body

- DriveUploadUrlRequest — Request to generate a signed URL for uploading to Definite Drive (frontend).
  - `file_name` string, required — Name of the file to upload
  - `folder` string, nullable — Optional folder path to upload to (e.g., 'reports/2024')

## Response `200`

Signed URL generated successfully

- DriveUploadUrlResponse — Response containing signed URL and instructions for direct GCS upload.
  - `upload_url` string, required — Signed PUT URL for direct upload to GCS
  - `http_method` string — HTTP method to use with upload_url
  - `headers` object — Headers that the client MUST send with the upload request. Includes Content-Type and, for temporary uploads, X-Goog-Custom-Time.
  - `gcs_path` string, required — Full GCS path where the file will be stored
  - `drive_path` string, required — Path in sandbox where the file will be accessible: /home/user/drive/{file_name}
  - `expires_at` string, date-time, nullable — When the file will be auto-deleted. Only set for temporary uploads.

## Other responses

- `422` — Validation Error
- `500` — Failed to generate signed URL

---

[API](https://skmtc.dev/definite/apis/defapi.md) · [All operations](https://skmtc.dev/definite/apis/defapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/definite/defapi/revisions/5ea378187147/schema)
