Engineering guide · Security

Telephony And Email Delivery Providers

Status: currentReviewed: 2026-07-26Audience: API developers, notification-service developers, security engineers, identity operators
On this pageEndpoint SummaryLifecycle And Independent ApprovalConfigure TelephonyConfigure SMTPActivate And Select A PrimarySecret And Network BoundariesRuntime Routing And Failure SemanticsSigned Asynchronous ReceiptsErrorsDocker Acceptance

Atlas provides one tenant-scoped delivery authority behind two developer-friendly management facades:

/api/v1/telephony/providers
/api/v1/email-servers

The first facade manages SMS and voice providers. The second manages SMTP servers with basic SMTP, OAuth 2.0 client credentials, or OAuth 2.0 JWT bearer authentication. Both use the same durable lifecycle, replay protection, credential boundary, evidence model, and runtime failover implementation. Atlas invitations and approval-notification email paths use this authority.

Endpoint Summary

Path Method Purpose

/api/v1/telephony/providers

GET, POST

List providers or create an inactive telephony provider.

/api/v1/email-servers

GET, POST

List servers or create an inactive email provider.

/{providerId}

GET, PUT, DELETE

Read, replace an inactive configuration, or retire an inactive provider.

/{providerId}/test

POST

Perform a real SMS, voice, or email delivery probe.

/{providerId}/lifecycle/activate

POST

Independently approve a recently probed provider.

/{providerId}/lifecycle/deactivate

POST

Stop routing new deliveries to a provider.

/{providerId}/primary

POST

Select an active provider as the primary.

/{providerId}/credentials/rotate

POST

Advance the credential generation and force revalidation.

/api/v1/delivery-providers/events

GET

Read verified provider lifecycle evidence.

/api/v1/delivery-operations

GET

Read privacy-preserving delivery results.

/api/v1/delivery-operations/{deliveryId}/receipts

GET

Read an HMAC-verified asynchronous receipt chain.

/api/v1/delivery-receipts/{tenantId}/{providerId}

POST

Ingest an mTLS- or HMAC-authenticated provider receipt.

All mutations require an Idempotency-Key. Mutations of an existing provider also require its strong ETag, such as If-Match: "v3". An exact replay returns Idempotent-Replay: true; reuse of a key by another actor or for different request content returns 409.

The required Atlas capabilities are:

Capability Minimum assurance Operations

notifications.providers.read

Fresh AAL2

Provider and verified evidence reads.

notifications.providers.manage

Fresh AAL2

Create, update, and run a delivery probe.

notifications.providers.activate

Fresh phishing-resistant AAL3

Activate, deactivate, select a primary, rotate, and retire.

Lifecycle And Independent Approval

The provider state machine is:

create -> INACTIVE -> successful real probe -> independent activation -> ACTIVE
                    ^                                      |
                    |                                      v
                    +------ credential rotation <- deactivation

INACTIVE -> retirement -> RETIRED

Creation can never make a provider active. A successful probe is bound to the provider version and credential generation. Activation requires a different actor from the actor who configured the provider, fresh phishing-resistant AAL3, the activation capability, an exact ETag, and a recent successful probe. These requirements are enforced by both the domain service and PostgreSQL transition guards.

Atlas supports at most three independently active providers per tenant and channel. The explicit primary is tried first, followed by active failover providers in deterministic order. A primary handoff is intentionally fail-closed: deactivate the old primary before selecting the new one. Atlas does not silently demote a provider as an unsigned side effect of another provider’s update.

Credential rotation accepts only a new reference. It increments credentialGeneration, immediately makes the provider inactive, removes primary status, and clears probe readiness. The new generation must be probed and independently activated.

Configure Telephony

CUSTOM_HTTPS, TWILIO, and TELESIGN telephony configurations use the hardened HTTPS adapter. Provider-specific integration belongs behind the configured endpoint, while Atlas keeps one stable delivery contract.

curl --fail-with-body \
  -X POST https://id.atlas.example/api/v1/telephony/providers \
  -H "Authorization: Bearer ${ATLAS_OPERATOR_TOKEN}" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: telephony-create-mission-primary-01" \
  --data '{
    "name": "mission telephony primary",
    "adapter": "CUSTOM_HTTPS",
    "authType": "BEARER",
    "endpointUrl": "https://telephony-gateway.example.mil/atlas/deliver",
    "supportedMethods": ["SMS", "VOICE"],
    "senderId": "ATLAS",
    "credentialRef": "vault://atlas/tenants/example/telephony/primary",
    "reason": "establish the tenant telephony delivery authority"
  }'

