# Welcome to Postmark

You're about to use the best email system on earth.

## Send your first email

You can have a request working in a few minutes. Start with the test token, which checks your request and sends nothing.

<FirstEmail
  email={{
    from: "you@yourdomain.com",
    to: "friend@example.com",
    subject: "Hello from Postmark",
    body: "It works!",
    note: "Yes... it's actually that easy. 🚀",
  }}
  steps={[
    {
      title: "Get a server token",
      body: "In Postmark, open your server, then API Tokens, and copy the Server API token. Until you have one, use POSTMARK_API_TEST.",
    },
    {
      title: "Verify your email",
      body: "The From address must belong to a sender signature or domain you've verified in Postmark.",
    },
    {
      title: "Send an email",
      body: "Run the example. It's that easy. Copy it, add your token, and run in your terminal.",
    },
  ]}
>

```bash
curl "https://api.postmarkapp.com/email" \
  -X POST \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "X-Postmark-Server-Token: POSTMARK_API_TEST" \
  -d '{
    "From": "you@yourdomain.com",
    "To": "friend@example.com",
    "Subject": "Hello from Postmark",
    "TextBody": "It works!",
    "MessageStream": "outbound"
  }'
```

</FirstEmail>

## Not sure where to start?

<Orient
  items={[
    {
      kind: "ai",
      title: "Build with AI",
      body: "Give your coding assistant Postmark Skills and the MCP server, so it writes correct email code and can work with your account.",
      to: "/ai",
      label: "See how",
    },
    {
      kind: "api",
      title: "API, or SMTP?",
      body: "Both send the same email. Find out which one fits the way your app is built.",
      to: "/api-or-smtp",
      label: "Help me choose",
    },
    {
      kind: "stream",
      title: "Transactional or broadcast?",
      body: "A password reset and a product announcement don't belong together. Learn how to tell them apart.",
      to: "/transactional-or-broadcast",
      label: "Tell me the difference",
    },
  ]}
/>

## What do you want to do next?

<Paths
  items={[
    {
      title: "Send a receipt or welcome email",
      body: "Keep the design in a template and send only the details that change.",
      to: "/api/email#send-email-with-template",
      uses: "POST /email/withTemplate",
      tone: "blue",
      icon: "Mail",
    },
    {
      title: "Know when an email is delivered or bounces",
      body: "Get a notification for every delivery, bounce, open, click and spam complaint.",
      to: "/api/webhooks#create-a-webhook",
      uses: "POST /webhooks",
      tone: "mint",
      icon: "BellRing",
    },
    {
      title: "Find out why an email didn't arrive",
      body: "Look up the message, see what the receiving server said, and reactivate the address if it bounced.",
      to: "/api/bounces",
      uses: "GET /bounces",
      tone: "red",
      icon: "LifeBuoy",
    },
    {
      title: "Send to a lot of people at once",
      body: "Send up to 500 messages in one call, with or without templates.",
      to: "/api/email#send-batch-emails",
      uses: "POST /email/batch",
      tone: "yellow",
      icon: "Layers",
    },
    {
      title: "Receive and process incoming email",
      body: "Have replies and forwarded messages delivered to your app, and block what you don't want.",
      to: "/api/messages#inbound-message-search",
      uses: "GET /messages/inbound",
      tone: "slate",
      icon: "Inbox",
    },
    {
      title: "Set up and verify your sending domain",
      body: "Add your domain, confirm DKIM and Return-Path, and get ready to send from your own address.",
      to: "/api/domains",
      uses: "POST /domains",
      tone: "blue",
      icon: "Globe",
    },
  ]}
/>

## Start in your language

Official libraries handle authentication and request details for you.

<Languages
  items={[
    { label: "TypeScript", icon: "js", to: "/libraries/official#typescript" },
    { label: "Python", icon: "python", to: "/libraries/official#python-sdk" },
    { label: "Ruby", icon: "ruby", to: "/libraries/official#postmark-ruby-gem" },
    { label: ".NET", icon: "csharp", to: "/libraries/official#postmark-net" },
    { label: "Java", icon: "java", to: "/libraries/official#postmark-java" },
    { label: "PHP", icon: "php", to: "/libraries/official#postmark-php" },
    { label: "Plain HTTP (cURL)", icon: "shell", to: "/api/email#send-a-single-email" },
  ]}
/>

## Already know what you're looking for?

<Reference
  items={[
    {
      title: "API reference",
      body: "Every endpoint, with parameters, examples and responses.",
      to: "/api",
    },
    {
      title: "MCP server",
      body: "Connect an AI assistant and see all 24 tools.",
      to: "/mcp-server",
    },
    {
      title: "Libraries",
      body: "Official and community libraries for every language.",
      to: "/libraries/official",
    },
  ]}
/>
