Quickstart

Get up and running with Agentry in 2 minutes.

View as Markdown

1. Create an Account

Sign up at agentry.to/register. You'll get an API key immediately.

2. Create an Inbox

curl -X POST https://api.agentry.to/agent/v0/inboxes \
  -H "Authorization: Bearer ag_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"display_name": "My Agent"}'

Response:

{
  "id": "my-agent@your-org.agentry.to",
  "display_name": "My Agent",
  "created_at": "2025-01-01T00:00:00Z"
}

3. Send an Email

curl -X POST https://api.agentry.to/agent/v0/inboxes/my-agent@your-org.agentry.to/messages/send \
  -H "Authorization: Bearer ag_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "to": ["recipient@example.com"],
    "subject": "Hello from Agentry",
    "text_body": "This email was sent by an AI agent.",
    "from_": "my-agent@your-org.agentry.to"
  }'

4. Receive Emails via Webhook

Set up a webhook to get notified when your inbox receives a reply:

curl -X POST https://api.agentry.to/agent/v0/webhooks \
  -H "Authorization: Bearer ag_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://your-app.com/webhook",
    "event_types": ["message.received"]
  }'

Using the SDK

Agentry is API-compatible with the AgentMail SDK. Just point it at our API:

import AgentMail from "agentmail";

const client = new AgentMail({
  apiKey: "ag_your_key_here",
  baseUrl: "https://api.agentry.to/agent",
});

const inbox = await client.inboxes.create({
  display_name: "My Agent",
});