The referenced secret must contain a token value. Atlas sends:

{
  "schema": "atlas.delivery.v1",
  "deliveryId": "opaque-Atlas-operation-id",
  "challengeId": "opaque-Atlas-challenge-id",
  "targetRef": "tenant-keyed target reference",
  "method": "SMS",
  "recipient": "+12025550123",
  "subject": "",
  "body": "verification content",
  "providerVersion": 2,
  "credentialGeneration": 1,
  "probe": true
}

The request uses Authorization: Bearer, repeats the operation ID in Idempotency-Key, forbids redirects, bounds the response, and requires a successful 2xx response. The endpoint must independently deduplicate that ID because an ambiguous network failure may be retried against the same provider.

Run the real probe with a write-only recipient:

curl --fail-with-body \
  -X POST https://id.atlas.example/api/v1/telephony/providers/tel-primary/test \
  -H "Authorization: Bearer ${ATLAS_OPERATOR_TOKEN}" \
  -H 'If-Match: "v1"' \
  -H "Idempotency-Key: telephony-probe-mission-primary-01" \
  -H "Content-Type: application/json" \
  --data '{
    "method": "SMS",
    "recipient": "+12025550123",
    "reason": "prove delivery before independent activation"
  }'

The probe recipient, body, credential value, and provider response are not stored.

Configure SMTP

Atlas accepts SMTP ports 465, 587, and 2587. Port 465 uses direct TLS; the submission ports must successfully upgrade with STARTTLS. TLS 1.2 or newer is mandatory.

Basic SMTP configuration:

curl --fail-with-body \
  -X POST https://id.atlas.example/api/v1/email-servers \
  -H "Authorization: Bearer ${ATLAS_OPERATOR_TOKEN}" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: email-create-mission-primary-0001" \
  --data '{
    "name": "mission email primary",
    "adapter": "SMTP",
    "authType": "BASIC_SMTP_AUTH",
    "smtpHost": "smtp.example.mil",
    "smtpPort": 587,
    "username": "atlas-notifications@example.mil",
    "supportedMethods": ["EMAIL"],
    "fromAddress": "atlas-notifications@example.mil",
    "credentialRef": "vault://atlas/tenants/example/email/primary",
    "reason": "establish the tenant email delivery authority"
  }'

The referenced basic-auth secret contains password.

For OAuth 2.0 client credentials, use authType: OAUTH2_CLIENT_CREDENTIALS and supply clientId, tokenEndpointUrl, and optional scopes. The secret contains client_secret. It may set token_endpoint_auth_method=client_secret_post; the default is HTTP Basic client authentication.

For OAuth 2.0 JWT bearer, use authType: OAUTH2_JWT_BEARER_GRANT. The secret contains private_key_pem and may contain issuer, subject, audience, and kid. Defaults come from clientId, username, and tokenEndpointUrl. Atlas accepts RSA keys of at least 3072 bits or P-384 keys, creates a two-minute assertion with a unique jti, and authenticates SMTP using XOAUTH2 only after TLS is established.

Activate And Select A Primary

After the probe advances the ETag, a different qualified operator activates the provider:

curl --fail-with-body \
  -X POST https://id.atlas.example/api/v1/email-servers/email-primary/lifecycle/activate \
  -H "Authorization: Bearer ${INDEPENDENT_AAL3_TOKEN}" \
  -H 'If-Match: "v2"' \
  -H "Idempotency-Key: email-activate-mission-primary-01" \
  -H "Content-Type: application/json" \
  --data '{
    "makePrimary": true,
    "reason": "independent approval after successful delivery validation"
  }'

Management responses never return credentialRef; they expose only credentialRefSha256. Despite compatibility-oriented field names ending in Sha256, credential, recipient, content, request, reason, state, and idempotency values are domain-separated HMAC-SHA-256 values, not unkeyed digests.

Secret And Network Boundaries

The public model permits vault://, kms://, pkcs11://, and secret:// references. The current API gateway resolves vault:// references through the Atlas Vault client. Other schemes are reserved integration contracts and will fail their real probe until a deployment supplies the corresponding approved resolver. Plaintext credentials are rejected.

