---
title: "Get signed URL for direct-to-cloud upload to a task"
method: POST
path: "/projects/{project_id}/tasks/direct_upload"
tags: ["Tasks"]
---

# Get signed URL for direct-to-cloud upload to a task

`POST /projects/{project_id}/tasks/direct_upload`

Get a signed URL for direct-to-cloud upload using ActiveStorage - step 1 of uploading files to a task. Upload the file bytes to the returned URL, then attach the blob to a task by passing its signed_id to add_files_to_task. Requires the files_write scope.

## Path parameters

- `project_id` integer, required

## Request body

- object
  - `blob` object, required
    - `filename` string, required — File name
    - `content_type` string, required — MIME type of the file
    - `byte_size` integer, required — Byte size of the file
    - `checksum` string, required — Base64-encoded MD5 checksum of the file contents.
    - `metadata` object — Arbitrary metadata of the file

## Response `200`

Signed URL for direct-to-cloud upload

- object
  - `signed_id` string, required — Signed blob ID to pass to add_files_to_task after uploading the file bytes.
  - `direct_upload` object, required
    - `url` string, uri, required — Pre-signed URL to upload the file bytes to.
    - `headers` object, required — Headers that must be included when uploading the file to the pre-signed URL (e.g. Content-Type, Content-MD5).

## Other responses

- `404` — project not found

---

[API](https://skmtc.net/gettruss/apis/api-v1.md) · [All operations](https://skmtc.net/gettruss/apis/api-v1/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gettruss/api-v1/revisions/e4dda8c7f007/schema)
