# IZON API v1 (instructions for AI agents) > IZON is a Vietnamese domain and hosting reseller for small business owners who run their business with AI. > The owner gave you an IZON API key so you can manage their domains, DNS records, hosting and orders for them. > You may do everything through this API EXCEPT payment and identity verification (eKYC). Those stay with the human owner. > You need the ability to send HTTP requests with an Authorization header (or to run commands such as curl). If you cannot, say so plainly to the owner: tools such as Claude Code, Claude desktop with tools enabled, Codex or Cursor can do it. Most phone chat apps cannot call this API on their own yet. ## Base URL and authentication - Base URL: the origin of the site you read this file from, plus `/api/v1`. Example: if this file is at `https://izon.vn/llms.txt`, the base URL is `https://izon.vn/api/v1`. All paths below are relative to the site origin. - Every request (except `GET /api/v1`) needs this header: `Authorization: Bearer izon_<40 letters and digits>` - Requests and responses are JSON (`Content-Type: application/json`). Use UTF-8. - CORS is open to any origin. The API never uses cookies. - Rate limit: 60 requests per minute per key. On HTTP 429 wait 60 seconds, then retry. - Machine-readable spec: `/openapi.json` (OpenAPI 3.1). - The owner gets or replaces the key at `/quan-ly#ket-noi-ai` (after Google login). If the key returns 401 `invalid_key`, ask the owner to create a new key there. ## Rules you must follow 1. NEVER attempt payment. Do not ask the owner for bank, card or wallet details. Orders you create wait for the owner to pay. IZON emails the owner a bank-transfer QR code during business hours. 2. NEVER attempt identity verification (eKYC) or fill in the owner's identity profile (full name, ID card number, date of birth, address). Tell the owner to do it at `/quan-ly#ho-so`. 3. Confirm with the owner BEFORE: deleting a DNS record, replacing existing records (`"thay_the": true`), creating an order (`POST /api/v1/don-hang`), or sending a service request (`POST /api/v1/dich-vu`). Tell them the exact domain, record, price or package first. 4. Be honest about DNS status. A new or changed record is stored in IZON with `trang_thai: "cho_dong_bo"` (waiting to sync with the registrar). IZON's registrar connection is not automatic yet; IZON staff install records during business hours. Do not tell the owner a record is live until `trang_thai` is `"da_dong_bo"`, and even then DNS propagation can take minutes to hours. 5. Only the key owner's own data is visible. A domain that is not in `GET /api/v1/ten-mien` cannot be managed. 6. Keep the API key secret. Never print it back in full, never put it in URLs, logs, public pages or files that leave the owner's machine. 7. Talk to the owner in their language (usually Vietnamese), in plain words. Error messages in `loi` are Vietnamese and safe to show; use `code` (English) for your own logic. ## Response format Success: `{"ok": true, ...data}` Error: `{"ok": false, "code": "english_code", "loi": "Vietnamese message"}` with an HTTP status 400, 401, 404, 409, 429 or 500. Common codes: `unauthorized`, `invalid_key`, `rate_limited`, `invalid_json`, `not_found`, `domain_not_found`, `domain_not_paid`, `record_not_found`, `invalid_type`, `invalid_name`, `invalid_value`, `missing_value`, `private_ip`, `cname_at_root`, `cname_conflict`, `duplicate`, `records_exist`, `limit_reached`, `type_immutable`, `hosting_not_found`, `hosting_not_ready`, `profile_incomplete`, `empty_order`, `domain_taken`, `missing_param`, `missing_input`, `server_error`. ## Vietnamese field names | Field | Meaning | |---|---| | ten | name (domain name) | | ten_mien | domain / domains | | trang_thai | status | | ban_ghi | DNS record | | dong_bo / cho_dong_bo / da_dong_bo | sync / waiting to sync with registrar / synced to registrar | | ghi_chu, ghi_chu_dong_bo | note, sync note | | canh_bao | warning | | goi | package / plan name | | loai | kind (hosting, vps, email, ssl, web, seo, maps, tro_ly_ai) or order item kind (moi = new, gia_han = renewal) | | nam | years | | don, don_hang | order, orders | | yeu_cau_dich_vu | service requests | | thay_the | replace existing records (boolean) | | ten_phu | subdomain label, e.g. "shop" | | gan_host | point to host | | ngay_het_han | expiry date | | da_xac_thuc_chinh_chu | owner identity verified (eKYC done) | | tu_gia_han | auto-renew on | | khoa_chuyen | transfer lock on | | may_chu_ten | nameservers ("mac_dinh_izon" = IZON default) | | san_sang | ready (hosting has an IP) | | loi | error message (Vietnamese) | Domain statuses (`trang_thai` of a domain): `hoat_dong` active, `cho_ekyc` waiting for the owner's eKYC, `tam_khoa` suspended, `het_han` expired. Order statuses: `cho_thanh_toan` waiting for the owner to pay, `cho_xac_nhan` owner says paid and IZON is checking, `da_thanh_toan` paid, `da_huy` cancelled. Service request statuses: `moi` received (IZON will email a quote), `dang_xu_ly` in progress, `da_ban_giao` delivered, `da_huy` cancelled. ## Endpoints ### GET /api/v1 No auth. Returns links to this file, the OpenAPI spec and where to get a key. ### GET /api/v1/me Who the key belongs to. ``` {"ok":true,"nguoi":{"email":"chu@gmail.com","ten":"Nguyễn Văn A","loai":"ca_nhan","ho_so_day_du":true}, "so_ten_mien":2,"key":{"prefix":"izon_Ab12Cd"},"gioi_han":{"moi_phut":60}, "viec_chu_tai_khoan_tu_lam":["Thanh toán đơn hàng ...","Xác thực chính chủ eKYC ...","Điền hồ sơ người đứng tên ..."], "quan_ly":"https://izon.vn/quan-ly"} ``` ### GET /api/v1/kiem?ten={name} Check availability. `ten` = a label (`tiembanhmai`, checks .vn .com .com.vn) or a full name (`tiembanhmai.vn`, checks only that one). IZON sells .vn, .com and .com.vn. ``` {"ok":true,"ket_qua":[{"ten":"tiembanhmai.vn","trang_thai":"trong","gia_nam_dau_chua_thue":550000,"tien_1_nam_gom_thue":560000}], "chu_thich":{"trong":"còn trống, đặt được","co_chu":"đã có người đăng ký","khong_ro":"chưa kiểm được, kiểm lại khi đặt"}} ``` Prices are in VND. `gia_nam_dau_chua_thue` is the yearly list price before VAT; `tien_1_nam_gom_thue` is the 1-year total including VAT. Always quote prices from the API, never from memory. ### POST /api/v1/goi-y Domain name ideas for a business. Body (fill at least one field): ``` {"thuong_hieu":"Tiệm bánh Mai","nganh":"tiệm bánh kem","ho_ten":"","biet_danh":"","mo_ta":"bánh kem sinh nhật ở Thủ Đức"} ``` Response: `{"ok":true,"ai_chay":true,"goi_y":[{"ten":"tiembanhmai","nhom":"thuong_hieu","y_nghia":"..."}]}`. Ideas are labels without extension; check them with `/kiem`. Max 8 calls per minute. ### GET /api/v1/ten-mien The owner's domains plus names still waiting for payment. ``` {"ok":true, "ten_mien":[{"ten":"tiembanhmai.vn","trang_thai":"hoat_dong","da_xac_thuc_chinh_chu":true,"ngay_dang_ky":"2026-11-12","ngay_het_han":"2027-11-12","tu_gia_han":true,"khoa_chuyen":true,"may_chu_ten":"mac_dinh_izon"}], "dang_cho_thanh_toan":[{"ten":"tiembanhmai.com","ma_don":"IZ261113ABCD","trang_thai_don":"cho_thanh_toan"}]} ``` DNS can only be managed on domains in `ten_mien`. If the owner says "I bought X" and X is in `dang_cho_thanh_toan`, tell them the order is not paid yet. ### GET /api/v1/ten-mien/{ten} One domain with its DNS records. May include `canh_bao` (e.g. eKYC still pending: records are stored but the domain only works after the owner completes eKYC). ### GET /api/v1/ten-mien/{ten}/dns ``` {"ok":true,"ten_mien":"tiembanhmai.vn","dns":[ {"id":41,"type":"A","name":"@","ten_day_du":"tiembanhmai.vn","value":"103.97.125.10","ttl":3600,"priority":null, "trang_thai":"cho_dong_bo","created_by":"api","created_at":"2026-11-13 02:10:00","updated_at":"2026-11-13 02:10:00"}], "ghi_chu_dong_bo":"..."} ``` ### POST /api/v1/ten-mien/{ten}/dns Create one record. Body: ``` {"type":"A","name":"shop","value":"103.97.125.10","ttl":3600} {"type":"CNAME","name":"www","value":"tiembanhmai.vn"} {"type":"MX","name":"@","value":"smtp.google.com","priority":1} {"type":"TXT","name":"@","value":"google-site-verification=abc123"} {"type":"AAAA","name":"@","value":"2001:db8::1"} ``` - `type`: A, AAAA, CNAME, MX, TXT. - `name`: `@` for the root domain, a label like `www` or `shop`, or a full name like `shop.tiembanhmai.vn` (the domain suffix is stripped). `host` is accepted as an alias of `name`. - `value`: A = public IPv4 (private IPs are rejected), AAAA = IPv6, CNAME/MX = hostname, TXT = text up to 500 characters. - `ttl`: seconds, 300 to 86400, default 3600. `priority`: MX only, default 10. - CNAME is not allowed on `@`, and a CNAME cannot share a name with any other record. Returns 201 `{"ok":true,"ban_ghi":{...},"ghi_chu_dong_bo":"..."}`. Max 200 records per domain. ### PATCH /api/v1/ten-mien/{ten}/dns/{id} Change `name`, `value`, `ttl` and/or `priority` (`type` cannot change: delete and recreate instead). The record goes back to `cho_dong_bo`. ### DELETE /api/v1/ten-mien/{ten}/dns/{id} Ask the owner first. Returns `{"ok":true,"da_xoa":{...},"ghi_chu":"..."}`. If the record was already installed at the registrar, IZON removes it there during business hours. ### POST /api/v1/ten-mien/{ten}/gan-host Point a domain (or a subdomain) to a server. ``` {"ip":"103.97.125.10"} -> creates A @ -> ip and CNAME www -> {ten} {"hosting_id":7} -> same, using the IP of an IZON hosting from GET /api/v1/hosting {"ip":"103.97.125.10","ten_phu":"shop"} -> creates only A shop -> ip {"ip":"103.97.125.10","thay_the":true} -> also removes existing A/AAAA/CNAME records on those names ``` If records already exist on those names you get 409 `records_exist` with `ban_ghi_dang_co`. Show them to the owner; only if they agree, resend with `"thay_the": true`. If the domain already points to exactly this target, you get 200 and nothing changes. Returns 201 `{"ok":true,"ban_ghi":[...],"da_go":[...],"nguon_ip":"ip","ip":"103.97.125.10","ghi_chu_dong_bo":"..."}`. ### GET /api/v1/hosting Hosting and VPS the owner requested from IZON. ``` {"ok":true,"hosting":[{"id":7,"loai":"hosting","goi":"Cơ bản","ten_mien":"tiembanhmai.vn","trang_thai":"da_ban_giao","ip":"103.97.125.10","created_at":"...","san_sang":true}]} ``` Only items with `san_sang: true` (an IP was delivered) can be used with `gan-host` via `hosting_id`. If the owner's hosting is elsewhere, use its IP directly. ### GET /api/v1/don-hang Domain orders and service requests. ``` {"ok":true,"don_hang":[{"code":"IZ261113ABCD","items":[{"ten":"tiembanhmai.vn","tld":"vn","nam":1,"loai":"moi","truocThue":550000,"thue":10000,"tong":560000}], "subtotal":550000,"tax":10000,"total":560000,"status":"cho_thanh_toan","created_at":"...","paid_at":null}], "yeu_cau_dich_vu":[...],"chu_thich":{...}} ``` ### POST /api/v1/don-hang Create a domain order that WAITS FOR THE OWNER TO PAY. It never marks anything as paid. Confirm names, years and total with the owner first. ``` {"items":[{"ten":"tiembanhmai.vn","nam":1},{"ten":"tiembanhmai.com","nam":2},{"ten":"tiembanhmai.com.vn","nam":1,"loai":"gia_han"}]} ``` - `nam`: 1, 2, 3 or 5 years. `loai`: `moi` (new, default) or `gia_han` (renew a domain the owner already has). - Requires the owner's identity profile; otherwise 409 `profile_incomplete` (tell the owner to fill `/quan-ly#ho-so`). - 409 `domain_taken` if a name was registered meanwhile. Returns 201 with `don` (code, items, totals, `status: "cho_thanh_toan"`) and `thanh_toan` (what to tell the owner). ### POST /api/v1/dich-vu Request hosting, VPS, email or SSL. IZON emails the owner a quote; nothing is charged until the owner agrees and pays. ``` {"loai":"hosting","goi":"Hosting Doanh Nghiệp","ten_mien":"tiembanhmai.vn","ghi_chu":"Web bán bánh, khoảng 200 khách mỗi ngày"} ``` `loai`: hosting, vps, email, ssl, web (website design), seo, maps (Google Maps business profile), tro_ly_ai (AI assistant setup). Max 10 requests per hour. Returns 201 `{"ok":true,"yeu_cau":{...},"ghi_chu":"..."}`. ## Typical workflows ### "I bought domain X and hosting Y on IZON, set it up for me" 1. `GET /api/v1/ten-mien` and find X. If it is under `dang_cho_thanh_toan`, tell the owner to pay first and stop. If `trang_thai` is `cho_ekyc`, remind the owner to finish eKYC (you can still prepare records). 2. `GET /api/v1/hosting`. Find the hosting with `san_sang: true`. If none is ready, tell the owner IZON has not delivered the hosting yet, or ask for the IP of their hosting elsewhere. 3. `POST /api/v1/ten-mien/X/gan-host` with `{"hosting_id": }`. On 409 `records_exist`, show the existing records and ask before resending with `"thay_the": true`. 4. Tell the owner: records are saved and waiting for IZON to install them at the registrar (business hours), then propagation takes minutes to hours. Check later with `GET /api/v1/ten-mien/X/dns`. ### Point a domain to a hosting IP `POST /api/v1/ten-mien/{ten}/gan-host` with `{"ip":""}`. ### Create a subdomain `POST /api/v1/ten-mien/{ten}/gan-host` with `{"ip":"","ten_phu":"shop"}`, or `POST /api/v1/ten-mien/{ten}/dns` with `{"type":"CNAME","name":"shop","value":""}` for website builders that give a hostname instead of an IP. ### Business email from IZON `POST /api/v1/dich-vu` with `{"loai":"email","goi":"Email Công Ty","ten_mien":"","ghi_chu":""}` after the owner agrees. When IZON delivers and sends the MX records, add them with `POST /api/v1/ten-mien/{ten}/dns`. ### Email with another provider (for example Google Workspace) `POST /api/v1/ten-mien/{ten}/dns` with `{"type":"MX","name":"@","value":"smtp.google.com","priority":1}`. Add the SPF record if the owner wants: `{"type":"TXT","name":"@","value":"v=spf1 include:_spf.google.com ~all"}`. Follow the provider's current instructions if they differ. ### Verify ownership with a TXT record (Google, Facebook, Zalo) `POST /api/v1/ten-mien/{ten}/dns` with `{"type":"TXT","name":"@","value":""}`. Tell the owner to press "verify" on the platform only after `trang_thai` becomes `da_dong_bo`. ### Find and register a new domain `POST /api/v1/goi-y` (optional) -> `GET /api/v1/kiem?ten=...` -> tell the owner the names and prices -> on approval `POST /api/v1/don-hang` -> tell the owner IZON will email a QR code to pay. ## What is not available yet - Automatic sync with the domain registrar (records are installed by IZON staff during business hours). - Changing nameservers, transfer lock or auto-renew through the API (the owner can do it at `/quan-ly#ten-mien`). - Two-factor code (Google Authenticator) at login and when creating or viewing an API key (planned).