Skip to main content

Official SDKs

Posta provides official client libraries that cover the whole API, grouped by resource:

AreaCovers
Emailssend, templated and batch sends, preview, address verification, status, retry, list
Templatestemplates, versions, localizations, preview, send-test, import and export
CampaignsCRUD, send, pause, resume, cancel, duplicate, per-recipient messages, analytics
Subscribers and listsCRUD, members, segments, opt-ins and opt-outs, bulk import
Suppressions and bounceslist, add, remove, record
Sending infrastructuredomains and DNS verification, SMTP servers, SMTP relay credentials
Webhooksendpoints, delivery logs, and signature verification
Web formsforms, embed snippets, submissions, replies, spam filters
Inbound emaillist, get, retry, raw .eml, attachments
Analyticsvolume, delivery and bounce trends, provider breakdown, dashboard stats
Workspacesmembers, invitations, settings, SSO, audit log, data export and import, GDPR erasure
Account and platform adminprofile, 2FA, sessions, notifications; users, plans, shared servers, settings

Available SDKs​

LanguagePackageMin Version
Gogithub.com/goposta/posta-goGo 1.25+
Node.js@goposta/postaNode 18+
PythonpostaPython 3.8+
PHPgoposta/posta-phpPHP 8.1+
Javacom.github.goposta:posta-javaJava 11+
.NETPosta.NET 10+

Credentials​

Most machine-facing endpoints authenticate with an API key. Account-level endpoints (/users/me/*) and the platform admin surface accept only a user session token — an API key is never a valid credential there, whatever scopes it carries.

Workspace-scoped endpoints resolve the active workspace from the X-Posta-Workspace-Id header. A workspace-bound API key carries its workspace already; an account-wide key or a user session must name one.

API key scopes​

A key reaches only what its scopes allow:

ScopeGrants
sendsending, verification, and subscriber-list opt-ins
readreading emails, bounces, webhook deliveries, and workspace resources
writemutating workspace resources
webhooksmanaging webhook endpoints
admintenant administration: API keys, members, invitations, settings, SSO
*every scope

Note that send grants none of the others: a send-only key is confined to the public send API. A 403 from an endpoint you expect to work usually means a missing scope.

Error Handling​

All SDKs provide typed API errors that include:

  • HTTP status code — The response status (e.g., 400, 401, 429)
  • Error info — Structured error details with code and message fields

Response Envelope​

All API responses use a standard envelope:

{
"success": true,
"data": { ... }
}

Error responses:

{
"success": false,
"error": {
"code": "validation_error",
"message": "Invalid email address",
"error": "to[0]: invalid format"
}
}