{"openapi":"3.1.0","info":{"title":"Clogin Local Automation API","version":"1.0.1","description":"API HTTP cá»¥c bá» cá»§a Clogin (127.0.0.1) Äá» quáº£n lÃ½ profile anti-detect, má»/ÄÃ³ng trÃ¬nh duyá»t kÃ¨m CDP, quáº£n lÃ½ cookies, proxy, fingerprint, thÆ° má»¥c, tiá»n Ã­ch, dáº¥u trang, tá»± Äá»ng hoÃ¡ vÃ  cá»ng MCP tÃ­ch há»£p cho AI."},"externalDocs":{"description":"TÃ i liá»u Clogin API & MCP trá»±c tuyáº¿n","url":"https://clogin.nguyenquangcuong.vn/api"},"servers":[{"url":"http://127.0.0.1:40325","description":"Clogin Local Server (127.0.0.1)"}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT (HS256, sub=clogin-api)"}}},"security":[{"bearerAuth":[]}],"tags":[{"name":"Há» thá»ng","description":"Kiá»m tra káº¿t ná»i, tráº¡ng thÃ¡i vÃ  tÃ i liá»u API"},{"name":"MCP","description":"Cá»ng Model Context Protocol (Streamable HTTP JSON-RPC 2.0) cho AI"},{"name":"Profiles","description":"Táº¡o, sá»­a, xÃ³a, khá»i cháº¡y vÃ  ÄÃ³ng profile trÃ¬nh duyá»t"},{"name":"Cookies","description":"Xuáº¥t vÃ  nháº­p cookies cá»§a profile"},{"name":"ThÆ° má»¥c","description":"Quáº£n lÃ½ thÆ° má»¥c chá»©a profile"},{"name":"Fingerprint","description":"Kho 1.001 vÃ¢n tay thiáº¿t bá» vÃ  sinh vÃ¢n tay ngáº«u nhiÃªn"},{"name":"Proxy","description":"Quáº£n lÃ½ vÃ  kiá»m tra proxy (SOCKS5 / HTTP / HTTPS)"},{"name":"Tiá»n Ã­ch & Dáº¥u trang","description":"ThÆ° viá»n extension vÃ  bookmark"},{"name":"ThÃ¹ng rÃ¡c","description":"KhÃ´i phá»¥c hoáº·c xÃ³a vÄ©nh viá»n profile"},{"name":"Tá»± Äá»ng hoÃ¡","description":"Quáº£n lÃ½ vÃ  cháº¡y ká»ch báº£n Automation & WASM modules"}],"paths":{"/health":{"get":{"tags":["Há» thá»ng"],"summary":"Kiá»m tra API Äang hoáº¡t Äá»ng (khÃ´ng cáº§n token)","security":[],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"ok":true,"name":"clogin","version":"1.0.1","mcp_enabled":true,"mcp_url":"http://127.0.0.1:40325/mcp","docs_url":"https://clogin.nguyenquangcuong.vn/api"}}}}}}},"/status":{"get":{"tags":["Há» thá»ng"],"summary":"Tá»ng quan tráº¡ng thÃ¡i Clogin (sá» profile, Äang cháº¡y, proxy, MCP)","responses":{"200":{"description":"Tráº¡ng thÃ¡i há» thá»ng Clogin"}}}},"/openapi.json":{"get":{"tags":["Há» thá»ng"],"summary":"Táº£i Äáº·c táº£ OpenAPI 3.1 JSON (khÃ´ng cáº§n token)","security":[],"responses":{"200":{"description":"OpenAPI JSON"}}}},"/mcp":{"post":{"tags":["MCP"],"summary":"Cá»ng Streamable HTTP MCP (JSON-RPC 2.0) cho AI Model / AI Agent","description":"Há» trá»£ initialize, notifications/initialized, ping, tools/list, tools/call, resources/list, resources/read. XÃ¡c thá»±c qua header `Authorization: Bearer <token>` hoáº·c query `?token=<token>`.","requestBody":{"required":true,"content":{"application/json":{"example":{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"ai-client","version":"1.0.0"}}}}}},"responses":{"200":{"description":"JSON-RPC 2.0 response"}}},"get":{"tags":["MCP"],"summary":"ThÃ´ng tin tráº¡ng thÃ¡i & danh sÃ¡ch nÄng lá»±c cá»ng Clogin MCP","responses":{"200":{"description":"ThÃ´ng tin server MCP"}}}},"/profiles":{"get":{"tags":["Profiles"],"summary":"Liá»t kÃª toÃ n bá» profile cÃ¹ng tráº¡ng thÃ¡i cháº¡y & CDP","responses":{"200":{"description":"Máº£ng profile"}}},"post":{"tags":["Profiles"],"summary":"Táº¡o profile má»i vá»i fingerprint tÃ¹y chá»nh","requestBody":{"required":true,"content":{"application/json":{"example":{"name":"TÃ i khoáº£n #1","folder":"Facebook","notes":"Ghi chÃº","proxy":"socks5://user:pass@1.2.3.4:1080","color":"#f97316","refresh_rate":60,"fingerprint":{}}}}},"responses":{"200":{"description":"Metadata profile vá»«a táº¡o"}}}},"/profiles/temporary":{"post":{"tags":["Profiles"],"summary":"Táº¡o profile táº¡m (tá»± Äá»ng xÃ³a sáº¡ch sau khi ÄÃ³ng trÃ¬nh duyá»t)","requestBody":{"required":true,"content":{"application/json":{"example":{"name":"PhiÃªn táº¡m","platform":"windows","proxy":"http://user:pass@host:port","noise":{"canvas":true,"webgl":true}}}}},"responses":{"200":{"description":"ThÃ´ng tin profile táº¡m vá»«a táº¡o"}}}},"/profiles/{id}":{"get":{"tags":["Profiles"],"summary":"Láº¥y toÃ n bá» cáº¥u hÃ¬nh profile theo ID (kÃ¨m CDP náº¿u Äang cháº¡y)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Chi tiáº¿t profile"},"404":{"description":"KhÃ´ng tÃ¬m tháº¥y"}}},"patch":{"tags":["Profiles"],"summary":"Cáº­p nháº­t má»t pháº§n thÃ´ng tin profile (chá» trÆ°á»ng nÃ o gá»­i má»i Äá»i)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"name":"TÃªn má»i","folder":"Shopee","proxy_id":"","notes":"ÄÃ£ cáº­p nháº­t","color":"#2F80ED"}}}},"responses":{"200":{"description":"Profile sau cáº­p nháº­t"}}},"delete":{"tags":["Profiles"],"summary":"Chuyá»n profile vÃ o ThÃ¹ng rÃ¡c","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"ÄÃ£ chuyá»n vÃ o thÃ¹ng rÃ¡c"}}}},"/profiles/{id}/start":{"post":{"tags":["Profiles"],"summary":"Khá»i cháº¡y trÃ¬nh duyá»t profile vá»i CDP báº­t sáºµn","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"headless":false,"fresh":false,"proxy":"socks5://user:pass@host:port","chromium_args":[]}}}},"responses":{"200":{"description":"Tráº£ vá» pid, cdp.port, cdp.http_url, cdp.web_socket_debugger_url"},"409":{"description":"Profile Äang má» hoáº·c Äang ÄÆ°á»£c thÃ nh viÃªn khÃ¡c sá»­ dá»¥ng"}}}},"/profiles/{id}/stop":{"post":{"tags":["Profiles"],"summary":"ÄÃ³ng trÃ¬nh duyá»t profile Äang cháº¡y","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Tráº¡ng thÃ¡i ÄÃ£ dá»«ng vÃ  káº¿t quáº£ Äá»ng bá»"}}}},"/running":{"get":{"tags":["Profiles"],"summary":"Liá»t kÃª cÃ¡c profile Äang má» cÃ¹ng PID vÃ  Äá»a chá» CDP","responses":{"200":{"description":"Danh sÃ¡ch phiÃªn Äang cháº¡y"}}}},"/profiles/{id}/cookies":{"get":{"tags":["Cookies"],"summary":"Xuáº¥t toÃ n bá» cookies cá»§a profile dÆ°á»i dáº¡ng JSON","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"{ cookies: [...] }"}}},"post":{"tags":["Cookies"],"summary":"Nháº­p cookies vÃ o profile (há» trá»£ máº£ng JSON hoáº·c chuá»i Netscape / JSON / Facebook)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"cookies":[{"name":"sid","value":"abc","domain":".example.com","path":"/"}],"text":null}}}},"responses":{"200":{"description":"{ imported: <sá» lÆ°á»£ng> }"},"409":{"description":"Profile Äang cháº¡y, cáº§n ÄÃ³ng trÆ°á»c khi nháº­p"}}}},"/folders":{"get":{"tags":["ThÆ° má»¥c"],"summary":"Liá»t kÃª táº¥t cáº£ tÃªn thÆ° má»¥c Äang cÃ³","responses":{"200":{"description":"Máº£ng tÃªn thÆ° má»¥c"}}}},"/folders/{folder}":{"patch":{"tags":["ThÆ° má»¥c"],"summary":"Äá»i tÃªn thÆ° má»¥c","parameters":[{"name":"folder","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"name":"TÃªn thÆ° má»¥c má»i"}}}},"responses":{"200":{"description":"Sá» profile ÄÃ£ cáº­p nháº­t"}}},"delete":{"tags":["ThÆ° má»¥c"],"summary":"XÃ³a thÆ° má»¥c (?delete_profiles=true Äá» xÃ³a luÃ´n profile bÃªn trong)","parameters":[{"name":"folder","in":"path","required":true,"schema":{"type":"string"}},{"name":"delete_profiles","in":"query","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"Káº¿t quáº£ xÃ³a thÆ° má»¥c"}}}},"/folders/{folder}/profiles":{"post":{"tags":["ThÆ° má»¥c"],"summary":"Táº¡o profile má»i trá»±c tiáº¿p bÃªn trong má»t thÆ° má»¥c","parameters":[{"name":"folder","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Metadata profile vá»«a táº¡o"}}}},"/fingerprints":{"get":{"tags":["Fingerprint"],"summary":"Liá»t kÃª kho 1.001 vÃ¢n tay thiáº¿t bá» trong Clogin","responses":{"200":{"description":"Danh sÃ¡ch preset vÃ¢n tay"}}}},"/fingerprint/new":{"get":{"tags":["Fingerprint"],"summary":"Sinh ngáº«u nhiÃªn 1 vÃ¢n tay má»i (theo há» Äiá»u hÃ nh mÃ¡y hiá»n táº¡i)","responses":{"200":{"description":"{ fingerprint: { ... } }"}}}},"/fingerprint/new/{platform}":{"get":{"tags":["Fingerprint"],"summary":"Sinh ngáº«u nhiÃªn 1 vÃ¢n tay theo ná»n táº£ng (windows | macos | linux | android)","parameters":[{"name":"platform","in":"path","required":true,"schema":{"type":"string","enum":["windows","macos","linux","android"]}}],"responses":{"200":{"description":"{ fingerprint: { ... } }"}}}},"/proxies":{"get":{"tags":["Proxy"],"summary":"Liá»t kÃª proxy ÄÃ£ lÆ°u (áº©n máº­t kháº©u)","responses":{"200":{"description":"Máº£ng proxy"}}},"post":{"tags":["Proxy"],"summary":"ThÃªm proxy má»i (tá»± lá»c trÃ¹ng endpoint)","requestBody":{"content":{"application/json":{"example":{"proxy":"socks5://user:pass@1.2.3.4:1080","name":"VN-Resi-01","country":"VN"}}}},"responses":{"200":{"description":"Proxy ÄÃ£ lÆ°u"}}}},"/proxies/{id}":{"delete":{"tags":["Proxy"],"summary":"XÃ³a proxy theo ID","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"{ deleted: true, id }"}}}},"/proxies/{id}/test":{"post":{"tags":["Proxy"],"summary":"Kiá»m tra káº¿t ná»i TCP, UDP vÃ  vá» trÃ­ GeoIP cá»§a proxy","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Káº¿t quáº£ kiá»m tra proxy"}}}},"/extensions":{"get":{"tags":["Tiá»n Ã­ch & Dáº¥u trang"],"summary":"Liá»t kÃª thÆ° viá»n tiá»n Ã­ch (extensions)","responses":{"200":{"description":"Máº£ng extension"}}},"post":{"tags":["Tiá»n Ã­ch & Dáº¥u trang"],"summary":"CÃ i tiá»n Ã­ch tá»« Chrome Web Store URL / ID hoáº·c ÄÆ°á»ng dáº«n cá»¥c bá» (.crx/.zip/folder)","requestBody":{"content":{"application/json":{"example":{"url":"https://chromewebstore.google.com/detail/..."}}}},"responses":{"200":{"description":"Extension vá»«a thÃªm"}}}},"/extensions/{id}":{"delete":{"tags":["Tiá»n Ã­ch & Dáº¥u trang"],"summary":"XÃ³a tiá»n Ã­ch khá»i thÆ° viá»n","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"{ deleted: true, id }"}}}},"/bookmarks":{"get":{"tags":["Tiá»n Ã­ch & Dáº¥u trang"],"summary":"Liá»t kÃª dáº¥u trang","responses":{"200":{"description":"Máº£ng dáº¥u trang"}}},"post":{"tags":["Tiá»n Ã­ch & Dáº¥u trang"],"summary":"ThÃªm hoáº·c cáº­p nháº­t dáº¥u trang","requestBody":{"content":{"application/json":{"example":{"title":"Google","url":"https://google.com","folder":""}}}},"responses":{"200":{"description":"Dáº¥u trang ÄÃ£ lÆ°u"}}}},"/bookmarks/{id}":{"delete":{"tags":["Tiá»n Ã­ch & Dáº¥u trang"],"summary":"XÃ³a dáº¥u trang","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"{ deleted: true, id }"}}}},"/trash":{"get":{"tags":["ThÃ¹ng rÃ¡c"],"summary":"Liá»t kÃª profile trong thÃ¹ng rÃ¡c","responses":{"200":{"description":"Danh sÃ¡ch thÃ¹ng rÃ¡c"}}}},"/trash/{id}/restore":{"post":{"tags":["ThÃ¹ng rÃ¡c"],"summary":"KhÃ´i phá»¥c profile tá»« thÃ¹ng rÃ¡c","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Profile ÄÃ£ khÃ´i phá»¥c"}}}},"/trash/{id}":{"delete":{"tags":["ThÃ¹ng rÃ¡c"],"summary":"XÃ³a vÄ©nh viá»n profile khá»i thÃ¹ng rÃ¡c","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"{ purged: true, id }"}}}},"/automation/projects":{"get":{"tags":["Tá»± Äá»ng hoÃ¡"],"summary":"Liá»t kÃª dá»± Ã¡n tá»± Äá»ng hoÃ¡","responses":{"200":{"description":"Máº£ng dá»± Ã¡n"}}},"post":{"tags":["Tá»± Äá»ng hoÃ¡"],"summary":"Táº¡o dá»± Ã¡n tá»± Äá»ng hoÃ¡ má»i","requestBody":{"content":{"application/json":{"example":{"name":"Ká»ch báº£n má»i"}}}},"responses":{"200":{"description":"Dá»± Ã¡n vá»«a táº¡o"}}}},"/automation/projects/{id}":{"get":{"tags":["Tá»± Äá»ng hoÃ¡"],"summary":"Xem chi tiáº¿t dá»± Ã¡n","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Chi tiáº¿t dá»± Ã¡n"}}},"put":{"tags":["Tá»± Äá»ng hoÃ¡"],"summary":"LÆ°u ÄÃ¨ toÃ n bá» dá»± Ã¡n","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Dá»± Ã¡n ÄÃ£ lÆ°u"}}},"delete":{"tags":["Tá»± Äá»ng hoÃ¡"],"summary":"XÃ³a dá»± Ã¡n","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"{ deleted: true }"}}}},"/automation/projects/{id}/run":{"post":{"tags":["Tá»± Äá»ng hoÃ¡"],"summary":"Báº¯t Äáº§u cháº¡y dá»± Ã¡n tá»± Äá»ng hoÃ¡","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"{ project_id, running: true }"}}}},"/automation/projects/{id}/stop":{"post":{"tags":["Tá»± Äá»ng hoÃ¡"],"summary":"YÃªu cáº§u dá»«ng dá»± Ã¡n Äang cháº¡y","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"{ project_id, stopping: true }"}}}},"/automation/projects/{id}/status":{"get":{"tags":["Tá»± Äá»ng hoÃ¡"],"summary":"Xem tiáº¿n Äá» cháº¡y cá»§a dá»± Ã¡n","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Tráº¡ng thÃ¡i worker"}}}},"/automation/runs":{"get":{"tags":["Tá»± Äá»ng hoÃ¡"],"summary":"Liá»t kÃª táº¥t cáº£ phiÃªn automation Äang cháº¡y","responses":{"200":{"description":"Máº£ng phiÃªn cháº¡y"}}}},"/automation/modules":{"get":{"tags":["Tá»± Äá»ng hoÃ¡"],"summary":"Liá»t kÃª WASM modules ÄÃ£ cÃ i","responses":{"200":{"description":"Máº£ng module"}}},"post":{"tags":["Tá»± Äá»ng hoÃ¡"],"summary":"CÃ i WASM module tá»« file .wasm cá»¥c bá»","requestBody":{"content":{"application/json":{"example":{"path":"D:\\modules\\script.wasm"}}}},"responses":{"200":{"description":"ThÃ´ng tin module"}}}}}}