For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
  • Get Started
    • Introduction
    • Quickstart
    • Authentication
  • API Reference
      • POSTCreate Upload
      • POSTConfirm Upload
      • DELDelete Upload
  • Python SDK
    • Install
    • Usage
    • Errors
  • CLI
    • Overview
LogoLogo
API Referenceuploads

Delete Upload

DELETE
/api/v1/uploads/:upload_id
DELETE
/api/v1/uploads/:upload_id
$curl -X DELETE https://api.onepin.ai/api/v1/uploads/upload_id \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{}'
1{
2 "data": {},
3 "meta": {
4 "request_id": "a3f47c9e-8b2d-4f1a-9c3e-2d7b5f6a1e4c",
5 "timestamp": "2024-04-27T14:22:00Z"
6 }
7}
Delete an upload and its S3 object. DB record is deleted first (committed on response). S3 cleanup runs after the response via a background task so the file is only removed once the DB commit succeeds. POD-301: if the upload was confirmed against a workspace-scoped resource, release the bytes back to that workspace's storage counter. Without this, storage_bytes_used drifts upward forever and customers stay capped after deleting files. Read upload state BEFORE delete_for_user — the row is gone after that call.
Was this page helpful?
Previous

Usage Summary

Next
Built with

Delete an upload and its S3 object.

DB record is deleted first (committed on response). S3 cleanup runs after the response via a background task so the file is only removed once the DB commit succeeds.

POD-301: if the upload was confirmed against a workspace-scoped resource, release the bytes back to that workspace’s storage counter. Without this, storage_bytes_used drifts upward forever and customers stay capped after deleting files. Read upload state BEFORE delete_for_user — the row is gone after that call.

Authentication

AuthorizationBearer
Clerk JWT token
OR
AuthorizationBearer

Onepin live API key (op_live_...). Test and public keys are reserved in Phase 1.

Path parameters

upload_idstringRequiredformat: "uuid"

Headers

X-Workspace-Idstring or nullOptional

Response

Successful Response
datamap from strings to any
metaobject

Errors

422
Unprocessable Entity Error