SDKs Overview
sevk ships official SDKs for eight languages with aligned resources and API coverage.
Languages
Each SDK is published to the native package registry for its ecosystem. Pick your language:
- Node.js / Bun:
sevkon npm (docs) - Python:
sevkon PyPI (docs) - PHP:
sevk/sevk-phpon Packagist (docs) - Ruby:
sevkon RubyGems (docs) - Go:
github.com/sevk-io/sevk-go(docs) - Rust:
sevkon crates.io (docs) - Java:
io.sevk:sevk-javaon Maven Central (docs) - .NET:
Sevkon NuGet (docs)
Install
npm install sevk
pip install sevk
composer require sevk/sevk-php
gem install sevk
go get github.com/sevk-io/sevk-go
cargo add sevk
<dependency><groupId>io.sevk</groupId><artifactId>sevk-java</artifactId><version>1.1.0</version></dependency>
dotnet add package Sevk
Initialize
Every SDK requires your API key. Grab one from the sevk dashboard under API Keys. The key is always passed explicitly; no SDK reads it from the environment.
import { Sevk } from 'sevk'const sevk = new Sevk('sevk_full_xxxxxxxx')
from sevk import Sevksevk = Sevk("sevk_full_xxxxxxxx")
sevk := sevk.New("sevk_full_xxxxxxxx")
Resources
Every SDK covers the same resources. Method names and casing follow each language's conventions.
sevk.emails: send, get, update, cancel, sendBulksevk.contacts: create, get, update, delete, list, bulkImport (bulk_importin Python/Ruby,BulkImportin Go/.NET), bulkUpdate, activitysevk.audiences: create, get, update, delete, list, addContacts, listContacts, removeContactsevk.broadcasts: list, get, create, update, delete, send, cancel, test, analytics, status, emails, estimateRecipients, estimateCost, activesevk.domains: list, get, create, update, delete, verify, verifyInbound, dnsRecords, regionssevk.templates: list, get, create, update, delete, duplicatesevk.topics: scoped to an audiencesevk.segments: scoped to an audience, preview before savingsevk.subscriptions: subscribe, unsubscribesevk.webhooks: list, get, create, update, delete, test, eventssevk.inbound: list, get, downloadAttachment, routes, blocklist, quota, securitysevk.outbound: getQuota, updateQuota, pause, resetsevk.activity: list, statssevk.usage: get
Your First Send
import { Sevk } from 'sevk'const sevk = new Sevk(process.env.SEVK_API_KEY!)const { id } = await sevk.emails.send({subject: 'First send',text: 'It worked.'})console.log(id)
import osfrom sevk import Sevksevk = Sevk(os.environ["SEVK_API_KEY"])email = sevk.emails.send({"subject": "First send","text": "It worked.",})print(email["id"])
Scheduled Email
All eight SDKs support scheduled transactional email through the single-send method, followed by reschedule or cancel operations on the returned email id. The timestamp must include a timezone, be in the future, and be no more than 30 days ahead. Attachments and bulk scheduling are not supported. Quota and balance are reserved at acceptance and released on cancellation.
| Name | Type | Description |
|---|---|---|
Node.js / PHP / Java | scheduledAt | RFC 3339 string on the single-send request. |
Python / Ruby / Rust | scheduled_at | RFC 3339 string; serialized as scheduledAt. |
Go | ScheduledAt | *string on SendEmailParams. |
.NET | ScheduledAt | string on SendEmailRequest. |
See the Node.js and Python lifecycle examples, plus the reschedule and cancel references. Changes are rejected after provider delivery starts. For safe send retries, persist the schedule with the payload and reuse the original idempotency key.
Errors
API failures, local request validation, and connection failures use each language's SDK error type. Catch that base type to handle request failures in one place. Use the machine code to distinguish validation, timeout, and connection errors.
Local validation uses VALIDATION_ERROR; timeouts use TIMEOUT, and connection failures use NETWORK_ERROR. Local validation sends no HTTP request. The status is 0 when unavailable, or None in Rust. API responses retain their actual HTTP status and any field details or retry delay supplied by the server.
import { SevkError, RateLimitError } from 'sevk'try {await sevk.emails.send({ /* ... */ })} catch (err) {if (!(err instanceof SevkError)) {throw err}console.error(err.code, err.statusCode, err.message, err.fields)if (err instanceof RateLimitError) {console.error(err.retryAfter)}}
Types
Node/TypeScript ships typings in the package. Go, Rust, Java and .NET are statically typed.