Create the service
Get a form
Retrieve a form’s metadata, field schema, and rendered HTML/CSS:
The Promise rejects with a 404 error if the form UUID is invalid.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Retrieve Paubox Form schemas and submit form responses using the Node.js SDK.
const pbMail = require('paubox-node');
const formsService = pbMail.formService();
const form = await formsService.getForm('your-form-uuid');
console.log('Title:', form.title);
console.log('HTML:', form.form_html);
| Field | Description |
|---|---|
title | Display name of the form |
form_json | Parsed field schema |
form_html | Rendered HTML for embedding |
form_css | Associated stylesheet |
active | Whether the form is accepting submissions |
submission_count | Number of submissions received |
await formsService.submitForm('your-form-uuid', {
first_name: 'Jane',
last_name: 'Smith',
email: 'jane@example.com'
});
// Resolves to null on success (HTTP 201)
const fs = require('fs');
const attachments = [
{
name: 'consent.pdf',
content: fs.readFileSync('consent.pdf').toString('base64')
}
];
await formsService.submitForm(
'your-form-uuid',
{ first_name: 'Jane' },
attachments
);
| Field | Description |
|---|---|
name | File name including extension |
content | Base64-encoded file content |
try {
const form = await formsService.getForm('your-form-uuid');
await formsService.submitForm('your-form-uuid', formData);
} catch (err) {
console.error('Forms error:', err.message);
}