Skip to content
Rykon Mail Help

Sending API and developers

Send your first transactional email

Make a sending key, then post receipts, sign-in links and order updates from your own application.

Updated 1 min read

The Sending API sends one message at a time from your own application, from your own domain: receipts, sign-in links, order updates. Every message is recorded on Sending API with what happened to it. The full reference is in the developer docs.

Make a key

  1. Step 1: Go to Sending API and find Keys. Owners and admins can make keys.
  2. Step 2: Under Name it after what uses it, enter something like Shop checkout.
  3. Step 3: Choose New key and copy it now. It starts rmk_, is shown once and is not stored.

A sending key can send transactional mail and do nothing else on your account. Give each application its own, so you can Revoke one without touching the others. Revoking takes effect at once.

Send a message

Terminal
curl https://app.rykonmail.com/api/send/v1/emails -X POST \
  -H "Authorization: Bearer $RYKON_MAIL_SEND_KEY" \
  -H "content-type: application/json" \
  -d '{
    "from": "hello@yourcompany.com",
    "fromName": "Your company",
    "to": "customer@example.com",
    "subject": "Your receipt for order 1042",
    "text": "Thanks for your order. Total: $18.00",
    "category": "receipt",
    "idempotencyKey": "order-1042-receipt"
  }'
FieldWhat it is
fromAn address on one of your domains that is set up for sending.
fromNameThe name shown as the sender.
toOne recipient.
subjectThe subject.
text, htmlThe message, as text, HTML, or both.
categoryWhat kind of message it is: account, security, receipt, order or notification.
idempotencyKeyOptional. With one, a retry never sends twice.

The answer names the message's id and state. A refusal says why.