Confirm Upload

Confirm a completed upload and bind it to a resource (step 2 of 2). Call this after successfully PUTting your file to the presigned URL returned by `POST /uploads`. Provide `context_type` and `context_id` to associate the file with an existing resource (currently `workflow` is the supported context type). The file is moved to its final location and `status` transitions from `pending` to `uploaded`. This endpoint is idempotent: if the upload was already confirmed, the current state is returned without re-processing. Storage quota is checked against the workspace at confirm time. If confirming would exceed the workspace storage limit, a 402 is returned and the file remains in its staging location (the upload record stays `pending` so you can delete the staging file and try a smaller file). Binding to a workspace-scoped resource requires the caller to be a member of that workspace. Workspace is inferred from the resource when `X-Workspace-Id` is omitted. Dual-auth: Bearer JWT or API key (scope `uploads:write`).

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

Type of resource this upload is being attached to. Currently only workflow is supported.

context_idstringRequiredformat: "uuid"

ID of the resource to attach this upload to. Must be an existing resource of the given context_type that the caller has access to.

Response

Successful Response
dataobject
metaobject

Errors

422
Unprocessable Entity Error