Your first completed session
Create a session, deliver the right signing link, follow its progress, and retrieve the completed documents.
Before you start
Choose a configured test account and a workflow your account supports. This example uses remote online notarization with BlueNotary network routing.
- Keep the API key on your server.
- Confirm network routing, invitation delivery, and the intended open-call trigger.
- Use synthetic participant details and a sample PDF in the approved test environment.
- Configure a webhook receiver before relying on automatic completion updates.
A created session is not yet an assigned notary, a delivered invitation, or a completed document. Observe each stage separately.
1. Prepare your request
Use ron for signing_type and gnw for the general-notary-work session category. The example adds a PDF from the server filesystem; no external Base64 converter is needed.
import { readFile } from 'node:fs/promises';
const pdf = await readFile('./agreement.pdf');
const payload = {
notarization_id: 'order-1042',
signing_type: 'ron',
session_type: 'gnw',
notarization_timing_type: 'notarize_now',
all_signers: [{
first_name: 'Sam', last_name: 'Signer',
email: 'sam@example.com'
}],
session_documents: [{
name: 'agreement.pdf',
base64Doc: pdf.toString('base64')
}]
};2. Create the session
Make the call from your backend. Set BN_API_BASE_URL to the base URL approved for your account and testing plan. Inspect the HTTP status and response body together.
const response = await fetch(
`${process.env.BN_API_BASE_URL}/sessions`,
{
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.BN_API_KEY}`,
'Content-Type': 'application/json'
},
body: JSON.stringify(payload)
}
);
const result = await response.json();
if (!response.ok) {
throw new Error(result.response_message || 'Create failed');
}
// Persist result.bn_session_id with your order reference.3. Give each participant their link
For ordinary separate-device RON, map each signing_urls entry using its signer_index. These URLs grant access to a particular participant. Deliver them privately and keep them out of analytics and routine logs.
{
"response": "Pass",
"response_message": "Session created successfully",
"notarization_id": "order-1042",
"bn_session_id": "67af8e4d1dfa453d2a05b24e",
"signing_urls": [
{
"signer_index": 0,
"bn_signing_url": "REDACTED_RELATIVE_URL",
"full_signing_url": "REDACTED_PARTICIPANT_URL"
}
],
"witnessess_signing_urls": []
}IPEN and shared-device workflows have different access semantics. Do not assume the first returned link always belongs to the first signer.
4. Follow the session
Handle the events relevant to your workflow. Use GET session when you need to reconcile state after a delayed or failed delivery.
- open_call_accepted
A notary has accepted the open call.
- session_started
The live session has started.
- session_completed_clicked
Completion was requested and document processing starts.
- session_completed
Final completion has been reached. Process the selected document delivery channel.
5. Retrieve signed PDFs
Call GET /sessions/{bn_session_id}/signed_documents using the BlueNotary session ID. The response contains Base64 content. An early request can return an empty array; use readiness events and bounded reconciliation.
{
"final_documents": [
{
"name": "signed-agreement.pdf",
"base64Doc": "BASE64_PDF_CONTENT",
"initial_document_name": "agreement.pdf"
}
]
}Verify creation, assignment, participant access, completion, and final-file retrieval together before extending the workflow.
Choose the next capability
Keep the first integration small. Add scheduling, your own notaries, templates, witnesses, or staged eSign only when your use case needs them.
- Schedule with an explicit ISO timestamp and timezone offset.
- Assign a named team notary after confirming linkage and eligibility.
- Use the integration builder to produce a tailored request and checklist.