Buckets
A bucket is a named container for objects. List your buckets — the default bucket is seeded on first call, so the list is never empty — or create a named one. Each bucket reports its liveusedBytes and objectCount.
409. The default bucket cannot be deleted.
Deleting any other bucket archives it and soft-deletes its objects, so their
bytes stop counting against your storage.
Upload an object
Uploading is a two-step handshake so bytes flow straight to storage, never through the API. First initiate the upload to get a time-boxedPUT URL, PUT
your bytes to it, then finalize so Dairo verifies the true size and records the
object.
1
Initiate — get an upload URL
cURL
PresignedUpload: { objectId, uploadUrl, method, headers, expiresInSeconds }.
The URL is valid for 300 seconds.2
PUT the bytes
Send the file directly to
uploadUrl with the exact headers returned —
they are part of the signature, and the upload is rejected without them.cURL
3
Finalize — record the object
cURL
BucketObject with its verified bytes and a scanStatus.
Dairo measures the stored bytes itself — a client-declared size is never
trusted — and rejects the object with 429 if it would exceed your plan’s
storage limit. Finalizing is idempotent: repeating the call returns the
already-recorded object.Objects are scanned before they can be shared. A freshly finalized object
starts at
scanStatus: "pending": you can still download it yourself, but
creating a share link over it returns 409 until the verdict is clean. An
infected or failed verdict blocks downloads for everyone, including you.Download an object
Ask for a short-lived download URL, then fetch the bytes from it directly. The URL is valid for 3,600 seconds.Share a single object
A share link turns one stored object into a revocable URL anyone can open — no API key needed. All three policy options are optional:
The
shareUrl (a /s/ share page) and downloadUrl (a direct /d/ download)
are returned only at create time, so capture them from the response. Opening
the share page spends nothing; each direct download counts one use.
Share a bundle — one link over many objects
When you want to hand out several files as a single link, create a share bundle:POST /v1/buckets/{bucketId}/share-links with an objectIds array —
1 to 50 distinct ids, all in the same bucket. The same password, maxUses,
and expiresAt options apply, enforced on every file in the bundle.
share_bundle: one shareUrl landing page that lists every
file, plus a per-file downloadUrl for each object.
Manage share links
List the links over an object, read a link’s open analytics, or revoke a link the moment it should stop working.summary.servedOpens counts served downloads — the number measured
against maxUses — while share-page views are logged but never consume a use.
Each event carries openedAt, clientIp, userAgent, and an outcome such
as served.
After a revoke, every future open of the link’s share page or download URL
returns 410 Gone. The same happens when a link expires or its use cap runs
out.
Delete objects
Deleting an object removes its stored bytes and stops them counting against your storage. Delete one object, or up to 1,000 in a single call:deleted ids from failed entries, each failure
naming its id and reason.
Scopes
Listing buckets, objects, download URLs, share links, and open analytics requiresbuckets:read. Creating buckets, uploading, deleting, and minting or
revoking share links require buckets:write. See scopes
for how permissions attach to API keys.
Related
- Attachments — pull files off inbound mail and reference stored objects when sending.
- MCP server — the
list_storageandmanage_storagetools for agents. - API reference — every buckets, objects, and share-link endpoint.