Recipient portal
Public API of the secure-content portal used by recipients of SECURE_LINK attachments: preview, confirmation of receipt and presigned downloads. It is served on the portal host, accepts only same-origin POST requests with a JSON body and answers errors as {error, message}.
POST /portal/v1/session
Open a secure link and describe the message
Public. Called by the portal page with the handle it read from the URL fragment. Nothing
is served yet: the answer says whether the recipient must confirm receipt (CLICK) or
enter an e-mailed code (OTP) before the attachments can be downloaded. In OTP mode only
the sender and the number of files are revealed. Requests must come from the portal origin.
- Authentication: public, no API key required
- operationId:
openPortalSession
Request body (application/json)
| Field | Type | Required | Description |
|---|---|---|---|
handle | PortalHandle | Yes | Access handle of the link the recipient received. It arrives in the URL fragment of the portal page (never in the query string), so it is never sent to a server by the browser until the page posts it in a JSON body. |
Responses
| Code | Description | Schema |
|---|---|---|
200 | State of the link. | PortalOpenResponse |
400 | The body is missing, malformed or lacks a required field, or the confirmation or the code is not valid. | PortalError |
403 | The request is cross-origin (cross_origin), the code is wrong (invalid_code) or receipt must be confirmed first (confirmation_required). | PortalError |
404 | The handle, the session or the attachment is forged, malformed or unknown; every case answers the same. | PortalError |
410 | The access period of the link or session has ended (expired). | PortalError |
413 | The body exceeds the allowed size (body_too_large). | PortalError |
415 | The Content-Type is not application/json (unsupported_media_type). | PortalError |
429 | Too many requests from this address or for this recipient (rate_limited). | PortalError |
500 | Unexpected failure (internal_error). | PortalError |
503 | A dependency is temporarily unavailable (unavailable), or the visit could not be recorded; nothing was confirmed. Retry after Retry-After seconds. | PortalError |
POST /portal/v1/otp
E-mail the one-time code to the recipient
Public. Only for links in OTP mode. Sends an 8-digit code, valid for a few minutes, to the
mailbox registered for the recipient. The code is limited per address and per recipient.
- Authentication: public, no API key required
- operationId:
requestPortalCode
Request body (application/json)
| Field | Type | Required | Description |
|---|---|---|---|
handle | PortalHandle | Yes | Access handle of the link the recipient received. It arrives in the URL fragment of the portal page (never in the query string), so it is never sent to a server by the browser until the page posts it in a JSON body. |
Responses
| Code | Description | Schema |
|---|---|---|
200 | Code sent. | PortalOtpResponse |
400 | The body is missing, malformed or lacks a required field, or the confirmation or the code is not valid. | PortalError |
403 | The request is cross-origin (cross_origin), the code is wrong (invalid_code) or receipt must be confirmed first (confirmation_required). | PortalError |
404 | The handle, the session or the attachment is forged, malformed or unknown; every case answers the same. | PortalError |
409 | The operation does not apply to this message (otp_unavailable or confirmation_not_required). | PortalError |
410 | The access period of the link or session has ended (expired). | PortalError |
413 | The body exceeds the allowed size (body_too_large). | PortalError |
415 | The Content-Type is not application/json (unsupported_media_type). | PortalError |
429 | Too many requests from this address or for this recipient (rate_limited). | PortalError |
500 | Unexpected failure (internal_error). | PortalError |
503 | A dependency is temporarily unavailable (unavailable), or the visit could not be recorded; nothing was confirmed. Retry after Retry-After seconds. | PortalError |
POST /portal/v1/confirm
Confirm receipt and open a download session
Public. Records the explicit confirmation of receipt (an L4 human confirmation in the
evidence) and returns a short-lived session. In CLICK mode send acknowledged: true; in
OTP mode send the code. If the confirmation cannot be recorded the request fails
(503) so that no evidence is lost.
- Authentication: public, no API key required
- operationId:
confirmPortalReceipt
Request body (application/json)
| Field | Type | Required | Description |
|---|---|---|---|
handle | PortalHandle | Yes | Access handle of the link the recipient received. It arrives in the URL fragment of the portal page (never in the query string), so it is never sent to a server by the browser until the page posts it in a JSON body. |
acknowledged | boolean | No | true when the recipient clicked to confirm receipt (CLICK mode). Required unless code is sent. |
code | string | No | One-time code e-mailed to the recipient (OTP mode). |
Responses
| Code | Description | Schema |
|---|---|---|
200 | Receipt confirmed; the session can download. | PortalConfirmResponse |
400 | The body is missing, malformed or lacks a required field, or the confirmation or the code is not valid. | PortalError |
403 | The request is cross-origin (cross_origin), the code is wrong (invalid_code) or receipt must be confirmed first (confirmation_required). | PortalError |
404 | The handle, the session or the attachment is forged, malformed or unknown; every case answers the same. | PortalError |
409 | The operation does not apply to this message (otp_unavailable or confirmation_not_required). | PortalError |
410 | The access period of the link or session has ended (expired). | PortalError |
413 | The body exceeds the allowed size (body_too_large). | PortalError |
415 | The Content-Type is not application/json (unsupported_media_type). | PortalError |
429 | Too many requests from this address or for this recipient (rate_limited). | PortalError |
500 | Unexpected failure (internal_error). | PortalError |
503 | A dependency is temporarily unavailable (unavailable), or the visit could not be recorded; nothing was confirmed. Retry after Retry-After seconds. | PortalError |
POST /portal/v1/download
Get a presigned download of an attachment
Public. With a confirmed session (or any session when no confirmation is required), records the download together with the SHA-256 of the file and returns a short-lived presigned URL. The page only follows URLs whose host is on its allow-list.
- Authentication: public, no API key required
- operationId:
downloadPortalAttachment
Request body (application/json)
| Field | Type | Required | Description |
|---|---|---|---|
session | PortalSessionToken | Yes | Short-lived session issued by the portal; it only authorizes downloads of the same message. |
index | integer | Yes | index of the attachment to download, as listed in message.attachments. |
Responses
| Code | Description | Schema |
|---|---|---|
200 | Presigned download. | PortalDownloadResponse |
400 | The body is missing, malformed or lacks a required field, or the confirmation or the code is not valid. | PortalError |
403 | The request is cross-origin (cross_origin), the code is wrong (invalid_code) or receipt must be confirmed first (confirmation_required). | PortalError |
404 | The handle, the session or the attachment is forged, malformed or unknown; every case answers the same. | PortalError |
410 | The access period of the link or session has ended (expired). | PortalError |
413 | The body exceeds the allowed size (body_too_large). | PortalError |
415 | The Content-Type is not application/json (unsupported_media_type). | PortalError |
429 | Too many requests from this address or for this recipient (rate_limited). | PortalError |
500 | Unexpected failure (internal_error). | PortalError |
503 | A dependency is temporarily unavailable (unavailable), or the visit could not be recorded; nothing was confirmed. Retry after Retry-After seconds. | PortalError |