Share links
What every endpoint shares is on Conventions.
GET /s/{opaque_id}
Section titled “GET /s/{opaque_id}”What a viewer needs to begin, for a live link.
Authentication: none.
Parameters
-
opaque_idrequiredThe opaque id.
Responses
-
200
OK. Headers:
X-Capsule-Min-Client-Build,X-Capsule-Protocol-Max,X-Capsule-Protocol-Min,X-Request-Id. -
400
Bad Request. Headers:
X-Capsule-Min-Client-Build,X-Capsule-Protocol-Max,X-Capsule-Protocol-Min,X-Request-Id. -
404
Not found. Headers:
X-Capsule-Min-Client-Build,X-Capsule-Protocol-Max,X-Capsule-Protocol-Min,X-Request-Id. -
413
the request body exceeds the configured limit. Headers:
X-Capsule-Min-Client-Build,X-Capsule-Protocol-Max,X-Capsule-Protocol-Min,X-Request-Id. -
429
Too many requests. Headers:
Retry-After,X-Capsule-Min-Client-Build,X-Capsule-Protocol-Max,X-Capsule-Protocol-Min,X-Request-Id. -
500
Internal server error. Headers:
X-Capsule-Min-Client-Build,X-Capsule-Protocol-Max,X-Capsule-Protocol-Min,X-Request-Id.
curl -X GET 'https://capsule.example/s/OPAQUE_ID'{ "metadata_hash": "string", "passphrase_protected": true}GET /s/{opaque_id}/blob/{hash}
Section titled “GET /s/{opaque_id}/blob/{hash}”Ciphertext for one of the link’s blobs, ranged.
The membership check is the security property: a link serves the addresses its record
enumerates and nothing else, so it cannot be walked sideways into the album’s unstripped
metadata. A blob the link does not name is the same 404 as a link that does not exist.
A delivery that carries bytes is recorded in the owner’s activity log, aggregated: one
share_link.served per link per window, naming the link and never the blob, and written
off the response path so it neither slows nor refuses the serve.
Authentication: none.
Parameters
-
If-MatchThe entity tag the client’s copy was taken from, per RFC 9110 section 13.1.1.
-
If-Modified-SinceThe date the client’s copy carries, per RFC 9110 section 13.1.3.
-
If-None-MatchThe entity tag the client already holds, per RFC 9110 section 13.1.2.
-
If-RangeThe entity tag the client’s partial copy came from, per RFC 9110 section 13.1.5. The
Rangeis honoured only if it matches this representation under the strong comparison; otherwise the whole representation is sent. -
If-Unmodified-SinceThe date the client’s copy carries, refused if the representation changed since, per RFC 9110 section 13.1.4.
-
RangeThe part of the representation to transfer, per RFC 9110 section 14.2. A field this operation cannot apply is ignored and the whole representation is sent. Example:
bytes=0-1023. -
hashrequiredThe blob’s content address.
-
opaque_idrequiredThe opaque id.
Responses
-
200
the whole representation. Headers:
Accept-Ranges,Cache-Control,Content-Disposition,ETag,Last-Modified,X-Capsule-Min-Client-Build,X-Capsule-Protocol-Max,X-Capsule-Protocol-Min,X-Request-Id. -
206
the part the request asked for. Headers:
Accept-Ranges,Cache-Control,Content-Disposition,Content-Range,ETag,Last-Modified,X-Capsule-Min-Client-Build,X-Capsule-Protocol-Max,X-Capsule-Protocol-Min,X-Request-Id. -
304
the client’s copy is current. Headers:
Cache-Control,ETag,Last-Modified,X-Capsule-Min-Client-Build,X-Capsule-Protocol-Max,X-Capsule-Protocol-Min,X-Request-Id. -
400
Bad Request. Headers:
X-Capsule-Min-Client-Build,X-Capsule-Protocol-Max,X-Capsule-Protocol-Min,X-Request-Id. -
404
Not found. Headers:
X-Capsule-Min-Client-Build,X-Capsule-Protocol-Max,X-Capsule-Protocol-Min,X-Request-Id. -
412
the representation is not the one the client’s copy came from. Headers:
X-Capsule-Min-Client-Build,X-Capsule-Protocol-Max,X-Capsule-Protocol-Min,X-Request-Id. -
413
the request body exceeds the configured limit. Headers:
X-Capsule-Min-Client-Build,X-Capsule-Protocol-Max,X-Capsule-Protocol-Min,X-Request-Id. -
416
Range Not Satisfiable. Headers:
Content-Range,X-Capsule-Min-Client-Build,X-Capsule-Protocol-Max,X-Capsule-Protocol-Min,X-Request-Id. -
429
Too many requests. Headers:
Retry-After,X-Capsule-Min-Client-Build,X-Capsule-Protocol-Max,X-Capsule-Protocol-Min,X-Request-Id. -
500
Internal server error. Headers:
X-Capsule-Min-Client-Build,X-Capsule-Protocol-Max,X-Capsule-Protocol-Min,X-Request-Id.
curl -X GET 'https://capsule.example/s/OPAQUE_ID/blob/HASH'200 · application/octet-stream bytes
206 · application/octet-stream bytes
GET /s/{opaque_id}/wrapped-secret
Section titled “GET /s/{opaque_id}/wrapped-secret”The passphrase-wrapped scope material, when there is one.
The octets the issuer registered as wrapped_secret, byte for byte. A viewer fetches this only
for a passphrase-protected link; a link with no passphrase carries its scope in the sealed
metadata blob instead.
A link with no passphrase answers 404 rather than 204 or an empty body: whether a link is
passphrase-protected is already disclosed by the metadata record, and a second way to ask
the same question with a different shape is a second thing to keep consistent.
Authentication: none.
Parameters
-
opaque_idrequiredThe opaque id.
Responses
-
200
OK. Headers:
X-Capsule-Min-Client-Build,X-Capsule-Protocol-Max,X-Capsule-Protocol-Min,X-Request-Id. -
400
Bad Request. Headers:
X-Capsule-Min-Client-Build,X-Capsule-Protocol-Max,X-Capsule-Protocol-Min,X-Request-Id. -
404
Not found. Headers:
X-Capsule-Min-Client-Build,X-Capsule-Protocol-Max,X-Capsule-Protocol-Min,X-Request-Id. -
413
the request body exceeds the configured limit. Headers:
X-Capsule-Min-Client-Build,X-Capsule-Protocol-Max,X-Capsule-Protocol-Min,X-Request-Id. -
429
Too many requests. Headers:
Retry-After,X-Capsule-Min-Client-Build,X-Capsule-Protocol-Max,X-Capsule-Protocol-Min,X-Request-Id. -
500
Internal server error. Headers:
X-Capsule-Min-Client-Build,X-Capsule-Protocol-Max,X-Capsule-Protocol-Min,X-Request-Id.
curl -X GET 'https://capsule.example/s/OPAQUE_ID/wrapped-secret'200 · application/octet-stream bytes
POST /v1/shares
Section titled “POST /v1/shares”Register a share link the caller’s client has issued.
A link is metadata growth: an account past its quota grace window is refused
403 error.quota.grace_locked, and one whose quota the operator suspended
403 error.quota.suspended.
Authentication: required — bearer.
Parameters
-
X-Capsule-Crypto-SuiteThe crypto suite id from the primitives inventory. Sent on writes; a suite this server does not implement is refused with
400. -
X-Capsule-ProtocolrequiredThe
YYYY-MM-DDprotocol version this request is written against. Outside the server’s[X-Capsule-Protocol-Min, X-Capsule-Protocol-Max]window the request is refused with426. -
X-Capsule-Sidecar-SchemaThe sidecar schema version declared at
sidecar_schemafield 0. Sent on metadata updates; a schema newer than this server indexes is refused with400.
Request body (required, application/json): IssueShareRequest
Responses
-
201
The share link is registered and servable. Headers:
X-Capsule-Min-Client-Build,X-Capsule-Protocol-Max,X-Capsule-Protocol-Min,X-Request-Id. -
400
Bad Request; Malformed share link; Malformed handshake. Headers:
X-Capsule-Min-Client-Build,X-Capsule-Protocol-Max,X-Capsule-Protocol-Min,X-Request-Id. -
401
Unauthorized. Headers:
WWW-Authenticate,X-Capsule-Min-Client-Build,X-Capsule-Protocol-Max,X-Capsule-Protocol-Min,X-Request-Id. -
403
Forbidden; Quota grace expired; Quota exceeded; Quota suspended. Headers:
X-Capsule-Min-Client-Build,X-Capsule-Protocol-Max,X-Capsule-Protocol-Min,X-Request-Id. -
408
Request Timeout. Headers:
X-Capsule-Min-Client-Build,X-Capsule-Protocol-Max,X-Capsule-Protocol-Min,X-Request-Id. -
413
Payload Too Large; the request body exceeds the configured limit. Headers:
X-Capsule-Min-Client-Build,X-Capsule-Protocol-Max,X-Capsule-Protocol-Min,X-Request-Id. -
415
Unsupported Media Type. Headers:
X-Capsule-Min-Client-Build,X-Capsule-Protocol-Max,X-Capsule-Protocol-Min,X-Request-Id. -
422
Unprocessable Entity. Headers:
X-Capsule-Min-Client-Build,X-Capsule-Protocol-Max,X-Capsule-Protocol-Min,X-Request-Id. -
425
Too early. Headers:
X-Capsule-Min-Client-Build,X-Capsule-Protocol-Max,X-Capsule-Protocol-Min,X-Request-Id. -
426
Protocol version unsupported. Headers:
X-Capsule-Min-Client-Build,X-Capsule-Protocol-Max,X-Capsule-Protocol-Min,X-Request-Id. -
500
Internal server error. Headers:
X-Capsule-Min-Client-Build,X-Capsule-Protocol-Max,X-Capsule-Protocol-Min,X-Request-Id.
curl -X POST 'https://capsule.example/v1/shares' \ -H "Authorization: Bearer $TOKEN" \ -H 'X-Capsule-Protocol: 2026-01-01' \ -H 'Content-Type: application/json' \ -d '{ "opaque_id": "string", "metadata_hash": "string", "serves": [ "string" ], "wrapped_secret": "string", "expires_at": "string", "metadata_blob": "string"}'{ "opaque_id": "string"}DELETE /v1/shares/{opaque_id}
Section titled “DELETE /v1/shares/{opaque_id}”Revoke one of the caller’s links.
Idempotent from the caller’s side and indistinguishable: a link that was never theirs, a
link that does not exist, and a link they already revoked are all 204. Revocation is the
one operation where saying “there was nothing to revoke” would be a lookup.
Authentication: required — bearer.
Parameters
-
X-Capsule-Crypto-SuiteThe crypto suite id from the primitives inventory. Sent on writes; a suite this server does not implement is refused with
400. -
X-Capsule-ProtocolrequiredThe
YYYY-MM-DDprotocol version this request is written against. Outside the server’s[X-Capsule-Protocol-Min, X-Capsule-Protocol-Max]window the request is refused with426. -
X-Capsule-Sidecar-SchemaThe sidecar schema version declared at
sidecar_schemafield 0. Sent on metadata updates; a schema newer than this server indexes is refused with400. -
opaque_idrequiredThe opaque id.
Responses
-
204
the request succeeded and there is no content to send. Headers:
X-Capsule-Min-Client-Build,X-Capsule-Protocol-Max,X-Capsule-Protocol-Min,X-Request-Id. -
400
Bad Request; Malformed share link; Malformed handshake. Headers:
X-Capsule-Min-Client-Build,X-Capsule-Protocol-Max,X-Capsule-Protocol-Min,X-Request-Id. -
401
Unauthorized. Headers:
WWW-Authenticate,X-Capsule-Min-Client-Build,X-Capsule-Protocol-Max,X-Capsule-Protocol-Min,X-Request-Id. -
403
Forbidden; Quota grace expired; Quota exceeded; Quota suspended. Headers:
X-Capsule-Min-Client-Build,X-Capsule-Protocol-Max,X-Capsule-Protocol-Min,X-Request-Id. -
413
the request body exceeds the configured limit. Headers:
X-Capsule-Min-Client-Build,X-Capsule-Protocol-Max,X-Capsule-Protocol-Min,X-Request-Id. -
425
Too early. Headers:
X-Capsule-Min-Client-Build,X-Capsule-Protocol-Max,X-Capsule-Protocol-Min,X-Request-Id. -
426
Protocol version unsupported. Headers:
X-Capsule-Min-Client-Build,X-Capsule-Protocol-Max,X-Capsule-Protocol-Min,X-Request-Id. -
500
Internal server error. Headers:
X-Capsule-Min-Client-Build,X-Capsule-Protocol-Max,X-Capsule-Protocol-Min,X-Request-Id.
curl -X DELETE 'https://capsule.example/v1/shares/OPAQUE_ID' \ -H "Authorization: Bearer $TOKEN" \ -H 'X-Capsule-Protocol: 2026-01-01'204 · no body
Schemas
Section titled “Schemas”The models these endpoints carry, to 4 references deep.
CodedProblem
Section titled “CodedProblem”An RFC 9457 problem detail.
| Field | Type | Description |
|---|---|---|
type |
string |
Required. |
title |
string |
— |
status |
integer |
Required. |
detail |
string |
— |
instance |
string |
— |
code |
string |
Required. The stable error.* catalog code. The client localizes this; detail stays English. Present on every problem this server renders. |
request_id |
string |
The UUIDv7 this server minted for the request, as the X-Request-Id header carries it. Quote it when reporting the failure: it names the request’s log lines. |
IssueShareRequest
Section titled “IssueShareRequest”A link the owner’s client has issued.
| Field | Type | Description |
|---|---|---|
opaque_id |
string |
Required. The 128-bit opaque id, 32 lowercase hex characters, drawn from the client’s CSPRNG. Minted by the client rather than the server because the client is what knows the fragment secret the id is paired with; the server checks its shape and stores it. |
metadata_hash |
string |
Required. The metadata blob a viewer starts from. Must appear in serves. The blob is the issuer’s sealed share metadata record (share-metadata/v1, built by capsule_core::sharing::publish_share), opaque to this server. |
serves |
string[] |
Required. Every blob this link may serve, and nothing else. Enumerated by the issuing client, which is what makes the boundary-crossing strip stick: the client points the link at blobs it prepared for export, and the server has no path from an opaque id to anything outside this set. |
wrapped_secret |
string | null |
The passphrase-wrapped scope material, base64, when the link is passphrase-protected. Opaque to this server. The passphrase never crosses the wire — unwrap is client-side. Absent for a link with no passphrase, whose scope travels inside the sealed metadata blob. |
expires_at |
string | null |
When the link stops being live, RFC 3339. Absent means no expiry. |
metadata_blob |
string | null |
The sealed metadata record itself, base64. Its SHA-256 must equal metadata_hash, and it may be at most 8 MiB decoded. The server stores it before it records the link, so a viewer’s first fetch finds it, and keeps it for as long as the link is live. It counts against the caller’s storage quota, and is refused when its new bytes would carry the account to its hard limit. Opaque to this server: it is sealed under material derived from the URL fragment, which never reaches it. Optional so an older client still registers a link; such a link serves its metadata only if the blob is already in the store. |
IssueShareResponse
Section titled “IssueShareResponse”Confirmation that a link is now servable.
| Field | Type | Description |
|---|---|---|
opaque_id |
string |
Required. The opaque id, echoed. |
ShareBlobRateLimitedProblem
Section titled “ShareBlobRateLimitedProblem”An RFC 9457 problem detail.
| Field | Type | Description |
|---|---|---|
type |
string |
Required. |
title |
string |
— |
status |
integer |
Required. |
detail |
string |
— |
instance |
string |
— |
code |
string |
Required. The stable error.* catalog code. The client localizes this; detail stays English. Present on every problem this server renders. |
request_id |
string |
The UUIDv7 this server minted for the request, as the X-Request-Id header carries it. Quote it when reporting the failure: it names the request’s log lines. |
retry_after |
integer |
When the caller may retry, as Unix seconds. From the limiter’s own window when a budget is spent, and an upper bound of one window when the limiter is at capacity. |
ShareMetadataRateLimitedProblem
Section titled “ShareMetadataRateLimitedProblem”An RFC 9457 problem detail.
| Field | Type | Description |
|---|---|---|
type |
string |
Required. |
title |
string |
— |
status |
integer |
Required. |
detail |
string |
— |
instance |
string |
— |
code |
string |
Required. The stable error.* catalog code. The client localizes this; detail stays English. Present on every problem this server renders. |
request_id |
string |
The UUIDv7 this server minted for the request, as the X-Request-Id header carries it. Quote it when reporting the failure: it names the request’s log lines. |
retry_after |
integer |
When the caller may retry, as Unix seconds. From the limiter’s own window when a budget is spent, and an upper bound of one window when the limiter is at capacity. |
ShareSecretRateLimitedProblem
Section titled “ShareSecretRateLimitedProblem”An RFC 9457 problem detail.
| Field | Type | Description |
|---|---|---|
type |
string |
Required. |
title |
string |
— |
status |
integer |
Required. |
detail |
string |
— |
instance |
string |
— |
code |
string |
Required. The stable error.* catalog code. The client localizes this; detail stays English. Present on every problem this server renders. |
request_id |
string |
The UUIDv7 this server minted for the request, as the X-Request-Id header carries it. Quote it when reporting the failure: it names the request’s log lines. |
retry_after |
integer |
When the caller may retry, as Unix seconds. From the limiter’s own window when a budget is spent, and an upper bound of one window when the limiter is at capacity. |
SharedMetadataResponse
Section titled “SharedMetadataResponse”What a viewer needs to start.
| Field | Type | Description |
|---|---|---|
metadata_hash |
string |
Required. The metadata blob’s content address; fetch it from /s/{opaque_id}/blob/{hash}. |
passphrase_protected |
boolean |
Required. Whether a passphrase is required before the scope material can be opened. The one property of the link this path discloses, and it has to: a viewer cannot know to ask for a passphrase otherwise. It says nothing about what the link points at. |