---
title: Create an upload session
description: Returns a signed PUT.
doc_version: 0.1.0-preview
last_updated: 2026-09-14
---

# Create an upload session

`POST /v1/workspaces/{workspaceId}/buckets/{bucketId}/upload-sessions`

Returns a signed PUT. Bytes go to the store, not through Spark.

## Authentication

Send `Authorization: Bearer <SPARK_API_KEY>`. Read the key from the
SPARK_API_KEY environment variable. Never print it.

## Path parameters

- `workspaceId` (string) — The workspace id.
- `bucketId` (string) — The storage bucket id.

## Request body

- `key` (string) — Object key.
- `lengthBytes` (string) — Exact object size as a decimal string.
- `contentType` (string (optional)) — MIME type.
- `checksums` (object (optional)) — Optional checksums such as SHA-256.

## Example request

```bash
curl \
  --url "https://api.beta.graphon.ai/v1/workspaces/wspQ7WsH2Np5L/buckets/bktA1b2C3d4E5/upload-sessions" \
  --header "Authorization: Bearer $SPARK_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{"key":"notes/readme.md","lengthBytes":"128","contentType":"text/markdown","checksums":{"SHA-256":"abababababababababababababababababababababababababababababababab"}}'
```

## Sitemap

See the full [sitemap](/sitemap.md) for all pages.
