# WorkPhone SDK API Portal

WorkPhone SDK is a real-device phone control engine for Cunkebao, Super Admin, AI Employee, and any external project.

## Human entry points

- API Portal: /static/hub.html
- Swagger UI: /docs
- ReDoc: /redoc
- Health: /health

## Machine-readable API sources

- OpenAPI JSON: /openapi.json
- Full integration manifest: /api/v3/integration/manifest
- Modules: /api/v3/integration/modules
- Consumers: /api/v3/integration/consumers
- Cunkebao subset: /api/v3/integration/consumers/cunkebao
- Super Admin subset: /api/v3/integration/consumers/superadmin
- AI Employee subset: /api/v3/integration/consumers/ai_employee
- Runtime device capability: /api/v3/integration/capability/{device_id}?consumer=cunkebao
- Integration health: /api/v3/integration/health

## Recommended integration flow

1. Discover available APIs for your consumer role with /api/v3/integration/consumers/{consumer}.
2. Check runtime capability for a target device with /api/v3/integration/capability/{device_id}?consumer={consumer}.
3. Call concrete /api/v3/* APIs, such as /api/v3/message/send or /api/v3/hook/execute.
4. For WeChat production control, prefer WebSocket Agent + Frida Hook. Do not claim success without real-device evidence.

## Main consumers

- cunkebao: business messaging, contacts, groups, tags, moments, lead reporting, hook events.
- superadmin: connection provider switching, device management, Frida, risk control, global governance.
- ai_employee: OpenAI-compatible gateway, MCP tools, natural-language agent execution.
- common: health, discovery, devices, shared operational APIs.

## Documentation files

- Interface manifest guide: /workbench-docs/5%E3%80%81%E6%8E%A5%E5%8F%A3/07-%E5%AF%B9%E5%A4%96%E6%8E%A5%E5%8F%A3%E7%BB%9F%E4%B8%80%E6%B8%85%E5%8D%95/README.md
- Any-project integration manual: /workbench-docs/9%E3%80%81%E6%89%8B%E5%86%8C/02-%E6%93%8D%E4%BD%9C%E6%8C%87%E5%8D%97/%E5%B7%A5%E4%BD%9C%E6%89%8B%E6%9C%BA%C2%B7%E6%8E%A5%E5%8F%A3%E7%BD%91%E7%AB%99%E4%B8%8E%E4%BB%BB%E6%84%8F%E9%A1%B9%E7%9B%AE%E5%AF%B9%E6%8E%A5%E6%89%8B%E5%86%8C.md

## Current verified scale

- 33 integration modules
- 358 API endpoints in manifest
- 253 Cunkebao-ready endpoints across 18 modules

## Safety

Real-device validation is mandatory for production claims. Offline tests and mocked responses are regression tools only.
