Provider credentials
Nerve uses a Bring-Your-Own (BYO) credentials model. You open accounts directly with your chosen delivery providers, and Nerve orchestrates delivery, failover, rate limiting, and regulatory compliance.
Supported providers
Nerve natively integrates eight leading delivery providers across four channels:
| Channel | Supported Providers | Common Use Case |
|---|---|---|
| SMS | Termii, Sendchamp, Infobip | Nigerian carrier delivery, DND routing, OTPs |
| Postmark, SendGrid | High-reputation transactional & bulk email | |
| Push | Firebase Cloud Messaging (FCM), Apple Push Notification service (APNs) | Android and iOS device notifications |
| Meta WhatsApp Cloud API | Official WhatsApp Business messaging |
Envelope encryption architecture
Provider credentials contain sensitive API secrets, service account JSONs, and Apple private keys (.p8). Nerve guarantees that no plaintext provider secret is ever stored in the database or exposed via any read API.
- Per-Record DEK: When a provider is saved, Nerve generates a cryptographically random 32-byte Data Encryption Key (DEK).
- Payload Encryption: The credential payload is encrypted using AES-256-GCM with a unique 12-byte random initialization vector (IV) and authenticated tag.
- Key Wrapping (KEK): The DEK is wrapped under the platform Key Encryption Key (
KEK_V1) using AES-256-GCM. - Database Storage: The database stores only
ciphertext,nonce,wrapped_dek,kek_version, and amasked_hint. - Zero Plaintext Reads: Read endpoints (
GET /console/providers) return only themasked_hint(e.g.,sk_live_...4f2a). Plaintext credentials cannot be queried back.
Connection testing
Before routing production traffic to a newly added provider, test the connection:
curl -X POST https://console.nervly.io/console/providers/{providerId}/test \
-H "Cookie: nerve_session=$SESSION_COOKIE" \
-H "X-CSRF-Token: $CSRF_TOKEN"
The control plane performs an authentic, zero-delivery API verification call:
- Termii: Queries account balance endpoint.
- SendGrid: Queries API key scopes (
/v3/scopes). - Postmark: Queries server configuration (
/server). - Sendchamp: Queries wallet balance.
- Infobip: Validates account status.
- FCM / APNs: Generates RS256/ES256 signed JWTs and verifies key format.
- Meta WhatsApp: Queries app details (
/me).
On success, verified_at is updated in the database and logged to the workspace audit log.
Priority and failover order
Each provider in a workspace has a numeric priority attribute (1 = primary, 2 = secondary fallback, 3 = tertiary fallback).
When dispatching an event:
- The Go worker retrieves enabled providers for the channel, sorted by
priority ASC. - The worker attempts dispatch against the primary provider.
- If the primary fails or its circuit breaker is open, the worker immediately falls back to the next priority provider.
- If all providers fail, the message is queued for exponential backoff retry and published to the Dead-Letter Queue (DLQ).