Skip to main content

Quickstart

Make your first Vetrol API call in under 5 minutes. This quickstart walks you through installing an SDK and sending your first message.

Prerequisites

1. Install the SDK

npm install vetrol

2. Send your first message

send-message.js
const vetrol = require('vetrol');

const client = new vetrol.Client(
process.env.VETROL_ACCOUNT_SID,
process.env.VETROL_AUTH_TOKEN
);

async function main() {
const message = await client.messages.create({
to: '+1234567890',
from: '+0987654321',
body: 'Hello from Vetrol! 👋',
});

console.log(`Message sent! SID: ${message.sid}`);
}

main();

3. Check the response

A successful request returns a 201 Created response with the message resource:

{
"sid": "MSxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"status": "queued",
"to": "+1234567890",
"from": "+0987654321",
"body": "Hello from Vetrol! 👋",
"created_at": "2026-03-13T17:00:00Z",
"price": null,
"price_unit": "USD"
}

Next steps