API

Environmentsv1

Base URLs, versioning, and environment-specific settings.

Base URL

All API requests are served from:

text
https://api.sendlib.com

Base paths

SendLib supports two equivalent prefixes:

  • Primary: /v1/...
  • Alias: /api/v1/...

Docs use /v1/... throughout.

Versioning

Paths are versioned via the URL prefix (e.g. /v1).

Avoid hardcoding full URLs everywhere

Prefer a single configurable base URL in your app (e.g. SENDLIB_BASE_URL) so you can switch environments without code changes.

Timeouts & retries

  • Use client-side timeouts for every request.
  • Retry only when it's safe:
    • GET requests are usually safe to retry.
    • POST requests should be retried only with Idempotency.

Common gotchas

  • 401 usually means missing/invalid API key.
  • 403 usually means missing scope.
  • 502 can happen when an upstream sender/ingest path is unavailable; retry with backoff.