Uploads — presigned direct-to-storage upload sessions.
Every path is on https://app.concord.app.
- PUT
/api/upload-pieces/{id}/{piece}Send one piece of an upload - GET
/api/v1/ai-suggestions/uploadsRead the suggestions for files you uploaded - POST
/api/v1/uploadsAsk to upload files for OCR - POST
/api/v1/uploads/completeFinish uploads - POST
/api/v1/uploads/from-urlUpload a file from a URL - GET
/api/v1/uploads/{id}Get an upload
PUT/api/upload-pieces/{id}/{piece}
Send one piece of an upload
The byte route (server-relative, NOT under /v1). The body is exactly bytes [(piece - 1) × piece_size, …) of the file, with Content-Type: application/octet-stream, an exact Content-Length, X-Concord-Upload-Token: <token> and X-Concord-Piece-Sha256: <hex SHA-256 of this piece>. No Authorization header: the token is the credential. Pieces may be sent in any order and in parallel; a piece already held is acknowledged again. Errors use the upload plane's own envelope ({ statusCode, error, code, message, data: { reason, retryable, facts } }).
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | The upload id POST /v1/imports or POST /v1/uploads returned. |
piecerequired | path | string | The 1-based piece number. |
Request body
A application/octet-stream body.
Responses
| Status | Description |
|---|---|
200 | The piece was received |
401 | The token is missing, wrong, or was replaced by a newer declare |
409 | The upload is no longer receiving pieces |
410 | The upload expired, was cancelled or was refused |
422 | Wrong piece number, length or digest |
429 | Too many bytes in flight — retry after Retry-After |
503 | Storage busy — retry after Retry-After |
GET/api/v1/ai-suggestions/uploads
Read the suggestions for files you uploaded
For up to ten of your own uploads (comma-separated uploadIds), the workspace, folder and stage concord.app suggests before you import them. A dimension concord.app could not tell has needsChoice: true and no value: choose one before importing. ready is false until the analysis has answered (usually within three seconds of the file landing). Uploads that are not yours are left out.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
uploadIdsrequired | query | string |
Responses
| Status | Description |
|---|---|
200 | OK |
400 | Malformed request or invalid parameters for the operation, Request payload failed schema validation; BAD_REQUEST: Malformed request or invalid parameters for the operation; VALIDATION: Request payload failed schema validation |
401 | 401 — UNAUTHORIZED: Missing or invalid authentication credentials |
403 | 403 — FORBIDDEN: Authenticated but not authorized for this resource or operation |
404 | 404 — NOT_FOUND: The requested resource (or a resource referenced by the operation) was not found |
405 | 405 — METHOD_NOT_SUPPORTED: HTTP method not supported for this resource |
406 | 406 — NOT_ACCEPTABLE: Requested representation is not acceptable |
408 | 408 — TIMEOUT: Request timed out |
409 | 409 — CONFLICT: Resource state conflict — concurrent modification or duplicate |
412 | 412 — PRECONDITION_FAILED: Resource state does not allow the requested operation |
413 | 413 — PAYLOAD_TOO_LARGE: Request payload exceeds the allowed size |
415 | 415 — UNSUPPORTED_MEDIA_TYPE: Request media type is not supported |
422 | 422 — UNPROCESSABLE_CONTENT: Request semantically valid but unprocessable |
429 | 429 — TOO_MANY_REQUESTS: Rate limit or quota exceeded for the operation |
499 | 499 — CLIENT_CLOSED_REQUEST: Client closed the request before the server finished |
500 | 500 — INTERNAL_SERVER_ERROR: Unexpected server error while processing the operation |
501 | 501 — NOT_IMPLEMENTED: The requested operation is not implemented |
502 | 502 — BAD_GATEWAY: Invalid response from an upstream dependency |
503 | 503 — SERVICE_UNAVAILABLE: Service temporarily unavailable — may be retried after Retry-After |
504 | 504 — GATEWAY_TIMEOUT: Timed out waiting for an upstream dependency |
POST/api/v1/uploads
Ask to upload files for OCR
Declare 1 to 500 files you are about to send for a HELD purpose: ocr_page (a scanned page for the OCR operations, at most 2 GB). Each accepted file comes back as an upload with its piece plan and piece token; declined files come back with the reason — and when EVERY file is over its purpose's limit the ask itself is refused 413 with that limit's sentence, before a byte is sent. Then PUT each piece, call POST /v1/uploads/complete, and use the upload id in the operation. A file already on the web can be pulled by the server instead (POST /v1/uploads/from-url). Documents to IMPORT are declared with POST /v1/imports instead (purpose: document is answered 400).
Parameters
| Name | In | Type | Description |
|---|---|---|---|
Idempotency-Key | header | string | Optional idempotency key. When supplied, a repeat of the same request replays the original response instead of performing the write twice. A retry sent WITHOUT the header is a second write and CAN duplicate its effect — always send one on retries. |
Request body
| Name | Type | Description |
|---|---|---|
purposerequired | one of "ocr_page" | What the files are for. ocr_page: a scanned page image or PDF for the OCR operations. Documents to IMPORT are not uploaded here: declare them with POST /v1/imports. |
filesrequired | array of object | The files to upload, 1 to 500 per call. One call opens one upload group. |
Responses
| Status | Description |
|---|---|
201 | The accepted uploads with their piece plans, and the declined files |
400 | Invalid request — see error.code for the specific failure mode |
401 | Missing or invalid Bearer token |
403 | Authenticated but not permitted to perform this action |
404 | Resource not found |
429 | Rate limit exceeded — see Retry-After and RateLimit-* headers |
POST/api/v1/uploads/complete
Finish uploads
Finish uploads whose pieces are all sent (1 to 500 ids — an import's files and held uploads alike). The server assembles each file, checks its exact size, its SHA-256 (when you send it), its real type and our malware scan. Small files (a few, up to 32 MiB in total) are checked inside this call; others come back checking. An entry with missing_pieces still needs those pieces; deferred: true means call complete again. Ids that are not yours are left out.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
Idempotency-Key | header | string | Optional idempotency key. When supplied, a repeat of the same request replays the original response instead of performing the write twice. A retry sent WITHOUT the header is a second write and CAN duplicate its effect — always send one on retries. |
Request body
| Name | Type | Description |
|---|---|---|
uploadsrequired | array of object |
Responses
| Status | Description |
|---|---|
200 | Each upload's status after this call |
400 | Invalid request — see error.code for the specific failure mode |
401 | Missing or invalid Bearer token |
403 | Authenticated but not permitted to perform this action |
404 | Resource not found |
429 | Rate limit exceeded — see Retry-After and RateLimit-* headers |
POST/api/v1/uploads/from-url
Upload a file from a URL
concord.app fetches the file at an https URL and lands it through the upload path, like a file you upload yourself: its real type and our malware scan are checked. purpose says what the file is for: "ocr_page" (a page for recognize-handwriting or bulk OCR) or "document" (a document to import; poll the returned import_id with GET /v1/imports/{id}). The URL must be https, carry no user name or password, answer with a Content-Length and redirect at most three times. The call waits up to 20 seconds for the file to be checked: a small file comes back ready, its upload_id usable at once.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
Idempotency-Key | header | string | Optional idempotency key. When supplied, a repeat of the same request replays the original response instead of performing the write twice. A retry sent WITHOUT the header is a second write and CAN duplicate its effect — always send one on retries. |
Request body
| Name | Type | Description |
|---|---|---|
urlrequired | string | The https URL of the file. |
purposerequired | one of "ocr_page", "document" | What the file is for. |
file_name | string | The file's name with its extension (e.g. page-1.png); the URL's last path segment when omitted. The extension decides which file types are accepted. |
folder_id | string | For purpose "document": the folder to import the document into. |
Responses
| Status | Description |
|---|---|
200 | OK |
400 | Malformed request or invalid parameters, Request payload failed schema validation; BAD_REQUEST: Malformed request or invalid parameters; VALIDATION: Request payload failed schema validation |
401 | 401 — UNAUTHORIZED: Missing or invalid authentication credentials |
403 | 403 — FORBIDDEN: Authenticated but not authorized for this resource |
404 | 404 — NOT_FOUND: Requested resource does not exist |
405 | 405 — METHOD_NOT_SUPPORTED: HTTP method not supported for this resource |
406 | 406 — NOT_ACCEPTABLE: Requested representation is not acceptable |
408 | 408 — TIMEOUT: Request timed out |
409 | 409 — CONFLICT: Resource state conflict — concurrent modification or duplicate |
412 | 412 — PRECONDITION_FAILED: Resource state does not allow the requested operation |
413 | 413 — PAYLOAD_TOO_LARGE: Request payload exceeds the allowed size |
415 | 415 — UNSUPPORTED_MEDIA_TYPE: Request media type is not supported |
422 | 422 — UNPROCESSABLE_CONTENT: Request semantically valid but unprocessable — e.g. file format mismatch |
429 | 429 — TOO_MANY_REQUESTS: Rate limit exceeded — wait retryAfterSeconds before retrying |
499 | 499 — CLIENT_CLOSED_REQUEST: Client closed the request before the server finished |
500 | 500 — INTERNAL_SERVER_ERROR: Unexpected server error — the request should not be retried |
501 | 501 — NOT_IMPLEMENTED: The requested operation is not implemented |
502 | 502 — BAD_GATEWAY: Invalid response from an upstream dependency |
503 | 503 — SERVICE_UNAVAILABLE: Service temporarily unavailable — may be retried after Retry-After |
504 | 504 — GATEWAY_TIMEOUT: Timed out waiting for an upstream dependency |
GET/api/v1/uploads/{id}
Get an upload
One upload's status: declared, receiving, checking, ready (usable), refused (with the reason), cancelled or expired.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string |
Responses
| Status | Description |
|---|---|
200 | The upload |
400 | Invalid request — see error.code for the specific failure mode |
401 | Missing or invalid Bearer token |
403 | Authenticated but not permitted to perform this action |
404 | Resource not found |
429 | Rate limit exceeded — see Retry-After and RateLimit-* headers |