Skip to content

Start an upload

POST
/orgs/{orgId}/buckets/{bucketId}/uploads
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.

orgId
required

Organization ID.

string
bucketId
required

Bucket ID.

string
Media typeapplication/json
object
contentType

MIME type sent during upload (defaults to application/octet-stream).

string
key
required

Destination object key relative to the bucket’s basePath.

string
overwrite

When true, allow replacing an existing object at key; otherwise fails with 409.

boolean
size
required

Exact object size in bytes (0 to 5 TiB). Uploads <= 16 MiB use single mode; larger uploads use multipart.

integer
<= 5497558138880

Example generated

{
"contentType": "example",
"key": "example",
"overwrite": true,
"size": 1
}

Presigned single or multipart upload instructions

Media typeapplication/json
Any of:
object
id
required
string
mode
required
Allowed value: single
url
required
string

Example

{
"mode": "single"
}

Invalid request input or rule violation.

Media typeapplication/json

Error returned when request input fails schema validation or violates a domain rule.

object
code
required
string
Allowed values: BAD_REQUEST
data
object
issues
required

Field-level validation failures, present when schema validation fails.

Array<object>
object
message
required
string
path
required

Dot-separated field path.

string
message
required

Human-readable error explanation.

string

Example

{
"code": "BAD_REQUEST"
}

Authentication required or credentials invalid.

Media typeapplication/json

Standard REST error envelope.

object
code
required

Machine-readable error code.

string
data

Optional structured error details.

message
required

Human-readable error explanation.

string

Example generated

{
"code": "example",
"data": "example",
"message": "example"
}

Insufficient role, bucket grant, or token scope.

Media typeapplication/json

Standard REST error envelope.

object
code
required

Machine-readable error code.

string
data

Optional structured error details.

message
required

Human-readable error explanation.

string

Example generated

{
"code": "example",
"data": "example",
"message": "example"
}

Resource not found.

Media typeapplication/json

Standard REST error envelope.

object
code
required

Machine-readable error code.

string
data

Optional structured error details.

message
required

Human-readable error explanation.

string

Example generated

{
"code": "example",
"data": "example",
"message": "example"
}

Request conflicts with the current state of the resource.

Media typeapplication/json

Standard REST error envelope.

object
code
required

Machine-readable error code.

string
data

Optional structured error details.

message
required

Human-readable error explanation.

string

Example generated

{
"code": "example",
"data": "example",
"message": "example"
}

Request or selection exceeds size or item limits.

Media typeapplication/json

Standard REST error envelope.

object
code
required

Machine-readable error code.

string
data

Optional structured error details.

message
required

Human-readable error explanation.

string

Example generated

{
"code": "example",
"data": "example",
"message": "example"
}

Unexpected server error. Quote data.requestId when you report it.

Media typeapplication/json

Error returned when Sendcrate or one of its providers fails (5xx).

object
code
required
string
Allowed values: INTERNAL_SERVER_ERROR PROVIDER_FAILED
data
object
debug

Error chain with stack traces. Present only when the server runs in development mode.

Array
requestId

Request reference to quote when you report the error.

string
message
required

Human-readable error explanation.

string

Example

{
"code": "INTERNAL_SERVER_ERROR"
}