SDKs

Client libraries

Thin clients over the same REST API, in the languages people actually integrate from. Each one handles the parts that are tedious to get right: idempotency on writes, retries only where the server asked for one, cursor paging, and one error type carrying a code you can branch on.

Pick a language

All four are written, tested against the same API description, and behave the same way. Go and Node are published; Python and .NET install from the repository until they are.

Choose a language

Go

available

Install

go get github.com/verusuite/veruapis-sdk/[email protected]

Then

api := veruapis.New(os.Getenv("VERUAPIS_KEY"))

folders, err := api.Mail.ListFolders(ctx)
if err != nil {
    var apiErr *veruapis.Error
    if errors.As(err, &apiErr) && apiErr.IsPermissionProblem() {
        log.Fatalf("this key is missing %s", apiErr.Code)
    }
}

for msg, err := range api.Mail.Messages(ctx, veruapis.ListMessagesOptions{
    FolderID: []string{folders[0].ID},
}) {
    if err != nil {
        return err
    }
    fmt.Println(msg.Subject)
}

Needs Go 1.23 or later.

TypeScript and JavaScript

available

Install

npm install @verusuite/api

Then

const api = new VeruApi({ apiKey: process.env.VERUAPIS_KEY });

const folders = await api.mail.listFolders();

for await (const message of api.mail.messages({ folder_id: folders[0].id })) {
  console.log(message.subject);
}

await api.mail.send({
  to: ["[email protected]"],
  subject: "Nightly report",
  text: "All green.",
});

Needs Node 18 or later.

Python

soon

Written and tested, but not on PyPI yet, so there is no pip install that works today. Clone the repository and install the python/ directory. It publishes as veruapis.

Then

api = VeruApi(api_key=os.environ["VERUAPIS_KEY"])

for folder in api.mail.list_folders():
    print(folder.name, folder.unread_count)

api.mail.send(
    to=["[email protected]"],
    subject="Nightly report",
    text="All green.",
)

Needs Python 3.9 or later, and nothing else.

C#

soon

Written and tested, but not on NuGet yet, so there is no dotnet add package that works today. Clone the repository and reference the project. It publishes as VeruSuite.Api.

Then

var api = new VeruApiClient(Environment.GetEnvironmentVariable("VERUAPIS_KEY"));

var folders = await api.Mail.ListFoldersAsync();

await api.Mail.SendAsync(new SendMessage {
    To = ["[email protected]"],
    Subject = "Nightly report",
    Text = "All green.",
});

Needs the .NET 8 SDK or later, and no packages.

How these are built

Every client derives from one OpenAPI description, and that description is generated from the server's own routing and permission tables rather than maintained by hand.

The description cannot lie

It is built from the tables that route and gate requests, so it cannot describe an endpoint the server does not serve. A specification maintained by hand goes stale quietly, and the first to find out is somebody whose working code stops matching the documentation.

The clients are written, not generated

A generator produces types you reach through rather than types you use. These expose named types and methods like listFolders. The cost of writing by hand is drift, so each client has a check that fails its build if it calls a route the API does not serve.

The same behaviour everywhere

Every client sends an idempotency key on writes, retries only 429, 408 and 5xx, honours Retry-After, and never retries a refusal that would fail the same way again. Moving between languages should not mean relearning the failure modes.

Any other language

There is nothing to wait for. The API is HTTP and JSON with bearer authentication, and a request is one call in anything that can make one.

curl https://api.veruapis.com/v1/folders \
  -H "Authorization: Bearer vak_live_..."

The full description, which most tooling can read directly, is openapi.yaml.

Start with a key

A key takes a minute to create, carries only the permissions you tick, and can be revoked from the same screen.