From 2c3a3bbbd2624716bfc1f4f8eb7ae47bf80d6b02 Mon Sep 17 00:00:00 2001 From: Daniel Jimenez Date: Tue, 13 May 2025 13:32:39 +1200 Subject: [PATCH] feat: Finish adding all request payload examples --- .../api/v1/accounts/articles_controller.rb | 2 +- swagger/definitions/index.yml | 6 + .../conversation/create_message_payload.yml | 13 +- .../request/conversation/create_payload.yml | 79 ++ .../custom_filter/create_update_payload.yml | 5 +- .../request/inbox/create_update_payload.yml | 88 ++ .../integrations/hook_create_payload.yml | 11 +- .../integrations/hook_update_payload.yml | 5 + .../portal/article_create_update_payload.yml | 57 +- .../portal/category_create_update_payload.yml | 40 +- .../portal/portal_create_update_payload.yml | 34 +- .../public/conversation/create_payload.yml | 1 + .../request/public/message/create_payload.yml | 4 +- .../request/public/message/update_payload.yml | 28 +- .../request/team/create_update_payload.yml | 3 + .../webhooks/create_update_payload.yml | 6 + .../application/conversation/assignments.yml | 2 + .../paths/application/conversation/index.yml | 67 +- .../conversation/toggle_priority.yml | 1 + .../conversation/toggle_status.yml | 1 + .../paths/application/conversation/update.yml | 2 + swagger/paths/application/inboxes/create.yml | 31 +- .../inboxes/inbox_members/create.yml | 4 +- .../inboxes/inbox_members/update.yml | 2 + .../application/inboxes/set_agent_bot.yml | 1 + swagger/paths/application/inboxes/update.yml | 33 +- swagger/paths/application/portal/update.yml | 6 +- .../paths/application/team_members/create.yml | 1 + .../paths/application/team_members/update.yml | 1 + .../inboxes/conversations/toggle_typing.yml | 12 + swagger/swagger.json | 815 +++++++++++------- 31 files changed, 865 insertions(+), 496 deletions(-) create mode 100644 swagger/definitions/request/conversation/create_payload.yml create mode 100644 swagger/definitions/request/inbox/create_update_payload.yml diff --git a/app/controllers/api/v1/accounts/articles_controller.rb b/app/controllers/api/v1/accounts/articles_controller.rb index 9148e4386..da2be2312 100644 --- a/app/controllers/api/v1/accounts/articles_controller.rb +++ b/app/controllers/api/v1/accounts/articles_controller.rb @@ -68,7 +68,7 @@ class Api::V1::Accounts::ArticlesController < Api::V1::Accounts::BaseController def article_params params.require(:article).permit( - :title, :slug, :position, :content, :description, :position, :category_id, :author_id, :associated_article_id, :status, + :title, :slug, :position, :content, :description, :category_id, :author_id, :associated_article_id, :status, :locale, meta: [:title, :description, { tags: [] }] diff --git a/swagger/definitions/index.yml b/swagger/definitions/index.yml index 026b85249..db04e4677 100644 --- a/swagger/definitions/index.yml +++ b/swagger/definitions/index.yml @@ -104,9 +104,15 @@ contact_update_payload: $ref: ./request/contact/update_payload.yml ## Conversation +conversation_create_payload: + $ref: ./request/conversation/create_payload.yml conversation_message_create_payload: $ref: ./request/conversation/create_message_payload.yml +# Inbox +inbox_create_update_payload: + $ref: ./request/inbox/create_update_payload.yml + # Team team_create_update_payload: $ref: ./request/team/create_update_payload.yml diff --git a/swagger/definitions/request/conversation/create_message_payload.yml b/swagger/definitions/request/conversation/create_message_payload.yml index ba71b9eec..717b6c1bf 100644 --- a/swagger/definitions/request/conversation/create_message_payload.yml +++ b/swagger/definitions/request/conversation/create_message_payload.yml @@ -5,20 +5,29 @@ properties: content: type: string description: The content of the message + example: 'Hello, how can I help you?' message_type: type: string enum: ['outgoing', 'incoming'] + description: The type of the message + example: 'outgoing' private: type: boolean description: Flag to identify if it is a private note + example: false content_type: type: string enum: ['text', 'input_email', 'cards', 'input_select', 'form', 'article'] + description: Content type of the message example: 'cards' - description: 'if you want to create custom message types' content_attributes: type: object - description: attributes based on your content type + description: Attributes based on the content type + example: { automation_rule_id: 1, in_reply_to: 1 } + campaign_id: + type: integer + description: The campaign id to which the message belongs + example: 1 template_params: type: object description: The template params for the message in case of whatsapp Channel diff --git a/swagger/definitions/request/conversation/create_payload.yml b/swagger/definitions/request/conversation/create_payload.yml new file mode 100644 index 000000000..c0cc75c46 --- /dev/null +++ b/swagger/definitions/request/conversation/create_payload.yml @@ -0,0 +1,79 @@ +type: object +required: + - source_id + - inbox_id +properties: + source_id: + type: string + description: Conversation source id + example: '1234567890' + inbox_id: + type: integer + description: 'Id of inbox in which the conversation is created
Allowed Inbox Types: Website, Phone, Api, Email' + example: 1 + contact_id: + type: integer + description: Contact Id for which conversation is created + example: 1 + additional_attributes: + type: object + description: Lets you specify attributes like browser information + example: + { + browser: 'Chrome', + browser_version: '89.0.4389.82', + os: 'Windows', + os_version: '10', + } + custom_attributes: + type: object + description: The object to save custom attributes for conversation, accepts custom attributes key and value + example: { attribute_key: attribute_value, priority_conversation_number: 3 } + status: + type: string + enum: ['open', 'resolved', 'pending'] + description: Specify the conversation whether it's pending, open, closed + example: open + assignee_id: + type: integer + description: Agent Id for assigning a conversation to an agent + example: 1 + team_id: + type: integer + description: Team Id for assigning a conversation to a team\ + example: 1 + snoozed_until: + type: string + format: date-time + description: Snoozed until date time + example: '2030-07-21T17:32:28Z' + message: + type: object + description: The initial message to be sent to the conversation + required: ['content'] + properties: + content: + type: string + description: The content of the message + example: 'Hello, how can I help you?' + template_params: + type: object + description: The template params for the message in case of whatsapp Channel + properties: + name: + type: string + description: Name of the template + example: 'sample_issue_resolution' + category: + type: string + description: Category of the template + example: UTILITY + language: + type: string + description: Language of the template + example: en_US + processed_params: + type: object + description: The processed param values for template variables in template + example: + 1: 'Chatwoot' diff --git a/swagger/definitions/request/custom_filter/create_update_payload.yml b/swagger/definitions/request/custom_filter/create_update_payload.yml index 86a6cd8c1..c046f74df 100644 --- a/swagger/definitions/request/custom_filter/create_update_payload.yml +++ b/swagger/definitions/request/custom_filter/create_update_payload.yml @@ -3,10 +3,13 @@ properties: name: type: string description: The name of the custom filter + example: 'My Custom Filter' type: type: string - enum: ["conversation", "contact", "report"] + enum: ['conversation', 'contact', 'report'] description: The description about the custom filter + example: 'conversation' query: type: object description: A query that needs to be saved as a custom filter + example: {} diff --git a/swagger/definitions/request/inbox/create_update_payload.yml b/swagger/definitions/request/inbox/create_update_payload.yml new file mode 100644 index 000000000..cc21d6919 --- /dev/null +++ b/swagger/definitions/request/inbox/create_update_payload.yml @@ -0,0 +1,88 @@ +type: object +properties: + name: + type: string + description: The name of the inbox + example: 'Support' + avatar: + type: string + format: binary + description: Image file for avatar + greeting_enabled: + type: boolean + description: Enable greeting message + example: true + greeting_message: + type: string + description: Greeting message to be displayed on the widget + example: Hello, how can I help you? + enable_email_collect: + type: boolean + description: Enable email collection + example: true + csat_survey_enabled: + type: boolean + description: Enable CSAT survey + example: tru + enable_auto_assignment: + type: boolean + description: Enable Auto Assignment + example: true + working_hours_enabled: + type: boolean + description: Enable working hours + example: true + out_of_office_message: + type: string + description: Out of office message to be displayed on the widget + 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 + example: 'America/New_York' + allow_messages_after_resolved: + type: boolean + description: Allow messages after conversation is resolved + example: true + lock_to_single_conversation: + type: boolean + description: Lock to single conversation + example: true + portal_id: + type: integer + 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 + enum: ['friendly', 'professional'] + example: 'friendly' + business_name: + type: string + description: Business name for the inbox + 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' diff --git a/swagger/definitions/request/integrations/hook_create_payload.yml b/swagger/definitions/request/integrations/hook_create_payload.yml index d1bf518d8..71da8106b 100644 --- a/swagger/definitions/request/integrations/hook_create_payload.yml +++ b/swagger/definitions/request/integrations/hook_create_payload.yml @@ -1,11 +1,18 @@ type: object properties: app_id: - type: string + type: integer description: The ID of app for which integration hook is being created + example: 1 inbox_id: - type: string + type: integer description: The inbox ID, if the hook is an inbox hook + example: 1 + status: + type: integer + description: The status of the integration (0 for inactive, 1 for active) + example: 1 settings: type: object description: The settings required by the integration + example: {} diff --git a/swagger/definitions/request/integrations/hook_update_payload.yml b/swagger/definitions/request/integrations/hook_update_payload.yml index 5b91024db..4444dee81 100644 --- a/swagger/definitions/request/integrations/hook_update_payload.yml +++ b/swagger/definitions/request/integrations/hook_update_payload.yml @@ -1,5 +1,10 @@ type: object properties: + status: + type: integer + description: The status of the integration (0 for inactive, 1 for active) + example: 1 settings: type: object description: The settings required by the integration + example: {} diff --git a/swagger/definitions/request/portal/article_create_update_payload.yml b/swagger/definitions/request/portal/article_create_update_payload.yml index cddac1d1d..311d478c3 100644 --- a/swagger/definitions/request/portal/article_create_update_payload.yml +++ b/swagger/definitions/request/portal/article_create_update_payload.yml @@ -1,34 +1,51 @@ type: object properties: - content: + title: type: string - description: The text content. - meta: - type: object - description: Use for search - example: { tags: ['article_name'], title: 'article title', description: 'article description' } + description: The title of the article + example: 'Article Title' + slug: + type: string + description: The slug of the article + example: 'article-title' position: type: integer description: article position in category - status: - type: integer - example: ['draft', 'published', 'archived'] - title: + example: 1 + content: type: string - slug: + description: The text content. + example: 'This is the content of the article' + description: type: string - views: - type: integer - portal_id: - type: integer - account_id: - type: integer - author_id: - type: integer + description: The description of the article + example: 'This is the description of the article' category_id: type: integer - folder_id: + description: The category id of the article + example: 1 + author_id: type: integer + description: The author agent id of the article + example: 1 associated_article_id: type: integer description: To associate similar articles to each other, e.g to provide the link for the reference. + example: 2 + status: + type: integer + description: The status of the article. 0 for draft, 1 for published, 2 for archived + example: 1 + locale: + type: string + description: The locale of the article + example: 'en' + meta: + type: object + description: Use for search + example: + { + tags: ['article_name'], + title: 'article title', + description: 'article description', + } diff --git a/swagger/definitions/request/portal/category_create_update_payload.yml b/swagger/definitions/request/portal/category_create_update_payload.yml index 0d1ce5c8f..e935f74c7 100644 --- a/swagger/definitions/request/portal/category_create_update_payload.yml +++ b/swagger/definitions/request/portal/category_create_update_payload.yml @@ -1,28 +1,34 @@ type: object properties: - description: - type: string - description: Category description - locale: - type: string - description: Category locale - example: en/es name: type: string - description: Category name - slug: + description: The name of the category + example: 'Category Name' + description: type: string - description: Category slug + description: A description for the category + example: 'Category description' position: type: integer description: Category position in the portal list to sort - portal_id: - type: integer - account_id: - type: integer - associated_category_id: - type: integer - description: To associate similar categories to each other, e.g same category of product documentation in different languages + example: 1 + slug: + type: string + description: The category slug used in the URL + example: 'category-name' + locale: + type: string + description: The locale of the category + example: en + icon: + type: string + description: The icon of the category, e.g. i-lucide-home + example: 'i-lucide-home' parent_category_id: type: integer description: To define parent category, e.g product documentation has multiple level features in sales category or in engineering category. + example: 1 + associated_category_id: + type: integer + description: To associate similar categories to each other, e.g same category of product documentation in different languages + example: 2 diff --git a/swagger/definitions/request/portal/portal_create_update_payload.yml b/swagger/definitions/request/portal/portal_create_update_payload.yml index 746f290f1..be075182d 100644 --- a/swagger/definitions/request/portal/portal_create_update_payload.yml +++ b/swagger/definitions/request/portal/portal_create_update_payload.yml @@ -1,16 +1,13 @@ type: object properties: - archived: - type: boolean - description: Status to check if portal is live + account_id: + type: integer + description: The account id of the portal + example: 1 color: type: string - description: Header color for help-center - example: add color HEX string, "#fffff" - config: - type: object - description: Configuration about supporting locales - example: { allowed_locales: ['en', 'es'], default_locale: 'en' } + description: Header color for help-center in hex format + example: '#FFFFFF' custom_domain: type: string description: Custom domain to display help center. @@ -26,11 +23,20 @@ properties: name: type: string description: Name for the portal - slug: - type: string - description: Slug for the portal to display in link + example: Handbook page_title: type: string description: Page title for the portal - account_id: - type: integer + example: Handbook + slug: + type: string + description: Slug for the portal to display in link + example: handbook + archived: + type: boolean + description: Status to check if portal is live + example: false + config: + type: object + description: Configuration about supporting locales + example: { allowed_locales: ['en', 'es'], default_locale: 'en' } diff --git a/swagger/definitions/request/public/conversation/create_payload.yml b/swagger/definitions/request/public/conversation/create_payload.yml index 37cd9f7ef..e81d1adf5 100644 --- a/swagger/definitions/request/public/conversation/create_payload.yml +++ b/swagger/definitions/request/public/conversation/create_payload.yml @@ -3,3 +3,4 @@ properties: custom_attributes: type: object description: Custom attributes of the conversation + example: {} diff --git a/swagger/definitions/request/public/message/create_payload.yml b/swagger/definitions/request/public/message/create_payload.yml index 2935b4abb..6ae920255 100644 --- a/swagger/definitions/request/public/message/create_payload.yml +++ b/swagger/definitions/request/public/message/create_payload.yml @@ -1,10 +1,10 @@ - type: object properties: content: type: string description: Content for the message + example: 'Hello, how can I help you?' echo_id: type: string description: Temporary identifier which will be passed back via websockets - \ No newline at end of file + example: '1234567890' diff --git a/swagger/definitions/request/public/message/update_payload.yml b/swagger/definitions/request/public/message/update_payload.yml index 10926faa1..c739aa34a 100644 --- a/swagger/definitions/request/public/message/update_payload.yml +++ b/swagger/definitions/request/public/message/update_payload.yml @@ -1,6 +1,30 @@ - type: object properties: submitted_values: type: object - description: Replies to the Bot Message Types \ No newline at end of file + description: Replies to the Bot Message Types + properties: + name: + type: string + description: The name of the submiitted value + example: 'My Name' + title: + type: string + description: The title of the submitted value + example: 'My Title' + value: + type: string + description: The value of the submitted value + example: 'value' + csat_survey_response: + type: object + description: The CSAT survey response + properties: + feedback_message: + type: string + description: The feedback message of the CSAT survey response + example: 'Great service!' + rating: + type: integer + description: The rating of the CSAT survey response + example: 5 diff --git a/swagger/definitions/request/team/create_update_payload.yml b/swagger/definitions/request/team/create_update_payload.yml index f4db1e5d7..77b714269 100644 --- a/swagger/definitions/request/team/create_update_payload.yml +++ b/swagger/definitions/request/team/create_update_payload.yml @@ -3,9 +3,12 @@ properties: name: type: string description: The name of the team + example: Support Team description: type: string description: The description of the team + example: This is a team of support agents allow_auto_assign: type: boolean description: If this setting is turned on, the system would automatically assign the conversation to an agent in the team while assigning the conversation to a team + example: true diff --git a/swagger/definitions/request/webhooks/create_update_payload.yml b/swagger/definitions/request/webhooks/create_update_payload.yml index 17cbe158a..2f4a718e4 100644 --- a/swagger/definitions/request/webhooks/create_update_payload.yml +++ b/swagger/definitions/request/webhooks/create_update_payload.yml @@ -3,6 +3,7 @@ properties: url: type: string description: The url where the events should be sent + example: https://example.com/webhook subscriptions: type: array items: @@ -14,6 +15,11 @@ properties: 'conversation_updated', 'message_created', 'message_updated', + 'contact_created', + 'contact_updated', 'webwidget_triggered', ] description: The events you want to subscribe to. + example: + - conversation_created + - conversation_status_changed diff --git a/swagger/paths/application/conversation/assignments.yml b/swagger/paths/application/conversation/assignments.yml index d070fa4cf..1ce1f484d 100644 --- a/swagger/paths/application/conversation/assignments.yml +++ b/swagger/paths/application/conversation/assignments.yml @@ -16,9 +16,11 @@ requestBody: assignee_id: type: number description: Id of the assignee user + example: 1 team_id: type: number description: Id of the team. If the assignee_id is present, this param would be ignored + example: 1 responses: '200': description: Success diff --git a/swagger/paths/application/conversation/index.yml b/swagger/paths/application/conversation/index.yml index 9144d0070..e58659530 100644 --- a/swagger/paths/application/conversation/index.yml +++ b/swagger/paths/application/conversation/index.yml @@ -69,7 +69,7 @@ post: - Conversations operationId: newConversation summary: Create New Conversation - description: "Creating a conversation in chatwoot requires a source id. \n\n Learn more about source_id: https://github.com/chatwoot/chatwoot/wiki/Building-on-Top-of-Chatwoot:-Importing-Existing-Contacts-and-Creating-Conversations" + description: "Creating a conversation in chatwoot requires a source id. \n\n Learn more about source_id: https://www.chatwoot.com/hc/user-guide/articles/1677839703-how-to-create-an-api-channel-inbox#send-messages-to-the-api-channel" security: - userApiKey: [] - agentBotApiKey: [] @@ -78,70 +78,7 @@ post: content: application/json: schema: - type: object - required: - - source_id - - inbox_id - properties: - source_id: - type: string - description: Conversation source id - inbox_id: - type: string - description: 'Id of inbox in which the conversation is created
Allowed Inbox Types: Website, Phone, Api, Email ' - contact_id: - type: string - description: Contact Id for which conversation is created - additional_attributes: - type: object - description: Lets you specify attributes like browser information - custom_attributes: - type: object - description: The object to save custom attributes for conversation, accepts custom attributes key and value - example: - { - attribute_key: attribute_value, - priority_conversation_number: 3, - } - status: - type: string - enum: ['open', 'resolved', 'pending'] - description: Specify the conversation whether it's pending, open, closed - assignee_id: - type: string - description: Agent Id for assigning a conversation to an agent - team_id: - type: string - description: Team Id for assigning a conversation to a team - message: - type: object - description: The initial message to be sent to the conversation - required: ['content'] - properties: - content: - type: string - description: The content of the message - template_params: - type: object - description: The template params for the message in case of whatsapp Channel - properties: - name: - type: string - description: Name of the template - example: 'sample_issue_resolution' - category: - type: string - description: Category of the template - example: UTILITY - language: - type: string - description: Language of the template - example: en_US - processed_params: - type: object - description: The processed param values for template variables in template - example: - 1: 'Chatwoot' + $ref: '#/components/schemas/conversation_create_payload' responses: '200': description: Success diff --git a/swagger/paths/application/conversation/toggle_priority.yml b/swagger/paths/application/conversation/toggle_priority.yml index 79c27ce3a..7ae3c252f 100644 --- a/swagger/paths/application/conversation/toggle_priority.yml +++ b/swagger/paths/application/conversation/toggle_priority.yml @@ -19,6 +19,7 @@ requestBody: type: string enum: ['urgent', 'high', 'medium', 'low', 'none'] description: 'The priority of the conversation' + example: 'high' responses: '200': description: Success diff --git a/swagger/paths/application/conversation/toggle_status.yml b/swagger/paths/application/conversation/toggle_status.yml index 96e4231a6..9c6f9ee6a 100644 --- a/swagger/paths/application/conversation/toggle_status.yml +++ b/swagger/paths/application/conversation/toggle_status.yml @@ -19,6 +19,7 @@ requestBody: type: string enum: ['open', 'resolved', 'pending'] description: The status of the conversation + example: open responses: '200': description: Success diff --git a/swagger/paths/application/conversation/update.yml b/swagger/paths/application/conversation/update.yml index 9a81e2eb4..fbe8e668b 100644 --- a/swagger/paths/application/conversation/update.yml +++ b/swagger/paths/application/conversation/update.yml @@ -17,9 +17,11 @@ requestBody: type: string enum: ['urgent', 'high', 'medium', 'low', 'none'] description: 'The priority of the conversation' + example: 'high' sla_policy_id: type: number description: 'The ID of the SLA policy (Available only in Enterprise edition)' + example: 1 responses: '200': description: Success diff --git a/swagger/paths/application/inboxes/create.yml b/swagger/paths/application/inboxes/create.yml index f25a6d923..c94039ff3 100644 --- a/swagger/paths/application/inboxes/create.yml +++ b/swagger/paths/application/inboxes/create.yml @@ -13,36 +13,7 @@ post: content: application/json: schema: - type: object - properties: - name: - type: string - description: The name of the inbox - avatar: - type: string - format: binary - description: File for avatar image - channel: - type: object - properties: - type: - type: string - enum: ['web_widget'] - website_url: - type: string - description: URL at which the widget will be loaded - welcome_title: - type: string - description: Welcome title to be displayed on the widget - welcome_tagline: - type: string - description: Welcome tagline to be displayed on the widget - agent_away_message: - type: string - description: A message which will be sent if there is not agent available. This is not available if agentbot is connected - widget_color: - type: string - description: A Hex-color string used to customize the widget + $ref: '#/components/schemas/inbox_create_update_payload' responses: '200': description: Success diff --git a/swagger/paths/application/inboxes/inbox_members/create.yml b/swagger/paths/application/inboxes/inbox_members/create.yml index 517f4b7aa..1298eda6a 100644 --- a/swagger/paths/application/inboxes/inbox_members/create.yml +++ b/swagger/paths/application/inboxes/inbox_members/create.yml @@ -16,13 +16,15 @@ requestBody: - user_ids properties: inbox_id: - type: string + type: integer description: The ID of the inbox + example: 1 user_ids: type: array items: type: integer description: IDs of users to be added to the inbox + example: [1, 2, 3] responses: '200': description: Success diff --git a/swagger/paths/application/inboxes/inbox_members/update.yml b/swagger/paths/application/inboxes/inbox_members/update.yml index c5594dc0e..49fd8bf83 100644 --- a/swagger/paths/application/inboxes/inbox_members/update.yml +++ b/swagger/paths/application/inboxes/inbox_members/update.yml @@ -18,11 +18,13 @@ requestBody: inbox_id: type: string description: The ID of the inbox + example: 1 user_ids: type: array items: type: integer description: IDs of users to be added to the inbox + example: [1, 2, 3] responses: '200': description: Success diff --git a/swagger/paths/application/inboxes/set_agent_bot.yml b/swagger/paths/application/inboxes/set_agent_bot.yml index 8fda7b508..bbd6a9e89 100644 --- a/swagger/paths/application/inboxes/set_agent_bot.yml +++ b/swagger/paths/application/inboxes/set_agent_bot.yml @@ -26,6 +26,7 @@ post: agent_bot: type: number description: 'Agent bot ID' + example: 1 responses: '204': description: Success diff --git a/swagger/paths/application/inboxes/update.yml b/swagger/paths/application/inboxes/update.yml index 9e11984cd..3894a1a6a 100644 --- a/swagger/paths/application/inboxes/update.yml +++ b/swagger/paths/application/inboxes/update.yml @@ -19,38 +19,7 @@ patch: content: application/json: schema: - type: object - required: - - enable_auto_assignment - properties: - name: - type: string - description: The name of the inbox - enable_auto_assignment: - type: boolean - description: 'Enable Auto Assignment' - avatar: - type: string - format: binary - description: 'Image file for avatar' - channel: - type: object - properties: - website_url: - type: string - description: URL at which the widget will be loaded - welcome_title: - type: string - description: Welcome title to be displayed on the widget - welcome_tagline: - type: string - description: Welcome tagline to be displayed on the widget - agent_away_message: - type: string - description: A message which will be sent if there is not agent available. This is not available if agentbot is connected - widget_color: - type: string - description: A Hex-color string used to customize the widget + $ref: '#/components/schemas/inbox_create_update_payload' responses: '200': description: Success diff --git a/swagger/paths/application/portal/update.yml b/swagger/paths/application/portal/update.yml index ea99b98f6..5faa170cc 100644 --- a/swagger/paths/application/portal/update.yml +++ b/swagger/paths/application/portal/update.yml @@ -1,8 +1,8 @@ tags: - Help Center -operationId: update-new-portal-to-account -summary: update a new portal -description: update a new portal to account +operationId: update-portal-to-account +summary: Update a portal +description: Update a portal to account security: - userApiKey: [] requestBody: diff --git a/swagger/paths/application/team_members/create.yml b/swagger/paths/application/team_members/create.yml index 5499f03eb..4b649cb34 100644 --- a/swagger/paths/application/team_members/create.yml +++ b/swagger/paths/application/team_members/create.yml @@ -19,6 +19,7 @@ requestBody: items: type: integer description: IDs of users to be added to the team + example: [1, 2, 3] responses: '200': description: Success diff --git a/swagger/paths/application/team_members/update.yml b/swagger/paths/application/team_members/update.yml index efacde3ff..c316dabc9 100644 --- a/swagger/paths/application/team_members/update.yml +++ b/swagger/paths/application/team_members/update.yml @@ -19,6 +19,7 @@ requestBody: items: type: integer description: IDs of users to be added to the team + example: [1, 2, 3] responses: '200': description: Success diff --git a/swagger/paths/public/inboxes/conversations/toggle_typing.yml b/swagger/paths/public/inboxes/conversations/toggle_typing.yml index 3152e844a..603ed0f8d 100644 --- a/swagger/paths/public/inboxes/conversations/toggle_typing.yml +++ b/swagger/paths/public/inboxes/conversations/toggle_typing.yml @@ -11,6 +11,18 @@ parameters: schema: type: string description: Typing status, either 'on' or 'off' +requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + typing_status: + type: string + enum: ['on', 'off'] + description: The typing status to set + example: 'on' responses: '200': description: Typing status toggled successfully diff --git a/swagger/swagger.json b/swagger/swagger.json index 63cc9da89..3c6c7ade2 100644 --- a/swagger/swagger.json +++ b/swagger/swagger.json @@ -1266,6 +1266,27 @@ "description": "Typing status, either 'on' or 'off'" } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "typing_status": { + "type": "string", + "enum": [ + "on", + "off" + ], + "description": "The typing status to set", + "example": "on" + } + } + } + } + } + }, "responses": { "200": { "description": "Typing status toggled successfully" @@ -3703,9 +3724,9 @@ "tags": [ "Help Center" ], - "operationId": "update-new-portal-to-account", - "summary": "update a new portal", - "description": "update a new portal to account", + "operationId": "update-portal-to-account", + "summary": "Update a portal", + "description": "Update a portal to account", "security": [ { "userApiKey": [ @@ -4097,7 +4118,7 @@ ], "operationId": "newConversation", "summary": "Create New Conversation", - "description": "Creating a conversation in chatwoot requires a source id. \n\n Learn more about source_id: https://github.com/chatwoot/chatwoot/wiki/Building-on-Top-of-Chatwoot:-Importing-Existing-Contacts-and-Creating-Conversations", + "description": "Creating a conversation in chatwoot requires a source id. \n\n Learn more about source_id: https://www.chatwoot.com/hc/user-guide/articles/1677839703-how-to-create-an-api-channel-inbox#send-messages-to-the-api-channel", "security": [ { "userApiKey": [ @@ -4115,95 +4136,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "required": [ - "source_id", - "inbox_id" - ], - "properties": { - "source_id": { - "type": "string", - "description": "Conversation source id" - }, - "inbox_id": { - "type": "string", - "description": "Id of inbox in which the conversation is created
Allowed Inbox Types: Website, Phone, Api, Email " - }, - "contact_id": { - "type": "string", - "description": "Contact Id for which conversation is created" - }, - "additional_attributes": { - "type": "object", - "description": "Lets you specify attributes like browser information" - }, - "custom_attributes": { - "type": "object", - "description": "The object to save custom attributes for conversation, accepts custom attributes key and value", - "example": { - "attribute_key": "attribute_value", - "priority_conversation_number": 3 - } - }, - "status": { - "type": "string", - "enum": [ - "open", - "resolved", - "pending" - ], - "description": "Specify the conversation whether it's pending, open, closed" - }, - "assignee_id": { - "type": "string", - "description": "Agent Id for assigning a conversation to an agent" - }, - "team_id": { - "type": "string", - "description": "Team Id for assigning a conversation to a team" - }, - "message": { - "type": "object", - "description": "The initial message to be sent to the conversation", - "required": [ - "content" - ], - "properties": { - "content": { - "type": "string", - "description": "The content of the message" - }, - "template_params": { - "type": "object", - "description": "The template params for the message in case of whatsapp Channel", - "properties": { - "name": { - "type": "string", - "description": "Name of the template", - "example": "sample_issue_resolution" - }, - "category": { - "type": "string", - "description": "Category of the template", - "example": "UTILITY" - }, - "language": { - "type": "string", - "description": "Language of the template", - "example": "en_US" - }, - "processed_params": { - "type": "object", - "description": "The processed param values for template variables in template", - "example": { - "1": "Chatwoot" - } - } - } - } - } - } - } + "$ref": "#/components/schemas/conversation_create_payload" } } } @@ -4457,11 +4390,13 @@ "low", "none" ], - "description": "The priority of the conversation" + "description": "The priority of the conversation", + "example": "high" }, "sla_policy_id": { "type": "number", - "description": "The ID of the SLA policy (Available only in Enterprise edition)" + "description": "The ID of the SLA policy (Available only in Enterprise edition)", + "example": 1 } } } @@ -4540,7 +4475,8 @@ "resolved", "pending" ], - "description": "The status of the conversation" + "description": "The status of the conversation", + "example": "open" } } } @@ -4628,7 +4564,8 @@ "low", "none" ], - "description": "The priority of the conversation" + "description": "The priority of the conversation", + "example": "high" } } } @@ -4785,11 +4722,13 @@ "properties": { "assignee_id": { "type": "number", - "description": "Id of the assignee user" + "description": "Id of the assignee user", + "example": 1 }, "team_id": { "type": "number", - "description": "Id of the team. If the assignee_id is present, this param would be ignored" + "description": "Id of the team. If the assignee_id is present, this param would be ignored", + "example": 1 } } } @@ -5106,49 +5045,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The name of the inbox" - }, - "avatar": { - "type": "string", - "format": "binary", - "description": "File for avatar image" - }, - "channel": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "web_widget" - ] - }, - "website_url": { - "type": "string", - "description": "URL at which the widget will be loaded" - }, - "welcome_title": { - "type": "string", - "description": "Welcome title to be displayed on the widget" - }, - "welcome_tagline": { - "type": "string", - "description": "Welcome tagline to be displayed on the widget" - }, - "agent_away_message": { - "type": "string", - "description": "A message which will be sent if there is not agent available. This is not available if agentbot is connected" - }, - "widget_color": { - "type": "string", - "description": "A Hex-color string used to customize the widget" - } - } - } - } + "$ref": "#/components/schemas/inbox_create_update_payload" } } } @@ -5221,50 +5118,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "required": [ - "enable_auto_assignment" - ], - "properties": { - "name": { - "type": "string", - "description": "The name of the inbox" - }, - "enable_auto_assignment": { - "type": "boolean", - "description": "Enable Auto Assignment" - }, - "avatar": { - "type": "string", - "format": "binary", - "description": "Image file for avatar" - }, - "channel": { - "type": "object", - "properties": { - "website_url": { - "type": "string", - "description": "URL at which the widget will be loaded" - }, - "welcome_title": { - "type": "string", - "description": "Welcome title to be displayed on the widget" - }, - "welcome_tagline": { - "type": "string", - "description": "Welcome tagline to be displayed on the widget" - }, - "agent_away_message": { - "type": "string", - "description": "A message which will be sent if there is not agent available. This is not available if agentbot is connected" - }, - "widget_color": { - "type": "string", - "description": "A Hex-color string used to customize the widget" - } - } - } - } + "$ref": "#/components/schemas/inbox_create_update_payload" } } } @@ -5407,7 +5261,8 @@ "properties": { "agent_bot": { "type": "number", - "description": "Agent bot ID" + "description": "Agent bot ID", + "example": 1 } } } @@ -5539,15 +5394,21 @@ ], "properties": { "inbox_id": { - "type": "string", - "description": "The ID of the inbox" + "type": "integer", + "description": "The ID of the inbox", + "example": 1 }, "user_ids": { "type": "array", "items": { "type": "integer" }, - "description": "IDs of users to be added to the inbox" + "description": "IDs of users to be added to the inbox", + "example": [ + 1, + 2, + 3 + ] } } } @@ -5628,14 +5489,20 @@ "properties": { "inbox_id": { "type": "string", - "description": "The ID of the inbox" + "description": "The ID of the inbox", + "example": 1 }, "user_ids": { "type": "array", "items": { "type": "integer" }, - "description": "IDs of users to be added to the inbox" + "description": "IDs of users to be added to the inbox", + "example": [ + 1, + 2, + 3 + ] } } } @@ -6554,7 +6421,12 @@ "items": { "type": "integer" }, - "description": "IDs of users to be added to the team" + "description": "IDs of users to be added to the team", + "example": [ + 1, + 2, + 3 + ] } } } @@ -6637,7 +6509,12 @@ "items": { "type": "integer" }, - "description": "IDs of users to be added to the team" + "description": "IDs of users to be added to the team", + "example": [ + 1, + 2, + 3 + ] } } } @@ -9046,6 +8923,116 @@ } } }, + "conversation_create_payload": { + "type": "object", + "required": [ + "source_id", + "inbox_id" + ], + "properties": { + "source_id": { + "type": "string", + "description": "Conversation source id", + "example": "1234567890" + }, + "inbox_id": { + "type": "integer", + "description": "Id of inbox in which the conversation is created
Allowed Inbox Types: Website, Phone, Api, Email", + "example": 1 + }, + "contact_id": { + "type": "integer", + "description": "Contact Id for which conversation is created", + "example": 1 + }, + "additional_attributes": { + "type": "object", + "description": "Lets you specify attributes like browser information", + "example": { + "browser": "Chrome", + "browser_version": "89.0.4389.82", + "os": "Windows", + "os_version": "10" + } + }, + "custom_attributes": { + "type": "object", + "description": "The object to save custom attributes for conversation, accepts custom attributes key and value", + "example": { + "attribute_key": "attribute_value", + "priority_conversation_number": 3 + } + }, + "status": { + "type": "string", + "enum": [ + "open", + "resolved", + "pending" + ], + "description": "Specify the conversation whether it's pending, open, closed", + "example": "open" + }, + "assignee_id": { + "type": "integer", + "description": "Agent Id for assigning a conversation to an agent", + "example": 1 + }, + "team_id": { + "type": "integer", + "description": "Team Id for assigning a conversation to a team\\", + "example": 1 + }, + "snoozed_until": { + "type": "string", + "format": "date-time", + "description": "Snoozed until date time", + "example": "2030-07-21T17:32:28Z" + }, + "message": { + "type": "object", + "description": "The initial message to be sent to the conversation", + "required": [ + "content" + ], + "properties": { + "content": { + "type": "string", + "description": "The content of the message", + "example": "Hello, how can I help you?" + }, + "template_params": { + "type": "object", + "description": "The template params for the message in case of whatsapp Channel", + "properties": { + "name": { + "type": "string", + "description": "Name of the template", + "example": "sample_issue_resolution" + }, + "category": { + "type": "string", + "description": "Category of the template", + "example": "UTILITY" + }, + "language": { + "type": "string", + "description": "Language of the template", + "example": "en_US" + }, + "processed_params": { + "type": "object", + "description": "The processed param values for template variables in template", + "example": { + "1": "Chatwoot" + } + } + } + } + } + } + } + }, "conversation_message_create_payload": { "type": "object", "required": [ @@ -9054,18 +9041,22 @@ "properties": { "content": { "type": "string", - "description": "The content of the message" + "description": "The content of the message", + "example": "Hello, how can I help you?" }, "message_type": { "type": "string", "enum": [ "outgoing", "incoming" - ] + ], + "description": "The type of the message", + "example": "outgoing" }, "private": { "type": "boolean", - "description": "Flag to identify if it is a private note" + "description": "Flag to identify if it is a private note", + "example": false }, "content_type": { "type": "string", @@ -9077,12 +9068,21 @@ "form", "article" ], - "example": "cards", - "description": "if you want to create custom message types" + "description": "Content type of the message", + "example": "cards" }, "content_attributes": { "type": "object", - "description": "attributes based on your content type" + "description": "Attributes based on the content type", + "example": { + "automation_rule_id": 1, + "in_reply_to": 1 + } + }, + "campaign_id": { + "type": "integer", + "description": "The campaign id to which the message belongs", + "example": 1 }, "template_params": { "type": "object", @@ -9114,20 +9114,146 @@ } } }, + "inbox_create_update_payload": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the inbox", + "example": "Support" + }, + "avatar": { + "type": "string", + "format": "binary", + "description": "Image file for avatar" + }, + "greeting_enabled": { + "type": "boolean", + "description": "Enable greeting message", + "example": true + }, + "greeting_message": { + "type": "string", + "description": "Greeting message to be displayed on the widget", + "example": "Hello, how can I help you?" + }, + "enable_email_collect": { + "type": "boolean", + "description": "Enable email collection", + "example": true + }, + "csat_survey_enabled": { + "type": "boolean", + "description": "Enable CSAT survey", + "example": "tru" + }, + "enable_auto_assignment": { + "type": "boolean", + "description": "Enable Auto Assignment", + "example": true + }, + "working_hours_enabled": { + "type": "boolean", + "description": "Enable working hours", + "example": true + }, + "out_of_office_message": { + "type": "string", + "description": "Out of office message to be displayed on the widget", + "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", + "example": "America/New_York" + }, + "allow_messages_after_resolved": { + "type": "boolean", + "description": "Allow messages after conversation is resolved", + "example": true + }, + "lock_to_single_conversation": { + "type": "boolean", + "description": "Lock to single conversation", + "example": true + }, + "portal_id": { + "type": "integer", + "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", + "enum": [ + "friendly", + "professional" + ], + "example": "friendly" + }, + "business_name": { + "type": "string", + "description": "Business name for the inbox", + "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" + } + } + } + } + }, "team_create_update_payload": { "type": "object", "properties": { "name": { "type": "string", - "description": "The name of the team" + "description": "The name of the team", + "example": "Support Team" }, "description": { "type": "string", - "description": "The description of the team" + "description": "The description of the team", + "example": "This is a team of support agents" }, "allow_auto_assign": { "type": "boolean", - "description": "If this setting is turned on, the system would automatically assign the conversation to an agent in the team while assigning the conversation to a team" + "description": "If this setting is turned on, the system would automatically assign the conversation to an agent in the team while assigning the conversation to a team", + "example": true } } }, @@ -9136,7 +9262,8 @@ "properties": { "name": { "type": "string", - "description": "The name of the custom filter" + "description": "The name of the custom filter", + "example": "My Custom Filter" }, "type": { "type": "string", @@ -9145,11 +9272,14 @@ "contact", "report" ], - "description": "The description about the custom filter" + "description": "The description about the custom filter", + "example": "conversation" }, "query": { "type": "object", - "description": "A query that needs to be saved as a custom filter" + "description": "A query that needs to be saved as a custom filter", + "example": { + } } } }, @@ -9158,7 +9288,8 @@ "properties": { "url": { "type": "string", - "description": "The url where the events should be sent" + "description": "The url where the events should be sent", + "example": "https://example.com/webhook" }, "subscriptions": { "type": "array", @@ -9170,10 +9301,16 @@ "conversation_updated", "message_created", "message_updated", + "contact_created", + "contact_updated", "webwidget_triggered" ] }, - "description": "The events you want to subscribe to." + "description": "The events you want to subscribe to.", + "example": [ + "conversation_created", + "conversation_status_changed" + ] } } }, @@ -9181,25 +9318,41 @@ "type": "object", "properties": { "app_id": { - "type": "string", - "description": "The ID of app for which integration hook is being created" + "type": "integer", + "description": "The ID of app for which integration hook is being created", + "example": 1 }, "inbox_id": { - "type": "string", - "description": "The inbox ID, if the hook is an inbox hook" + "type": "integer", + "description": "The inbox ID, if the hook is an inbox hook", + "example": 1 + }, + "status": { + "type": "integer", + "description": "The status of the integration (0 for inactive, 1 for active)", + "example": 1 }, "settings": { "type": "object", - "description": "The settings required by the integration" + "description": "The settings required by the integration", + "example": { + } } } }, "integrations_hook_update_payload": { "type": "object", "properties": { + "status": { + "type": "integer", + "description": "The status of the integration (0 for inactive, 1 for active)", + "example": 1 + }, "settings": { "type": "object", - "description": "The settings required by the integration" + "description": "The settings required by the integration", + "example": { + } } } }, @@ -9263,25 +9416,15 @@ "portal_create_update_payload": { "type": "object", "properties": { - "archived": { - "type": "boolean", - "description": "Status to check if portal is live" + "account_id": { + "type": "integer", + "description": "The account id of the portal", + "example": 1 }, "color": { "type": "string", - "description": "Header color for help-center", - "example": "add color HEX string, \"#fffff\"" - }, - "config": { - "type": "object", - "description": "Configuration about supporting locales", - "example": { - "allowed_locales": [ - "en", - "es" - ], - "default_locale": "en" - } + "description": "Header color for help-center in hex format", + "example": "#FFFFFF" }, "custom_domain": { "type": "string", @@ -9300,67 +9443,134 @@ }, "name": { "type": "string", - "description": "Name for the portal" - }, - "slug": { - "type": "string", - "description": "Slug for the portal to display in link" + "description": "Name for the portal", + "example": "Handbook" }, "page_title": { "type": "string", - "description": "Page title for the portal" + "description": "Page title for the portal", + "example": "Handbook" }, - "account_id": { - "type": "integer" + "slug": { + "type": "string", + "description": "Slug for the portal to display in link", + "example": "handbook" + }, + "archived": { + "type": "boolean", + "description": "Status to check if portal is live", + "example": false + }, + "config": { + "type": "object", + "description": "Configuration about supporting locales", + "example": { + "allowed_locales": [ + "en", + "es" + ], + "default_locale": "en" + } } } }, "category_create_update_payload": { "type": "object", "properties": { - "description": { - "type": "string", - "description": "Category description" - }, - "locale": { - "type": "string", - "description": "Category locale", - "example": "en/es" - }, "name": { "type": "string", - "description": "Category name" + "description": "The name of the category", + "example": "Category Name" }, - "slug": { + "description": { "type": "string", - "description": "Category slug" + "description": "A description for the category", + "example": "Category description" }, "position": { "type": "integer", - "description": "Category position in the portal list to sort" + "description": "Category position in the portal list to sort", + "example": 1 }, - "portal_id": { - "type": "integer" + "slug": { + "type": "string", + "description": "The category slug used in the URL", + "example": "category-name" }, - "account_id": { - "type": "integer" + "locale": { + "type": "string", + "description": "The locale of the category", + "example": "en" }, - "associated_category_id": { - "type": "integer", - "description": "To associate similar categories to each other, e.g same category of product documentation in different languages" + "icon": { + "type": "string", + "description": "The icon of the category, e.g. i-lucide-home", + "example": "i-lucide-home" }, "parent_category_id": { "type": "integer", - "description": "To define parent category, e.g product documentation has multiple level features in sales category or in engineering category." + "description": "To define parent category, e.g product documentation has multiple level features in sales category or in engineering category.", + "example": 1 + }, + "associated_category_id": { + "type": "integer", + "description": "To associate similar categories to each other, e.g same category of product documentation in different languages", + "example": 2 } } }, "article_create_update_payload": { "type": "object", "properties": { + "title": { + "type": "string", + "description": "The title of the article", + "example": "Article Title" + }, + "slug": { + "type": "string", + "description": "The slug of the article", + "example": "article-title" + }, + "position": { + "type": "integer", + "description": "article position in category", + "example": 1 + }, "content": { "type": "string", - "description": "The text content." + "description": "The text content.", + "example": "This is the content of the article" + }, + "description": { + "type": "string", + "description": "The description of the article", + "example": "This is the description of the article" + }, + "category_id": { + "type": "integer", + "description": "The category id of the article", + "example": 1 + }, + "author_id": { + "type": "integer", + "description": "The author agent id of the article", + "example": 1 + }, + "associated_article_id": { + "type": "integer", + "description": "To associate similar articles to each other, e.g to provide the link for the reference.", + "example": 2 + }, + "status": { + "type": "integer", + "description": "The status of the article. 0 for draft, 1 for published, 2 for archived", + "example": 1 + }, + "locale": { + "type": "string", + "description": "The locale of the article", + "example": "en" }, "meta": { "type": "object", @@ -9372,46 +9582,6 @@ "title": "article title", "description": "article description" } - }, - "position": { - "type": "integer", - "description": "article position in category" - }, - "status": { - "type": "integer", - "example": [ - "draft", - "published", - "archived" - ] - }, - "title": { - "type": "string" - }, - "slug": { - "type": "string" - }, - "views": { - "type": "integer" - }, - "portal_id": { - "type": "integer" - }, - "account_id": { - "type": "integer" - }, - "author_id": { - "type": "integer" - }, - "category_id": { - "type": "integer" - }, - "folder_id": { - "type": "integer" - }, - "associated_article_id": { - "type": "integer", - "description": "To associate similar articles to each other, e.g to provide the link for the reference." } } }, @@ -9461,11 +9631,13 @@ "properties": { "content": { "type": "string", - "description": "Content for the message" + "description": "Content for the message", + "example": "Hello, how can I help you?" }, "echo_id": { "type": "string", - "description": "Temporary identifier which will be passed back via websockets" + "description": "Temporary identifier which will be passed back via websockets", + "example": "1234567890" } } }, @@ -9474,7 +9646,40 @@ "properties": { "submitted_values": { "type": "object", - "description": "Replies to the Bot Message Types" + "description": "Replies to the Bot Message Types", + "properties": { + "name": { + "type": "string", + "description": "The name of the submiitted value", + "example": "My Name" + }, + "title": { + "type": "string", + "description": "The title of the submitted value", + "example": "My Title" + }, + "value": { + "type": "string", + "description": "The value of the submitted value", + "example": "value" + }, + "csat_survey_response": { + "type": "object", + "description": "The CSAT survey response", + "properties": { + "feedback_message": { + "type": "string", + "description": "The feedback message of the CSAT survey response", + "example": "Great service!" + }, + "rating": { + "type": "integer", + "description": "The rating of the CSAT survey response", + "example": 5 + } + } + } + } } } }, @@ -9483,7 +9688,9 @@ "properties": { "custom_attributes": { "type": "object", - "description": "Custom attributes of the conversation" + "description": "Custom attributes of the conversation", + "example": { + } } } },