Files
gochat/docs/reports/ROUTE_GAP_REPORT.md
T
rogee aeddedf2a3 Reorganize repo: backend/, deploy/, docs/ layout + AGENTS.md
Restructure the monorepo into clear top-level directories:
- backend/: Go module root (cmd, internal, pkg, configs, migrations,
  docs/swagger, scripts, tests, go.mod, Makefile, .air.toml)
- deploy/: Docker (Dockerfile, docker-compose*), quickstart, fluentd
- docs/: project documentation + reports/ (moved from repo root)
- AGENTS.md: new AI coding-agent guide at repo root

Update all references to the new layout:
- Dockerfile: COPY backend/go.mod, COPY backend/ (context = repo root)
- docker-compose files: context ../.., dockerfile deploy/docker/Dockerfile,
  env_file ../../.env, volume mounts ../../backend:/app
- deploy/quickstart/compose.yaml: dockerfile deploy/docker/Dockerfile
- CI: working-directory: backend for go commands, file deploy/docker/Dockerfile,
  coverage path backend/coverage.out, health_check backend/scripts/
- backend/Makefile: docker target uses -f ../deploy/docker/Dockerfile ../
- README: architecture tree, quickstart, config paths updated

Move root stray scripts (rename_models.*, run_m11_tests.sh, verify_build.sh,
gorm_bool_main.go) to backend/scripts/legacy/. All moves via git mv to
preserve history. Build, vet, SQLite tests, and docker compose config verified.
2026-07-07 14:44:12 +08:00

505 lines
39 KiB
Markdown

