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

Confirm Upload

POST
/api/v1/uploads/:upload_id
POST
/api/v1/uploads/:upload_id
$curl -X POST https://api.onepin.ai/api/v1/uploads/upload_id \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "context_type": "workflow",
> "context_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
>}'
1{
2 "data": {
3 "id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
4 "user_id": "1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
5 "filename": "project_plan_v2.pdf",
6 "category": "documents",
7 "content_type": "application/pdf",
8 "status": "confirmed",
9 "created_at": "2024-01-15T09:30:00Z",
10 "updated_at": "2024-01-15T09:30:00Z",
11 "workspace_id": "9f8e7d6c-5b4a-3c2d-1e0f-9a8b7c6d5e4f",
12 "format": "pdf",
13 "size_bytes": 245760,
14 "download_url": "https://cdn.onepin.ai/uploads/7c9e6679-7425-40de-944b-e07fc1f90ae7/download",
15 "context_type": "workflow",
16 "context_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
17 },
18 "meta": {
19 "request_id": "req_1234567890abcdef",
20 "timestamp": "2024-01-15T09:30:00Z"
21 }
22}

Confirm upload and move file to final location.

POD-301: gates the file size against storage_bytes_per_workspace whenever the upload binds to a workspace-scoped resource (header OR derived from context_id). Records the storage_charge event in the same transaction as the upload row update.

Was this page helpful?
Previous

Delete Upload

Next
Built with

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

Request

This endpoint expects an object.
context_type"workflow"Required
context_idstringRequiredformat: "uuid"

Response

Successful Response
dataobject
metaobject

Errors

422
Unprocessable Entity Error