API Reference

REST API

Complete API reference for AgentEmail. Create inboxes, send/receive emails, manage domains, set up webhooks, and integrate with AI agents.

Base URL

https://api.agentemail.email/api/v1

Authentication

Public endpoints require no auth. Authenticated endpoints accept either X-API-Key: ak_... or Authorization: Bearer <jwt>.

Response Format

All responses follow a consistent JSON envelope:

{
  "success": true,
  "data": { ... }     // on success
  "error": "message"  // on failure
}

Endpoints

Quick Example

Create a temporary inbox and extract a verification code — no authentication required:

cURL
# 1. Create inbox
curl -X POST https://api.agentemail.email/api/v1/public/inbox

# 2. (send a verification email to the inbox address)

# 3. Extract code
curl https://api.agentemail.email/api/v1/public/inbox/{token}/code

Response

{ "success": true, "code": "847293" }