Quickstart: cURL
Create your first email deliverability test using cURL in under 5 minutes.
Get your API key
Navigate to your API Keys settings and create a new key. For development, use a test mode key (prefix: rk_test_).
export REACHSCORE_API_KEY="rk_test_your_api_key_here"
Create a test
Create a new deliverability test by specifying your sender email address:
curl -X POST https://api.reachscore.co/v1/tests \
-H "Authorization: Bearer $REACHSCORE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"from_address": "notifications@yourcompany.com",
"subject": "Test email deliverability"
}'The response includes a unique test email address to send your email to:
{
"id": "test_7xK2mN9pQrT4v",
"object": "test",
"test_address": "test_7xK2mN9p@inbound.reachscore.co",
"from_address": "notifications@yourcompany.com",
"status": "awaiting_email",
"created_at": "2024-01-15T10:30:00Z",
"livemode": false
}Send an email
Send an email from your application or email service to the test_address returned in the previous step.
Note: The email must come from the exact from_address you specified when creating the test.
Get the results
Poll the test endpoint to check if the email has been processed:
curl https://api.reachscore.co/v1/tests/test_7xK2mN9pQrT4v \ -H "Authorization: Bearer $REACHSCORE_API_KEY"
Once processed, you will receive detailed deliverability results:
{
"id": "test_7xK2mN9pQrT4v",
"object": "test",
"status": "completed",
"score": 92,
"grade": "A",
"auth_results": {
"spf": "pass",
"dkim": "pass",
"dmarc": "pass"
},
"inbox_placement": {
"gmail": "inbox",
"outlook": "inbox",
"yahoo": "inbox"
},
"spam_score": 0.2,
"recommendations": [
"All authentication protocols are correctly configured."
],
"completed_at": "2024-01-15T10:31:15Z"
}You are all set!
You have successfully created your first deliverability test. Explore the API Reference to learn about domains, monitors, webhooks, and more.
Using Webhooks (Recommended)
Instead of polling, configure a webhook to receive results automatically:
# Create a webhook endpoint
curl -X POST https://api.reachscore.co/v1/webhooks/endpoints \
-H "Authorization: Bearer $REACHSCORE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://your-server.com/webhooks/reachscore",
"events": ["test.completed"]
}'