@amgmail/sdk
v0.12.1
Published
AMG Mail server-side SDK for Node.js and TypeScript
Readme
AMG Mail SDK
Server-side client for the transactional-only AMG Mail API. Keep keys and callback secrets in your server secret manager.
Production sends require a fixed approved template and a verified event bound to the exact recipient and rendered content. Raw messages and arbitrary transaction labels are rejected. Start at https://amgmail.amgcc.space/setup and follow https://amgmail.amgcc.space/docs#event-proof.
New transactional resources: transactional.status, transactional.templates.create, transactional.integrations.create / remove, and transactional.events.create. Verify a source event, attach its returned ID/type as metadata.transaction_id / metadata.event, call emails.validate, then emails.send with a stable idempotency key. The callback authenticates application assertions; it is application attestation. Payment receipts and paid-order confirmations instead require an independent Stripe connection.
No automatic retries or redirects. HTTP acceptance means queued, not delivered. Marketing, bulk recipients, arbitrary content, attachments and custom headers are unavailable in production. SDK methods for existing contact/template/legacy resources do not override server policy.
Install from the public package registry:
npm install @amgmail/sdkSee the OpenAPI contract at https://amgmail.amgcc.space/openapi.json for exact payloads and response fields. Versioned website downloads remain available in the guide.
Independent payment verification is available through transactional.providers.create / remove and transactional.events.create with provider_connection_id. Stripe test-mode payments do not authorize production mail. Copy the complete Node/Python example at https://amgmail.amgcc.space/docs#stripe.
Use emails.metrics for delivery, bounce, complaint and engagement counts/rates; analytics.settings.get and analytics.settings.update control tracking. Open/click observations may come from privacy proxies or scanners. Sensitive messages and links are excluded. Dashboard: https://amgmail.amgcc.space/analytics.
