Files
gochat/docs/parity/chatwoot-routes-static.md
T

22 KiB

Chatwoot Route Source Declarations

Source: ../docs/chatwoot/config/routes.rb

Ruby is unavailable in the current workspace, so this file records static route DSL declarations with source lines. It is a repeatable fallback until bin/rails routes can run.

Line Declaration
3 mount_devise_token_auth_for 'User', at: 'auth', controllers: {
11 post 'resend_confirmation', to: 'auth/resend_confirmations#create'
19 get '/app', to: 'dashboard#index'
20 get '/app/*params', to: 'dashboard#index'
21 get '/app/accounts/:account_id/settings/inboxes/new/twitter', to: 'dashboard#index', as: 'app_new_twitter_inbox'
22 get '/app/accounts/:account_id/settings/inboxes/new/microsoft', to: 'dashboard#index', as: 'app_new_microsoft_inbox'
23 get '/app/accounts/:account_id/settings/inboxes/new/instagram', to: 'dashboard#index', as: 'app_new_instagram_inbox'
24 get '/app/accounts/:account_id/settings/inboxes/new/tiktok', to: 'dashboard#index', as: 'app_new_tiktok_inbox'
25 get '/app/accounts/:account_id/settings/inboxes/new/:inbox_id/agents', to: 'dashboard#index', as: 'app_twitter_inbox_agents'
26 get '/app/accounts/:account_id/settings/inboxes/new/:inbox_id/agents', to: 'dashboard#index', as: 'app_email_inbox_agents'
27 get '/app/accounts/:account_id/settings/inboxes/new/:inbox_id/agents', to: 'dashboard#index', as: 'app_instagram_inbox_agents'
28 get '/app/accounts/:account_id/settings/inboxes/new/:inbox_id/agents', to: 'dashboard#index', as: 'app_tiktok_inbox_agents'
29 get '/app/accounts/:account_id/settings/inboxes/:inbox_id', to: 'dashboard#index', as: 'app_instagram_inbox_settings'
30 get '/app/accounts/:account_id/settings/inboxes/:inbox_id', to: 'dashboard#index', as: 'app_tiktok_inbox_settings'
31 get '/app/accounts/:account_id/settings/inboxes/:inbox_id', to: 'dashboard#index', as: 'app_email_inbox_settings'
32 get '/app/accounts/:account_id/onboarding/inbox-setup', to: 'dashboard#index', as: 'app_onboarding_inbox_setup'
34 resource :widget, only: [:show]
35 namespace :survey do
36 resources :responses, only: [:show]
38 resource :slack_uploads, only: [:show]
41 get '/health', to: 'health#show'
42 get '/api', to: 'api#index'
43 namespace :api, defaults: { format: 'json' } do
44 namespace :v1 do
47 resources :accounts, only: [:create, :show, :update] do
49 post :update_active_at
50 get :cache_keys
53 scope module: :accounts do
54 namespace :actions do
55 resource :contact_merge, only: [:create]
57 resource :bulk_actions, only: [:create]
58 resource :onboarding, only: [:update] do
59 get :help_center_generation
61 resources :agents, only: [:index, :create, :update, :destroy] do
62 post :bulk_create, on: :collection
64 namespace :captain do
65 resource :preferences, only: [:show, :update]
66 resources :assistants do
68 post :playground
69 get :stats
70 get :summary
71 get :drilldown
74 get :tools
76 resources :inboxes, only: [:index, :create, :destroy], param: :inbox_id
77 resources :scenarios
79 resources :assistant_responses
80 resources :message_reports, only: [:create]
81 resources :bulk_actions, only: [:create]
82 resources :copilot_threads, only: [:index, :create] do
83 resources :copilot_messages, only: [:index, :create]
85 resources :custom_tools do
86 post :test, on: :collection
88 resources :documents, only: [:index, :show, :create, :destroy] do
89 post :sync, on: :member
91 resource :tasks, only: [], controller: 'tasks' do
92 post :rewrite
93 post :summarize
94 post :reply_suggestion
95 post :label_suggestion
96 post :follow_up
99 resource :saml_settings, only: [:show, :create, :update, :destroy]
100 resources :agent_bots, only: [:index, :create, :show, :update, :destroy] do
101 delete :avatar, on: :member
102 post :reset_access_token, on: :member
103 post :reset_secret, on: :member
105 resources :contact_inboxes, only: [] do
107 post :filter
110 resources :assignable_agents, only: [:index]
111 resource :audit_logs, only: [:show]
112 resources :callbacks, only: [] do
114 post :register_facebook_page
115 get :register_facebook_page
116 post :facebook_pages
117 post :reauthorize_page
120 resources :canned_responses, only: [:index, :create, :update, :destroy]
121 resources :automation_rules, only: [:index, :create, :show, :update, :destroy] do
122 post :clone
124 resources :macros, only: [:index, :create, :show, :update, :destroy] do
125 post :execute, on: :member
127 resources :sla_policies, only: [:index, :create, :show, :update, :destroy]
128 resources :custom_roles, only: [:index, :create, :show, :update, :destroy]
129 resources :agent_capacity_policies, only: [:index, :create, :show, :update, :destroy] do
130 scope module: :agent_capacity_policies do
131 resources :users, only: [:index, :create, :destroy]
132 resources :inbox_limits, only: [:create, :update, :destroy]
135 resources :campaigns, only: [:index, :create, :show, :update, :destroy]
136 resources :dashboard_apps, only: [:index, :show, :create, :update, :destroy]
137 namespace :channels do
138 resource :twilio_channel, only: [:create]
140 resources :conversations, only: [:index, :create, :show, :update, :destroy] do
142 get :meta
143 get :search
144 get :unread_counts, to: 'conversations/unread_counts#index'
145 post :filter
147 scope module: :conversations do
148 resources :messages, only: [:index, :create, :destroy, :update] do
150 post :translate
151 post :retry
154 resources :assignments, only: [:create]
155 resources :labels, only: [:create, :index]
156 resource :participants, only: [:show, :create, :update, :destroy]
157 resource :direct_uploads, only: [:create]
158 resource :draft_messages, only: [:show, :update, :destroy]
161 post :mute
162 post :unmute
163 post :transcript
164 post :toggle_status
165 post :toggle_priority
166 post :toggle_typing_status
167 post :update_last_seen
168 post :unread
169 post :custom_attributes
170 get :attachments
171 get :inbox_assistant
172 get :reporting_events if ChatwootApp.enterprise?
176 resources :search, only: [:index] do
178 get :conversations
179 get :messages
180 get :contacts
181 get :articles
185 resources :companies, only: [:index, :show, :create, :update, :destroy] do
187 get :search
190 post :destroy_custom_attributes
191 delete :avatar
193 scope module: :companies do
194 resources :contacts, only: [:index, :create, :destroy] do
196 get :search
199 resources :conversations, only: [:index]
200 resources :notes, only: [:index]
203 resources :contacts, only: [:index, :show, :update, :create, :destroy] do
205 get :active
206 get :search
207 post :filter
208 post :import
209 post :export
212 get :contactable_inboxes
213 post :destroy_custom_attributes
214 delete :avatar
216 scope module: :contacts do
217 resources :conversations, only: [:index]
218 resources :contact_inboxes, only: [:create]
219 resources :labels, only: [:create, :index]
220 resources :notes
221 get :attachments, to: 'attachments#index'
222 post :call, on: :member, to: 'calls#create' if ChatwootApp.enterprise?
225 resources :csat_survey_responses, only: [:index] do
227 get :metrics
228 get :download
231 patch :update if ChatwootApp.enterprise?
234 resources :applied_slas, only: [:index] do
236 get :metrics
237 get :download
240 resources :reporting_events, only: [:index] if ChatwootApp.enterprise?
243 resources :calls, only: [:index]
244 resources :whatsapp_calls, only: [:show] do
246 post :accept
247 post :reject
248 post :terminate
249 post :upload_recording
252 post :initiate
257 resources :custom_attribute_definitions, only: [:index, :show, :create, :update, :destroy]
258 resources :custom_filters, only: [:index, :show, :create, :update, :destroy]
259 resources :inboxes, only: [:index, :show, :create, :update, :destroy] do
260 get :assignable_agents, on: :member
261 get :campaigns, on: :member
262 get :agent_bot, on: :member
263 post :set_agent_bot, on: :member
264 delete :avatar, on: :member
265 post :sync_templates, on: :member
266 get :health, on: :member
267 post :register_webhook, on: :member
268 post :reset_secret, on: :member
270 resource :conference, only: %i[create destroy], controller: 'conference' do
271 get :token, on: :member
273 post :enable_whatsapp_calling, on: :member
274 post :disable_whatsapp_calling, on: :member
275 post :set_inbound_calls, on: :member
278 resource :csat_template, only: [:show, :create], controller: 'inbox_csat_templates' do
279 post :analyze, on: :collection
283 resources :inbox_members, only: [:create, :show], param: :inbox_id do
285 delete :destroy
286 patch :update
289 resources :labels, only: [:index, :show, :create, :update, :destroy]
291 resources :notifications, only: [:index, :update, :destroy] do
293 post :read_all
294 get :unread_count
295 post :destroy_all
298 post :snooze
299 post :unread
302 resource :notification_settings, only: [:show, :update]
304 resources :teams do
305 resources :team_members, only: [:index, :create] do
307 delete :destroy
308 patch :update
314 resources :assignment_policies do
315 resources :inboxes, only: [:index, :create, :destroy], module: :assignment_policies
318 resources :inboxes, only: [] do
319 resource :assignment_policy, only: [:show, :create, :destroy], module: :inboxes
322 namespace :twitter do
323 resource :authorization, only: [:create]
326 namespace :microsoft do
327 resource :authorization, only: [:create]
330 namespace :google do
331 resource :authorization, only: [:create]
334 namespace :instagram do
335 resource :authorization, only: [:create]
338 namespace :tiktok do
339 resource :authorization, only: [:create]
342 namespace :notion do
343 resource :authorization, only: [:create]
346 namespace :whatsapp do
347 resource :authorization, only: [:create]
350 resources :webhooks, only: [:index, :create, :update, :destroy]
351 namespace :integrations do
352 resources :apps, only: [:index, :show]
353 resources :hooks, only: [:show, :create, :update, :destroy] do
355 post :process_event
358 resource :slack, only: [:create, :update, :destroy], controller: 'slack' do
360 get :list_all_channels
363 resource :dyte, controller: 'dyte', only: [] do
365 post :create_a_meeting
366 post :add_participant_to_meeting
369 resource :shopify, controller: 'shopify', only: [:destroy] do
371 post :auth
372 get :orders
375 resource :linear, controller: 'linear', only: [] do
377 delete :destroy
378 get :teams
379 get :team_entities
380 post :create_issue
381 post :link_issue
382 post :unlink_issue
383 get :search_issue
384 get :linked_issues
387 resource :notion, controller: 'notion', only: [] do
389 delete :destroy
393 resources :portals do
395 patch :archive
396 delete :logo
397 post :send_instructions
398 get :ssl_status
400 resources :categories do
401 post :reorder, on: :collection
403 namespace :articles do
404 resource :bulk_actions, only: [] do
405 post :translate
406 patch :update_status
407 patch :update_category
408 delete :delete_articles
411 resources :articles do
412 post :reorder, on: :collection
416 resources :upload, only: [:create]
422 namespace :integrations do
423 resources :webhooks, only: [:create]
427 post 'auth/saml_login', to: 'auth#saml_login'
429 resource :profile, only: [:show, :update] do
430 delete :avatar, on: :collection
432 post :availability
433 post :auto_offline
434 put :set_active_account
435 post :resend_confirmation
436 post :reset_access_token
440 scope module: 'profile' do
441 resource :mfa, controller: 'mfa', only: [:show, :create, :destroy] do
442 post :verify
443 post :backup_codes
445 resources :sessions, only: [:index, :destroy]
449 resource :notification_subscriptions, only: [:create, :destroy]
451 namespace :widget do
452 resource :direct_uploads, only: [:create]
453 resource :config, only: [:create]
454 resources :campaigns, only: [:index]
455 resources :events, only: [:create]
456 resources :messages, only: [:index, :create, :update]
457 resources :conversations, only: [:index, :create] do
459 post :destroy_custom_attributes
460 post :set_custom_attributes
461 post :update_last_seen
462 post :toggle_typing
463 post :transcript
464 get :toggle_status
467 resource :contact, only: [:show, :update] do
469 post :destroy_custom_attributes
470 patch :set_user
473 resources :inbox_members, only: [:index]
474 resources :labels, only: [:create, :destroy]
475 namespace :integrations do
476 resource :dyte, controller: 'dyte', only: [] do
478 post :add_participant_to_meeting
485 namespace :v2 do
486 resources :accounts, only: [:create] do
487 scope module: :accounts do
488 resources :summary_reports, only: [] do
490 get :agent
491 get :team
492 get :inbox
493 get :label
494 get :channel
497 resources :reports, only: [:index] do
499 get :summary
500 get :bot_summary
501 get :agents
502 get :inboxes
503 get :labels
504 get :teams
505 get :conversations
506 get :conversations_summary
507 get :conversation_traffic
508 get :drilldown
509 get :bot_metrics
510 get :inbox_label_matrix
511 get :first_response_time_distribution
512 get :outgoing_messages_count
515 resource :year_in_review, only: [:show]
516 resources :live_reports, only: [] do
518 get :conversation_metrics
519 get :grouped_conversation_metrics
528 namespace :enterprise, defaults: { format: 'json' } do
529 namespace :api do
530 namespace :v1 do
531 resources :accounts do
533 post :checkout
534 post :subscription
535 post :select_billing_currency
536 get :limits
537 post :toggle_deletion
538 post :topup_checkout
539 get :topup_options
545 post 'webhooks/stripe', to: 'webhooks/stripe#process_payload'
546 post 'webhooks/firecrawl', to: 'webhooks/firecrawl#process_payload'
552 namespace :platform, defaults: { format: 'json' } do
553 namespace :api do
554 namespace :v1 do
555 resources :users, only: [:create, :show, :update, :destroy] do
557 get :login
558 post :token
561 resources :agent_bots, only: [:index, :create, :show, :update, :destroy] do
562 delete :avatar, on: :member
564 resources :accounts, only: [:index, :create, :show, :update, :destroy] do
565 resources :account_users, only: [:index, :create] do
567 delete :destroy
570 resources :email_channel_migrations, only: [:create]
578 namespace :public, defaults: { format: 'json' } do
579 namespace :api do
580 namespace :v1 do
581 resources :inboxes do
582 scope module: :inboxes do
583 resources :contacts, only: [:create, :show, :update] do
584 resources :conversations, only: [:index, :create, :show] do
586 post :toggle_status
587 post :toggle_typing
588 post :update_last_seen
591 resources :messages, only: [:index, :create, :update]
597 resources :csat_survey, only: [:show, :update]
602 get 'hc/:slug', to: 'public/api/v1/portals#show'
603 get 'hc/:slug/sitemap.xml', to: 'public/api/v1/portals#sitemap'
604 get 'hc/:slug/:locale', to: 'public/api/v1/portals#show', as: :public_portal_locale
605 get 'hc/:slug/:locale/search', to: 'public/api/v1/portals/search#index', as: :portal_search
606 get 'hc/:slug/:locale/articles', to: 'public/api/v1/portals/articles#index'
607 get 'hc/:slug/:locale/categories', to: 'public/api/v1/portals/categories#index'
608 get 'hc/:slug/:locale/categories/:category_slug', to: 'public/api/v1/portals/categories#show', as: :public_portal_category
609 get 'hc/:slug/:locale/categories/:category_slug/articles', to: 'public/api/v1/portals/articles#index'
610 get 'hc/:slug/articles/:article_slug.png', to: 'public/api/v1/portals/articles#tracking_pixel'
611 get 'hc/:slug/articles/:article_slug.md', to: 'public/api/v1/portals/articles#show_markdown', as: :public_portal_article_markdown,
613 get 'hc/:slug/articles/:article_slug', to: 'public/api/v1/portals/articles#show', as: :public_portal_article
617 resource :app, only: [:index] do
618 resources :accounts do
619 resources :conversations, only: [:show]
625 mount Facebook::Messenger::Server, at: 'bot'
626 get 'webhooks/twitter', to: 'api/v1/webhooks#twitter_crc'
627 post 'webhooks/twitter', to: 'api/v1/webhooks#twitter_events'
628 post 'webhooks/line/:line_channel_id', to: 'webhooks/line#process_payload'
629 post 'webhooks/telegram/:bot_token', to: 'webhooks/telegram#process_payload'
630 post 'webhooks/sms/:phone_number', to: 'webhooks/sms#process_payload'
631 get 'webhooks/whatsapp/:phone_number', to: 'webhooks/whatsapp#verify'
632 post 'webhooks/whatsapp/:phone_number', to: 'webhooks/whatsapp#process_payload'
633 get 'webhooks/instagram', to: 'webhooks/instagram#verify'
634 post 'webhooks/instagram', to: 'webhooks/instagram#events'
635 post 'webhooks/tiktok', to: 'webhooks/tiktok#events'
636 post 'webhooks/shopify', to: 'webhooks/shopify#events'
638 namespace :twitter do
639 resource :callback, only: [:show]
642 namespace :linear do
643 resource :callback, only: [:show]
646 namespace :shopify do
647 resource :callback, only: [:show]
650 namespace :twilio do
651 resources :callback, only: [:create]
652 resources :delivery_status, only: [:create]
655 post 'voice/call/:phone', to: 'voice#call_twiml', as: :voice_call
656 post 'voice/status/:phone', to: 'voice#status', as: :voice_status
657 post 'voice/conference_status/:phone', to: 'voice#conference_status', as: :voice_conference_status
658 post 'voice/recording_status/:phone', to: 'voice#recording_status', as: :voice_recording_status
662 get 'microsoft/callback', to: 'microsoft/callbacks#show'
663 get 'google/callback', to: 'google/callbacks#show'
664 get 'instagram/callback', to: 'instagram/callbacks#show'
665 get 'tiktok/callback', to: 'tiktok/callbacks#show'
666 get 'notion/callback', to: 'notion/callbacks#show'
669 get '.well-known/assetlinks.json' => 'android_app#assetlinks'
670 get '.well-known/apple-app-site-association' => 'apple_app#site_association'
671 get '.well-known/microsoft-identity-association.json' => 'microsoft#identity_association'
672 get '.well-known/cf-custom-hostname-challenge/:id', to: 'custom_domains#verify'
681 get 'super_admin/logout', to: 'super_admin/devise/sessions#destroy'
682 namespace :super_admin do
685 resource :app_config, only: [:show, :create]
686 resource :push_diagnostics, only: [:show, :create] do
687 post :destroy_subscriptions, on: :collection
691 resources :accounts, only: [:index, :new, :create, :show, :edit, :update, :destroy] do
692 post :seed, on: :member
693 post :reset_cache, on: :member
695 resources :users, only: [:index, :new, :create, :show, :edit, :update, :destroy] do
696 delete :avatar, on: :member, action: :destroy_avatar
699 resources :access_tokens, only: [:index, :show]
700 resources :installation_configs, only: [:index, :new, :create, :show, :edit, :update]
701 resources :agent_bots, only: [:index, :new, :create, :show, :edit, :update, :destroy] do
702 delete :avatar, on: :member, action: :destroy_avatar
704 resources :platform_apps, only: [:index, :new, :create, :show, :edit, :update, :destroy]
705 resources :platform_banners
706 resource :instance_status, only: [:show]
708 resource :settings, only: [:show] do
709 get :refresh, on: :collection
713 resources :account_users, only: [:new, :create, :show, :destroy]
716 mount Sidekiq::Web => '/monitoring/sidekiq'
720 namespace :installation do
721 get 'onboarding', to: 'onboarding#index'
722 post 'onboarding', to: 'onboarding#create'
727 get '/swagger/*path', to: 'swagger#respond'
728 get '/swagger', to: 'swagger#respond'
732 resources :widget_tests, only: [:index] unless Rails.env.production?