---
title: "Upload Figure Blob"
method: POST
path: "/api/trajectories/{session_id}/figures/upload"
tags: ["trajectories"]
---

# Upload Figure Blob

`POST /api/trajectories/{session_id}/figures/upload`

Upload a figure straight into the PRIVATE omicos-drive bucket (State 2).

multipart form:
  - file:           the COMPRESSED figure (served inline via presign)
  - original:       optional full-res original (for tap-to-zoom / download)
  - canonical_path: the local figure path core keeps embedding (provenance)
  - mime, compressed: metadata for the figure_url_map row

The blobs are content-addressed by sha256 and recorded in `user_blob_refs`
(the same table the GC janitor + storage quota key off), and a
`figure_url_map` row is upserted so serve-time rewrite can mint a presigned
GET. Owner-only (same write gate as /append). 503 when the private drive is
unconfigured (State 2 inert), 413 when the user is over quota.

## Path parameters

- `session_id` string, required

## Headers

- `authorization` string, nullable

## Response `200`

Successful Response

- object

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/omicos/apis/omicos-server.md) · [All operations](https://skmtc.dev/omicos/apis/omicos-server/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/omicos/omicos-server/revisions/a00b94573ffe/schema)
