AI Agents Guide
Everything an AI agent needs to autonomously create accounts, set up newsletters, manage issues, grow subscriber lists, configure custom domains, and audit health — end to end.
Machine-readable formats available:
llms.txt— Brief index (Jeremy Howard / llmstxt.org format)llms-full.txt— Full API + platform referenceskill.md— AgentSkills v1 format with executable workflows/.well-known/skills/default/skill.md— Standard well-known discovery path
Quick Start for Agents
- Sign up — browser automation at
/signup - Confirm email — extract confirmation link from email
- Create newsletter — browser automation at
/newsletters/new - Complete onboarding — frequency + preferences steps
- Generate API key — at
/newsletters/:id/api_keys - Use REST API — all subsequent operations via API
Phase 1: Account Creation (Browser Flow)
There is no REST endpoint for signup — use browser automation (Playwright, Puppeteer, Selenium).
Step 1.1 — Register
# Navigate to signup
GET https://www.dailydraft.ai/signup
# Submit form (POST /signup)
{
"user[email_address]": "[email protected]",
"user[password]": "SecurePassword123!",
"user[password_confirmation]": "SecurePassword123!"
}
# On success: redirected to /email_confirmation_pending
# Response includes flash: "Please check your email to confirm your account"
Step 1.2 — Confirm Email
DailyDraft sends a confirmation email. Extract the confirmation URL and navigate to it.
# Confirmation link format:
https://www.dailydraft.ai/email_confirmations/<TOKEN>
# On success: session created, redirected to /newsletters
# Flash: "Email confirmed! Welcome to DailyDraft!"
Confirmation Token Validity: Tokens expire. If expired, navigate to
/email_confirmation_required and submit the resend form.
Step 1.3 — Sign In (Existing Accounts)
# Navigate to
GET https://www.dailydraft.ai/session/new
# Submit form (POST /session)
{
"email_address": "[email protected]",
"password": "SecurePassword123!"
}
# On success: redirected to /newsletters
Phase 2: Newsletter Creation (Browser Flow)
Step 2.1 — Create Newsletter
# Navigate to
GET https://www.dailydraft.ai/newsletters/new
# Submit form (POST /newsletters)
{
"newsletter[name]": "AI Stack Weekly",
"newsletter[tagline]": "Weekly AI tooling for builders",
"newsletter[keywords]": "artificial intelligence, Claude, Cursor, LLMs",
"newsletter[from_name]": "Todd Dickerson",
"newsletter[from_email]": "[email protected]"
}
# On success: redirected to /newsletters/:id/setup_frequency
# Flash: "Newsletter created! Let's set up your publishing schedule..."
Step 2.2 — Set Publishing Frequency
# At: GET /newsletters/:id/setup_frequency
# Submit (POST /newsletters/:id/apply_frequency)
{
"frequency": "weekly" # Options: "daily", "three_times", "weekly", "skip"
}
# Frequencies map to:
# "daily" → Mon-Fri draft pipeline
# "three_times" → Mon/Wed/Fri
# "weekly" → Tuesdays (recommended starting point)
# "skip" → Configure later
# On success: redirected to /newsletters/:id/preference/edit
Step 2.3 — Set Preferences
# At: GET /newsletters/:id/preference/edit
# Submit (PATCH /newsletters/:id/preference)
{
"newsletter_preference[target_audience]": "B2B software developers who use AI tools",
"newsletter_preference[content_tone]": "professional",
"newsletter_preference[newsletter_length]": "medium"
}
# On success: redirected to /newsletters/:id
# Newsletter is now live on its subdomain
Phase 3: Generate API Key (Browser Flow)
# Navigate to
GET /newsletters/:id/api_keys/new
# Submit form (POST /newsletters/:id/api_keys)
{
"api_key[name]": "ea-agent",
"api_key[permissions][]": "read",
"api_key[permissions][]": "write"
}
# Response: page shows the full key ONCE — capture it immediately
# Key format: <8-char-prefix><64-char-hex>
# Store securely — it cannot be retrieved again
API Key Visibility: The full key is shown exactly once at creation time. Capture it from the page before navigating away.
Phase 4: REST API Operations
All subsequent operations use the REST API. Set your environment:
BASE=https://www.dailydraft.ai/api/v1
API_KEY=<your_key>
Audit newsletter health
curl -s $BASE/newsletter -H "Authorization: Bearer $API_KEY" | jq '{name,tier,status,from_email}'
curl -s $BASE/newsletter/stats -H "Authorization: Bearer $API_KEY" | jq '.stats'
Create and send an issue
# 1. Create draft
ISSUE=$(curl -s -X POST $BASE/issues \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"issue": {
"subject": "AI Stack Weekly #1",
"content_markdown": "## Welcome\n\nThis is issue #1..."
}
}')
ISSUE_ID=$(echo $ISSUE | jq -r '.id')
# 2. Approve
curl -s -X PATCH $BASE/issues/$ISSUE_ID \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"issue": {"status": "approved"}}'
# 3. Send (requires paid tier)
curl -s -X POST $BASE/issues/$ISSUE_ID/send_now \
-H "Authorization: Bearer $API_KEY"
Import subscribers
curl -s -X POST $BASE/subscribers/bulk_create \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"subscribers": [{"email": "[email protected]"}]}'
Phase 5: Custom Domain Setup (Browser + DNS)
Custom domains use Cloudflare for SaaS with automated SSL provisioning. No REST API endpoint — use browser automation + DNS management.
- Navigate to
/newsletters/:id/custom_domains/choose_method - Submit domain name (e.g.,
newsletter.yourdomain.com) - DailyDraft returns CNAME and optional TXT records to add
- Via DNS provider API: add
CNAME newsletter.yourdomain.com → <subdomain>.dailydraft.ai - Click Verify — or navigate to
POST /newsletters/:id/custom_domains/:domain_id/verify - Poll status at
/newsletters/:id/custom_domains/:domain_iduntilstatus: "active"
DNS Propagation: Allow up to 24 hours for DNS to propagate. SSL is auto-provisioned by Cloudflare once DNS resolves correctly.
Full Onboarding Checklist (Agent Validation)
| Step | Method | Success Signal |
|---|---|---|
| 1. Register account | Browser POST /signup | Redirect to /email_confirmation_pending |
| 2. Confirm email | Browser GET /email_confirmations/:token | Session created, redirect to /newsletters |
| 3. Create newsletter | Browser POST /newsletters | Redirect to /setup_frequency |
| 4. Set frequency | Browser POST /apply_frequency | Redirect to /preference/edit |
| 5. Set preferences | Browser PATCH /preference | Redirect to /newsletters/:id |
| 6. Generate API key | Browser POST /api_keys | Full key shown on page |
| 7. Fetch newsletter | API GET /newsletter | 200 with newsletter JSON |
| 8. Create issue | API POST /issues | 201 with issue id |
| 9. Approve issue | API PATCH /issues/:id | 200, status="approved" |
| 10. Publish to web | API POST /issues/:id/publish | 200 with web_url |
| 11. Import subscriber | API POST /subscribers/bulk_create | { created: N, errors: [] } |
| 12. Verify health | API GET /newsletter/stats | total_subscribers > 0 |
Issue Content Format
Use standard Markdown for content_markdown:
## Opening Hook
One paragraph that makes the reader glad they opened.
---
## 🔥 Main Story: [Headline]
[150-300 words. What happened, why it matters, what to do about it.]
**Source:** [Publication name](https://url)
---
## Quick Hits
- **[Headline]** — One sentence summary. ([Source](url))
- **[Headline]** — One sentence summary. ([Source](url))
---
## Takeaway
One paragraph with your editorial POV.
---
*Forwarded this? [Subscribe free](https://[subdomain].dailydraft.ai/subscribe).*
Error Reference
| Code | Meaning | Fix |
|---|---|---|
| 401 | Invalid API key | Regenerate at Settings → API Keys |
| 402 | Paid tier required | Upgrade newsletter ($97/mo) before sending email |
| 403 | Missing permission | Use a key with write or delete scope |
| 422 | Validation failed | Check errors array in response |
| 429 | Rate limited | Wait until X-RateLimit-Reset timestamp |
Rate Limits
| Limit | Value |
|---|---|
| Requests per hour | 1000 |
| Bulk import max | 1000 subscribers per request |
| Headers | X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset |
Machine-Readable Resources
- llms.txt — Brief index following the llmstxt.org standard
- llms-full.txt — Full platform reference with all endpoints, examples, and workflows
- skill.md — AgentSkills v1 format; drop into any compatible agent framework
- /.well-known/skills/default/skill.md — Standard discovery path for agent frameworks
Health Check
curl https://www.dailydraft.ai/up
# → {"status":"ok"}
Related Docs
Still need help?
Can't find what you're looking for? Chat with our AI assistant or create a support ticket.
Sign in to get support