Complete an upload
const url = 'https://example.com/api/v1/orgs/example/buckets/example/uploads/example/complete';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"parts":[{"etag":"example","partNumber":1}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/orgs/example/buckets/example/uploads/example/complete \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "parts": [ { "etag": "example", "partNumber": 1 } ] }'Finalizes a staged upload: completes the S3 multipart upload (when applicable), verifies exact size and MIME type, copies the object into its final key, and removes the staged copy.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Organization ID.
Bucket ID.
Upload intent ID returned by uploads.create.
Request Body
Section titled “Request Body”object
Completed part ETags (required for multipart uploads; up to 10,000 parts).
object
ETag header returned by S3 for this part.
Example generated
{ "parts": [ { "etag": "example", "partNumber": 1 } ]}Responses
Section titled “Responses”Upload verified and promoted to destination key
Simple acknowledgement response.
object
Example
{ "ok": true}Invalid request input or rule violation.
Error returned when request input fails schema validation or violates a domain rule.
object
object
Field-level validation failures, present when schema validation fails.
object
Dot-separated field path.
Human-readable error explanation.
Example
{ "code": "BAD_REQUEST"}Authentication required or credentials invalid.
Standard REST error envelope.
object
Machine-readable error code.
Optional structured error details.
Human-readable error explanation.
Example generated
{ "code": "example", "data": "example", "message": "example"}Insufficient role, bucket grant, or token scope.
Standard REST error envelope.
object
Machine-readable error code.
Optional structured error details.
Human-readable error explanation.
Example generated
{ "code": "example", "data": "example", "message": "example"}Resource not found.
Standard REST error envelope.
object
Machine-readable error code.
Optional structured error details.
Human-readable error explanation.
Example generated
{ "code": "example", "data": "example", "message": "example"}Request conflicts with the current state of the resource.
Standard REST error envelope.
object
Machine-readable error code.
Optional structured error details.
Human-readable error explanation.
Example generated
{ "code": "example", "data": "example", "message": "example"}Unexpected server error. Quote data.requestId when you report it.
Error returned when Sendcrate or one of its providers fails (5xx).
object
object
Error chain with stack traces. Present only when the server runs in development mode.
Request reference to quote when you report the error.
Human-readable error explanation.
Example
{ "code": "INTERNAL_SERVER_ERROR"}