Start an upload
const url = 'https://example.com/api/v1/orgs/example/buckets/example/uploads';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"contentType":"example","key":"example","overwrite":true,"size":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 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "contentType": "example", "key": "example", "overwrite": true, "size": 1 }'Creates an upload intent and returns presigned S3 upload URL(s) targeting .sendcrate/staging/. Objects <= 16 MiB use single mode (1 hour expiry); larger objects use multipart mode (6 hour expiry). Requires share bucket level and write capability.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Organization ID.
Bucket ID.
Request Bodyrequired
Section titled “Request Bodyrequired”object
MIME type sent during upload (defaults to application/octet-stream).
Destination object key relative to the bucket’s basePath.
When true, allow replacing an existing object at key; otherwise fails with 409.
Exact object size in bytes (0 to 5 TiB). Uploads <= 16 MiB use single mode; larger uploads use multipart.
Example generated
{ "contentType": "example", "key": "example", "overwrite": true, "size": 1}Responses
Section titled “Responses”Presigned single or multipart upload instructions
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"}Request or selection exceeds size or item limits.
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"}