# GoChat vs Chatwoot 路由差距报告
生成时间: 2026-06-03T15:09:00.174781
## 概览
- Chatwoot路由总数: 473
- GoChat路由总数: 0
- 已覆盖: 0 (0.0%)
- 缺失: 473
- GoChat额外: 0
## 缺失路由清单
### Enterprise API (5条)
- `GET /enterprise/api/v1/accounts/:id/limits` → enterprise/accounts#limits
- `POST /enterprise/api/v1/accounts/:id/checkout` → enterprise/accounts#checkout
- `POST /enterprise/api/v1/accounts/:id/subscription` → enterprise/accounts#subscription
- `POST /enterprise/api/v1/accounts/:id/toggle_deletion` → enterprise/accounts#toggle_deletion
- `POST /enterprise/api/v1/accounts/:id/topup_checkout` → enterprise/accounts#topup_checkout
### Platform API (21条)
- `DELETE /platform/api/v1/accounts/:id` → platform/accounts#destroy
- `DELETE /platform/api/v1/accounts/:account_id/account_users` → platform/account_users#destroy
- `DELETE /platform/api/v1/agent_bots/:id` → platform/agent_bots#destroy
- `DELETE /platform/api/v1/agent_bots/:id/avatar` → platform/agent_bots#delete_avatar
- `DELETE /platform/api/v1/users/:id` → platform/users#destroy
- `GET /platform/api/v1/accounts` → platform/accounts#index
- `GET /platform/api/v1/accounts/:id` → platform/accounts#show
- `GET /platform/api/v1/accounts/:account_id/account_users` → platform/account_users#index
- `GET /platform/api/v1/agent_bots` → platform/agent_bots#index
- `GET /platform/api/v1/agent_bots/:id` → platform/agent_bots#show
- `GET /platform/api/v1/users/:id` → platform/users#show
- `GET /platform/api/v1/users/:id/login` → platform/users#login
- `POST /platform/api/v1/accounts` → platform/accounts#create
- `POST /platform/api/v1/accounts/:account_id/account_users` → platform/account_users#create
- `POST /platform/api/v1/accounts/:account_id/email_channel_migrations` → platform/email_channel_migrations#create
- `POST /platform/api/v1/agent_bots` → platform/agent_bots#create
- `POST /platform/api/v1/users` → platform/users#create
- `POST /platform/api/v1/users/:id/token` → platform/users#token
- `PUT /platform/api/v1/accounts/:id` → platform/accounts#update
- `PUT /platform/api/v1/agent_bots/:id` → platform/agent_bots#update
- `PUT /platform/api/v1/users/:id` → platform/users#update
### Public API (15条)
- `GET /public/api/v1/contacts/:id` → public/contacts#show
- `GET /public/api/v1/conversations` → public/conversations#index
- `GET /public/api/v1/conversations/:id` → public/conversations#show
- `GET /public/api/v1/conversations/:id/messages` → public/messages#index
- `GET /public/api/v1/csat_survey` → public/csat_survey#show
- `GET /public/api/v1/inboxes` → public/inboxes#index
- `PATCH /public/api/v1/contacts/:id` → public/contacts#update
- `PATCH /public/api/v1/conversations/:id/messages/:message_id` → public/messages#update
- `PATCH /public/api/v1/csat_survey` → public/csat_survey#update
- `POST /public/api/v1/contacts` → public/contacts#create
- `POST /public/api/v1/conversations` → public/conversations#create
- `POST /public/api/v1/conversations/:id/messages` → public/messages#create
- `POST /public/api/v1/conversations/:id/toggle_status` → public/conversations#toggle_status
- `POST /public/api/v1/conversations/:id/toggle_typing` → public/conversations#toggle_typing
- `POST /public/api/v1/conversations/:id/update_last_seen` → public/conversations#update_last_seen
### V1 Account级-其他 (335条)
- `DELETE /api/v1/accounts/:account_id/agent_bots/:id` → agent_bots#destroy
- `DELETE /api/v1/accounts/:account_id/agent_bots/:id/avatar` → agent_bots#delete_avatar
- `DELETE /api/v1/accounts/:account_id/agent_capacity_policies/:id` → agent_capacity_policies#destroy
- `DELETE /api/v1/accounts/:account_id/agents/:id` → agents#destroy
- `DELETE /api/v1/accounts/:account_id/assignment_policies/:id` → assignment_policies#destroy
- `DELETE /api/v1/accounts/:account_id/assignment_policies/:assignment_policy_id/inboxes/:inbox_id` → assignment_policies/inboxes#destroy
- `DELETE /api/v1/accounts/:account_id/automation_rules/:id` → automation_rules#destroy
- `DELETE /api/v1/accounts/:account_id/campaigns/:id` → campaigns#destroy
- `DELETE /api/v1/accounts/:account_id/canned_responses/:id` → canned_responses#destroy
- `DELETE /api/v1/accounts/:account_id/captain/assistants/:id` → captain/assistants#destroy
- `DELETE /api/v1/accounts/:account_id/captain/assistants/:assistant_id/inboxes/:inbox_id` → captain/assistants/inboxes#destroy
- `DELETE /api/v1/accounts/:account_id/captain/assistants/:assistant_id/scenarios/:id` → captain/scenarios#destroy
- `DELETE /api/v1/accounts/:account_id/captain/custom_tools/:id` → captain/custom_tools#destroy
- `DELETE /api/v1/accounts/:account_id/captain/documents/:id` → captain/documents#destroy
- `DELETE /api/v1/accounts/:account_id/companies/:id` → companies#destroy
- `DELETE /api/v1/accounts/:account_id/companies/:id/avatar` → companies#delete_avatar
- `DELETE /api/v1/accounts/:account_id/companies/:id/contacts/:contact_id` → companies/contacts#destroy
- `DELETE /api/v1/accounts/:account_id/contacts/:id` → contacts#destroy
- `DELETE /api/v1/accounts/:account_id/contacts/:id/avatar` → contacts#delete_avatar
- `DELETE /api/v1/accounts/:account_id/contacts/:id/notes/:note_id` → contacts/notes#destroy
- `DELETE /api/v1/accounts/:account_id/conversations/:id` → conversations#destroy
- `DELETE /api/v1/accounts/:account_id/conversations/:conversation_id/draft_messages` → conversations/draft_messages#destroy
- `DELETE /api/v1/accounts/:account_id/conversations/:conversation_id/messages/:id` → conversations/messages#destroy
- `DELETE /api/v1/accounts/:account_id/conversations/:conversation_id/participants` → conversations/participants#destroy
- `DELETE /api/v1/accounts/:account_id/custom_attribute_definitions/:id` → custom_attribute_definitions#destroy
- `DELETE /api/v1/accounts/:account_id/custom_filters/:id` → custom_filters#destroy
- `DELETE /api/v1/accounts/:account_id/custom_roles/:id` → custom_roles#destroy
- `DELETE /api/v1/accounts/:account_id/dashboard_apps/:id` → dashboard_apps#destroy
- `DELETE /api/v1/accounts/:account_id/inbox_limits/:id` → inbox_limits#destroy
- `DELETE /api/v1/accounts/:account_id/inbox_members` → inbox_members#destroy
- `DELETE /api/v1/accounts/:account_id/inboxes/:id` → inboxes#destroy
- `DELETE /api/v1/accounts/:account_id/inboxes/:inbox_id/assignment_policy` → inboxes/assignment_policy#destroy
- `DELETE /api/v1/accounts/:account_id/inboxes/:id/avatar` → inboxes#delete_avatar
- `DELETE /api/v1/accounts/:account_id/inboxes/:inbox_id/instagram_comments/:comment_id` → instagram_channel#delete_comment
- `DELETE /api/v1/accounts/:account_id/integrations/hooks/:id` → integrations/hooks#destroy
- `DELETE /api/v1/accounts/:account_id/integrations/linear` → integrations/linear#destroy
- `DELETE /api/v1/accounts/:account_id/integrations/notion` → integrations/notion#destroy
- `DELETE /api/v1/accounts/:account_id/integrations/shopify` → integrations/shopify#destroy
- `DELETE /api/v1/accounts/:account_id/integrations/slack` → integrations/slack#destroy
- `DELETE /api/v1/accounts/:account_id/labels/:id` → labels#destroy
- `DELETE /api/v1/accounts/:account_id/macros/:id` → macros#destroy
- `DELETE /api/v1/accounts/:account_id/notifications/:id` → notifications#destroy
- `DELETE /api/v1/accounts/:account_id/portals/:id` → portals#destroy
- `DELETE /api/v1/accounts/:account_id/portals/:portal_id/articles/:id` → articles#destroy
- `DELETE /api/v1/accounts/:account_id/portals/:portal_id/categories/:id` → categories#destroy
- `DELETE /api/v1/accounts/:account_id/portals/:id/logo` → portals#delete_logo
- `DELETE /api/v1/accounts/:account_id/portals/articles/bulk_actions/delete_articles` → articles/bulk_actions#delete_articles
- `DELETE /api/v1/accounts/:account_id/sla_policies/:id` → sla_policies#destroy
- `DELETE /api/v1/accounts/:account_id/teams/:id` → teams#destroy
- `DELETE /api/v1/accounts/:account_id/teams/:team_id/team_members` → team_members#destroy
- `DELETE /api/v1/accounts/:account_id/webhooks/:id` → webhooks#destroy
- `GET /api/v1/accounts/:account_id` → accounts#show
- `GET /api/v1/accounts/:account_id/agent_bots` → agent_bots#index
- `GET /api/v1/accounts/:account_id/agent_bots/:id` → agent_bots#show
- `GET /api/v1/accounts/:account_id/agent_capacity_policies` → agent_capacity_policies#index
- `GET /api/v1/accounts/:account_id/agent_capacity_policies/:id` → agent_capacity_policies#show
- `GET /api/v1/accounts/:account_id/agents` → agents#index
- `GET /api/v1/accounts/:account_id/applied_slas` → applied_slas#index
- `GET /api/v1/accounts/:account_id/applied_slas/download` → applied_slas#download
- `GET /api/v1/accounts/:account_id/applied_slas/metrics` → applied_slas#metrics
- `GET /api/v1/accounts/:account_id/assignable_agents` → assignable_agents#index
- `GET /api/v1/accounts/:account_id/assignment_policies` → assignment_policies#index
- `GET /api/v1/accounts/:account_id/assignment_policies/:id` → assignment_policies#show
- `GET /api/v1/accounts/:account_id/assignment_policies/:assignment_policy_id/inboxes` → assignment_policies/inboxes#index
- `GET /api/v1/accounts/:account_id/automation_rules` → automation_rules#index
- `GET /api/v1/accounts/:account_id/automation_rules/:id` → automation_rules#show
- `GET /api/v1/accounts/:account_id/cache_keys` → accounts#cache_keys
- `GET /api/v1/accounts/:account_id/campaigns` → campaigns#index
- `GET /api/v1/accounts/:account_id/campaigns/:id` → campaigns#show
- `GET /api/v1/accounts/:account_id/canned_responses` → canned_responses#index
- `GET /api/v1/accounts/:account_id/captain/assistant_responses` → captain/assistant_responses#index
- `GET /api/v1/accounts/:account_id/captain/assistants` → captain/assistants#index
- `GET /api/v1/accounts/:account_id/captain/assistants/:id` → captain/assistants#show
- `GET /api/v1/accounts/:account_id/captain/assistants/:assistant_id/inboxes` → captain/assistants/inboxes#index
- `GET /api/v1/accounts/:account_id/captain/assistants/:assistant_id/scenarios` → captain/scenarios#index
- `GET /api/v1/accounts/:account_id/captain/assistants/:assistant_id/scenarios/:id` → captain/scenarios#show
- `GET /api/v1/accounts/:account_id/captain/assistants/tools` → captain/assistants#tools
- `GET /api/v1/accounts/:account_id/captain/copilot_threads` → captain/copilot_threads#index
- `GET /api/v1/accounts/:account_id/captain/copilot_threads/:id/copilot_messages` → captain/copilot_messages#index
- `GET /api/v1/accounts/:account_id/captain/custom_tools` → captain/custom_tools#index
- `GET /api/v1/accounts/:account_id/captain/custom_tools/:id` → captain/custom_tools#show
- `GET /api/v1/accounts/:account_id/captain/documents` → captain/documents#index
- `GET /api/v1/accounts/:account_id/captain/documents/:id` → captain/documents#show
- `GET /api/v1/accounts/:account_id/captain/preferences` → captain/preferences#show
- `GET /api/v1/accounts/:account_id/companies` → companies#index
- `GET /api/v1/accounts/:account_id/companies/:id` → companies#show
- `GET /api/v1/accounts/:account_id/companies/:id/contacts` → companies/contacts#index
- `GET /api/v1/accounts/:account_id/companies/:id/contacts/search` → companies/contacts#search
- `GET /api/v1/accounts/:account_id/companies/:id/conversations` → companies/conversations#index
- `GET /api/v1/accounts/:account_id/companies/:id/notes` → companies/notes#index
- `GET /api/v1/accounts/:account_id/companies/search` → companies#search
- `GET /api/v1/accounts/:account_id/contact_inboxes/filter` → contact_inboxes#filter
- `GET /api/v1/accounts/:account_id/contacts` → contacts#index
- `GET /api/v1/accounts/:account_id/contacts/:id` → contacts#show
- `GET /api/v1/accounts/:account_id/contacts/:id/attachments` → contacts/attachments#index
- `GET /api/v1/accounts/:account_id/contacts/:id/contactable_inboxes` → contacts#contactable_inboxes
- `GET /api/v1/accounts/:account_id/contacts/:id/conversations` → contacts/conversations#index
- `GET /api/v1/accounts/:account_id/contacts/:id/labels` → contacts/labels#index
- `GET /api/v1/accounts/:account_id/contacts/:id/notes` → contacts/notes#index
- `GET /api/v1/accounts/:account_id/contacts/:id/notes/:note_id` → contacts/notes#show
- `GET /api/v1/accounts/:account_id/contacts/active` → contacts#active
- `GET /api/v1/accounts/:account_id/contacts/search` → contacts#search
- `GET /api/v1/accounts/:account_id/conversations` → conversations#index
- `GET /api/v1/accounts/:account_id/conversations/:id` → conversations#show
- `GET /api/v1/accounts/:account_id/conversations/:id/attachments` → conversations#attachments
- `GET /api/v1/accounts/:account_id/conversations/:conversation_id/draft_messages` → conversations/draft_messages#show
- `GET /api/v1/accounts/:account_id/conversations/:conversation_id/labels` → conversations/labels#index
- `GET /api/v1/accounts/:account_id/conversations/:conversation_id/messages` → conversations/messages#index
- `GET /api/v1/accounts/:account_id/conversations/:conversation_id/participants` → conversations/participants#show
- `GET /api/v1/accounts/:account_id/conversations/meta` → conversations#meta
- `GET /api/v1/accounts/:account_id/conversations/search` → conversations#search
- `GET /api/v1/accounts/:account_id/conversations/unread_counts` → conversations/unread_counts#index
- `GET /api/v1/accounts/:account_id/csat_survey_responses` → csat_survey_responses#index
- `GET /api/v1/accounts/:account_id/csat_survey_responses/download` → csat_survey_responses#download
- `GET /api/v1/accounts/:account_id/csat_survey_responses/metrics` → csat_survey_responses#metrics
- `GET /api/v1/accounts/:account_id/custom_attribute_definitions` → custom_attribute_definitions#index
- `GET /api/v1/accounts/:account_id/custom_attribute_definitions/:id` → custom_attribute_definitions#show
- `GET /api/v1/accounts/:account_id/custom_filters` → custom_filters#index
- `GET /api/v1/accounts/:account_id/custom_filters/:id` → custom_filters#show
- `GET /api/v1/accounts/:account_id/custom_roles` → custom_roles#index
- `GET /api/v1/accounts/:account_id/custom_roles/:id` → custom_roles#show
- `GET /api/v1/accounts/:account_id/dashboard_apps` → dashboard_apps#index
- `GET /api/v1/accounts/:account_id/dashboard_apps/:id` → dashboard_apps#show
- `GET /api/v1/accounts/:account_id/google/callback` → google_channels#oauth_callback
- `GET /api/v1/accounts/:account_id/google/oauth` → google_channels#authorization
- `GET /api/v1/accounts/:account_id/google/webhooks` → google_channels#list_webhooks
- `GET /api/v1/accounts/:account_id/inbox_limits` → inbox_limits#index
- `GET /api/v1/accounts/:account_id/inbox_limits/:id` → inbox_limits#show
- `GET /api/v1/accounts/:account_id/inbox_members/:inbox_id` → inbox_members#show
- `GET /api/v1/accounts/:account_id/inboxes` → inboxes#index
- `GET /api/v1/accounts/:account_id/inboxes/:id` → inboxes#show
- `GET /api/v1/accounts/:account_id/inboxes/:id/agent_bot` → inboxes#agent_bot
- `GET /api/v1/accounts/:account_id/inboxes/:id/assignable_agents` → inboxes#assignable_agents
- `GET /api/v1/accounts/:account_id/inboxes/:inbox_id/assignment_policy` → inboxes/assignment_policy#show
- `GET /api/v1/accounts/:account_id/inboxes/:id/campaigns` → inboxes#campaigns
- `GET /api/v1/accounts/:account_id/inboxes/:id/csat_template` → inbox_csat_templates#show
- `GET /api/v1/accounts/:account_id/inboxes/:id/health` → inboxes#health
- `GET /api/v1/accounts/:account_id/inboxes/:inbox_id/instagram_comments/:comment_id/replies` → instagram_channel#get_comment_replies
- `GET /api/v1/accounts/:account_id/inboxes/:inbox_id/instagram_comments/media/:media_id` → instagram_channel#get_comments
- `GET /api/v1/accounts/:account_id/integrations/apps` → integrations/apps#index
- `GET /api/v1/accounts/:account_id/integrations/apps/:id` → integrations/apps#show
- `GET /api/v1/accounts/:account_id/integrations/hooks/:id` → integrations/hooks#show
- `GET /api/v1/accounts/:account_id/integrations/linear/linked_issues` → integrations/linear#linked_issues
- `GET /api/v1/accounts/:account_id/integrations/linear/search_issue` → integrations/linear#search_issue
- `GET /api/v1/accounts/:account_id/integrations/linear/team_entities` → integrations/linear#team_entities
- `GET /api/v1/accounts/:account_id/integrations/linear/teams` → integrations/linear#teams
- `GET /api/v1/accounts/:account_id/integrations/shopify/orders` → integrations/shopify#orders
- `GET /api/v1/accounts/:account_id/integrations/slack/list_all_channels` → integrations/slack#list_all_channels
- `GET /api/v1/accounts/:account_id/labels` → labels#index
- `GET /api/v1/accounts/:account_id/labels/:id` → labels#show
- `GET /api/v1/accounts/:account_id/macros` → macros#index
- `GET /api/v1/accounts/:account_id/macros/:id` → macros#show
- `GET /api/v1/accounts/:account_id/notification_settings` → notification_settings#show
- `GET /api/v1/accounts/:account_id/notifications` → notifications#index
- `GET /api/v1/accounts/:account_id/notifications/unread_count` → notifications#unread_count
- `GET /api/v1/accounts/:account_id/portals` → portals#index
- `GET /api/v1/accounts/:account_id/portals/:id` → portals#show
- `GET /api/v1/accounts/:account_id/portals/:portal_id/articles` → articles#index
- `GET /api/v1/accounts/:account_id/portals/:portal_id/articles/:id` → articles#show
- `GET /api/v1/accounts/:account_id/portals/:portal_id/categories` → categories#index
- `GET /api/v1/accounts/:account_id/portals/:portal_id/categories/:id` → categories#show
- `GET /api/v1/accounts/:account_id/portals/:id/ssl_status` → portals#ssl_status
- `GET /api/v1/accounts/:account_id/reporting_events` → reporting_events#index
- `GET /api/v1/accounts/:account_id/search` → search#index
- `GET /api/v1/accounts/:account_id/search/contacts` → search#contacts
- `GET /api/v1/accounts/:account_id/search/conversations` → search#conversations
- `GET /api/v1/accounts/:account_id/search/messages` → search#messages
- `GET /api/v1/accounts/:account_id/sla_policies` → sla_policies#index
- `GET /api/v1/accounts/:account_id/sla_policies/:id` → sla_policies#show
- `GET /api/v1/accounts/:account_id/teams` → teams#index
- `GET /api/v1/accounts/:account_id/teams/:id` → teams#show
- `GET /api/v1/accounts/:account_id/teams/:team_id/team_members` → team_members#index
- `GET /api/v1/accounts/:account_id/webhooks` → webhooks#index
- `GET /api/v1/accounts/:account_id/whatsapp_calls/:id` → whatsapp_calls#show
- `PATCH /api/v1/accounts/:account_id/contacts/:id/notes/:note_id` → contacts/notes#update
- `PATCH /api/v1/accounts/:account_id/conversations/:id` → conversations#update
- `PATCH /api/v1/accounts/:account_id/conversations/:conversation_id/draft_messages` → conversations/draft_messages#update
- `PATCH /api/v1/accounts/:account_id/conversations/:conversation_id/messages/:id` → conversations/messages#update
- `PATCH /api/v1/accounts/:account_id/conversations/:conversation_id/participants` → conversations/participants#update
- `PATCH /api/v1/accounts/:account_id/inbox_members` → inbox_members#update
- `PATCH /api/v1/accounts/:account_id/portals/:id/archive` → portals#archive
- `PATCH /api/v1/accounts/:account_id/portals/articles/bulk_actions/update_status` → articles/bulk_actions#update_status
- `PATCH /api/v1/accounts/:account_id/teams/:team_id/team_members` → team_members#update
- `POST /api/v1/accounts` → accounts#create
- `POST /api/v1/accounts/:account_id/actions/contact_merge` → contact_merges#create
- `POST /api/v1/accounts/:account_id/agent_bots` → agent_bots#create
- `POST /api/v1/accounts/:account_id/agent_bots/:id/reset_access_token` → agent_bots#reset_access_token
- `POST /api/v1/accounts/:account_id/agent_bots/:id/reset_secret` → agent_bots#reset_secret
- `POST /api/v1/accounts/:account_id/agent_capacity_policies` → agent_capacity_policies#create
- `POST /api/v1/accounts/:account_id/agents` → agents#create
- `POST /api/v1/accounts/:account_id/agents/bulk_create` → agents#bulk_create
- `POST /api/v1/accounts/:account_id/assignment_policies` → assignment_policies#create
- `POST /api/v1/accounts/:account_id/assignment_policies/:assignment_policy_id/inboxes` → assignment_policies/inboxes#create
- `POST /api/v1/accounts/:account_id/automation_rules` → automation_rules#create
- `POST /api/v1/accounts/:account_id/automation_rules/:id/clone` → automation_rules#clone
- `POST /api/v1/accounts/:account_id/bulk_actions` → bulk_actions#create
- `POST /api/v1/accounts/:account_id/callbacks/register_facebook_page` → callbacks#register_facebook_page
- `POST /api/v1/accounts/:account_id/callbacks/verify_facebook_page` → callbacks#verify_facebook_page
- `POST /api/v1/accounts/:account_id/campaigns` → campaigns#create
- `POST /api/v1/accounts/:account_id/canned_responses` → canned_responses#create
- `POST /api/v1/accounts/:account_id/captain/assistants` → captain/assistants#create
- `POST /api/v1/accounts/:account_id/captain/assistants/:assistant_id/inboxes` → captain/assistants/inboxes#create
- `POST /api/v1/accounts/:account_id/captain/assistants/:id/playground` → captain/assistants#playground
- `POST /api/v1/accounts/:account_id/captain/assistants/:assistant_id/scenarios` → captain/scenarios#create
- `POST /api/v1/accounts/:account_id/captain/bulk_actions` → captain/bulk_actions#create
- `POST /api/v1/accounts/:account_id/captain/copilot_threads` → captain/copilot_threads#create
- `POST /api/v1/accounts/:account_id/captain/copilot_threads/:id/copilot_messages` → captain/copilot_messages#create
- `POST /api/v1/accounts/:account_id/captain/custom_tools` → captain/custom_tools#create
- `POST /api/v1/accounts/:account_id/captain/custom_tools/test` → captain/custom_tools#test
- `POST /api/v1/accounts/:account_id/captain/documents` → captain/documents#create
- `POST /api/v1/accounts/:account_id/captain/documents/:id/sync` → captain/documents#sync
- `POST /api/v1/accounts/:account_id/captain/tasks/rewrite` → captain/tasks#rewrite
- `POST /api/v1/accounts/:account_id/channels/twilio_channel` → twilio_channels#create
- `POST /api/v1/accounts/:account_id/companies` → companies#create
- `POST /api/v1/accounts/:account_id/companies/:id/contacts` → companies/contacts#create
- `POST /api/v1/accounts/:account_id/companies/:id/destroy_custom_attributes` → companies#destroy_custom_attributes
- `POST /api/v1/accounts/:account_id/contacts` → contacts#create
- `POST /api/v1/accounts/:account_id/contacts/:id/contact_inboxes` → contacts/contact_inboxes#create
- `POST /api/v1/accounts/:account_id/contacts/:id/destroy_custom_attributes` → contacts#destroy_custom_attributes
- `POST /api/v1/accounts/:account_id/contacts/:id/labels` → contacts/labels#create
- `POST /api/v1/accounts/:account_id/contacts/:id/notes` → contacts/notes#create
- `POST /api/v1/accounts/:account_id/contacts/export` → contacts#export
- `POST /api/v1/accounts/:account_id/contacts/filter` → contacts#filter
- `POST /api/v1/accounts/:account_id/contacts/import` → contacts#import
- `POST /api/v1/accounts/:account_id/conversations` → conversations#create
- `POST /api/v1/accounts/:account_id/conversations/:conversation_id/assignments` → conversations/assignments#create
- `POST /api/v1/accounts/:account_id/conversations/:id/custom_attributes` → conversations#custom_attributes
- `POST /api/v1/accounts/:account_id/conversations/:conversation_id/direct_uploads` → conversations/direct_uploads#create
- `POST /api/v1/accounts/:account_id/conversations/:conversation_id/labels` → conversations/labels#create
- `POST /api/v1/accounts/:account_id/conversations/:conversation_id/messages` → conversations/messages#create
- `POST /api/v1/accounts/:account_id/conversations/:conversation_id/messages/:id/retry` → conversations/messages#retry
- `POST /api/v1/accounts/:account_id/conversations/:conversation_id/messages/:id/translate` → conversations/messages#translate
- `POST /api/v1/accounts/:account_id/conversations/:id/mute` → conversations#mute
- `POST /api/v1/accounts/:account_id/conversations/:conversation_id/participants` → conversations/participants#create
- `POST /api/v1/accounts/:account_id/conversations/:id/toggle_priority` → conversations#toggle_priority
- `POST /api/v1/accounts/:account_id/conversations/:id/toggle_status` → conversations#toggle_status
- `POST /api/v1/accounts/:account_id/conversations/:id/toggle_typing_status` → conversations#toggle_typing_status
- `POST /api/v1/accounts/:account_id/conversations/:id/transcript` → conversations#transcript
- `POST /api/v1/accounts/:account_id/conversations/:id/unmute` → conversations#unmute
- `POST /api/v1/accounts/:account_id/conversations/:id/unread` → conversations#unread
- `POST /api/v1/accounts/:account_id/conversations/:id/update_last_seen` → conversations#update_last_seen
- `POST /api/v1/accounts/:account_id/conversations/filter` → conversations#filter
- `POST /api/v1/accounts/:account_id/custom_attribute_definitions` → custom_attribute_definitions#create
- `POST /api/v1/accounts/:account_id/custom_filters` → custom_filters#create
- `POST /api/v1/accounts/:account_id/custom_roles` → custom_roles#create
- `POST /api/v1/accounts/:account_id/dashboard_apps` → dashboard_apps#create
- `POST /api/v1/accounts/:account_id/direct_uploads` → upload#direct_uploads
- `POST /api/v1/accounts/:account_id/google/authorization` → google/authorization#create
- `POST /api/v1/accounts/:account_id/google/webhooks` → google_channels#register_webhook
- `POST /api/v1/accounts/:account_id/inbox_limits` → inbox_limits#create
- `POST /api/v1/accounts/:account_id/inbox_members` → inbox_members#create
- `POST /api/v1/accounts/:account_id/inboxes` → inboxes#create
- `POST /api/v1/accounts/:account_id/inboxes/:inbox_id/assignment_policy` → inboxes/assignment_policy#create
- `POST /api/v1/accounts/:account_id/inboxes/:id/csat_template` → inbox_csat_templates#create
- `POST /api/v1/accounts/:account_id/inboxes/:id/csat_template/analyze` → inbox_csat_templates#analyze
- `POST /api/v1/accounts/:account_id/inboxes/:inbox_id/instagram_comments/:comment_id/hide` → instagram_channel#hide_comment
- `POST /api/v1/accounts/:account_id/inboxes/:inbox_id/instagram_comments/:comment_id/reply` → instagram_channel#reply_to_comment
- `POST /api/v1/accounts/:account_id/inboxes/:id/register_webhook` → inboxes#register_webhook
- `POST /api/v1/accounts/:account_id/inboxes/:id/reset_secret` → inboxes#reset_secret
- `POST /api/v1/accounts/:account_id/inboxes/:id/set_agent_bot` → inboxes#set_agent_bot
- `POST /api/v1/accounts/:account_id/inboxes/:id/sync_templates` → inboxes#sync_templates
- `POST /api/v1/accounts/:account_id/instagram/authorization` → instagram/authorization#create
- `POST /api/v1/accounts/:account_id/integrations/dyte/add_participant_to_meeting` → integrations/dyte#add_participant_to_meeting
- `POST /api/v1/accounts/:account_id/integrations/dyte/create_a_meeting` → integrations/dyte#create_a_meeting
- `POST /api/v1/accounts/:account_id/integrations/hooks` → integrations/hooks#create
- `POST /api/v1/accounts/:account_id/integrations/hooks/:id/process_event` → integrations/hooks#process_event
- `POST /api/v1/accounts/:account_id/integrations/linear/create_issue` → integrations/linear#create_issue
- `POST /api/v1/accounts/:account_id/integrations/linear/link_issue` → integrations/linear#link_issue
- `POST /api/v1/accounts/:account_id/integrations/linear/unlink_issue` → integrations/linear#unlink_issue
- `POST /api/v1/accounts/:account_id/integrations/shopify/auth` → integrations/shopify#auth
- `POST /api/v1/accounts/:account_id/integrations/slack` → integrations/slack#create
- `POST /api/v1/accounts/:account_id/labels` → labels#create
- `POST /api/v1/accounts/:account_id/macros` → macros#create
- `POST /api/v1/accounts/:account_id/macros/:id/execute` → macros#execute
- `POST /api/v1/accounts/:account_id/microsoft/authorization` → microsoft/authorization#create
- `POST /api/v1/accounts/:account_id/notifications/:id/snooze` → notifications#snooze
- `POST /api/v1/accounts/:account_id/notifications/:id/unread` → notifications#unread
- `POST /api/v1/accounts/:account_id/notifications/destroy_all` → notifications#destroy_all
- `POST /api/v1/accounts/:account_id/notifications/read_all` → notifications#read_all
- `POST /api/v1/accounts/:account_id/notion/authorization` → notion/authorization#create
- `POST /api/v1/accounts/:account_id/portals` → portals#create
- `POST /api/v1/accounts/:account_id/portals/:portal_id/articles` → articles#create
- `POST /api/v1/accounts/:account_id/portals/:portal_id/articles/reorder` → articles#reorder
- `POST /api/v1/accounts/:account_id/portals/:portal_id/categories` → categories#create
- `POST /api/v1/accounts/:account_id/portals/:portal_id/categories/reorder` → categories#reorder
- `POST /api/v1/accounts/:account_id/portals/:id/send_instructions` → portals#send_instructions
- `POST /api/v1/accounts/:account_id/portals/articles/bulk_actions/translate` → articles/bulk_actions#translate
- `POST /api/v1/accounts/:account_id/sla_policies` → sla_policies#create
- `POST /api/v1/accounts/:account_id/teams` → teams#create
- `POST /api/v1/accounts/:account_id/teams/:team_id/team_members` → team_members#create
- `POST /api/v1/accounts/:account_id/tiktok/authorization` → tiktok/authorization#create
- `POST /api/v1/accounts/:account_id/twitter/authorization` → twitter/authorization#create
- `POST /api/v1/accounts/:account_id/update_active_at` → accounts#update_active_at
- `POST /api/v1/accounts/:account_id/upload` → upload#create
- `POST /api/v1/accounts/:account_id/webhooks` → webhooks#create
- `POST /api/v1/accounts/:account_id/whatsapp/authorization` → whatsapp/authorization#create
- `POST /api/v1/accounts/:account_id/whatsapp_calls/:id/accept` → whatsapp_calls#accept
- `POST /api/v1/accounts/:account_id/whatsapp_calls/:id/reject` → whatsapp_calls#reject
- `POST /api/v1/accounts/:account_id/whatsapp_calls/:id/terminate` → whatsapp_calls#terminate
- `POST /api/v1/accounts/:account_id/whatsapp_calls/:id/upload_recording` → whatsapp_calls#upload_recording
- `POST /api/v1/accounts/:account_id/whatsapp_calls/initiate` → whatsapp_calls#initiate
- `POST /resend_confirmation` → resend_confirmations#create
- `PUT /api/v1/accounts/:account_id` → accounts#update
- `PUT /api/v1/accounts/:account_id/agent_bots/:id` → agent_bots#update
- `PUT /api/v1/accounts/:account_id/agent_capacity_policies/:id` → agent_capacity_policies#update
- `PUT /api/v1/accounts/:account_id/agents/:id` → agents#update
- `PUT /api/v1/accounts/:account_id/assignment_policies/:id` → assignment_policies#update
- `PUT /api/v1/accounts/:account_id/automation_rules/:id` → automation_rules#update
- `PUT /api/v1/accounts/:account_id/campaigns/:id` → campaigns#update
- `PUT /api/v1/accounts/:account_id/canned_responses/:id` → canned_responses#update
- `PUT /api/v1/accounts/:account_id/captain/assistants/:id` → captain/assistants#update
- `PUT /api/v1/accounts/:account_id/captain/assistants/:assistant_id/scenarios/:id` → captain/scenarios#update
- `PUT /api/v1/accounts/:account_id/captain/custom_tools/:id` → captain/custom_tools#update
- `PUT /api/v1/accounts/:account_id/captain/preferences` → captain/preferences#update
- `PUT /api/v1/accounts/:account_id/companies/:id` → companies#update
- `PUT /api/v1/accounts/:account_id/contacts/:id` → contacts#update
- `PUT /api/v1/accounts/:account_id/custom_attribute_definitions/:id` → custom_attribute_definitions#update
- `PUT /api/v1/accounts/:account_id/custom_filters/:id` → custom_filters#update
- `PUT /api/v1/accounts/:account_id/custom_roles/:id` → custom_roles#update
- `PUT /api/v1/accounts/:account_id/dashboard_apps/:id` → dashboard_apps#update
- `PUT /api/v1/accounts/:account_id/inbox_limits/:id` → inbox_limits#update
- `PUT /api/v1/accounts/:account_id/inboxes/:id` → inboxes#update
- `PUT /api/v1/accounts/:account_id/integrations/hooks/:id` → integrations/hooks#update
- `PUT /api/v1/accounts/:account_id/integrations/slack` → integrations/slack#update
- `PUT /api/v1/accounts/:account_id/labels/:id` → labels#update
- `PUT /api/v1/accounts/:account_id/macros/:id` → macros#update
- `PUT /api/v1/accounts/:account_id/notification_settings` → notification_settings#update
- `PUT /api/v1/accounts/:account_id/notifications/:id` → notifications#update
- `PUT /api/v1/accounts/:account_id/portals/:id` → portals#update
- `PUT /api/v1/accounts/:account_id/portals/:portal_id/articles/:id` → articles#update
- `PUT /api/v1/accounts/:account_id/portals/:portal_id/categories/:id` → categories#update
- `PUT /api/v1/accounts/:account_id/settings` → accounts#update_settings
- `PUT /api/v1/accounts/:account_id/sla_policies/:id` → sla_policies#update
- `PUT /api/v1/accounts/:account_id/teams/:id` → teams#update
- `PUT /api/v1/accounts/:account_id/webhooks/:id` → webhooks#update
### V1非Account级 (24条)
- `DELETE /api/v1/notification_subscriptions` → notification_subscriptions#destroy
- `DELETE /api/v1/profile/avatar` → profile#delete_avatar
- `DELETE /api/v1/profile/mfa` → mfa#destroy
- `DELETE /auth` → auth#destroy (logout)
- `DELETE /auth/sign_out` → sessions#destroy
- `GET /api/v1/profile` → profile#show
- `GET /api/v1/profile/mfa` → mfa#show
- `POST /api/v1/auth/saml_login` → auth#saml_login
- `POST /api/v1/integrations/webhooks` → integrations/webhooks#create
- `POST /api/v1/notification_subscriptions` → notification_subscriptions#create
- `POST /api/v1/profile/auto_offline` → profile#auto_offline
- `POST /api/v1/profile/availability` → profile#availability
- `POST /api/v1/profile/mfa` → mfa#create
- `POST /api/v1/profile/mfa/backup_codes` → mfa#backup_codes
- `POST /api/v1/profile/mfa/verify` → mfa#verify
- `POST /api/v1/profile/resend_confirmation` → profile#resend_confirmation
- `POST /api/v1/profile/reset_access_token` → profile#reset_access_token
- `POST /auth` → auth#create (login)
- `POST /auth/password` → passwords#create
- `POST /auth/password/reset` → passwords#reset
- `POST /auth/sign_in` → sessions#create
- `PUT /api/v1/profile` → profile#update
- `PUT /api/v1/profile/set_active_account` → profile#set_active_account
- `PUT /auth/password` → passwords#update
### V2报表 (22条)
- `GET /api/v2/accounts/:account_id/live_reports/conversation_metrics` → live_reports#conversation_metrics
- `GET /api/v2/accounts/:account_id/live_reports/grouped_conversation_metrics` → live_reports#grouped_conversation_metrics
- `GET /api/v2/accounts/:account_id/reports` → reports#index
- `GET /api/v2/accounts/:account_id/reports/agents` → reports#agents
- `GET /api/v2/accounts/:account_id/reports/bot_metrics` → reports#bot_metrics
- `GET /api/v2/accounts/:account_id/reports/bot_summary` → reports#bot_summary
- `GET /api/v2/accounts/:account_id/reports/conversation_traffic` → reports#conversation_traffic
- `GET /api/v2/accounts/:account_id/reports/conversations` → reports#conversations
- `GET /api/v2/accounts/:account_id/reports/conversations_summary` → reports#conversations_summary
- `GET /api/v2/accounts/:account_id/reports/first_response_time_distribution` → reports#first_response_time_distribution
- `GET /api/v2/accounts/:account_id/reports/inbox_label_matrix` → reports#inbox_label_matrix
- `GET /api/v2/accounts/:account_id/reports/inboxes` → reports#inboxes
- `GET /api/v2/accounts/:account_id/reports/labels` → reports#labels
- `GET /api/v2/accounts/:account_id/reports/outgoing_messages_count` → reports#outgoing_messages_count
- `GET /api/v2/accounts/:account_id/reports/summary` → reports#summary
- `GET /api/v2/accounts/:account_id/reports/teams` → reports#teams
- `GET /api/v2/accounts/:account_id/summary_reports/agent` → summary_reports#agent
- `GET /api/v2/accounts/:account_id/summary_reports/channel` → summary_reports#channel
- `GET /api/v2/accounts/:account_id/summary_reports/inbox` → summary_reports#inbox
- `GET /api/v2/accounts/:account_id/summary_reports/label` → summary_reports#label
- `GET /api/v2/accounts/:account_id/summary_reports/team` → summary_reports#team
- `GET /api/v2/accounts/:account_id/year_in_review` → year_in_review#show
### WebSocket/Health (11条)
- `GET /cable` → websocket#serve_cable
- `GET /hc/:slug` → public/portals#show
- `GET /hc/:slug/:locale` → public/portals#show
- `GET /hc/:slug/:locale/articles` → public/articles#index
- `GET /hc/:slug/:locale/categories` → public/categories#index
- `GET /hc/:slug/:locale/categories/:category_slug` → public/categories#show
- `GET /hc/:slug/:locale/categories/:category_slug/articles` → public/articles#index
- `GET /hc/:slug/articles/:article_slug` → public/articles#show
- `GET /hc/:slug/sitemap.xml` → public/portals#sitemap
- `GET /health` → health#check
- `GET /ws` → websocket#serve
### Webhooks (18条)
- `GET /webhooks/email/:inbox_id/verification` → email_webhook#verification
- `GET /webhooks/facebook/:page_id` → facebook_webhook#verify
- `GET /webhooks/tiktok/:business_id` → tiktok_webhook#verify
- `GET /webhooks/twitter/webhook` → twitter_webhook#crc
- `GET /webhooks/whatsapp/:phone_number_id` → whatsapp_webhook#verify
- `POST /webhooks/email/:inbox_id` → email_webhook#event
- `POST /webhooks/facebook/:page_id` → facebook_webhook#event
- `POST /webhooks/firecrawl` → enterprise/webhooks/firecrawl#process_payload
- `POST /webhooks/line/:channel_id` → line_webhook#event
- `POST /webhooks/microsoft/events` → microsoft_webhook#event
- `POST /webhooks/microsoft/validation` → microsoft_webhook#validation
- `POST /webhooks/stripe` → enterprise/webhooks/stripe#process_payload
- `POST /webhooks/telegram/:bot_token` → telegram_webhook#event
- `POST /webhooks/tiktok/:business_id` → tiktok_webhook#event
- `POST /webhooks/twilio/sms/:phone_number` → twilio_webhook#inbound_sms
- `POST /webhooks/twilio/status/:phone_number` → twilio_webhook#delivery_status
- `POST /webhooks/twitter/webhook` → twitter_webhook#event
- `POST /webhooks/whatsapp/:phone_number_id` → whatsapp_webhook#event
### Widget (22条)
- `DELETE /widget/labels` → widget/labels#destroy
- `GET /widget/campaigns` → widget/campaigns#index
- `GET /widget/contact` → widget/contact#show
- `GET /widget/conversations` → widget/conversations#index
- `GET /widget/conversations/toggle_status` → widget/conversations#toggle_status
- `GET /widget/inbox_members` → widget/inbox_members#index
- `GET /widget/messages` → widget/messages#index
- `PATCH /widget/contact` → widget/contact#update
- `PATCH /widget/contact/set_user` → widget/contact#set_user
- `PATCH /widget/messages` → widget/messages#update
- `POST /widget/config` → widget/config#create
- `POST /widget/contact/destroy_custom_attributes` → widget/contact#destroy_custom_attributes
- `POST /widget/conversations` → widget/conversations#create
- `POST /widget/conversations/destroy_custom_attributes` → widget/conversations#destroy_custom_attributes
- `POST /widget/conversations/set_custom_attributes` → widget/conversations#set_custom_attributes
- `POST /widget/conversations/toggle_typing` → widget/conversations#toggle_typing
- `POST /widget/conversations/transcript` → widget/conversations#transcript
- `POST /widget/conversations/update_last_seen` → widget/conversations#update_last_seen
- `POST /widget/direct_uploads` → widget/direct_uploads#create
- `POST /widget/events` → widget/events#create
- `POST /widget/labels` → widget/labels#create
- `POST /widget/messages` → widget/messages#create
## GoChat额外路由