For HTTPS endpoints, SMTP hosts, and OAuth token endpoints, Atlas:

  • requires an externally routable DNS hostname;

  • rejects loopback, private, link-local, multicast, and otherwise unsafe IPs;

  • pins validated DNS answers when connecting to resist rebinding;

  • validates the TLS hostname and requires TLS 1.2 or newer;

  • forbids HTTP redirects;

  • bounds response size and execution time; and

  • never places credentials in URLs, logs, or durable delivery state.

The adapter receives plaintext recipient and content only for the duration of the outbound operation.

Runtime Routing And Failure Semantics

Each delivery operation is claimed in PostgreSQL before the external side effect. The claim binds tenant, method, provider configuration, credential generation, recipient HMAC, content HMAC, and idempotency-key HMAC. Competing Atlas replicas converge on one claim and the provider also receives the stable operation ID.

Atlas tries the active primary and then independently active failover providers. Once a tenant has an active managed provider, a provider, credential, storage, DNS, TLS, or evidence failure is final. Atlas never bypasses the tenant authority with a deployment-global legacy credential. Legacy SMTP is used only during migration when the tenant has no active managed email provider.

GET /api/v1/delivery-operations returns only pseudonymous evidence. Raw recipients, message bodies, probe data, credential values, provider response bodies, and raw idempotency keys are absent from storage. Provider events form per-provider HMAC chains. Provider reads, event reads, and delivery evidence reads verify their integrity and return 503 on tampering. Every HMAC pseudonym includes the tenant boundary so the same recipient, content, secret reference, or idempotency key cannot be correlated across tenants.

Signed Asynchronous Receipts

Managed SMS, voice, and email providers can assert PROVIDER_ACCEPTED, PROVIDER_SENT, PROVIDER_DELIVERED, or PROVIDER_FAILED through the provider callback. Atlas authenticates either a TLS client certificate with a verified chain or a current/bounded-previous HMAC key in the provider’s Vault credential. The signature binds the tenant, active provider version, credential generation, delivery, challenge, target reference, method, timestamp, nonce, sequence, and complete receipt.

The append-only receipt row and challenge projection commit in one serializable transaction. Status reads independently rebuild the HMAC chain and require its exact tail to match the projection. Raw receipt IDs, provider message IDs, nonces, recipients, and content are absent from durable receipt evidence.

The PROVIDER_ prefix is a security boundary. These values do not mean Atlas observed carrier-network acceptance, a handset, a mailbox, presentation, or a person. See Signed Asynchronous Delivery Receipts for signing, rotation, replay, projection, and error contracts.

Errors

Status Meaning

400

Unknown JSON, unsafe endpoint, invalid provider/auth combination, invalid secret reference, or malformed header.

403

Capability, assurance, freshness, phishing resistance, or independent-actor requirement failed.

404

The provider does not exist in the authenticated tenant.

409

ETag, idempotency, lifecycle, provider-limit, or primary-handoff conflict.

428

An existing-provider mutation omitted If-Match.

503

Secret, provider, DNS, TLS, PostgreSQL, or evidence integrity authority is unavailable.

Docker Acceptance

Run the bounded PostgreSQL validation when at least 1 GiB of memory is available:

scripts/test/run-delivery-provider-docker-validation.sh
scripts/test/run-delivery-receipt-docker-validation.sh

The scenario starts a real PostgreSQL container, applies the production migration, creates and probes a provider, denies same-actor activation, activates with an independent actor, races delivery claims across two service replicas, verifies exactly one external side effect, restarts PostgreSQL, and re-verifies replay and HMAC evidence. It also demonstrates that raw recipient, content, credential, and idempotency material is absent and that append-only and terminal-state database guards reject direct mutation.

The separate signed-receipt scenario starts PostgreSQL plus a real HTTP provider simulator, exercises SMS, voice, and email callback signing, and re-verifies projected status after service restart. It passed on 2026-07-27; the verified manifest is artifacts/delivery-receipt-docker-validation/20260727T001114Z/manifest.sha256.

The package unit suite is:

Internal implementation checks are omitted from this public guide.

The gateway lifecycle, redaction, authorization, ETag, managed-email integration, and OpenAPI contract tests are:

Internal implementation checks are omitted from this public guide.