Skip to content
Docs menu

Email

Email API

Send email from a Laravel or Next.js app, a script or anything else that makes HTTP requests. It uses the same sending domains and monthly allowance as your WordPress websites.

Before you start

You need a verified sending domain and room in your monthly allowance. Creating keys needs the Manage email permission, which Owners and Admins have.

Create an API key

  1. Open API keys

    Open Email in the main sidebar, then API keys.

  2. Name it

    Name the key after the app that uses it, then choose Create key.

  3. Copy it now

    The key starts with skydun_ and is shown only once. Keep it in your app’s environment, never in code you commit.

A key can send from every verified domain in the workspace and read every email it sent, so give each app its own. The list shows when each key was Last used. To stop a key, choose Revoke key. Keys marked WordPress belong to websites using Skydun Email: leave those alone.

Send an email

Send a POST to https://manage.skydun.com/api/v1/emails with the key as a bearer token:

Send

curl https://manage.skydun.com/api/v1/emails \
  -H "Authorization: Bearer skydun_..." \
  -H "Content-Type: application/json" \
  -d '{
    "from": "Shop <[email protected]>",
    "to": "[email protected]",
    "subject": "Hello",
    "html": "<p>It works.</p>"
  }'

The response is the email’s id, such as {"id": "9b1f…"}. The request takes the same fields as Resend’s send-email API:

FieldValue
fromAn address at a verified domain, alone or as "Name <address>". Required.
toOne address or a list. Required.
cc, bcc, reply_toOne address or a list.
subjectRequired.
html, textThe body. Send one or both.
headersExtra headers. Only names starting with X-.
attachmentsA list of { filename, content, content_type }, with content in base64.

Scroll to see more

Limits:

  • 50 recipients an email, across to, cc and bcc. Each counts against the allowance;
  • 10 attachments an email, 10 MB in total;
  • 600 requests a minute for each key.

Check what happened to an email

Check

curl https://manage.skydun.com/api/v1/emails/EMAIL_ID \
  -H "Authorization: Bearer skydun_..."

The response has the email’s from, to, subject, created_at and last_event: sent, delivered, bounced, complained or rejected. The same emails are under Email → Logs.

Errors

An error comes back as {"name": "…", "message": "…"}. Don’t retry it as it is: fix the cause first.

StatusNameWhat to do
401invalid_api_keyCheck the key. It may have been revoked.
403domain_not_verifiedSend from an address at a verified domain, or verify this one.
403suspendedThe allowance is used up or Amazon SES paused sending. See the Email page.
422recipient_suppressedThe address bounced or reported spam before. See Suppressions.
429quota_exceededThe email doesn’t fit what’s left of this month’s allowance.
502rejectedAmazon SES refused the email. The message says why.
503not_availableEmail sending isn’t available right now. Email us.

A missing or invalid field returns 422 with a message and an errors object listing each field.

Scroll to see more

Refused emails aren’t logged

Emails refused with an error never reach Email → Logs, so log the error in your app.