chatwoot/swagger/definitions/request
Sojan Jose ed3059c1aa
docs: Document API inbox webhook URL (#14593)
Documents the existing API inbox webhook_url request field and expands
inbox create/update request docs with channel-specific schemas and
examples.

Closes #14591

## Why
API inboxes already accept channel.webhook_url through Channel::Api
editable attributes, but the OpenAPI request schemas did not document
the field. The previous mixed channel object also made it hard to see
which fields belong to each supported channel type.

## What changed
- Added named channel payload schemas for supported inbox create channel
types.
- Added channel-specific create request samples in this order: Website
inbox, API channel, Email channel, LINE channel, Telegram channel,
WhatsApp channel, SMS channel.
- Added common inbox fields such as greeting_enabled, greeting_message,
enable_auto_assignment, working_hours_enabled, and timezone to request
samples.
- Kept website-only flags such as allow_messages_after_resolved and
enable_email_collect only in website inbox samples.
- Annotated inbox request field descriptions with channel availability
where Swagger UI cannot dynamically filter fields.
- Added channel-specific update settings schemas and request samples for
editable channel attributes.
- Documented channel.webhook_url for API inbox create/update payloads.
- Rebuilt generated Swagger JSON and tag-group specs.

## Screenshots

**Website inbox request sample**

Shows the request sample selector set to Website inbox, including
website-only fields such as enable_email_collect and
allow_messages_after_resolved.

<img width="3840" height="2160" alt="Website inbox request sample"
src="https://github.com/user-attachments/assets/ad130f04-b336-4cc3-aba1-e934b646d447"
/>

**API channel request sample**

Shows the selector switched to API channel, with API-specific fields
such as webhook_url, hmac_mandatory, and additional_attributes.

<img width="3840" height="2160" alt="API channel request sample"
src="https://github.com/user-attachments/assets/09484816-1d47-490f-9ab4-195835ed5cd3"
/>

**Expanded channel schema**

Shows the request-body schema with channel expanded, including the type
selector and channel-specific fields under it.

<img width="3840" height="2160" alt="Expanded channel schema"
src="https://github.com/user-attachments/assets/f6c4878e-ac34-40fe-8be3-5913f27cbdd8"
/>

## Validation
- bundle exec rake swagger:build
- bundle exec rspec spec/swagger/openapi_spec.rb
- Rendered the local Swagger page and verified the request sample
dropdown order and API channel payload.

---------

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2026-06-01 12:37:07 +04:00
..
account feat: validate OpenAPI spec using Skooma (#13623) 2026-03-10 18:33:55 -07:00
account_user feat: Update swagger to openapi 3.0.4, update request payloads with examples (#11374) 2025-05-22 14:26:44 +07:00
agent fix: clarify agent availability swagger fields (#14533) 2026-05-22 11:33:19 +05:30
agent_bot feat: Update swagger to openapi 3.0.4, update request payloads with examples (#11374) 2025-05-22 14:26:44 +07:00
automation_rule feat: Add automation rule event conversation resolved (#9669) 2025-08-13 12:57:14 +05:30
canned_response feat: Update swagger to openapi 3.0.4, update request payloads with examples (#11374) 2025-05-22 14:26:44 +07:00
contact feat: Update swagger to openapi 3.0.4, update request payloads with examples (#11374) 2025-05-22 14:26:44 +07:00
conversation feat: validate OpenAPI spec using Skooma (#13623) 2026-03-10 18:33:55 -07:00
custom_attribute feat: Update swagger to openapi 3.0.4, update request payloads with examples (#11374) 2025-05-22 14:26:44 +07:00
custom_filter feat: Update swagger to openapi 3.0.4, update request payloads with examples (#11374) 2025-05-22 14:26:44 +07:00
inbox docs: Document API inbox webhook URL (#14593) 2026-06-01 12:37:07 +04:00
integrations feat: Update swagger to openapi 3.0.4, update request payloads with examples (#11374) 2025-05-22 14:26:44 +07:00
label docs(swagger): document account label endpoints (#13760) 2026-03-10 22:24:16 -07:00
platform/agent_bot feat: Update swagger to openapi 3.0.4, update request payloads with examples (#11374) 2025-05-22 14:26:44 +07:00
portal feat: Update swagger to openapi 3.0.4, update request payloads with examples (#11374) 2025-05-22 14:26:44 +07:00
public feat: Update swagger to openapi 3.0.4, update request payloads with examples (#11374) 2025-05-22 14:26:44 +07:00
team feat: Update swagger to openapi 3.0.4, update request payloads with examples (#11374) 2025-05-22 14:26:44 +07:00
user feat: Update swagger to openapi 3.0.4, update request payloads with examples (#11374) 2025-05-22 14:26:44 +07:00
webhooks fix(openapi): document webhook secret in API schema (#14199) 2026-05-22 16:10:17 +05:30