API

API Overviewv1

Base URLs, auth, errors, and the request patterns you'll use everywhere.

Base URL

All API requests use:

text
https://api.sendlib.com

Base paths

SendLib serves the API under two equivalent prefixes:

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

Docs use /v1/... throughout.

Authentication

Use bearer tokens on every request.

bash
-H "Authorization: Bearer $SENDLIB_API_KEY"

API keys are scoped (permissioned). If you hit a 403, it usually means the key is valid but missing the required scope.

Idempotency

For POST requests that create resources, include an idempotency key.

bash
-H "Idempotency-Key: <uuid>"

Safe retries

If your network times out, re-send the same request with the same idempotency key.

Errors & request IDs

When something goes wrong, you'll get a JSON error body. Many deployments also include a request correlation id.

Next steps