On this page
Sender and signer pages¶
The signing server includes a sender dashboard, a workspace and a signer page. You can open them from your own application, or replace either side with your own interface. Start the local signing pilot first.
Open signing from the PressJet workspace¶
Visit http://127.0.0.1:8091/workspace in the pilot. After signing in to the project, select
Send for signature. The workspace and signing panel share the project's browser session.
A signed-in user can move between them without entering a key or opening a separate link.
An existing panel link can land in the workspace by setting the query parameter
next=workspace before its #login= fragment. Links without this parameter open the signing
panel directly.
Open the panel from your application¶
If people already sign in to your application, add a button that calls your backend.
After checking the current user's project access, your backend calls
POST /v1/signing/panel-links with the project's secret key. Redirect the browser to the
returned URL. The panel shows the project and asks the user to enter. The access link lasts
five minutes and can start one browser session. Its fragment carries the short-lived ticket.
If the preview opens the panel without its sign-in link, paste the full link or the code after
#login= into Sign-in link or code.
curl -sS -X POST http://127.0.0.1:8091/v1/signing/panel-links \
-H "Authorization: Bearer $PRESSJET_API_KEY"
The session lasts eight hours and the browser keeps it across reloads. The panel uses an
HttpOnly, SameSite cookie. Set PRESSJET_SIGNING_PANEL_ORIGIN to the exact HTTPS origin
when running behind a reverse proxy. The local pilot uses its bound loopback origin and supports HTTPS preview proxies that forward browser metadata or the panel's same-origin request header.
If you open the panel directly, entering a project key starts the same browser session.
Bring your own interface¶
A customer can host their own sender dashboard, signer page, or both. The signing API owns document preparation, recipient authorization, turn order, consent, receipts, retries and publication. Use the same endpoints for the built-in and custom experiences.
Sender dashboard¶
Call the sender endpoints from your backend with the project secret. Authenticate your users in your own application and grant them access to the corresponding PressJet project. Keep the key on the backend.
- List templates, then call
POST /v1/signing/revisionswith the template ID, template hash and the contract data. Reuse the sameIdempotency-Keyand request bytes on a retry. - Fetch the returned
pdfUrlthrough your backend for the sender to review. Show the returnedfieldson the preview if your UI displays field positions. - Create the envelope with the returned
revisionIdandpdfSha256, plus one recipient for each distinct role infields, in the returned order. The envelope status gives you the current turn, email status and final digests. For manual delivery, useinvitation.urlfor a custom page and the API-relativeinvitation.pathfor the built-in page.
Signer page¶
Set signerUi on the project grant. All keys for one project use the same URL. PressJet
stores the URL and its exact origin on the envelope when it is created. Invitations and
completion emails go to that page. Configure the URL with HTTPS for a hosted UI, or with HTTP
for local loopback testing. Set the URL to the signer page and omit the query string and fragment.
export PRESSJET_SIGNING_PROJECTS='{
"default": {
"project": "pilot",
"templates": ["servicio"],
"signerUi": "http://127.0.0.1:8092/"
}
}'
The invitation token is in the URL fragment. Read it in the browser and pass it as
Authorization: Bearer <token> on the signer endpoints. Fetch the original PDF and show the
consent wording returned by the API. On confirmation, submit the server-provided IDs and hash
with the signer's name and consent. For a rejection send action: "decline", consent: false
and null for the name and consent version. The prior acceptance ID, when provided, identifies
the earlier receipt that the signer saw.
const token = location.hash.slice(1);
const headers = { Authorization: `Bearer ${token}` };
const api = "http://127.0.0.1:8091/v1/signing/invitation";
const review = await (await fetch(api, { headers, credentials: "omit" })).json();
// Send this only after the signer has reviewed the PDF and expressly confirmed.
const decision = {
action: "accept",
revisionId: review.revisionId,
pdfSha256: review.pdfSha256,
priorAcceptanceId: review.priorAcceptance?.receiptId ?? null,
name: signerName,
consent: true,
consentVersion: review.consentVersion
};
if (review.fields.some((field) => field.role === review.role && field.mark === "initials")) {
decision.initials = signerInitials;
}
const receipt = await fetch(api, {
method: "POST",
headers: { ...headers, "Content-Type": "application/json" },
body: JSON.stringify(decision),
credentials: "omit"
});
The signer API allows browser requests from the configured origin and checks it against the
envelope. Use the same bearer for /original, /pdf and /evidence. Poll the invitation
status or offer refresh until it is available. Keep the token out of application logs and
third-party scripts. Sender endpoints are intended for server calls.
The sample signer UI runs on a separate origin and points to the pilot API on port 8091.
From the repository root, start it and create a new envelope using the config above. For a
different API origin, set the API URL in the example script and its connect-src in the HTML.
The sample's layout and browser logic belong to the client. All authority comes from the API.
python3 -m http.server 8092 --bind 127.0.0.1 --directory examples/signing/custom-ui