Look Up Capsule
const url = 'https://example.com/vault/alpha/capsules/example';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/vault/alpha/capsules/exampleReports whether a delivery is still collectable, and what it holds — never the payload itself.
This is deliberately NON-CONSUMING, and that is a requirement rather than a nicety: chat and mail clients fetch posted URLs unbidden to build a preview, so a check that consumed would destroy the payload before the recipient ever clicked.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”The capsule’s identifier — the public half of the split token, and the only half a lookup needs.
Responses
Section titled “ Responses ”OK
What an anonymous recipient may learn about a capsule before collecting it.
A separate message rather than a redacted Capsule, because the difference is not redaction but entitlement: the recipient is a stranger holding a link, and the fields absent here are absent by decision. In particular it carries NO sender identity — that is the one field a recipient does not need in order to decide whether to collect, and the only one that names a person to whoever holds a guessed identifier.
object
The capsule’s identifier, echoed back.
Whether the delivery is still collectable, and if not, how it ended.
Optional IANA media type of the payload.
Size of the payload in bytes, so a recipient knows what they are about to collect before collecting it.
The deadline, so a recipient can tell how long they have.
Example
{ "state": "CAPSULE_STATE_UNSPECIFIED"}default
Section titled “default ”Default error response
The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC. Each Status message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the API Design Guide.
object
The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
A list of messages that carry the error details. There is a common set of message types for APIs to use.
Contains an arbitrary serialized message along with a @type that describes the type of the serialized message.
object
The type of the serialized message.
Example generated
{ "code": 1, "message": "example", "details": [ { "@type": "example" } ]}