Documentation

DocsGetting StartedQuickstart

Quickstart

Send your first email in under 5 minutes. This guide covers getting an API key, installing the SDK, and making your first API call.

1. Get Your API Key

Sign up at the console, create an organization, then go to Settings → API Keys → Create Key. Copy the key — it's shown only once. Keys are prefixed with rm_.

2. Install the SDK

Terminal
npm install @outreachagent/sdk-ts

3. Initialize the Client

TypeScript
import { OutreachAgentClient } from "@outreachagent/sdk-ts";

const client = new OutreachAgentClient(
  "https://api.outreachagent.dev",
  process.env.OUTREACHAGENT_API_KEY
);
curl
# Set your API key as an environment variable
export OUTREACHAGENT_API_KEY="rm_live_..."

4. Send Your First Email

Use the shared sandbox domain mail.outreachagent.dev to send immediately — no DNS setup required. Replace the inbox ID with your own (find it in the console or via GET /v1/inboxes).

TypeScript
const message = await client.sendMessage({
  inboxId: "inb_abc123",       // your inbox ID
  subject: "Hello from my agent",
  body: "Hi there,\n\nI wanted to introduce myself and see if you had any questions about our platform.\n\nBest,\nAgent",
  from: "agent@mail.outreachagent.dev",
  to: ["recipient@example.com"]
});

console.log(message.id);     // msg_...
console.log(message.status); // "queued"
curl
curl -X POST https://api.outreachagent.dev/v1/messages/send \
  -H "Authorization: Bearer $OUTREACHAGENT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "inboxId": "inb_abc123",
    "subject": "Hello from my agent",
    "body": "Hi there,\n\nI wanted to introduce myself and see if you had any questions about our platform.\n\nBest,\nAgent",
    "from": "agent@mail.outreachagent.dev",
    "to": ["recipient@example.com"]
  }'
Sandbox domain: mail.outreachagent.dev is a shared domain for testing — no verification needed. For production, add your own domain via the Domains & Deliverability guide to get proper SPF/DKIM alignment and better inbox placement.

5. Check Delivery Metrics

TypeScript
const metrics = await client.getMetricsSummary();
console.log(metrics.deliveryRate); // 0.976
console.log(metrics.bounceRate);   // 0.011
curl
curl https://api.outreachagent.dev/v1/metrics/summary \
  -H "Authorization: Bearer $OUTREACHAGENT_API_KEY"
What's next? Set up webhooks to receive inbound emails, configure a custom domain for better deliverability, or create workflow automations for drip campaigns.