iachat/app/views/api/v1/accounts
Shivam Mishra 95463230cb
feat: sign webhooks for API channel and agentbots (#13892)
Account webhooks sign outgoing payloads with HMAC-SHA256, but agent bot
and API inbox webhooks were delivered unsigned. This PR adds the same
signing to both.

Each model gets a dedicated `secret` column rather than reusing the
agent bot's `access_token` (for API auth back into Chatwoot) or the API
inbox's `hmac_token` (for inbound contact identity verification). These
serve different trust boundaries and shouldn't be coupled — rotating a
signing secret shouldn't invalidate API access or contact verification.

The existing `Webhooks::Trigger` already signs when a secret is present,
so the backend change is just passing `secret:` through to the jobs.
Shared token logic is extracted into a `WebhookSecretable` concern
included by `Webhook`, `AgentBot`, and `Channel::Api`. The frontend
reuses the existing `AccessToken` component for secret display. Secrets
are admin-only and excluded from enterprise audit logs.

### How to test

Point an agent bot or API inbox webhook URL at a request inspector. Send
a message and verify `X-Chatwoot-Signature` and `X-Chatwoot-Timestamp`
headers are present. Reset the secret from settings and confirm
subsequent deliveries use the new value.

---------

Co-authored-by: Sojan Jose <sojan@pepalo.com>
2026-04-06 15:28:25 +05:30
..
actions/contact_merges feat: Reverse the contact merge (#8057) 2023-10-10 08:20:48 +05:30
agent_bots feat: sign webhooks for API channel and agentbots (#13892) 2026-04-06 15:28:25 +05:30
agents chore: Fix agent API returning 500 error (#9193) 2024-04-04 19:44:47 +05:30
articles feat(v4): Update the help center portal design (#10296) 2024-10-23 22:09:36 -07:00
assignable_agents fix: DEPRECATION WARNING: Rendering actions with '.' in the name is deprecated (#5560) 2022-10-05 17:24:34 -07:00
assignment_policies feat: Agent assignment policy index page with CRUD actions (#12373) 2025-09-10 12:07:21 +05:30
automation_rules fix: DEPRECATION WARNING: Rendering actions with '.' in the name is deprecated (#5560) 2022-10-05 17:24:34 -07:00
callbacks fix: DEPRECATION WARNING: Rendering actions with '.' in the name is deprecated (#5560) 2022-10-05 17:24:34 -07:00
campaigns fix: DEPRECATION WARNING: Rendering actions with '.' in the name is deprecated (#5560) 2022-10-05 17:24:34 -07:00
categories feat: Adds the ability to set an emoji for help center category (#8111) 2023-10-20 13:52:30 +05:30
channels/twilio_channels fix: DEPRECATION WARNING: Rendering actions with '.' in the name is deprecated (#5560) 2022-10-05 17:24:34 -07:00
contact_inboxes chore: Add an API to find the contacts using contact inbox sourceId (#8012) 2023-09-28 15:26:28 -07:00
contacts feat: Add infinite scroll to contacts search page (#13376) 2026-01-27 18:55:19 -08:00
conversations feat: APIs to assign agents_bots as assignee in conversations (#12836) 2025-11-18 18:20:58 -08:00
csat_survey_responses feat(ee): Review Notes for CSAT Reports (#13289) 2026-01-15 19:53:57 -08:00
custom_attribute_definitions fix: DEPRECATION WARNING: Rendering actions with '.' in the name is deprecated (#5560) 2022-10-05 17:24:34 -07:00
custom_filters fix: DEPRECATION WARNING: Rendering actions with '.' in the name is deprecated (#5560) 2022-10-05 17:24:34 -07:00
dashboard_apps fix: DEPRECATION WARNING: Rendering actions with '.' in the name is deprecated (#5560) 2022-10-05 17:24:34 -07:00
inbox_members fix: DEPRECATION WARNING: Rendering actions with '.' in the name is deprecated (#5560) 2022-10-05 17:24:34 -07:00
inboxes feat: sign webhooks for API channel and agentbots (#13892) 2026-04-06 15:28:25 +05:30
integrations feat: Linear OAuth 2.0 (#10851) 2025-02-27 18:15:53 +05:30
labels Feature: Label APIs (#931) 2020-06-07 11:17:13 +05:30
macros fix: DEPRECATION WARNING: Rendering actions with '.' in the name is deprecated (#5560) 2022-10-05 17:24:34 -07:00
notification_settings Feature: Add web push notification permission in frontend (#766) 2020-05-06 00:10:56 +05:30
notifications feat(v4): Update Inbox view card design (#10599) 2025-01-07 21:11:54 +05:30
portals feat: Add draft status for help center locales (#13768) 2026-03-17 12:45:54 +04:00
search feat: Advanced Search Backend (#12917) 2026-01-07 15:30:49 +05:30
team_members fix: DEPRECATION WARNING: Rendering actions with '.' in the name is deprecated (#5560) 2022-10-05 17:24:34 -07:00
teams fix: DEPRECATION WARNING: Rendering actions with '.' in the name is deprecated (#5560) 2022-10-05 17:24:34 -07:00
webhooks feat: add per-webhook secret with backfill migration (#13573) 2026-02-26 17:26:12 +05:30
whatsapp/callbacks feat: Whatsapp embedded signup (#11612) 2025-07-14 21:37:06 -07:00
create.json.jbuilder fix: Cannot read properties of undefined (reading 'always_play_audio_alert') (#7260) 2023-06-06 15:16:25 -07:00
show.json.jbuilder feat: allow feature plan map in super admin (#9318) 2024-05-08 22:58:46 -07:00
update.json.jbuilder fix: DEPRECATION WARNING: Rendering actions with '.' in the name is deprecated (#5560) 2022-10-05 17:24:34 -07:00