API दस्तावेज़

autonknowme अस्थायी ईमेल सेवा के लिए REST और MCP संदर्भ। Base URL: https://autonknowme.com। JSON in, JSON out। मुफ़्त — कोई plan tiers नहीं, कोई paywalled key नहीं।

प्रमाणीकरण

OAuth 2.1 bearer tokens, एजेंट के self-registration पर जारी किए जाते हैं। Registration ही एकमात्र unauthenticated call है; हर दूसरा REST call और हर MCP tool call सर्वर पर token के विरुद्ध जाँचा जाता है।

POST /api/v1/agents/register
{ "identifier": "<agent public key or identifier>",
  "webhook_url": "https://… (optional)" }

→ 201 { "agent_id": "agt_…", "token": "akm_…", "token_type": "Bearer" }

# then, on every call:
Authorization: Bearer akm_…

REST endpoints

POST   /api/v1/agents/register        register → agent_id + bearer token (no auth)
POST   /api/v1/inboxes                create inbox { domain?, local_part? }
GET    /api/v1/inboxes                list your active inboxes
GET    /api/v1/inboxes/:id/emails     list emails (newest first, previews + codes)
GET    /api/v1/emails/:id?inbox_id=   read one email (text, codes, links)
DELETE /api/v1/inboxes/:id            delete inbox and its emails
POST   /api/v1/inboxes/:id/activate   bind to a task/site { task }
GET    /api/v1/account                usage + limits
GET    /api/v1/health                 service health (no auth)

इनबॉक्स बनाएँ

→ { inbox_id, address, domain, created_at, expires_at }

पते आंतरिक क्रम से आते हैं; सार्वजनिक local part उसका one-way hash है, इसलिए अगला पता कभी अनुमानित या जबरन नहीं लिया जा सकता। वैकल्पिक custom local part, autonknowme.com या autonknowme.store पर।

ईमेल पढ़ें

→ { email_id, from, subject, received_at, codes[], links[{url, kind}], text }

Text 20,000 characters पर काटा जाता है। Link kinds: verification, magic-link, password-reset।

MCP tools — https://autonknowme.com/mcp

Streamable HTTP transport, JSON-RPC 2.0 (initialize, tools/list, tools/call)। वही bearer token, वही limits, REST जैसा ही audit log।

register_agent(identifier, webhook_url?)
    → agent_id + bearer token. First call in the lifecycle.
create_inbox(domain?, local_part?)
    → address, inbox_id, expires_at (10 minutes)
get_verification(inbox_id, timeout_seconds = 60, range 5–300)
    → { found, code, link, codes[], links[] } — just the credential
wait_for_email(inbox_id, from?, subject?, since?, timeout_seconds = 60)
    → the full matching email
list_emails(inbox_id)
    → newest first, previews + detected codes
read_email(inbox_id, email_id)
    → plain text (20,000 char cap), codes + links extracted
list_inboxes()
    → the calling agent's active inboxes
delete_inbox(inbox_id)
    → deletes the inbox and its emails
activate_assignment(inbox_id, task)
    → binds agent + inbox to a task/site; utilization counting starts
get_account()
    → usage: requests today/remaining, inboxes active/created, limits

Webhooks

प्रति एजेंट एक callback URL, registration पर सेट किया जाता है। Events: email.received, inbox.created, inbox.expired। Delivery best-effort है, छोटे retries के साथ, और यह कभी मेल या expiry को नहीं रोकती। Payloads में कभी message body या verification code नहीं होता।

{ "event": "email.received", "timestamp": "…",
  "data": { "emailId": "…", "inboxId": "…", "from": "…", "subject": "…" } }

त्रुटियाँ और rate limits

त्रुटि का स्वरूप

{ "error": { "code": "…", "message": "…" } }

400 invalid request · 401 unauthorized (missing/invalid token) · 404 not found · 409 conflict (address in use, task already bound) · 410 inbox expired · 429 rate limited.

Rate-limit headers

X-RateLimit-Limit: 3000
X-RateLimit-Remaining: 2997

प्रति एजेंट limits: 60 inbox creations/hour, 3,000 requests/day, 10-minute inbox TTL, प्रति site/task एक inbox।

नए हैं?

डेवलपर अवलोकन से शुरू करें →