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>
This commit is contained in:
co-authored by
Muhsin Keloth
parent
9d591b8f46
commit
ed3059c1aa
@@ -145,6 +145,34 @@ inbox_create_payload:
|
||||
$ref: ./request/inbox/create_payload.yml
|
||||
inbox_update_payload:
|
||||
$ref: ./request/inbox/update_payload.yml
|
||||
inbox_create_web_widget_channel_payload:
|
||||
$ref: ./request/inbox/channels/create_web_widget_channel_payload.yml
|
||||
inbox_create_api_channel_payload:
|
||||
$ref: ./request/inbox/channels/create_api_channel_payload.yml
|
||||
inbox_create_email_channel_payload:
|
||||
$ref: ./request/inbox/channels/create_email_channel_payload.yml
|
||||
inbox_create_line_channel_payload:
|
||||
$ref: ./request/inbox/channels/create_line_channel_payload.yml
|
||||
inbox_create_telegram_channel_payload:
|
||||
$ref: ./request/inbox/channels/create_telegram_channel_payload.yml
|
||||
inbox_create_whatsapp_channel_payload:
|
||||
$ref: ./request/inbox/channels/create_whatsapp_channel_payload.yml
|
||||
inbox_create_sms_channel_payload:
|
||||
$ref: ./request/inbox/channels/create_sms_channel_payload.yml
|
||||
inbox_update_web_widget_channel_payload:
|
||||
$ref: ./request/inbox/channels/update_web_widget_channel_payload.yml
|
||||
inbox_update_api_channel_payload:
|
||||
$ref: ./request/inbox/channels/update_api_channel_payload.yml
|
||||
inbox_update_email_channel_payload:
|
||||
$ref: ./request/inbox/channels/update_email_channel_payload.yml
|
||||
inbox_update_line_channel_payload:
|
||||
$ref: ./request/inbox/channels/update_line_channel_payload.yml
|
||||
inbox_update_telegram_channel_payload:
|
||||
$ref: ./request/inbox/channels/update_telegram_channel_payload.yml
|
||||
inbox_update_whatsapp_channel_payload:
|
||||
$ref: ./request/inbox/channels/update_whatsapp_channel_payload.yml
|
||||
inbox_update_sms_channel_payload:
|
||||
$ref: ./request/inbox/channels/update_sms_channel_payload.yml
|
||||
|
||||
# Team
|
||||
team_create_update_payload:
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
type: object
|
||||
title: API channel
|
||||
required:
|
||||
- type
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
enum: ['api']
|
||||
example: api
|
||||
webhook_url:
|
||||
type: string
|
||||
description: Webhook URL for API channel inbox callbacks
|
||||
example: 'https://example.com/webhook'
|
||||
hmac_mandatory:
|
||||
type: boolean
|
||||
description: Require HMAC verification for incoming API channel messages
|
||||
example: false
|
||||
additional_attributes:
|
||||
type: object
|
||||
description: Additional attributes stored on contacts created through the API channel
|
||||
example:
|
||||
source: mobile_app
|
||||
@@ -0,0 +1,90 @@
|
||||
type: object
|
||||
title: Email channel
|
||||
required:
|
||||
- type
|
||||
- email
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
enum: ['email']
|
||||
example: email
|
||||
email:
|
||||
type: string
|
||||
description: Email address for the inbox
|
||||
example: support@example.com
|
||||
imap_enabled:
|
||||
type: boolean
|
||||
description: Enable IMAP for inbound emails
|
||||
example: true
|
||||
imap_login:
|
||||
type: string
|
||||
description: IMAP login username
|
||||
example: support@example.com
|
||||
imap_password:
|
||||
type: string
|
||||
description: IMAP login password
|
||||
example: your-imap-password
|
||||
imap_address:
|
||||
type: string
|
||||
description: IMAP server address
|
||||
example: imap.example.com
|
||||
imap_port:
|
||||
type: integer
|
||||
description: IMAP server port
|
||||
example: 993
|
||||
imap_enable_ssl:
|
||||
type: boolean
|
||||
description: Enable SSL for IMAP
|
||||
example: true
|
||||
imap_authentication:
|
||||
type: string
|
||||
description: IMAP authentication method
|
||||
example: plain
|
||||
smtp_enabled:
|
||||
type: boolean
|
||||
description: Enable SMTP for outbound emails
|
||||
example: true
|
||||
smtp_login:
|
||||
type: string
|
||||
description: SMTP login username
|
||||
example: support@example.com
|
||||
smtp_password:
|
||||
type: string
|
||||
description: SMTP login password
|
||||
example: your-smtp-password
|
||||
smtp_address:
|
||||
type: string
|
||||
description: SMTP server address
|
||||
example: smtp.example.com
|
||||
smtp_port:
|
||||
type: integer
|
||||
description: SMTP server port
|
||||
example: 587
|
||||
smtp_domain:
|
||||
type: string
|
||||
description: SMTP HELO domain
|
||||
example: example.com
|
||||
smtp_enable_starttls_auto:
|
||||
type: boolean
|
||||
description: Automatically enable STARTTLS for SMTP
|
||||
example: true
|
||||
smtp_enable_ssl_tls:
|
||||
type: boolean
|
||||
description: Enable SSL/TLS for SMTP
|
||||
example: false
|
||||
smtp_openssl_verify_mode:
|
||||
type: string
|
||||
description: OpenSSL certificate verification mode for SMTP
|
||||
example: none
|
||||
smtp_authentication:
|
||||
type: string
|
||||
description: SMTP authentication method
|
||||
example: login
|
||||
provider:
|
||||
type: string
|
||||
description: Email provider
|
||||
example: google
|
||||
verified_for_sending:
|
||||
type: boolean
|
||||
description: Whether the inbox is verified for sending emails
|
||||
example: false
|
||||
@@ -0,0 +1,24 @@
|
||||
type: object
|
||||
title: LINE channel
|
||||
required:
|
||||
- type
|
||||
- line_channel_id
|
||||
- line_channel_secret
|
||||
- line_channel_token
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
enum: ['line']
|
||||
example: line
|
||||
line_channel_id:
|
||||
type: string
|
||||
description: LINE channel ID
|
||||
example: '1234567890'
|
||||
line_channel_secret:
|
||||
type: string
|
||||
description: LINE channel secret
|
||||
example: line-channel-secret
|
||||
line_channel_token:
|
||||
type: string
|
||||
description: LINE channel access token
|
||||
example: line-channel-token
|
||||
@@ -0,0 +1,20 @@
|
||||
type: object
|
||||
title: SMS channel
|
||||
required:
|
||||
- type
|
||||
- phone_number
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
enum: ['sms']
|
||||
example: sms
|
||||
phone_number:
|
||||
type: string
|
||||
description: SMS phone number
|
||||
example: '+15551234567'
|
||||
provider_config:
|
||||
type: object
|
||||
description: Provider-specific SMS configuration
|
||||
example:
|
||||
account_id: your-account-id
|
||||
application_id: your-application-id
|
||||
@@ -0,0 +1,14 @@
|
||||
type: object
|
||||
title: Telegram channel
|
||||
required:
|
||||
- type
|
||||
- bot_token
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
enum: ['telegram']
|
||||
example: telegram
|
||||
bot_token:
|
||||
type: string
|
||||
description: Telegram bot token
|
||||
example: 123456789:telegram-bot-token
|
||||
@@ -0,0 +1,66 @@
|
||||
type: object
|
||||
title: Website channel
|
||||
required:
|
||||
- type
|
||||
- website_url
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
enum: ['web_widget']
|
||||
example: web_widget
|
||||
website_url:
|
||||
type: string
|
||||
description: URL at which the widget will be loaded
|
||||
example: 'https://example.com'
|
||||
welcome_title:
|
||||
type: string
|
||||
description: Welcome title to be displayed on the widget
|
||||
example: 'Welcome to our support'
|
||||
welcome_tagline:
|
||||
type: string
|
||||
description: Welcome tagline to be displayed on the widget
|
||||
example: 'We are here to help you'
|
||||
widget_color:
|
||||
type: string
|
||||
description: A Hex-color string used to customize the widget
|
||||
example: '#FF5733'
|
||||
reply_time:
|
||||
type: string
|
||||
description: Expected reply time shown on the widget
|
||||
enum: ['in_a_few_minutes', 'in_a_few_hours', 'in_a_day']
|
||||
example: in_a_few_minutes
|
||||
pre_chat_form_enabled:
|
||||
type: boolean
|
||||
description: Enable the pre-chat form before starting a conversation
|
||||
example: false
|
||||
pre_chat_form_options:
|
||||
type: object
|
||||
description: Pre-chat form configuration
|
||||
example:
|
||||
pre_chat_message: Share your queries or comments here.
|
||||
pre_chat_fields:
|
||||
- field_type: standard
|
||||
label: Email Id
|
||||
name: emailAddress
|
||||
type: email
|
||||
required: true
|
||||
enabled: true
|
||||
continuity_via_email:
|
||||
type: boolean
|
||||
description: Continue conversations over email when the contact leaves the website
|
||||
example: true
|
||||
hmac_mandatory:
|
||||
type: boolean
|
||||
description: Require HMAC verification for contacts using the widget
|
||||
example: false
|
||||
allowed_domains:
|
||||
type: string
|
||||
description: Comma-separated list of domains where the widget is allowed to load
|
||||
example: example.com
|
||||
selected_feature_flags:
|
||||
type: array
|
||||
description: Enabled widget feature flags
|
||||
items:
|
||||
type: string
|
||||
enum: ['attachments', 'emoji_picker', 'end_conversation', 'use_inbox_avatar_for_bot', 'allow_mobile_webview']
|
||||
example: ['attachments', 'emoji_picker', 'end_conversation']
|
||||
@@ -0,0 +1,80 @@
|
||||
oneOf:
|
||||
- type: object
|
||||
title: WhatsApp Cloud channel
|
||||
required:
|
||||
- type
|
||||
- phone_number
|
||||
- provider
|
||||
- provider_config
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
enum: ['whatsapp']
|
||||
example: whatsapp
|
||||
phone_number:
|
||||
type: string
|
||||
description: WhatsApp phone number
|
||||
example: '+15551234567'
|
||||
provider:
|
||||
type: string
|
||||
description: WhatsApp provider
|
||||
enum: ['whatsapp_cloud']
|
||||
example: whatsapp_cloud
|
||||
provider_config:
|
||||
type: object
|
||||
description: WhatsApp Cloud provider configuration
|
||||
required:
|
||||
- api_key
|
||||
- phone_number_id
|
||||
- business_account_id
|
||||
properties:
|
||||
api_key:
|
||||
type: string
|
||||
description: WhatsApp Cloud API key
|
||||
example: your-api-key
|
||||
phone_number_id:
|
||||
type: string
|
||||
description: Phone number ID for WhatsApp Cloud
|
||||
example: your-phone-number-id
|
||||
business_account_id:
|
||||
type: string
|
||||
description: Business account ID for WhatsApp Cloud
|
||||
example: your-business-account-id
|
||||
example:
|
||||
api_key: your-api-key
|
||||
phone_number_id: your-phone-number-id
|
||||
business_account_id: your-business-account-id
|
||||
- type: object
|
||||
title: Legacy 360dialog WhatsApp channel
|
||||
deprecated: true
|
||||
required:
|
||||
- type
|
||||
- phone_number
|
||||
- provider_config
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
enum: ['whatsapp']
|
||||
example: whatsapp
|
||||
phone_number:
|
||||
type: string
|
||||
description: WhatsApp phone number
|
||||
example: '+15551234567'
|
||||
provider:
|
||||
type: string
|
||||
description: Legacy 360dialog provider. Omit this field or use `default` only for existing deprecated 360dialog setups.
|
||||
enum: ['default']
|
||||
deprecated: true
|
||||
example: default
|
||||
provider_config:
|
||||
type: object
|
||||
description: Legacy 360dialog provider configuration
|
||||
required:
|
||||
- api_key
|
||||
properties:
|
||||
api_key:
|
||||
type: string
|
||||
description: 360dialog API key
|
||||
example: your-api-key
|
||||
example:
|
||||
api_key: your-api-key
|
||||
@@ -0,0 +1,16 @@
|
||||
type: object
|
||||
title: API channel settings
|
||||
properties:
|
||||
webhook_url:
|
||||
type: string
|
||||
description: Webhook URL for API channel inbox callbacks
|
||||
example: 'https://example.com/webhook'
|
||||
hmac_mandatory:
|
||||
type: boolean
|
||||
description: Require HMAC verification for incoming API channel messages
|
||||
example: false
|
||||
additional_attributes:
|
||||
type: object
|
||||
description: Additional attributes stored on contacts created through the API channel
|
||||
example:
|
||||
source: mobile_app
|
||||
@@ -0,0 +1,83 @@
|
||||
type: object
|
||||
title: Email channel settings
|
||||
properties:
|
||||
email:
|
||||
type: string
|
||||
description: Email address for the inbox
|
||||
example: support@example.com
|
||||
imap_enabled:
|
||||
type: boolean
|
||||
description: Enable IMAP for inbound emails
|
||||
example: true
|
||||
imap_login:
|
||||
type: string
|
||||
description: IMAP login username
|
||||
example: support@example.com
|
||||
imap_password:
|
||||
type: string
|
||||
description: IMAP login password
|
||||
example: your-imap-password
|
||||
imap_address:
|
||||
type: string
|
||||
description: IMAP server address
|
||||
example: imap.example.com
|
||||
imap_port:
|
||||
type: integer
|
||||
description: IMAP server port
|
||||
example: 993
|
||||
imap_enable_ssl:
|
||||
type: boolean
|
||||
description: Enable SSL for IMAP
|
||||
example: true
|
||||
imap_authentication:
|
||||
type: string
|
||||
description: IMAP authentication method
|
||||
example: plain
|
||||
smtp_enabled:
|
||||
type: boolean
|
||||
description: Enable SMTP for outbound emails
|
||||
example: true
|
||||
smtp_login:
|
||||
type: string
|
||||
description: SMTP login username
|
||||
example: support@example.com
|
||||
smtp_password:
|
||||
type: string
|
||||
description: SMTP login password
|
||||
example: your-smtp-password
|
||||
smtp_address:
|
||||
type: string
|
||||
description: SMTP server address
|
||||
example: smtp.example.com
|
||||
smtp_port:
|
||||
type: integer
|
||||
description: SMTP server port
|
||||
example: 587
|
||||
smtp_domain:
|
||||
type: string
|
||||
description: SMTP HELO domain
|
||||
example: example.com
|
||||
smtp_enable_starttls_auto:
|
||||
type: boolean
|
||||
description: Automatically enable STARTTLS for SMTP
|
||||
example: true
|
||||
smtp_enable_ssl_tls:
|
||||
type: boolean
|
||||
description: Enable SSL/TLS for SMTP
|
||||
example: false
|
||||
smtp_openssl_verify_mode:
|
||||
type: string
|
||||
description: OpenSSL certificate verification mode for SMTP
|
||||
example: none
|
||||
smtp_authentication:
|
||||
type: string
|
||||
description: SMTP authentication method
|
||||
example: login
|
||||
provider:
|
||||
type: string
|
||||
description: Email provider
|
||||
example: google
|
||||
verified_for_sending:
|
||||
type: boolean
|
||||
description: Whether the inbox is verified for sending emails
|
||||
example: false
|
||||
@@ -0,0 +1,15 @@
|
||||
type: object
|
||||
title: LINE channel settings
|
||||
properties:
|
||||
line_channel_id:
|
||||
type: string
|
||||
description: LINE channel ID
|
||||
example: '1234567890'
|
||||
line_channel_secret:
|
||||
type: string
|
||||
description: LINE channel secret
|
||||
example: line-channel-secret
|
||||
line_channel_token:
|
||||
type: string
|
||||
description: LINE channel access token
|
||||
example: line-channel-token
|
||||
@@ -0,0 +1,15 @@
|
||||
type: object
|
||||
title: SMS channel settings
|
||||
properties:
|
||||
phone_number:
|
||||
type: string
|
||||
description: SMS phone number
|
||||
example: '+15551234567'
|
||||
provider_config:
|
||||
type: object
|
||||
description: Provider-specific SMS configuration
|
||||
example:
|
||||
api_key: your-api-key
|
||||
api_secret: your-api-secret
|
||||
application_id: your-application-id
|
||||
account_id: your-account-id
|
||||
@@ -0,0 +1,7 @@
|
||||
type: object
|
||||
title: Telegram channel settings
|
||||
properties:
|
||||
bot_token:
|
||||
type: string
|
||||
description: Telegram bot token
|
||||
example: 123456789:telegram-bot-token
|
||||
@@ -0,0 +1,59 @@
|
||||
type: object
|
||||
title: Website channel settings
|
||||
properties:
|
||||
website_url:
|
||||
type: string
|
||||
description: URL at which the widget will be loaded
|
||||
example: 'https://example.com'
|
||||
welcome_title:
|
||||
type: string
|
||||
description: Welcome title to be displayed on the widget
|
||||
example: 'Welcome to our support'
|
||||
welcome_tagline:
|
||||
type: string
|
||||
description: Welcome tagline to be displayed on the widget
|
||||
example: 'We are here to help you'
|
||||
widget_color:
|
||||
type: string
|
||||
description: A Hex-color string used to customize the widget
|
||||
example: '#FF5733'
|
||||
reply_time:
|
||||
type: string
|
||||
description: Expected reply time shown on the widget
|
||||
enum: ['in_a_few_minutes', 'in_a_few_hours', 'in_a_day']
|
||||
example: in_a_few_minutes
|
||||
pre_chat_form_enabled:
|
||||
type: boolean
|
||||
description: Enable the pre-chat form before starting a conversation
|
||||
example: false
|
||||
pre_chat_form_options:
|
||||
type: object
|
||||
description: Pre-chat form configuration
|
||||
example:
|
||||
pre_chat_message: Share your queries or comments here.
|
||||
pre_chat_fields:
|
||||
- field_type: standard
|
||||
label: Email Id
|
||||
name: emailAddress
|
||||
type: email
|
||||
required: true
|
||||
enabled: true
|
||||
continuity_via_email:
|
||||
type: boolean
|
||||
description: Continue conversations over email when the contact leaves the website
|
||||
example: true
|
||||
hmac_mandatory:
|
||||
type: boolean
|
||||
description: Require HMAC verification for contacts using the widget
|
||||
example: false
|
||||
allowed_domains:
|
||||
type: string
|
||||
description: Comma-separated list of domains where the widget is allowed to load
|
||||
example: example.com
|
||||
selected_feature_flags:
|
||||
type: array
|
||||
description: Enabled widget feature flags
|
||||
items:
|
||||
type: string
|
||||
enum: ['attachments', 'emoji_picker', 'end_conversation', 'use_inbox_avatar_for_bot', 'allow_mobile_webview']
|
||||
example: ['attachments', 'emoji_picker', 'end_conversation']
|
||||
@@ -0,0 +1,32 @@
|
||||
type: object
|
||||
title: WhatsApp channel settings
|
||||
properties:
|
||||
phone_number:
|
||||
type: string
|
||||
description: WhatsApp phone number
|
||||
example: '+15551234567'
|
||||
provider:
|
||||
type: string
|
||||
description: WhatsApp provider. `default` is supported only for existing deprecated 360dialog setups.
|
||||
enum: ['whatsapp_cloud', 'default']
|
||||
example: whatsapp_cloud
|
||||
provider_config:
|
||||
type: object
|
||||
description: WhatsApp provider configuration. Cloud channels use `api_key`, `phone_number_id`, and `business_account_id`; legacy 360dialog channels use `api_key`.
|
||||
properties:
|
||||
api_key:
|
||||
type: string
|
||||
description: Provider API key
|
||||
example: your-api-key
|
||||
phone_number_id:
|
||||
type: string
|
||||
description: Phone number ID for WhatsApp Cloud
|
||||
example: your-phone-number-id
|
||||
business_account_id:
|
||||
type: string
|
||||
description: Business account ID for WhatsApp Cloud
|
||||
example: your-business-account-id
|
||||
example:
|
||||
api_key: your-api-key
|
||||
phone_number_id: your-phone-number-id
|
||||
business_account_id: your-business-account-id
|
||||
@@ -2,87 +2,129 @@ type: object
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
description: The name of the inbox
|
||||
description: The name of the inbox.
|
||||
example: 'Support'
|
||||
avatar:
|
||||
type: string
|
||||
format: binary
|
||||
description: Image file for avatar
|
||||
description: Image file for avatar.
|
||||
greeting_enabled:
|
||||
type: boolean
|
||||
description: Enable greeting message
|
||||
description: Enable greeting message.
|
||||
example: true
|
||||
greeting_message:
|
||||
type: string
|
||||
description: Greeting message to be displayed on the widget
|
||||
description: Greeting message to send when greeting messages are enabled.
|
||||
example: Hello, how can I help you?
|
||||
enable_email_collect:
|
||||
type: boolean
|
||||
description: Enable email collection
|
||||
description: |
|
||||
Enable email collection.
|
||||
|
||||
Available for: `Website`
|
||||
example: true
|
||||
csat_survey_enabled:
|
||||
type: boolean
|
||||
description: Enable CSAT survey
|
||||
description: Enable CSAT survey.
|
||||
example: true
|
||||
csat_config:
|
||||
type: object
|
||||
description: CSAT survey configuration.
|
||||
properties:
|
||||
display_type:
|
||||
type: string
|
||||
description: Display style for the CSAT survey.
|
||||
enum: ['emoji', 'star']
|
||||
example: emoji
|
||||
message:
|
||||
type: string
|
||||
description: Message shown with the CSAT survey.
|
||||
example: Please rate your conversation
|
||||
button_text:
|
||||
type: string
|
||||
description: Text shown on the CSAT survey button.
|
||||
example: Please rate us
|
||||
language:
|
||||
type: string
|
||||
description: Language code for the CSAT survey.
|
||||
example: en
|
||||
survey_rules:
|
||||
type: object
|
||||
description: Rules that decide when to show the CSAT survey.
|
||||
properties:
|
||||
operator:
|
||||
type: string
|
||||
example: contains
|
||||
values:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
example: ['billing']
|
||||
enable_auto_assignment:
|
||||
type: boolean
|
||||
description: Enable Auto Assignment
|
||||
description: Enable Auto Assignment.
|
||||
example: true
|
||||
working_hours_enabled:
|
||||
type: boolean
|
||||
description: Enable working hours
|
||||
description: Enable working hours.
|
||||
example: true
|
||||
out_of_office_message:
|
||||
type: string
|
||||
description: Out of office message to be displayed on the widget
|
||||
description: Out of office message to send outside working hours.
|
||||
example: We are currently out of office. Please leave a message and we will get back to you.
|
||||
timezone:
|
||||
type: string
|
||||
description: Timezone of the inbox
|
||||
description: Timezone of the inbox.
|
||||
example: 'America/New_York'
|
||||
allow_messages_after_resolved:
|
||||
type: boolean
|
||||
description: Allow messages after conversation is resolved
|
||||
description: |
|
||||
Allow messages after conversation is resolved.
|
||||
|
||||
Available for: `Website`
|
||||
example: true
|
||||
lock_to_single_conversation:
|
||||
type: boolean
|
||||
description: Lock to single conversation
|
||||
description: |
|
||||
Lock contact messages to a single active conversation.
|
||||
|
||||
Available for: `API` `LINE` `Telegram` `WhatsApp` `SMS`
|
||||
example: true
|
||||
portal_id:
|
||||
type: integer
|
||||
description: Id of the help center portal to attach to the inbox
|
||||
description: Id of the help center portal to attach to the inbox.
|
||||
example: 1
|
||||
sender_name_type:
|
||||
type: string
|
||||
description: Sender name type for the inbox
|
||||
description: |
|
||||
Sender name type for outbound email replies.
|
||||
|
||||
Available for: `Website` `Email`
|
||||
enum: ['friendly', 'professional']
|
||||
example: 'friendly'
|
||||
business_name:
|
||||
type: string
|
||||
description: Business name for the inbox
|
||||
description: |
|
||||
Business name for outbound email replies.
|
||||
|
||||
Available for: `Website` `Email`
|
||||
example: 'My Business'
|
||||
channel:
|
||||
type: object
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
description: Type of the channel
|
||||
enum:
|
||||
['web_widget', 'api', 'email', 'line', 'telegram', 'whatsapp', 'sms']
|
||||
example: web_widget
|
||||
website_url:
|
||||
type: string
|
||||
description: URL at which the widget will be loaded
|
||||
example: 'https://example.com'
|
||||
welcome_title:
|
||||
type: string
|
||||
description: Welcome title to be displayed on the widget
|
||||
example: 'Welcome to our support'
|
||||
welcome_tagline:
|
||||
type: string
|
||||
description: Welcome tagline to be displayed on the widget
|
||||
example: 'We are here to help you'
|
||||
widget_color:
|
||||
type: string
|
||||
description: A Hex-color string used to customize the widget
|
||||
example: '#FF5733'
|
||||
oneOf:
|
||||
- $ref: '#/components/schemas/inbox_create_web_widget_channel_payload'
|
||||
- $ref: '#/components/schemas/inbox_create_api_channel_payload'
|
||||
- $ref: '#/components/schemas/inbox_create_email_channel_payload'
|
||||
- $ref: '#/components/schemas/inbox_create_line_channel_payload'
|
||||
- $ref: '#/components/schemas/inbox_create_telegram_channel_payload'
|
||||
- $ref: '#/components/schemas/inbox_create_whatsapp_channel_payload'
|
||||
- $ref: '#/components/schemas/inbox_create_sms_channel_payload'
|
||||
discriminator:
|
||||
propertyName: type
|
||||
mapping:
|
||||
web_widget: '#/components/schemas/inbox_create_web_widget_channel_payload'
|
||||
api: '#/components/schemas/inbox_create_api_channel_payload'
|
||||
email: '#/components/schemas/inbox_create_email_channel_payload'
|
||||
line: '#/components/schemas/inbox_create_line_channel_payload'
|
||||
telegram: '#/components/schemas/inbox_create_telegram_channel_payload'
|
||||
whatsapp: '#/components/schemas/inbox_create_whatsapp_channel_payload'
|
||||
sms: '#/components/schemas/inbox_create_sms_channel_payload'
|
||||
|
||||
@@ -2,81 +2,119 @@ type: object
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
description: The name of the inbox
|
||||
description: The name of the inbox.
|
||||
example: 'Support'
|
||||
avatar:
|
||||
type: string
|
||||
format: binary
|
||||
description: Image file for avatar
|
||||
description: Image file for avatar.
|
||||
greeting_enabled:
|
||||
type: boolean
|
||||
description: Enable greeting message
|
||||
description: Enable greeting message.
|
||||
example: true
|
||||
greeting_message:
|
||||
type: string
|
||||
description: Greeting message to be displayed on the widget
|
||||
description: Greeting message to send when greeting messages are enabled.
|
||||
example: Hello, how can I help you?
|
||||
enable_email_collect:
|
||||
type: boolean
|
||||
description: Enable email collection
|
||||
description: |
|
||||
Enable email collection.
|
||||
|
||||
Available for: `Website`
|
||||
example: true
|
||||
csat_survey_enabled:
|
||||
type: boolean
|
||||
description: Enable CSAT survey
|
||||
description: Enable CSAT survey.
|
||||
example: true
|
||||
csat_config:
|
||||
type: object
|
||||
description: CSAT survey configuration.
|
||||
properties:
|
||||
display_type:
|
||||
type: string
|
||||
description: Display style for the CSAT survey.
|
||||
enum: ['emoji', 'star']
|
||||
example: emoji
|
||||
message:
|
||||
type: string
|
||||
description: Message shown with the CSAT survey.
|
||||
example: Please rate your conversation
|
||||
button_text:
|
||||
type: string
|
||||
description: Text shown on the CSAT survey button.
|
||||
example: Please rate us
|
||||
language:
|
||||
type: string
|
||||
description: Language code for the CSAT survey.
|
||||
example: en
|
||||
survey_rules:
|
||||
type: object
|
||||
description: Rules that decide when to show the CSAT survey.
|
||||
properties:
|
||||
operator:
|
||||
type: string
|
||||
example: contains
|
||||
values:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
example: ['billing']
|
||||
enable_auto_assignment:
|
||||
type: boolean
|
||||
description: Enable Auto Assignment
|
||||
description: Enable Auto Assignment.
|
||||
example: true
|
||||
working_hours_enabled:
|
||||
type: boolean
|
||||
description: Enable working hours
|
||||
description: Enable working hours.
|
||||
example: true
|
||||
out_of_office_message:
|
||||
type: string
|
||||
description: Out of office message to be displayed on the widget
|
||||
description: Out of office message to send outside working hours.
|
||||
example: We are currently out of office. Please leave a message and we will get back to you.
|
||||
timezone:
|
||||
type: string
|
||||
description: Timezone of the inbox
|
||||
description: Timezone of the inbox.
|
||||
example: 'America/New_York'
|
||||
allow_messages_after_resolved:
|
||||
type: boolean
|
||||
description: Allow messages after conversation is resolved
|
||||
description: |
|
||||
Allow messages after conversation is resolved.
|
||||
|
||||
Available for: `Website`
|
||||
example: true
|
||||
lock_to_single_conversation:
|
||||
type: boolean
|
||||
description: Lock to single conversation
|
||||
description: |
|
||||
Lock contact messages to a single active conversation.
|
||||
|
||||
Available for: `API` `LINE` `Telegram` `WhatsApp` `SMS`
|
||||
example: true
|
||||
portal_id:
|
||||
type: integer
|
||||
description: Id of the help center portal to attach to the inbox
|
||||
description: Id of the help center portal to attach to the inbox.
|
||||
example: 1
|
||||
sender_name_type:
|
||||
type: string
|
||||
description: Sender name type for the inbox
|
||||
description: |
|
||||
Sender name type for outbound email replies.
|
||||
|
||||
Available for: `Website` `Email`
|
||||
enum: ['friendly', 'professional']
|
||||
example: 'friendly'
|
||||
business_name:
|
||||
type: string
|
||||
description: Business name for the inbox
|
||||
description: |
|
||||
Business name for outbound email replies.
|
||||
|
||||
Available for: `Website` `Email`
|
||||
example: 'My Business'
|
||||
channel:
|
||||
type: object
|
||||
properties:
|
||||
website_url:
|
||||
type: string
|
||||
description: URL at which the widget will be loaded
|
||||
example: 'https://example.com'
|
||||
welcome_title:
|
||||
type: string
|
||||
description: Welcome title to be displayed on the widget
|
||||
example: 'Welcome to our support'
|
||||
welcome_tagline:
|
||||
type: string
|
||||
description: Welcome tagline to be displayed on the widget
|
||||
example: 'We are here to help you'
|
||||
widget_color:
|
||||
type: string
|
||||
description: A Hex-color string used to customize the widget
|
||||
example: '#FF5733'
|
||||
anyOf:
|
||||
- $ref: '#/components/schemas/inbox_update_web_widget_channel_payload'
|
||||
- $ref: '#/components/schemas/inbox_update_api_channel_payload'
|
||||
- $ref: '#/components/schemas/inbox_update_email_channel_payload'
|
||||
- $ref: '#/components/schemas/inbox_update_line_channel_payload'
|
||||
- $ref: '#/components/schemas/inbox_update_telegram_channel_payload'
|
||||
- $ref: '#/components/schemas/inbox_update_whatsapp_channel_payload'
|
||||
- $ref: '#/components/schemas/inbox_update_sms_channel_payload'
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
post:
|
||||
tags:
|
||||
- Inboxes
|
||||
operationId: inboxCreation
|
||||
summary: Create an inbox
|
||||
description: You can create more than one website inbox in each account
|
||||
security:
|
||||
- userApiKey: []
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/account_id'
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/inbox_create_payload'
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/inbox'
|
||||
'404':
|
||||
description: Inbox not found
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
'403':
|
||||
description: Access denied
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
@@ -49,6 +49,121 @@ post:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/inbox_create_payload'
|
||||
examples:
|
||||
web_widget:
|
||||
summary: Website inbox
|
||||
value:
|
||||
name: Support
|
||||
greeting_enabled: true
|
||||
greeting_message: Hello, how can I help you?
|
||||
enable_email_collect: true
|
||||
enable_auto_assignment: true
|
||||
working_hours_enabled: true
|
||||
timezone: America/New_York
|
||||
allow_messages_after_resolved: true
|
||||
channel:
|
||||
type: web_widget
|
||||
website_url: https://example.com
|
||||
welcome_title: Welcome to our support
|
||||
welcome_tagline: We are here to help you
|
||||
widget_color: '#FF5733'
|
||||
reply_time: in_a_few_minutes
|
||||
pre_chat_form_enabled: false
|
||||
continuity_via_email: true
|
||||
hmac_mandatory: false
|
||||
selected_feature_flags:
|
||||
- attachments
|
||||
- emoji_picker
|
||||
- end_conversation
|
||||
api:
|
||||
summary: API channel
|
||||
value:
|
||||
name: API Inbox
|
||||
greeting_enabled: true
|
||||
greeting_message: Hello, how can I help you?
|
||||
enable_auto_assignment: true
|
||||
working_hours_enabled: true
|
||||
timezone: America/New_York
|
||||
channel:
|
||||
type: api
|
||||
webhook_url: https://example.com/webhook
|
||||
hmac_mandatory: false
|
||||
additional_attributes:
|
||||
source: mobile_app
|
||||
email:
|
||||
summary: Email channel
|
||||
value:
|
||||
name: Email Inbox
|
||||
greeting_enabled: true
|
||||
greeting_message: Hello, how can I help you?
|
||||
enable_auto_assignment: true
|
||||
working_hours_enabled: true
|
||||
timezone: America/New_York
|
||||
channel:
|
||||
type: email
|
||||
email: support@example.com
|
||||
imap_enabled: false
|
||||
smtp_enabled: false
|
||||
line:
|
||||
summary: LINE channel
|
||||
value:
|
||||
name: LINE Inbox
|
||||
greeting_enabled: true
|
||||
greeting_message: Hello, how can I help you?
|
||||
enable_auto_assignment: true
|
||||
working_hours_enabled: true
|
||||
timezone: America/New_York
|
||||
channel:
|
||||
type: line
|
||||
line_channel_id: '1234567890'
|
||||
line_channel_secret: line-channel-secret
|
||||
line_channel_token: line-channel-token
|
||||
telegram:
|
||||
summary: Telegram channel
|
||||
value:
|
||||
name: Telegram Inbox
|
||||
greeting_enabled: true
|
||||
greeting_message: Hello, how can I help you?
|
||||
enable_auto_assignment: true
|
||||
working_hours_enabled: true
|
||||
timezone: America/New_York
|
||||
channel:
|
||||
type: telegram
|
||||
bot_token: 123456789:telegram-bot-token
|
||||
whatsapp:
|
||||
summary: WhatsApp channel
|
||||
value:
|
||||
name: WhatsApp Inbox
|
||||
greeting_enabled: true
|
||||
greeting_message: Hello, how can I help you?
|
||||
enable_auto_assignment: true
|
||||
working_hours_enabled: true
|
||||
timezone: America/New_York
|
||||
channel:
|
||||
type: whatsapp
|
||||
phone_number: '+15551234567'
|
||||
provider: whatsapp_cloud
|
||||
provider_config:
|
||||
api_key: your-api-key
|
||||
phone_number_id: your-phone-number-id
|
||||
business_account_id: your-business-account-id
|
||||
sms:
|
||||
summary: SMS channel
|
||||
value:
|
||||
name: SMS Inbox
|
||||
greeting_enabled: true
|
||||
greeting_message: Hello, how can I help you?
|
||||
enable_auto_assignment: true
|
||||
working_hours_enabled: true
|
||||
timezone: America/New_York
|
||||
channel:
|
||||
type: sms
|
||||
phone_number: '+15551234567'
|
||||
provider_config:
|
||||
api_key: your-api-key
|
||||
api_secret: your-api-secret
|
||||
application_id: your-application-id
|
||||
account_id: your-account-id
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
|
||||
@@ -55,6 +55,114 @@ patch:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/inbox_update_payload'
|
||||
examples:
|
||||
web_widget:
|
||||
summary: Website inbox settings
|
||||
value:
|
||||
name: Support
|
||||
greeting_enabled: true
|
||||
greeting_message: Hello, how can I help you?
|
||||
enable_email_collect: true
|
||||
enable_auto_assignment: true
|
||||
working_hours_enabled: true
|
||||
timezone: America/New_York
|
||||
allow_messages_after_resolved: true
|
||||
channel:
|
||||
website_url: https://example.com
|
||||
welcome_title: Welcome to our support
|
||||
welcome_tagline: We are here to help you
|
||||
widget_color: '#FF5733'
|
||||
reply_time: in_a_few_minutes
|
||||
pre_chat_form_enabled: false
|
||||
continuity_via_email: true
|
||||
hmac_mandatory: false
|
||||
selected_feature_flags:
|
||||
- attachments
|
||||
- emoji_picker
|
||||
- end_conversation
|
||||
api:
|
||||
summary: API channel settings
|
||||
value:
|
||||
name: API Inbox
|
||||
greeting_enabled: true
|
||||
greeting_message: Hello, how can I help you?
|
||||
enable_auto_assignment: true
|
||||
working_hours_enabled: true
|
||||
timezone: America/New_York
|
||||
channel:
|
||||
webhook_url: https://example.com/webhook
|
||||
hmac_mandatory: false
|
||||
additional_attributes:
|
||||
source: mobile_app
|
||||
email:
|
||||
summary: Email channel settings
|
||||
value:
|
||||
name: Email Inbox
|
||||
greeting_enabled: true
|
||||
greeting_message: Hello, how can I help you?
|
||||
enable_auto_assignment: true
|
||||
working_hours_enabled: true
|
||||
timezone: America/New_York
|
||||
channel:
|
||||
email: support@example.com
|
||||
imap_enabled: false
|
||||
smtp_enabled: false
|
||||
line:
|
||||
summary: LINE channel settings
|
||||
value:
|
||||
name: LINE Inbox
|
||||
greeting_enabled: true
|
||||
greeting_message: Hello, how can I help you?
|
||||
enable_auto_assignment: true
|
||||
working_hours_enabled: true
|
||||
timezone: America/New_York
|
||||
channel:
|
||||
line_channel_id: '1234567890'
|
||||
line_channel_secret: line-channel-secret
|
||||
line_channel_token: line-channel-token
|
||||
telegram:
|
||||
summary: Telegram channel settings
|
||||
value:
|
||||
name: Telegram Inbox
|
||||
greeting_enabled: true
|
||||
greeting_message: Hello, how can I help you?
|
||||
enable_auto_assignment: true
|
||||
working_hours_enabled: true
|
||||
timezone: America/New_York
|
||||
channel:
|
||||
bot_token: 123456789:telegram-bot-token
|
||||
whatsapp:
|
||||
summary: WhatsApp channel settings
|
||||
value:
|
||||
name: WhatsApp Inbox
|
||||
greeting_enabled: true
|
||||
greeting_message: Hello, how can I help you?
|
||||
enable_auto_assignment: true
|
||||
working_hours_enabled: true
|
||||
timezone: America/New_York
|
||||
channel:
|
||||
phone_number: '+15551234567'
|
||||
provider: whatsapp_cloud
|
||||
provider_config:
|
||||
api_key: your-api-key
|
||||
phone_number_id: your-phone-number-id
|
||||
business_account_id: your-business-account-id
|
||||
sms:
|
||||
summary: SMS channel settings
|
||||
value:
|
||||
name: SMS Inbox
|
||||
greeting_enabled: true
|
||||
greeting_message: Hello, how can I help you?
|
||||
enable_auto_assignment: true
|
||||
working_hours_enabled: true
|
||||
timezone: America/New_York
|
||||
channel:
|
||||
phone_number: '+15551234567'
|
||||
provider_config:
|
||||
api_key: your-api-key
|
||||
api_secret: your-api-secret
|
||||
application_id: your-application-id
|
||||
account_id: your-account-id
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
|
||||
+1226
-79
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user