Skip to main content
The AgentPost REST API provides the same capabilities as the MCP API through standard HTTP endpoints. Every MCP tool has a corresponding REST endpoint.

Base URL

https://agentpost.email/api/v1

Authentication

All requests require a Bearer token in the Authorization header:
curl https://agentpost.email/api/v1/domains \
  -H "Authorization: Bearer YOUR_API_TOKEN"
Generate tokens at Settings > API Tokens in the AgentPost dashboard. The same tokens work for both the REST API and the MCP API.

Rate Limits

REST and MCP calls share the same per-user quota:
TierPer minutePer day
Starter550
Developer302,000
Pro6010,000
Business300100,000
Rate limit headers are included in every response:
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 57
X-RateLimit-Reset: 1680000000

Response Format

Success

Single resource:
{
  "data": {
    "id": "abc-123",
    "email_address": "agent-x7k@agent.agentpost.email"
  }
}
Paginated list:
{
  "data": [...],
  "meta": {
    "cursor": "eyJ...",
    "has_more": true
  }
}

Error

{
  "error": {
    "message": "Mailbox not found.",
    "code": "not_found"
  }
}

Validation Error (422)

{
  "error": {
    "message": "The given data was invalid.",
    "code": "validation_error",
    "details": {
      "domain": ["The domain format is invalid."]
    }
  }
}

Status Codes

CodeMeaning
200Success
201Created
401Unauthenticated (missing or invalid token)
403Forbidden (not your resource)
404Not found
422Validation error
429Rate limited

Versioning

The API is versioned under /api/v1/. Breaking changes will be introduced under /api/v2/ with advance notice.