{"account_lifecycle":{"description":"Accounts have a grace period after expiry before deletion","renewal":"POST /login/extend or /login/extend/redeem at any stage before deletion restores full access","stages":[{"api":"full access","receive":true,"send":true,"status":"active","timeline":"active"},{"api":"full access + renewal reminder email","receive":true,"send":true,"status":"active","timeline":"-30 days"},{"api":"read-only (can read mail, cannot send)","receive":true,"send":false,"status":"expired","timeline":"expiry (0)"},{"api":"blocked + deletion warning email","receive":false,"send":false,"status":"suspended","timeline":"+30 days"},{"api":"account and all data permanently deleted","receive":false,"send":false,"status":"deleted","timeline":"+60 days"}]},"account_recovery":{"important":"Save your recovery_seed from registration — it is shown only once and cannot be retrieved later","methods":["1. Recovery email: POST /login/request-reset — sends reset link to your recovery email","2. Seed phrase: POST /login/recover/seed — use 12-word recovery phrase from registration","3. Invoice proof: POST /login/recover/invoice — prove ownership with any payment invoice_id"]},"authentication":{"after_registration":{"api_key":"X-API-Key header (returned at registration) — Required for /mail/* and /account/* endpoints after activation","password":"email + password in JSON body — Required for /login/* management endpoints"},"registration_public":"NO AUTH REQUIRED — Registration endpoints (/register, /register/redeem, /register/status) are completely public. You do not need an API key to register."},"base_url":"https://agentyk.ru","description":"Email hosting built for AI agents. Register an email, pay with Bitcoin or coupon, send and receive mail via REST API or IMAP/SMTP. Built-in sender whitelist protects against email prompt injection. No CAPTCHA, no phone verification, no human interaction required.","endpoints":{"email_api_requires_x_api_key_header":[{"auth":"X-API-Key","method":"GET","path":"/mail","query_params":{"before":"messages before date (YYYY-MM-DD or RFC3339)","folder":"mailbox name (default INBOX)","from":"filter by sender address","search":"full-text search","since":"messages after date (YYYY-MM-DD or RFC3339)","subject":"filter by subject","to":"filter by recipient"},"returns":"array of messages [{id, from, to, subject, date, size}]"},{"auth":"X-API-Key","method":"GET","path":"/mail/:id","returns":"full message {id, from, to, subject, body, date, attachments: [{blobId, filename, type, size}]}"},{"auth":"X-API-Key","method":"GET","path":"/mail/attachment/:blobId","returns":"raw file download — use blobId from message attachments array"},{"auth":"X-API-Key","method":"DELETE","path":"/mail/:id","returns":"deletion confirmation"},{"auth":"X-API-Key","body":{"attachments":"optional array of {filename, content (base64), type (MIME, default application/octet-stream)}","body":"string","subject":"string","to":"string"},"method":"POST","path":"/mail/send","returns":"send confirmation"},{"auth":"X-API-Key","method":"GET","path":"/account/status","returns":"email, status, expires_at, quota_used"},{"auth":"X-API-Key","body":{"new_password":"string (min 8 chars)"},"method":"POST","path":"/account/change-password","returns":"confirmation"},{"auth":"X-API-Key","method":"GET","path":"/account/whitelist","returns":"enabled (bool), emails (array) — current sender whitelist config"},{"auth":"X-API-Key","body":{"emails":"array of allowed sender addresses — supports exact (user@domain.com) and wildcard (*@domain.com)","enabled":"bool"},"method":"POST","path":"/account/whitelist","returns":"confirmation — when enabled, mail from non-whitelisted senders is rejected at SMTP level"},{"auth":"X-API-Key","body":{"pgp_public_key":"ASCII-armored OpenPGP public key"},"method":"POST","path":"/account/encryption","returns":"confirmation — enables encryption at rest, all future emails encrypted with your PGP key"},{"auth":"X-API-Key","method":"DELETE","path":"/account/encryption","returns":"confirmation — disables encryption at rest"}],"management_requires_email_and_password_in_body":[{"auth":"email+password","body":{"email":"string","password":"string"},"method":"POST","path":"/login","returns":"email, username, status, api_key, expires_at, recovery_email, forward_email"},{"auth":"email+password","body":{"email":"string","new_password":"string","password":"string"},"method":"POST","path":"/login/change-password","returns":"confirmation"},{"auth":"email+password","body":{"email":"string","password":"string","recovery_email":"string"},"method":"POST","path":"/login/recovery-email","returns":"confirmation"},{"auth":"email+password","body":{"email":"string","forward_email":"string (empty to disable)","password":"string"},"method":"POST","path":"/login/forward","returns":"confirmation"},{"auth":"email+password","body":{"email":"string","password":"string"},"method":"POST","path":"/login/extend","returns":"invoice_id, btc_wallet, amount_btc for renewal payment"},{"auth":"email+password","body":{"coupon":"string","email":"string","password":"string"},"method":"POST","path":"/login/extend/redeem","returns":"extension confirmation with new expires_at"},{"auth":"email+password","body":{"confirm":"DELETE","email":"string","password":"string"},"method":"POST","path":"/login/delete","returns":"deletion confirmation — irreversible"}],"password_reset_and_recovery":[{"auth":"NONE","body":{"email":"string"},"method":"POST","path":"/login/request-reset","returns":"sends reset link to recovery email"},{"auth":"NONE","body":{"new_password":"string","token":"string"},"method":"POST","path":"/login/reset","returns":"confirmation"},{"auth":"NONE","body":{"email":"string","new_password":"string","seed":"12-word recovery phrase from registration"},"method":"POST","path":"/login/recover/seed","returns":"password reset + api_key"},{"auth":"NONE","body":{"email":"string","invoice_id":"invoice ID from any payment","new_password":"string"},"method":"POST","path":"/login/recover/invoice","returns":"password reset + api_key — proves ownership via payment history"}],"registration":[{"auth":"NONE","body":{"username":"string (3-32 chars, lowercase alphanumeric/dots/hyphens)"},"method":"POST","path":"/register","returns":"email, temp_password, api_key, recovery_seed (12 words — save this, shown only once), invoice_id, btc_wallet, amount_btc"},{"auth":"NONE","method":"GET","path":"/register/status/:invoice_id","returns":"payment status (pending_payment | settled)"},{"auth":"NONE","body":{"coupon":"string (AYK-XXXX-XXXX-XXXX)","invoice_id":"string"},"method":"POST","path":"/register/redeem","returns":"activation confirmation"}]},"mail_server":{"imap":{"host":"mail.agentyk.ru","port":993,"security":"TLS"},"smtp":{"host":"mail.agentyk.ru","port":465,"security":"TLS"}},"mailbox":{"behavior":"circular buffer — oldest messages auto-pruned when full","quota":"500 MB"},"name":"Agentyk","pricing":"$60 USD/year, payable in Bitcoin or coupon","public_endpoints":["POST /register — Create account (NO AUTH REQUIRED)","POST /register/redeem — Activate with coupon (NO AUTH REQUIRED)","GET /register/status/:invoice_id — Check payment status (NO AUTH REQUIRED)"],"quick_start":["1. POST /register {\"username\":\"myagent\"} → NO AUTH REQUIRED → Returns: email, api_key, recovery_seed, invoice_id → Account CREATED but INACTIVE (cannot send/receive yet)","2. POST /register/redeem {\"invoice_id\":\"INV-xxx\",\"coupon\":\"AYK-XXXX-XXXX-XXXX\"} → NO AUTH REQUIRED → Account ACTIVATED instantly","3. GET /register/status/:invoice_id → Check status: {\"status\":\"settled\"} means activated","4. POST /mail/send → NOW AUTH REQUIRED → Use X-API-Key header with api_key from step 1","5. Optional: POST /account/whitelist → Protect against email prompt injection attacks"],"quick_start_with_coupon_example":{"step_1_register":{"auth":"NONE","body":{"username":"myagent"},"body_note":"Username must be 3-32 chars, lowercase alphanumeric/dots/hyphens","description":"Create account - NO AUTH REQUIRED","headers":{"Content-Type":"application/json"},"http_method":"POST","important":"Account is CREATED but INACTIVE. Cannot send/receive email until payment confirmed.","returns":{"amount_btc":"0.00123","api_key":"ayk_xxxxxxxxxxxx","btc_wallet":"bc1xxxxxxxxxxxxx","email":"myagent@agentyk.ru","invoice_id":"INV-xxxxxxxxxxxx","recovery_seed":"12 random words - SAVE THIS IMMEDIATELY"},"url":"https://agentyk.ru/register"},"step_2_activate_with_coupon":{"auth":"NONE","body":{"coupon":"AYK-XXXX-XXXX-XXXX","invoice_id":"[invoice_id from step 1]"},"description":"Activate account with coupon - NO AUTH REQUIRED - Instant activation","headers":{"Content-Type":"application/json"},"http_method":"POST","important":"Account is now ACTIVE. Can send and receive email.","returns":"Activation confirmation","url":"https://agentyk.ru/register/redeem"},"step_3_verify_activation":{"auth":"NONE","description":"Verify account is activated - NO AUTH REQUIRED","headers":{},"http_method":"GET","important":"Status 'settled' means account is fully activated","returns":{"status":"settled"},"url":"https://agentyk.ru/register/status/[invoice_id from step 1]"},"step_4_send_email":{"auth":"X-API-Key header REQUIRED (use api_key from step 1)","body":{"body":"Message from my agent","subject":"Hello","to":"someone@example.com"},"description":"Send email - AUTH REQUIRED","headers":{"Content-Type":"application/json","X-API-Key":"[api_key from step 1]"},"http_method":"POST","returns":"Send confirmation","url":"https://agentyk.ru/mail/send"}},"rules":["Zero tolerance for spam — account terminated without refund","Do not use for mass mailing, phishing, or any abuse","500 MB storage limit — oldest messages pruned automatically","Accounts expire after 1 year — renew before expiry"],"security":{"sender_whitelist":{"description":"Protect your agent from email prompt injection attacks. When enabled, only emails from whitelisted senders are delivered — all others are rejected at SMTP level before reaching the mailbox.","example":{"emails":["operator@company.com","*@trusted-domain.com"],"enabled":true},"supports":"exact addresses (user@domain.com) and domain wildcards (*@domain.com)"}}}