First Transactional Send
Use this workflow when an application needs to send login codes, receipts, notifications, or onboarding messages through PING8.
Before you start
Prepare:
- A verified domain such as
yourdomain.com. - A sender such as
hello@yourdomain.com. - An API template in PING8.
- A Send API key stored as an environment variable.
- One owned test recipient.
Steps
- Open Sending > Domain and confirm SPF, DKIM, DMARC, MX, A, and PTR checks pass.
- Open Developer > Send API.
- Create or select an API template.
- Confirm the template uses the verified sender.
- Create an API key with the smallest practical scope.
- Add an IP allowlist if the caller has a stable outbound IP.
- Send one request with an owned test recipient.
- Check the API response for queued status.
- Open logs or analytics and confirm delivery lifecycle events.
Example request
curl -X POST "https://app.yourdomain.com/api/batch_mail/api/send" \
-H "Content-Type: application/json" \
-H "X-API-Key: $PING8_API_KEY" \
-d '{
"recipient": "user@example.com",
"attribs": {
"first_name": "Alex"
}
}'What success looks like
- The API returns a queued result.
- The message appears in logs.
- Delivery telemetry moves to delivered, deferred, bounced, or suppressed.
- Your application never logs the raw API key.
Common mistakes
- Calling the API before a template is active.
- Sending from a domain that has not passed DNS checks.
- Hardcoding API keys in application source code.
- Retrying failed requests without understanding duplicate-email risk.