API

Accountv1

Introspect the current tenant and manage API keys and SMTP credentials.

Overview

These endpoints are tenant-scoped and operate on the authenticated tenant.

Endpoints

GET Request
Bearer
GET/v1/me

Get tenant identity and current API key scopes.

POST Request
Bearer
POST/v1/api-keys

Create a new API key (returned once).

GET Request
Bearer
GET/v1/smtp-credentials

List SMTP credentials.

POST Request
Bearer
POST/v1/smtp-credentials

Create an SMTP credential.

POST Request
Bearer
POST/v1/smtp-credentials/ensure

Ensure an SMTP credential exists (idempotent).

Authentication & scopes

  • GET /v1/me: any valid key
  • Creating keys: manage:api-keys
  • SMTP credentials: manage:smtp-credentials

Get current tenant (example)

bash
curl -sS https://api.sendlib.com/v1/me \
  -H "Authorization: Bearer $SENDLIB_API_KEY"

Create an API key (example)

bash
curl -sS -X POST https://api.sendlib.com/v1/api-keys \
  -H "Authorization: Bearer $SENDLIB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"prod-sender","scopes":["send:transmissions"]}'

Raw keys are returned once

Store newly created API keys in a secure secret store. You typically can't retrieve the raw key again.

Next