No SDK required
AvenoLink is a plain REST API, so you can use it from any language that makes HTTP requests. There is nothing to install and nothing to keep up to date. Helper libraries do the same thing with less typing, but they never do anything the raw API cannot.
- Every code sample in the docs is plain HTTP, so it works as written.
- You choose your own HTTP client, so there are no dependency clashes.
- Moving between languages is easy because the requests are identical.
Supported languages
We publish working examples for all of these languages, with the exact headers and request body.
| Language | Requirements |
|---|---|
| cURL | Any terminal |
| JavaScript | Node.js 18+ or any modern browser |
| Python | Python 3.8+ with requests |
| PHP | PHP 7.4+ with cURL |
| Java | Java 15+ |
| C# | .NET 7+ |
| C++ | C++11 with libcurl |
| Go | Go 1.18+ |
| Rust | Rust with reqwest and tokio |
| Swift | Swift 5.7+ |
| Kotlin | Kotlin on JVM 11+ |
Starter wrapper: JavaScript
A small wrapper keeps your key and host in one place and gives the rest of your code a single function to call.
avenolink.js
const HOST = process.env.AVENOLINK_API_HOST ?? "https://api.avenolink.com";
export async function send(channel, apiKey, body) {
const res = await fetch(`${HOST}/api/v1/send/${channel}`, {
method: "POST",
headers: {
"x-api-key": apiKey,
"Content-Type": "application/json",
},
body: JSON.stringify(body),
});
const data = await res.json();
if (!res.ok) throw new Error(data.message ?? "Request failed");
return data;
}
// Usage
await send("sms", process.env.AVENOLINK_SMS_KEY, {
recipients: ["265XXXXXXXXX"],
sender_id: "AVENOLINK",
message: "Your verification code is 482913.",
});Starter wrapper: Python
avenolink.py
import os
import requests
HOST = os.environ.get("AVENOLINK_API_HOST", "https://api.avenolink.com")
def send(channel, api_key, body):
res = requests.post(
f"{HOST}/api/v1/send/{channel}",
json=body,
headers={"x-api-key": api_key},
timeout=15,
)
res.raise_for_status()
return res.json()
# Usage
send("sms", os.environ["AVENOLINK_SMS_KEY"], {
"recipients": ["265XXXXXXXXX"],
"sender_id": "AVENOLINK",
"message": "Your verification code is 482913.",
})Good habits for any language
- Set a request timeout so a slow network never freezes your app.
- Retry
429and5xxresponses with a growing delay, and do not retry400or401. - Read keys and the host from environment variables.
- Log the
batch_idof every send to make support and reconciliation easy. - Keep API calls on your server, never in client-side code.