Skip to main content

Quick Start

Get your first NotaryCam transaction running in 5 minutes.

What You Need

  • API Credentials
  • Node.js 18+ installed (or Python 3.8+ or .NET 6+)
  • 5 minutes

1-Minute Setup

Install Client

npm install axios

Set Environment Variables

Create a .env file:

NOTARYCAM_PARTNER_ID=your-partner-id
NOTARYCAM_API_KEY=your-api-key
NOTARYCAM_API_SECRET=your-api-secret
NOTARYCAM_DEPARTMENT_ID=your-department-id # Required
NOTARYCAM_WORKFLOW_ID=your-workflow-id # Optional

** Tip:** You only need DEPARTMENT_ID - the system will automatically assign a default WORKFLOW_ID if not specified.

5-Minute Implementation

Copy & Run This Code

const axios = require('axios');
const FormData = require('form-data');
const fs = require('fs');
require('dotenv').config();

const BASE_URL = '{BASE_URL}';

async function quickStart() {
try {
// 1. Authenticate
const auth = await axios.post(`${BASE_URL}/api/v4/authorize/`, {
partnerId: process.env.NOTARYCAM_PARTNER_ID,
apiKey: process.env.NOTARYCAM_API_KEY,
apiSecret: process.env.NOTARYCAM_API_SECRET
}, {
headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
});

const token = auth.data.token;
const headers = {
'Authorization': `Bearer ${token}`,
'Content-Type': 'application/json'
};

// 2. Create User
const user = await axios.post(`${BASE_URL}/api/v4/users`, {
departments: [process.env.NOTARYCAM_DEPARTMENT_ID],
email: 'test@example.com',
firstName: 'Test',
lastName: 'User',
phone: '+15551234567'
}, { headers });

// 3. Create Transaction
const transaction = await axios.post(`${BASE_URL}/api/v4/transactions/`, {
department: process.env.NOTARYCAM_DEPARTMENT_ID, // Required
participants: [{ user: user.data.user._id, role: 'signer' }],
workflow: process.env.NOTARYCAM_WORKFLOW_ID // Optional
}, { headers });

const txId = transaction.data.transaction._id;

// 4. Upload Document
const form = new FormData();
form.append('documents', fs.createReadStream('./test.pdf'));
form.append('documentData', JSON.stringify([
{ fileName: 'test.pdf', type: 'notarize' }
]));
await axios.post(
`${BASE_URL}/api/v4/transactions/${txId}/documents`,
form,
{ headers: { 'Authorization': `Bearer ${token}`, ...form.getHeaders() } }
);

// 5. Activate
await axios.put(`${BASE_URL}/api/v4/transactions/${txId}/activate`, {}, { headers });

console.log(' Success! Transaction ID:', txId);
console.log('Room URL:', transaction.data.transaction.participants[0].roomURL);

} catch (error) {
console.error(' Error:', error.response?.data || error.message);
}
}

quickStart();

What Just Happened?

You just:

  1. Authenticated with the API
  2. Created a test user
  3. Created a transaction
  4. Uploaded a test document
  5. Activated the transaction

Total time: ~5 seconds
API calls: 5

Next Steps

Now that you've seen it work, learn how each step works in detail:

Deep Dive

Production Ready

Troubleshooting

Error running the code?

  • Verify your .env file has all required variables

401 Unauthorized?

  • Double-check your API credentials
  • Verify Partner ID matches API Key and Secret
  • Try sandbox environment first

Need help?