Introduction
Welcome to the SendLiberty documentation. Learn how to connect your Gmail via OAuth and send transactional emails using our REST API.
What is SendLiberty?
SendLiberty removes the friction of configuring ancient SMTP ports, storing risky App Passwords, and managing strict firewall rules. By using secure Google Workspace OAuth2 flows, you grant SendLiberty temporary, revokable access to relay messages securely through your own connected Gmail accounts.
Secure by Default
We never see your Google password. You use a standard Bearer API key to authorize request calls.
API-First Design
Send transactional emails instantly from any cloud platform (Railway, Render) with a single HTTP POST request.
Basic Usage
To send an email, make a secure HTTP POST request containing your API Key in the headers and the email details in the JSON body. You can authenticate using the standard Authorization: Bearer YOUR_API_KEY header, or the custom x-api-key: YOUR_API_KEY header.
curl -X POST https://api.sendliberty.com/api/send \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"from": "sender@gmail.com",
"to": "recipient@example.com",
"subject": "Welcome aboard!",
"html": "<p>Sent via SendLiberty REST API.</p>",
"replyTo": "support@yourdomain.com",
"cc": "anotheruser@example.com",
"bcc": ["audit@example.com"],
"attachments": [
{ "filename": "invoice.pdf", "content": "JVBERi0xLjQKJ..." }
]
}'