SDK
SDK Overview
Official TypeScript/JavaScript client for the VertaaUX API
SDK Overview
The VertaaUX SDK is the official TypeScript/JavaScript client for integrating UX and accessibility auditing into your Node.js applications. It provides a type-safe, promise-based interface to all VertaaUX API functionality.
Quick Install
npm install @vertaaux/sdkKey Features
- Full TypeScript Support - Complete type definitions for all methods and responses
- Automatic Retries - Built-in retry logic with exponential backoff for transient failures
- Webhook Verification - Helper function for secure webhook signature validation
- Pagination Helpers - Auto-pagination for list endpoints
- Promise-based - Modern async/await API throughout
Quick Example
import { VertaaUX } from '@vertaaux/sdk';
// Initialize client
const client = new VertaaUX({
apiKey: process.env.VERTAA_API_KEY!,
});
// Create an audit
const job = await client.audits.create({
url: 'https://example.com',
mode: 'standard',
});
console.log('Audit started:', job.job_id);
// Poll for results
let result = await client.audits.get(job.job_id);
while (result.status === 'queued' || result.status === 'running') {
await new Promise((r) => setTimeout(r, 2000));
result = await client.audits.get(job.job_id);
}
if (result.status === 'completed') {
console.log('Overall score:', result.scores?.overall);
console.log('Issues found:', result.issues?.length);
}When to Use the SDK
| Use Case | Recommended Surface |
|---|---|
| Node.js/TypeScript applications | SDK |
| CI/CD pipelines, shell scripts | CLI |
| Custom integrations, non-JS languages | API |
| One-off audits, quick checks | CLI or Dashboard |
Choose the SDK when:
- Building Node.js applications that need programmatic audit access
- You want full TypeScript type safety
- You need automatic retry handling
- You're implementing webhook receivers
Documentation
Quickstart
Create your first audit in 5 minutes
Client Setup
Configuration options and initialization
Audit Methods
Create audits and poll for results
TypeScript Types
Complete type reference
Also Available
The same functionality is available through other surfaces:
Requirements
- Node.js 18 or later
- TypeScript 5.0+ (optional, for type checking)
Was this page helpful?