API Reference

API Reference

The MailBlastr REST API: base URL, authentication, content type, idempotency, rate limits, and error format.

The MailBlastr API is organized around REST. It has predictable, resource-oriented URLs, accepts JSON request bodies, returns JSON responses, and uses standard HTTP response codes and verbs.

Base URL

https://api.mailblastr.com

All requests are made over HTTPS. The resources are mounted at the root: /emails, /domains, /audiences, /campaigns, /api-keys.

Authentication

Authenticate with your API key as a Bearer token on every request. See Authentication.

Authorization: Bearer mb_xxxxxxxxx

Official SDKs

Every endpoint in this reference shows examples for each official package — pick your language from the tabs on any request sample.

LanguagePackageInstall
Node.jsmailblastrnpm install mailblastr
Rubymailblastrgem install mailblastr
PHPmailblastr/mailblastrcomposer require mailblastr/mailblastr
Pythonmailblastrpip install mailblastr
Gomailblastr-gogo get github.com/shekhu10/mailblastr-sdks/mailblastr-go
Rustmailblastrcargo add mailblastr
Javacom.mailblastr:mailblastrMaven / Gradle
.NETMailblastrdotnet add package Mailblastr
CLImailblastr-clinpm install -g mailblastr-cli

Content type

Send request bodies as JSON with Content-Type: application/json. Responses are always JSON.

User-Agent

All API requests must include a User-Agent header. Requests without it are rejected with a 403 status code. If you are making direct HTTP requests, set it explicitly:

User-Agent: my-app/1.0
If you get a 403 despite a valid API key, a missing User-Agent header is the likely cause.

Response codes

MailBlastr uses standard HTTP codes: 2xx for success, 4xx for user-related failures, and 5xx for infrastructure issues.

StatusDescription
200Successful request.
400Check that the parameters were correct.
401The API key used was missing.
403The API key used was invalid.
404The resource was not found.
429The rate limit was exceeded.
5xxIndicates an error with MailBlastr servers.

Versioning

There is currently no versioning system in place. Versioning via calendar-based headers is planned for the future.

Pagination

Some list endpoints support cursor-based pagination to browse large datasets efficiently.

Idempotency

Mutating endpoints accept an optional Idempotency-Key header so a retried request is not processed twice. See Idempotency keys.

Idempotency-Key: <your-unique-key>

Rate limits

The send endpoints (POST /emails and the transactional send API) are rate-limited per client IP to blunt bursts. When you exceed the send rate the response is a 429 rate_limit_exceeded — read the ratelimit-* and retry-after headers and back off accordingly. Other endpoints are not subject to this per-request cap; sustained volume is governed by your account quotas instead (see Usage limits).

Errors

Errors use standard HTTP status codes and a consistent JSON body. See the full error reference.

{
  "statusCode": 422,
  "name": "validation_error",
  "message": "`to` must contain between 1 and 50 recipients."
}