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
- A Vetrol account
- Your Account SID and Auth Token
- Node.js 18+ (or your preferred language runtime)
1. Install the SDK
- Node.js
- Python
- Ruby
- PHP
npm install vetrol
pip install vetrol
gem install vetrol
composer require vetrol/sdk
2. Send your first message
- Node.js
- Python
- cURL
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();
send_message.py
import os
from vetrol import Client
client = Client(
os.environ['VETROL_ACCOUNT_SID'],
os.environ['VETROL_AUTH_TOKEN']
)
message = client.messages.create(
to='+1234567890',
from_='+0987654321',
body='Hello from Vetrol! 👋'
)
print(f'Message sent! SID: {message.sid}')
curl -X POST https://api.vetrol.io/v1/messages \
-u "$VETROL_ACCOUNT_SID:$VETROL_AUTH_TOKEN" \
-d "To=+1234567890" \
-d "From=+0987654321" \
-d "Body=Hello from Vetrol! 👋"
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
- Explore the Messaging API for full capabilities
- Set up Webhooks to receive delivery status updates
- Learn about Error handling
- Browse Guides for common integration patterns