Most scheduling integrations take a week. This one takes five minutes.
Vennio exposes two endpoints that cover 90% of booking use cases: one to query open slots, one to create a booking. Here's how to wire them up.
You need:
To test without sending real emails or creating real calendar events, create a test key (vennio_sk_test_*) from the API keys page. All side effects are skipped — emails, webhooks, calendar sync — but the booking data is created and queryable.
npm install axios dotenv
Create a .env file:
VENNIO_API_KEY=vennio_sk_test_your_key_here
BUSINESS_ID=your-business-uuid
require('dotenv').config();
const axios = require('axios');
const vennio = axios.create({
baseURL: 'https://api.vennio.app',
headers: { Authorization: `Bearer ${process.env.VENNIO_API_KEY}` }
});
async function getAvailability() {
const from = new Date().toISOString();
const to = new Date(Date.now() + 7 * 24 * 60 * 60 * 1000).toISOString();
const { data } = await vennio.get('/v1/availability/slots', {
params: {
business_id: process.env.BUSINESS_ID,
duration_minutes: 30,
from,
to
}
});
console.log(`${data.total_slots} slots available`);
return data.slots;
}
duration_minutes is required. from and to default to now and 14 days out if omitted.
Pick a slot from the availability response and pass its start and end directly into the booking request:
async function createBooking(slot) {
const { data } = await vennio.post('/v1/bookings', {
business_id: process.env.BUSINESS_ID,
customer_email: 'jane@example.com',
customer_name: 'Jane Doe',
start_time: slot.start,
end_time: slot.end,
notes: 'Happy to connect'
});
console.log(`Booking created: ${data.booking.id}`);
return data.booking;
}
All five fields are required: business_id, customer_email, customer_name, start_time, end_time.
async function bookNextAvailable() {
const slots = await getAvailability();
if (!slots.length) {
console.log('No availability in the next 7 days');
return;
}
return createBooking(slots[0]);
}
bookNextAvailable();
Run it:
node index.js
With a test key, nothing fires. With a live key, Vennio sends confirmation emails to both parties, creates a calendar event, and fires a booking.created webhook.
Register a webhook to get notified when bookings are created:
await vennio.post('/v1/webhooks', {
url: 'https://yourapp.com/webhooks/vennio',
events: ['booking.created']
});
Your endpoint will receive a signed POST whenever a booking is made. Verify the X-Webhook-Signature header against your webhook secret to confirm authenticity.
That's the core integration. From here you can:
Full API reference and guides at docs.vennio.app.