Saltar al contenido principal

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)​

FieldTypeRequiredDescription
handlePortalHandleYesAccess 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​

CodeDescriptionSchema
200State of the link.PortalOpenResponse
400The body is missing, malformed or lacks a required field, or the confirmation or the code is not valid.PortalError
403The request is cross-origin (cross_origin), the code is wrong (invalid_code) or receipt must be confirmed first (confirmation_required).PortalError
404The handle, the session or the attachment is forged, malformed or unknown; every case answers the same.PortalError
410The access period of the link or session has ended (expired).PortalError
413The body exceeds the allowed size (body_too_large).PortalError
415The Content-Type is not application/json (unsupported_media_type).PortalError
429Too many requests from this address or for this recipient (rate_limited).PortalError
500Unexpected failure (internal_error).PortalError
503A 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)​

FieldTypeRequiredDescription
handlePortalHandleYesAccess 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​

CodeDescriptionSchema
200Code sent.PortalOtpResponse
400The body is missing, malformed or lacks a required field, or the confirmation or the code is not valid.PortalError
403The request is cross-origin (cross_origin), the code is wrong (invalid_code) or receipt must be confirmed first (confirmation_required).PortalError
404The handle, the session or the attachment is forged, malformed or unknown; every case answers the same.PortalError
409The operation does not apply to this message (otp_unavailable or confirmation_not_required).PortalError
410The access period of the link or session has ended (expired).PortalError
413The body exceeds the allowed size (body_too_large).PortalError
415The Content-Type is not application/json (unsupported_media_type).PortalError
429Too many requests from this address or for this recipient (rate_limited).PortalError
500Unexpected failure (internal_error).PortalError
503A 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)​

FieldTypeRequiredDescription
handlePortalHandleYesAccess 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.
acknowledgedbooleanNotrue when the recipient clicked to confirm receipt (CLICK mode). Required unless code is sent.
codestringNoOne-time code e-mailed to the recipient (OTP mode).

Responses​

CodeDescriptionSchema
200Receipt confirmed; the session can download.PortalConfirmResponse
400The body is missing, malformed or lacks a required field, or the confirmation or the code is not valid.PortalError
403The request is cross-origin (cross_origin), the code is wrong (invalid_code) or receipt must be confirmed first (confirmation_required).PortalError
404The handle, the session or the attachment is forged, malformed or unknown; every case answers the same.PortalError
409The operation does not apply to this message (otp_unavailable or confirmation_not_required).PortalError
410The access period of the link or session has ended (expired).PortalError
413The body exceeds the allowed size (body_too_large).PortalError
415The Content-Type is not application/json (unsupported_media_type).PortalError
429Too many requests from this address or for this recipient (rate_limited).PortalError
500Unexpected failure (internal_error).PortalError
503A 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)​

FieldTypeRequiredDescription
sessionPortalSessionTokenYesShort-lived session issued by the portal; it only authorizes downloads of the same message.
indexintegerYesindex of the attachment to download, as listed in message.attachments.

Responses​

CodeDescriptionSchema
200Presigned download.PortalDownloadResponse
400The body is missing, malformed or lacks a required field, or the confirmation or the code is not valid.PortalError
403The request is cross-origin (cross_origin), the code is wrong (invalid_code) or receipt must be confirmed first (confirmation_required).PortalError
404The handle, the session or the attachment is forged, malformed or unknown; every case answers the same.PortalError
410The access period of the link or session has ended (expired).PortalError
413The body exceeds the allowed size (body_too_large).PortalError
415The Content-Type is not application/json (unsupported_media_type).PortalError
429Too many requests from this address or for this recipient (rate_limited).PortalError
500Unexpected failure (internal_error).PortalError
503A dependency is temporarily unavailable (unavailable), or the visit could not be recorded; nothing was confirmed. Retry after Retry-After seconds.PortalError