---
title: "Admin Upload Po Document"
method: POST
path: "/api/v1/admin/projects/{project_id}/po-document"
tags: ["admin-projects"]
---

# Admin Upload Po Document

`POST /api/v1/admin/projects/{project_id}/po-document`

Stream an admin-on-behalf PO document to R2 (firewall-safe upload proxy).

Replaces the browser's direct PUT to ``*.r2.cloudflarestorage.com``.
The admin POSTs the file as ``multipart/form-data``; the API streams
it straight to R2 and returns the ``r2_key``. The admin passes that
key back as ``po_document_r2_key`` on ``POST /upload-po-on-behalf``.

The R2 key is namespaced under the **project's user_id** (not the
admin's id) so the user-side download path + permissions continue to
work identically — locked decision #7. The admin's role is solely to
perform the upload; the artifact still lives in the customer's
namespace.

## Path parameters

- `project_id` string, uuid, required

## Response `200`

Successful Response

- POUploadResponse — Response from the PO-document upload proxy endpoint. Carries the R2 key the streamed file was written to. The client passes it back as ``po_document_r2_key`` on the subsequent ``POST /payments/purchase-order`` call.
  - `r2_key` string, required
  - `document_id` string, uuid, nullable
  - `extraction_status` string
  - `latest_extraction_id` string, uuid, nullable

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/prototyping/apis/prototyping-io-api.md) · [All operations](https://skmtc.dev/prototyping/apis/prototyping-io-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/prototyping/prototyping-io-api/revisions/f4a0079fbb57/schema)
