Skip to content
sproutboatDocs
Esc
↑↓navigate↵open⌘Jpreview

Upload one asset file

Raw bytes, at most 64 MiB; sha256 must match them. Idempotent. The CLI uploads up to 4 at a time. New bytes count against the team’s 24-hour budget of static assets (429 quota-upload, checked from Content-Length before a byte is read); uploads are rate-limited per team (429 upload-rate) and bounded in flight (429 busy, retry in 5 s).

PUT/v1/assets/blobs/{sha256}
Authorization
AuthorizationBearer token · headerrequired

A team API key, sbk_..., from Settings, API keys.

or
x-api-keyAPI key · headerrequired

The same key, in a header of its own.

Path parameters
sha256Sha256required

Lowercase hex SHA-256 of the exact bytes of the body.

matches ^[0-9a-f]{64}$
Request body
requiredapplication/octet-stream
string<binary>
Responses
200

Stored.

sha256Sha256required
matches ^[0-9a-f]{64}$
sizeintegerrequired
storedbooleanrequired

False when the Cloud already had these bytes.

400

The request is malformed. path names the field when one is at fault; some refusals (a digest mismatch, a body that is not JSON) carry a message only.

One of:
ErrorInvalid
errorstringrequired

A message for people. Do not parse it.

reasonstringrequired
Allowed:invalid
ErrorPlain
errorstringrequired

A message for people. Do not parse it.

reasonstring

A stable, machine-readable cause, when there is one.

pathstring

The request field at fault.

needstring

The grant a 403 asks for, app:write for example.

retry_after_sinteger
401

No key, or an invalid, expired or revoked key (unknown or missing API token, invalid, expired or revoked API key). No reason.

errorstringrequired

A message for people. Do not parse it.

reasonstring

A stable, machine-readable cause, when there is one.

pathstring

The request field at fault.

needstring

The grant a 403 asks for, app:write for example.

retry_after_sinteger
403

The key lacks a grant (reason: forbidden, need: "<resource>:<action>").

errorstringrequired

A message for people. Do not parse it.

reasonstringrequired
Allowed:forbidden
needstringrequired

The grant, as <resource>:<action>, for example app:write.

413

The body is over the limit for this route (reason: too-large; some refusals carry a message only).

One of:
ErrorTooLarge
errorstringrequired

A message for people. Do not parse it.

reasonstringrequired
Allowed:too-large
ErrorPlain
errorstringrequired

A message for people. Do not parse it.

reasonstring

A stable, machine-readable cause, when there is one.

pathstring

The request field at fault.

needstring

The grant a 403 asks for, app:write for example.

retry_after_sinteger
429

As for sources, plus busy (too many large uploads in flight on this API process; retry in a few seconds). quota-upload counts new asset blob bytes. Honor Retry-After.

One of:
ErrorKeyRateLimited
errorstringrequired

A message for people. Do not parse it.

reasonstringrequired
Allowed:key-rate-limited
retry_after_sintegerrequired

Seconds to wait; also the Retry-After header.

ErrorUploadRate
errorstringrequired

A message for people. Do not parse it.

reasonstringrequired
Allowed:upload-rate
retry_afterintegerrequired

Seconds to wait; also the Retry-After header.

ErrorQuotaUpload
errorstringrequired

A message for people. Do not parse it.

reasonstringrequired
Allowed:quota-upload
keystringrequired

Which budget.

Allowed:source_mb_per_dayasset_mb_per_day
limitintegerrequired

MiB per 24 hours.

used_mbintegerrequired

MiB uploaded in the last 24 hours.

retry_after_sintegerrequired

Also the Retry-After header.

ErrorBusy
errorstringrequired

A message for people. Do not parse it.

reasonstringrequired
Allowed:busy
retry_afterintegerrequired

Seconds to wait; also the Retry-After header.

Request
curl -X PUT 'https://dash.sproutboat.com/v1/assets/blobs/string' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/octet-stream' \
  -d 'string'
Response
{
  "sha256": "string",
  "size": 0,
  "stored": true
}