| Language | Package | Version | Requires | Dependencies |
|---|---|---|---|---|
| Node and Bun | @deveryidea/voaaro | 0.6.0 | Node 18 or later, Bun | none (native fetch); ESM and CommonJS, TypeScript types |
| Python | voaaro | 0.4.0 | Python 3.9 or later | none (standard library), typed |
| PHP | deveryidea/voaaro | 0.4.0 | PHP 8.1 or later | none required (ext-curl recommended, or a PSR-18 client) |
| Go | github.com/deveryidea/voaaro-go | 0.4.0 | Go 1.21 or later | none (standard library) |
All four are under the MIT license.
What they cover
The four SDKs cover the same API; only the names follow each language's usage (camelCase in Node and PHP, snake_case in Python, PascalCase in Go).
| Node | Python | PHP | Go | |
|---|---|---|---|---|
| emails: sending, batches, reading, listing, scheduling, canceling, sharing, statistics | yes | yes | yes | yes |
| attachments of sent emails, received emails | yes | yes | yes | yes |
| sending event log | yes | yes | yes | yes |
| API keys, domains | yes | yes | yes | yes |
| suppression list | yes | yes | yes | yes |
| contacts, segments (dynamic included), audiences, topics, properties, broadcasts, imports | yes | yes | yes | yes |
| newsletters: settings, overview, forms, statistics, A/B testing, templates, automations, events, cleanup | yes | yes | yes | yes |
| webhooks managed through the API: endpoints, rotation, test, deliveries, replay | yes | yes | yes | yes |
| webhook verification, with several secrets | yes | yes | yes | yes |
subscribing and unsubscribing from the server and the browser (PublicForm, proof of work), campaign scheduling | yes | yes | yes | yes |
organizations (operator key mko_…) | yes | yes | yes | yes |
Common configuration
All four read VOAARO_API_KEY and VOAARO_BASE_URL from the environment if you do not pass them. Always give your instance's address (https://mail.example.com, with or without /api/v1): there is no central API.
Retries and idempotency
The four SDKs retry on their own a request that failed for a transient reason, twice by default:
- after a network error, a
429 rate_limit_exceeded(600 requests per minute) or a 500, 502, 503 or 504 response; - never after
429 daily_quota_exceeded(the quota does not come back for hours) nor after another4xxerror: fix the request; - wait: the
Retry-Afterheader if given (60 seconds at most), otherwise 0.5 s, 1 s, 2 s… with some jitter, 8 seconds at most.
Each creation (POST) accepts an idempotency key. Without one, the SDK draws one (a UUID) for each POST, the same from one attempt to the next: a retry after a dropped connection never creates two objects (idempotency). Turning retries off (maxRetries: 0, or its equivalent) also turns off this automatic key.
| Number of retries | Idempotency key | |
|---|---|---|
| Node | new Voaaro(key, { maxRetries: 2 }) | { idempotencyKey } as the last argument |
| Python | Voaaro(..., max_retries=2) or voaaro.max_retries | {"idempotency_key": …} as the last argument |
| PHP | Voaaro::client(..., maxRetries: 2) | option ['idempotencyKey' => …] |
| Go | voaaro.WithMaxRetries(2) | IdempotencyKey field, or voaaro.WithIdempotencyKey(ctx, key) |
Pagination
Each cursor list has an iterator that asks for pages of 100 (or the limit given) and follows after as long as has_more is true, one page at a time. The list's filters apply to each page; the walk goes from newest to oldest (pagination).
| Iterator | |
|---|---|
| Node | for await (const c of voaaro.contacts.iterate(params)); iterateEvents, iterateRecipients, iterateSignups, iterateRuns; voaaro.paginate(…) for any list |
| Python | for c in voaaro.Contacts.list_all(params); events_all, recipients_all, signups_all, runs_all, list_contacts_all |
| PHP | foreach ($voaaro->contacts->all($options) as $c); allEvents, allSignups, allRuns, allContacts; $voaaro->paginate('/path', $filters) |
| Go | it := client.Contacts.ListAll(ctx, opts) then it.Next(), it.Current(), it.Err() (type Iter[T]); EventsAll, RecipientsAll, SignupsAll, RunsAll, ListContactsAll |
Errors, in each language's style
- Node: each call returns
{ data, error }and never throws for an API error;erroris{ name, message, statusCode }(statusCodeisnullfor a network error), withretryAfterwhen the service gaveRetry-After. Only the iterators throw, aVoaaroApiError. - Python: typed exceptions, all subclasses of
voaaro.VoaaroError(ValidationError,RateLimitError…), withretry_after. - PHP: exceptions that subclass
Voaaro\Exceptions\ErrorException, withgetErrorName(),getStatusCode()andgetRetryAfter(). - Go:
erris a*voaaro.Error(StatusCode,Name,Message,RetryAfter) to read witherrors.As, or to compare witherrors.Is(voaaro.ErrRateLimit,ErrNotFound…).
The error names are those of the API (Errors). The error returned is the last attempt's, once the retries are exhausted.