NorthRelayNorthRelay
API Reference

API Reference

NorthRelay REST API overview, base URL, authentication, rate limits, error handling, and pagination.

API Reference

The NorthRelay API lets you send transactional and marketing emails, manage domains, templates, contacts, mailing-list subscriptions, suppressions, and retrieve analytics programmatically.

Base URL

All API requests use the following base URL:

https://app.northrelay.ca/api/v1/

All requests must be made over HTTPS. Plain HTTP requests are rejected.

Authentication

Authenticate every request with a Bearer token in the Authorization header:

curl https://app.northrelay.ca/api/v1/emails/send \
  -H "Authorization: Bearer nr_live_xxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

API keys use two prefixes:

PrefixEnvironmentPurpose
nr_live_ProductionSends real emails
nr_test_Accepted legacy prefixDoes not itself isolate delivery or quota; use a test environment with a mail sink

Create and manage keys in Dashboard > Settings > API Keys. See the Authentication page for full details.

Rate Limits

Sending quotas are enforced per account based on your plan tier. They are expressed as recipients per calendar month and reset on the 1st:

TierMonthly QuotaPrice (CAD)
Free3,000Free
Starter5,000$5/mo
Micro20,000$12/mo
Pro50,000$29/mo
Scale150,000$79/mo

When you exceed your monthly quota, the API returns a 429 status with the QUOTA_EXCEEDED error code and the date the counter resets. Upgrading raises the limit immediately.

API request rate limits (separate from email quotas):

EndpointLimit
POST /emails/send100 requests/second
POST /emails/batch10 requests/second
POST /emails/validate50 requests/second
All other endpoints200 requests/second

Error Handling

Every error response follows a consistent JSON structure with four fields:

{
  "code": "DOMAIN_NOT_FOUND",
  "message": "The specified domain was not found",
  "action": "Check the domain ID and try again",
  "docs_url": "https://docs.northrelay.ca/domains/setup"
}
FieldTypeDescription
codestringMachine-readable error code for programmatic handling
messagestringHuman-readable description of the problem
actionstringActionable instruction to resolve the issue
docs_urlstringLink to relevant documentation

HTTP Status Codes

StatusMeaning
200Success
201Resource created
400Validation error or bad request
401Missing or invalid authentication
403Insufficient permissions or tier
404Resource not found
429Rate limit exceeded
500Internal server error
503Service temporarily unavailable

Error Codes Reference

CodeHTTP StatusDescription
UNAUTHORIZED401No valid session or API key provided
INVALID_CREDENTIALS401API key is malformed or revoked
SESSION_EXPIRED401Session token has expired
VERIFICATION_FAILED400Verification code is invalid
VERIFICATION_EXPIRED400Verification code has expired
RATE_LIMIT_EXCEEDED429Monthly quota or request rate exceeded
DOMAIN_NOT_FOUND404Domain ID does not exist
DOMAIN_ALREADY_EXISTS400Domain is already registered
DNS_VERIFICATION_FAILED400Required DNS records not found
DNS_RECORD_MISSING400Specific DNS record is missing
DNS_LOOKUP_ERROR400Unable to query DNS for the domain
API_KEY_NOT_FOUND404API key ID does not exist
API_KEY_INVALID401API key is invalid or expired
API_KEY_LIMIT_REACHED400Maximum number of API keys reached
WEBHOOK_SIGNATURE_INVALID401Webhook signature verification failed
WEBHOOK_PAYLOAD_INVALID400Webhook payload does not match schema
WEBHOOK_EVENT_UNKNOWN400Unrecognized webhook event type
VALIDATION_ERROR400Request body failed validation
NOT_FOUND404Requested resource not found
INTERNAL_ERROR500Unexpected server error
SERVICE_UNAVAILABLE503Downstream service temporarily unavailable

Pagination

List endpoints return paginated results. Control pagination with query parameters:

ParameterTypeDefaultDescription
pageinteger1Page number (1-indexed)
limitinteger25Items per page (max 100)

Every paginated response includes a pagination object:

{
  "data": [ ... ],
  "pagination": {
    "page": 1,
    "limit": 25,
    "total": 142,
    "totalPages": 6
  }
}

Versioning

The API is versioned via the URL path (/api/v1/). Breaking changes will be introduced under a new version prefix (e.g., /api/v2/). Non-breaking additions (new fields, new endpoints) are added to the current version without a version bump.

Content Type

All request bodies must be JSON with the Content-Type: application/json header. All responses are JSON.

Next Steps

  • Authentication -- create and use API keys
  • Sending -- send single, batch, and scheduled emails
  • Domains -- add and verify custom sending domains
  • Templates -- manage reusable email templates
  • Webhooks -- receive delivery event notifications

On this page