Docs
guides · quickstart

Quickstart

Send your first email in under a minute. You need two things — an API key and a from address — and Drin gives you a shared onboarding domain so you can send before touching DNS.

  1. 1

    Get an API key

    Create one in the dashboard under API Keys. The secret is shown once — store it somewhere safe, for example as DRIN_API_KEY.

    Already have oneNew accounts get a key automatically during onboarding, baked into the in-dashboard snippets. This page is the version you can copy anywhere.
  2. 2

    Send your first email

    Every snippet hits the same contract: POST https://api.drin.run/v1/emails with a from, a to array, and subject + html (or text).

    curl https://api.drin.run/v1/emails \
      -H "Authorization: Bearer $DRIN_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "from": { "email": "onboarding@yourdomain.com" },
        "to": [{ "email": "you@example.com" }],
        "subject": "Hello from Drin",
        "html": "<p>It works!</p>"
      }'

    A 202 Accepted with a message id means it's queued. Java, C#, Rust, Elixir, Kotlin, Swift and a no-code SMTP recipe are all in the dashboard's in-app quickstart too.

  3. 3

    Watch it land

    Every send shows up on Email Activity within seconds, with its full transit log — queued → sent → delivered → opened. Or fetch it over the API: GET /v1/emails/{id}.

  4. 4

    Send from your own domain

    The shared onboarding domain runs in test mode — it can only deliver to your own address. To email anyone from your own brand, verify a domain on the Domains page (DKIM + SPF + DMARC, guided). Then list your verified domains in code and use one as your from:

    Node.js
    const [d] = await drin.domains.listVerified();
    
    await drin.emails.send({
      from: { email: `hello@${d.domain}` },
      to: [{ email: "customer@example.com" }],
      subject: "Welcome aboard",
      html: "<p>Glad you're here.</p>",
    });
Account-wide keysA key that isn't scoped to a single project must name the sending project per request with the X-Drin-Product: <project-id> header — or the SDK's sender option. Project-scoped keys don't need it. See Authentication.

01 Next steps