feat: Update swagger to openapi 3.0.4, update request payloads with examples (#11374)
This commit is contained in:
@@ -6,4 +6,4 @@ properties:
|
||||
errors:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/definitions/request_error'
|
||||
$ref: '#/components/schemas/request_error'
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
## ---------- ERRORS ------------- ##
|
||||
## ---------- ERRORS -------------- ##
|
||||
## -------------------------------- ##
|
||||
bad_request_error:
|
||||
$ref: ./error/bad_request.yml
|
||||
request_error:
|
||||
$ref: ./error/request.yml
|
||||
|
||||
|
||||
|
||||
## ---------- RESOURCE ------------- ##
|
||||
## ---------- RESOURCE ------------ ##
|
||||
## -------------------------------- ##
|
||||
|
||||
generic_id:
|
||||
@@ -24,10 +22,6 @@ category:
|
||||
$ref: ./resource/category.yml
|
||||
article:
|
||||
$ref: ./resource/article.yml
|
||||
category:
|
||||
$ref: ./resource/category.yml
|
||||
article:
|
||||
$ref: ./resource/article.yml
|
||||
contact:
|
||||
$ref: ./resource/contact.yml
|
||||
conversation:
|
||||
@@ -52,6 +46,8 @@ webhook:
|
||||
$ref: ./resource/webhook.yml
|
||||
account:
|
||||
$ref: ./resource/account.yml
|
||||
account_user:
|
||||
$ref: ./resource/account_user.yml
|
||||
platform_account:
|
||||
$ref: ./resource/platform_account.yml
|
||||
team:
|
||||
@@ -71,13 +67,18 @@ public_message:
|
||||
public_inbox:
|
||||
$ref: ./resource/public/inbox.yml
|
||||
|
||||
|
||||
## ---------- REQUEST------------- ##
|
||||
## ---------- REQUEST ------------- ##
|
||||
## -------------------------------- ##
|
||||
|
||||
account_create_update_payload:
|
||||
$ref: ./request/account/create_update_payload.yml
|
||||
|
||||
account_user_create_update_payload:
|
||||
$ref: ./request/account_user/create_update_payload.yml
|
||||
|
||||
platform_agent_bot_create_update_payload:
|
||||
$ref: ./request/platform/agent_bot/create_update_payload.yml
|
||||
|
||||
agent_bot_create_update_payload:
|
||||
$ref: ./request/agent_bot/create_update_payload.yml
|
||||
|
||||
@@ -89,21 +90,36 @@ canned_response_create_update_payload:
|
||||
|
||||
custom_attribute_create_update_payload:
|
||||
$ref: ./request/custom_attribute/create_update_payload.yml
|
||||
## contact
|
||||
contact_create:
|
||||
$ref: ./request/contact/create.yml
|
||||
contact_update:
|
||||
$ref: ./request/contact/update.yml
|
||||
|
||||
## conversation
|
||||
conversation_message_create:
|
||||
$ref: ./request/conversation/create_message.yml
|
||||
## Agent
|
||||
agent_create_payload:
|
||||
$ref: ./request/agent/create_payload.yml
|
||||
agent_update_payload:
|
||||
$ref: ./request/agent/update_payload.yml
|
||||
|
||||
# Team request Payload
|
||||
## Contact
|
||||
contact_create_payload:
|
||||
$ref: ./request/contact/create_payload.yml
|
||||
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_payload:
|
||||
$ref: ./request/inbox/create_payload.yml
|
||||
inbox_update_payload:
|
||||
$ref: ./request/inbox/update_payload.yml
|
||||
|
||||
# Team
|
||||
team_create_update_payload:
|
||||
$ref: ./request/team/create_update_payload.yml
|
||||
|
||||
# Custom Filter request Payload
|
||||
# Custom Filter
|
||||
custom_filter_create_update_payload:
|
||||
$ref: ./request/custom_filter/create_update_payload.yml
|
||||
|
||||
@@ -128,7 +144,6 @@ category_create_update_payload:
|
||||
article_create_update_payload:
|
||||
$ref: ./request/portal/article_create_update_payload.yml
|
||||
|
||||
|
||||
## public requests
|
||||
public_contact_create_update_payload:
|
||||
$ref: ./request/public/contact/create_update_payload.yml
|
||||
@@ -141,37 +156,37 @@ public_message_update_payload:
|
||||
public_conversation_create_payload:
|
||||
$ref: ./request/public/conversation/create_payload.yml
|
||||
|
||||
## ---------- RESPONSE ------------- ##
|
||||
## ---------- RESPONSE ------------ ##
|
||||
## -------------------------------- ##
|
||||
|
||||
## contact
|
||||
## Contact
|
||||
extended_contact:
|
||||
allOf:
|
||||
- $ref: '#/definitions/contact'
|
||||
- $ref: '#/components/schemas/contact'
|
||||
- $ref: ./resource/extension/contact/show.yml
|
||||
contact_base:
|
||||
allOf:
|
||||
- $ref: '#/definitions/generic_id'
|
||||
- $ref: '#/definitions/contact'
|
||||
- $ref: '#/components/schemas/generic_id'
|
||||
- $ref: '#/components/schemas/contact'
|
||||
contact_list:
|
||||
type: array
|
||||
description: 'array of contacts'
|
||||
items:
|
||||
allOf:
|
||||
- $ref: '#/definitions/generic_id'
|
||||
- $ref: '#/definitions/contact'
|
||||
- $ref: '#/components/schemas/generic_id'
|
||||
- $ref: '#/components/schemas/contact'
|
||||
contact_conversations:
|
||||
type: array
|
||||
description: 'array of conversations'
|
||||
items:
|
||||
allOf:
|
||||
- $ref: '#/definitions/conversation'
|
||||
- $ref: '#/components/schemas/conversation'
|
||||
- $ref: ./resource/extension/contact/conversation.yml
|
||||
- $ref: ./resource/extension/conversation/with_display_id.yml
|
||||
contact_labels:
|
||||
$ref: ./resource/extension/contact/labels.yml
|
||||
|
||||
## conversation
|
||||
## Conversation
|
||||
conversation_list:
|
||||
$ref: ./resource/extension/conversation/list.yml
|
||||
conversation_show:
|
||||
@@ -181,8 +196,7 @@ conversation_status_toggle:
|
||||
conversation_labels:
|
||||
$ref: ./resource/extension/conversation/labels.yml
|
||||
|
||||
|
||||
## report
|
||||
## Report
|
||||
account_summary:
|
||||
$ref: './resource/reports/summary.yml'
|
||||
agent_conversation_metrics:
|
||||
|
||||
@@ -3,3 +3,29 @@ properties:
|
||||
name:
|
||||
type: string
|
||||
description: Name of the account
|
||||
example: 'My Account'
|
||||
locale:
|
||||
type: string
|
||||
description: The locale of the account
|
||||
example: 'en'
|
||||
domain:
|
||||
type: string
|
||||
description: The domain of the account
|
||||
example: 'example.com'
|
||||
support_email:
|
||||
type: string
|
||||
description: The support email of the account
|
||||
example: 'support@example.com'
|
||||
status:
|
||||
type: string
|
||||
enum: ['active', 'suspended']
|
||||
description: The status of the account
|
||||
example: 'active'
|
||||
limits:
|
||||
type: object
|
||||
description: The limits of the account
|
||||
example: {}
|
||||
custom_attributes:
|
||||
type: object
|
||||
description: The custom attributes of the account
|
||||
example: {}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
type: object
|
||||
required:
|
||||
- user_id
|
||||
- role
|
||||
properties:
|
||||
user_id:
|
||||
type: integer
|
||||
description: The ID of the user
|
||||
example: 1
|
||||
role:
|
||||
type: string
|
||||
description: whether user is an administrator or agent
|
||||
example: administrator
|
||||
28
swagger/definitions/request/agent/create_payload.yml
Normal file
28
swagger/definitions/request/agent/create_payload.yml
Normal file
@@ -0,0 +1,28 @@
|
||||
type: object
|
||||
required:
|
||||
- name
|
||||
- email
|
||||
- role
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
description: Full Name of the agent
|
||||
example: 'John Doe'
|
||||
email:
|
||||
type: string
|
||||
description: Email of the Agent
|
||||
example: 'john.doe@acme.inc'
|
||||
role:
|
||||
type: string
|
||||
enum: ['agent', 'administrator']
|
||||
description: Whether its administrator or agent
|
||||
example: 'agent'
|
||||
availability_status:
|
||||
type: string
|
||||
enum: ['available', 'busy', 'offline']
|
||||
description: The availability setting of the agent.
|
||||
example: 'available'
|
||||
auto_offline:
|
||||
type: boolean
|
||||
description: Whether the availability status of agent is configured to go offline automatically when away.
|
||||
example: true
|
||||
18
swagger/definitions/request/agent/update_payload.yml
Normal file
18
swagger/definitions/request/agent/update_payload.yml
Normal file
@@ -0,0 +1,18 @@
|
||||
type: object
|
||||
required:
|
||||
- role
|
||||
properties:
|
||||
role:
|
||||
type: string
|
||||
enum: ['agent', 'administrator']
|
||||
description: Whether its administrator or agent
|
||||
example: 'agent'
|
||||
availability_status:
|
||||
type: string
|
||||
enum: ['available', 'busy', 'offline']
|
||||
description: The availability status of the agent.
|
||||
example: 'available'
|
||||
auto_offline:
|
||||
type: boolean
|
||||
description: Whether the availability status of agent is configured to go offline automatically when away.
|
||||
example: true
|
||||
@@ -3,9 +3,28 @@ properties:
|
||||
name:
|
||||
type: string
|
||||
description: The name of the agent bot
|
||||
example: 'My Agent Bot'
|
||||
description:
|
||||
type: string
|
||||
description: The description about the agent bot
|
||||
description: The description of the agent bot
|
||||
example: 'This is a sample agent bot'
|
||||
outgoing_url:
|
||||
type: string
|
||||
description: The webhook URL for the bot
|
||||
example: 'https://example.com/webhook'
|
||||
avatar:
|
||||
type: string
|
||||
format: binary
|
||||
description: Send the form data with the avatar image binary or use the avatar_url
|
||||
avatar_url:
|
||||
type: string
|
||||
description: The url to a jpeg, png file for the agent bot avatar
|
||||
example: https://example.com/avatar.png
|
||||
bot_type:
|
||||
type: integer
|
||||
description: The type of the bot (0 for webhook)
|
||||
example: 0
|
||||
bot_config:
|
||||
type: object
|
||||
description: The configuration for the bot
|
||||
example: {}
|
||||
|
||||
@@ -36,6 +36,6 @@ properties:
|
||||
example:
|
||||
attribute_key: content
|
||||
filter_operator: contains
|
||||
query_operator: nil
|
||||
query_operator: OR
|
||||
values:
|
||||
- help
|
||||
|
||||
@@ -3,6 +3,8 @@ properties:
|
||||
content:
|
||||
type: string
|
||||
description: Message content for canned response
|
||||
example: 'Hello, {{contact.name}}! Welcome to our service.'
|
||||
short_code:
|
||||
type: string
|
||||
description: Short Code for quick access of the canned response
|
||||
example: 'welcome'
|
||||
|
||||
44
swagger/definitions/request/contact/create_payload.yml
Normal file
44
swagger/definitions/request/contact/create_payload.yml
Normal file
@@ -0,0 +1,44 @@
|
||||
type: object
|
||||
required:
|
||||
- inbox_id
|
||||
properties:
|
||||
inbox_id:
|
||||
type: number
|
||||
description: ID of the inbox to which the contact belongs
|
||||
example: 1
|
||||
name:
|
||||
type: string
|
||||
description: name of the contact
|
||||
example: Alice
|
||||
email:
|
||||
type: string
|
||||
description: email of the contact
|
||||
example: alice@acme.inc
|
||||
blocked:
|
||||
type: boolean
|
||||
description: whether the contact is blocked or not
|
||||
example: false
|
||||
phone_number:
|
||||
type: string
|
||||
description: phone number of the contact
|
||||
example: '+123456789'
|
||||
avatar:
|
||||
type: string
|
||||
format: binary
|
||||
description: Send the form data with the avatar image binary or use the avatar_url
|
||||
avatar_url:
|
||||
type: string
|
||||
description: The url to a jpeg, png file for the contact avatar
|
||||
example: https://example.com/avatar.png
|
||||
identifier:
|
||||
type: string
|
||||
description: A unique identifier for the contact in external system
|
||||
example: '1234567890'
|
||||
additional_attributes:
|
||||
type: object
|
||||
description: An object where you can store additional attributes for contact. example {"type":"customer", "age":30}
|
||||
example: { 'type': 'customer', 'age': 30 }
|
||||
custom_attributes:
|
||||
type: object
|
||||
description: An object where you can store custom attributes for contact. example {"type":"customer", "age":30}, this should have a valid custom attribute definition.
|
||||
example: {}
|
||||
@@ -1,25 +0,0 @@
|
||||
type: object
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
description: name of the contact
|
||||
email:
|
||||
type: string
|
||||
description: email of the contact
|
||||
phone_number:
|
||||
type: string
|
||||
description: phone number of the contact
|
||||
avatar:
|
||||
type: string
|
||||
format: binary
|
||||
description: Send the form data with the avatar image binary or use the avatar_url
|
||||
avatar_url:
|
||||
type: string
|
||||
description: The url to a jpeg, png file for the contact avatar
|
||||
identifier:
|
||||
type: string
|
||||
description: A unique identifier for the contact in external system
|
||||
custom_attributes:
|
||||
type: object
|
||||
description: An object where you can store custom attributes for contact. example {"type":"customer", "age":30}
|
||||
|
||||
@@ -1,18 +1,21 @@
|
||||
type: object
|
||||
required:
|
||||
- inbox_id
|
||||
properties:
|
||||
inbox_id:
|
||||
type: number
|
||||
name:
|
||||
type: string
|
||||
description: name of the contact
|
||||
example: Alice
|
||||
email:
|
||||
type: string
|
||||
description: email of the contact
|
||||
example: alice@acme.inc
|
||||
blocked:
|
||||
type: boolean
|
||||
description: whether the contact is blocked or not
|
||||
example: false
|
||||
phone_number:
|
||||
type: string
|
||||
description: phone number of the contact
|
||||
example: '+123456789'
|
||||
avatar:
|
||||
type: string
|
||||
format: binary
|
||||
@@ -20,9 +23,16 @@ properties:
|
||||
avatar_url:
|
||||
type: string
|
||||
description: The url to a jpeg, png file for the contact avatar
|
||||
example: https://example.com/avatar.png
|
||||
identifier:
|
||||
type: string
|
||||
description: A unique identifier for the contact in external system
|
||||
example: '1234567890'
|
||||
additional_attributes:
|
||||
type: object
|
||||
description: An object where you can store additional attributes for contact. example {"type":"customer", "age":30}
|
||||
example: { 'type': 'customer', 'age': 30 }
|
||||
custom_attributes:
|
||||
type: object
|
||||
description: An object where you can store custom attributes for contact. example {"type":"customer", "age":30}
|
||||
description: An object where you can store custom attributes for contact. example {"type":"customer", "age":30}, this should have a valid custom attribute definition.
|
||||
example: {}
|
||||
@@ -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']
|
||||
example: 'cards'
|
||||
description: 'if you want to create custom message types'
|
||||
enum: ['text', 'input_email', 'cards', 'input_select', 'form', 'article']
|
||||
description: Content type of the message
|
||||
example: 'text'
|
||||
content_attributes:
|
||||
type: object
|
||||
description: attributes based on your content type
|
||||
description: Attributes based on the content type
|
||||
example: {}
|
||||
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
|
||||
@@ -35,8 +44,8 @@ properties:
|
||||
type: string
|
||||
description: Language of the template
|
||||
example: en_US
|
||||
processed_params:
|
||||
processed_params:
|
||||
type: object
|
||||
description: The processed param values for template variables in template
|
||||
example:
|
||||
1: "Chatwoot"
|
||||
example:
|
||||
1: 'Chatwoot'
|
||||
79
swagger/definitions/request/conversation/create_payload.yml
Normal file
79
swagger/definitions/request/conversation/create_payload.yml
Normal file
@@ -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 <br/> 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'
|
||||
@@ -3,20 +3,34 @@ properties:
|
||||
attribute_display_name:
|
||||
type: string
|
||||
description: Attribute display name
|
||||
example: 'Custom Attribute'
|
||||
attribute_display_type:
|
||||
type: integer
|
||||
description: Attribute display type (text- 0, number- 1, currency- 2, percent- 3, link- 4, date- 5, list- 6, checkbox- 7)
|
||||
example: 0
|
||||
attribute_description:
|
||||
type: string
|
||||
description: Attribute description
|
||||
example: 'This is a custom attribute'
|
||||
attribute_key:
|
||||
type: string
|
||||
description: Attribute unique key value
|
||||
example: 'custom_attribute'
|
||||
attribute_values:
|
||||
type: array
|
||||
description: Attribute values
|
||||
items:
|
||||
type: string
|
||||
example: ['value1', 'value2']
|
||||
attribute_model:
|
||||
type: integer
|
||||
description: Attribute type(conversation_attribute- 0, contact_attribute- 1)
|
||||
example: 0
|
||||
regex_pattern:
|
||||
type: string
|
||||
description: Regex pattern (Only applicable for type- text). The regex pattern is used to validate the attribute value(s).
|
||||
example: '^[a-zA-Z0-9]+$'
|
||||
regex_cue:
|
||||
type: string
|
||||
description: Regex cue message (Only applicable for type- text). The cue message is shown when the regex pattern is not matched.
|
||||
example: 'Please enter a valid value'
|
||||
|
||||
@@ -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: {}
|
||||
|
||||
88
swagger/definitions/request/inbox/create_payload.yml
Normal file
88
swagger/definitions/request/inbox/create_payload.yml
Normal file
@@ -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: true
|
||||
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'
|
||||
82
swagger/definitions/request/inbox/update_payload.yml
Normal file
82
swagger/definitions/request/inbox/update_payload.yml
Normal file
@@ -0,0 +1,82 @@
|
||||
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: true
|
||||
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:
|
||||
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'
|
||||
@@ -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: {}
|
||||
|
||||
@@ -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: {}
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
type: object
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
description: The name of the agent bot
|
||||
example: 'My Agent Bot'
|
||||
description:
|
||||
type: string
|
||||
description: The description of the agent bot
|
||||
example: 'This is a sample agent bot'
|
||||
outgoing_url:
|
||||
type: string
|
||||
description: The webhook URL for the bot
|
||||
example: 'https://example.com/webhook'
|
||||
account_id:
|
||||
type: integer
|
||||
description: The account ID to associate the agent bot with
|
||||
example: 1
|
||||
avatar:
|
||||
type: string
|
||||
format: binary
|
||||
description: Send the form data with the avatar image binary or use the avatar_url
|
||||
avatar_url:
|
||||
type: string
|
||||
description: The url to a jpeg, png file for the agent bot avatar
|
||||
example: https://example.com/avatar.png
|
||||
@@ -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',
|
||||
}
|
||||
|
||||
@@ -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 as a string (emoji)
|
||||
example: '📚'
|
||||
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
|
||||
|
||||
@@ -1,20 +1,13 @@
|
||||
type: object
|
||||
properties:
|
||||
archived:
|
||||
type: boolean
|
||||
description: Status to check if portal is live
|
||||
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.
|
||||
example: https://chatwoot.help/.
|
||||
description: Custom domain to display help center.
|
||||
example: chatwoot.help
|
||||
header_text:
|
||||
type: string
|
||||
description: Help center header
|
||||
@@ -26,11 +19,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' }
|
||||
|
||||
@@ -1,24 +1,30 @@
|
||||
|
||||
type: object
|
||||
properties:
|
||||
identifier:
|
||||
type: string
|
||||
description: External identifier of the contact
|
||||
example: '1234567890'
|
||||
identifier_hash:
|
||||
type: string
|
||||
description: Identifier hash prepared for HMAC authentication
|
||||
example: 'e93275d4eba0e5679ad55f5360af00444e2a888df9b0afa3e8b691c3173725f9'
|
||||
email:
|
||||
type: string
|
||||
description: Email of the contact
|
||||
example: alice@acme.inc
|
||||
name:
|
||||
type: string
|
||||
description: Name of the contact
|
||||
example: Alice
|
||||
phone_number:
|
||||
type: string
|
||||
description: Phone number of the contact
|
||||
avatar_url:
|
||||
example: '+123456789'
|
||||
avatar:
|
||||
type: string
|
||||
description: The url to a jpeg, png file for the user avatar
|
||||
format: binary
|
||||
description: Send the form data with the avatar image binary or use the avatar_url
|
||||
custom_attributes:
|
||||
type: object
|
||||
description: Custom attributes of the customer
|
||||
description: Custom attributes of the customer
|
||||
example: {}
|
||||
|
||||
@@ -3,3 +3,4 @@ properties:
|
||||
custom_attributes:
|
||||
type: object
|
||||
description: Custom attributes of the conversation
|
||||
example: {}
|
||||
|
||||
@@ -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
|
||||
|
||||
example: '1234567890'
|
||||
|
||||
@@ -1,6 +1,30 @@
|
||||
|
||||
type: object
|
||||
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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -3,13 +3,20 @@ properties:
|
||||
name:
|
||||
type: string
|
||||
description: Name of the user
|
||||
example: 'Daniel'
|
||||
display_name:
|
||||
type: string
|
||||
description: Display name of the user
|
||||
example: 'Dan'
|
||||
email:
|
||||
type: string
|
||||
description: Email of the user
|
||||
example: 'daniel@acme.inc'
|
||||
password:
|
||||
type: string
|
||||
description: Password must contain uppercase, lowercase letters, number and a special character
|
||||
example: 'Password2!'
|
||||
custom_attributes:
|
||||
type: object
|
||||
description: Custom attributes you want to associate with the user
|
||||
|
||||
example: {}
|
||||
|
||||
@@ -3,16 +3,23 @@ properties:
|
||||
url:
|
||||
type: string
|
||||
description: The url where the events should be sent
|
||||
example: https://example.com/webhook
|
||||
subscriptions:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
enum: [
|
||||
"conversation_created",
|
||||
"conversation_status_changed",
|
||||
"conversation_updated",
|
||||
"message_created",
|
||||
"message_updated",
|
||||
"webwidget_triggered"
|
||||
]
|
||||
enum:
|
||||
[
|
||||
'conversation_created',
|
||||
'conversation_status_changed',
|
||||
'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
|
||||
|
||||
14
swagger/definitions/resource/account_user.yml
Normal file
14
swagger/definitions/resource/account_user.yml
Normal file
@@ -0,0 +1,14 @@
|
||||
type: array
|
||||
description: 'Array of account users'
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
account_id:
|
||||
type: integer
|
||||
description: The ID of the account
|
||||
user_id:
|
||||
type: integer
|
||||
description: The ID of the user
|
||||
role:
|
||||
type: string
|
||||
description: whether user is an administrator or agent
|
||||
@@ -19,14 +19,13 @@ properties:
|
||||
enum: ['agent', 'administrator']
|
||||
confirmed:
|
||||
type: boolean
|
||||
availability_status:
|
||||
availability_status:
|
||||
type: string
|
||||
enum: ['available', 'busy', 'offline']
|
||||
description: The availability status of the agent computed by Chatwoot.
|
||||
auto_offline:
|
||||
type: boolean
|
||||
description: Whether the availability status of agent is configured to go offline automatically when away.
|
||||
custom_attributes:
|
||||
custom_attributes:
|
||||
type: object
|
||||
description: Available for users who are created through platform APIs and has custom attributes associated.
|
||||
|
||||
|
||||
@@ -24,8 +24,9 @@ properties:
|
||||
custom_attributes:
|
||||
type: object
|
||||
description: The object to save custom attributes for contact, accepts custom attributes key and value
|
||||
example: { attribute_key: attribute_value, signed_up_at: dd/mm/yyyy }
|
||||
example:
|
||||
{ attribute_key: attribute_value, signed_up_at: dd/mm/yyyy }
|
||||
contact_inboxes:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/definitions/contact_inboxes'
|
||||
$ref: '#/components/schemas/contact_inboxes'
|
||||
|
||||
@@ -5,4 +5,4 @@ properties:
|
||||
description: Contact Inbox Source Id
|
||||
inbox:
|
||||
type: object
|
||||
$ref: '#/definitions/inbox'
|
||||
$ref: '#/components/schemas/inbox'
|
||||
|
||||
@@ -5,4 +5,4 @@ properties:
|
||||
description: Contact Inbox Source Id
|
||||
inbox:
|
||||
type: object
|
||||
$ref: '#/definitions/inbox'
|
||||
$ref: '#/components/schemas/inbox'
|
||||
|
||||
@@ -6,7 +6,7 @@ properties:
|
||||
messages:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/definitions/message'
|
||||
$ref: '#/components/schemas/message'
|
||||
account_id:
|
||||
type: number
|
||||
description: Account Id
|
||||
|
||||
@@ -19,4 +19,4 @@ properties:
|
||||
type: string
|
||||
description: Channel Type
|
||||
assignee:
|
||||
$ref: '#/definitions/user'
|
||||
$ref: '#/components/schemas/user'
|
||||
|
||||
@@ -19,6 +19,6 @@ properties:
|
||||
description: 'array of conversations'
|
||||
items:
|
||||
allOf:
|
||||
- $ref: '#/definitions/generic_id'
|
||||
- $ref: '#/definitions/conversation'
|
||||
- $ref: '#/components/schemas/generic_id'
|
||||
- $ref: '#/components/schemas/conversation'
|
||||
- $ref: '../contact/conversation.yml'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
type: object
|
||||
allOf:
|
||||
- $ref: '#/definitions/conversation'
|
||||
- $ref: '#/components/schemas/conversation'
|
||||
- $ref: '../contact/conversation.yml'
|
||||
|
||||
@@ -27,8 +27,8 @@ properties:
|
||||
categories:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/definitions/category'
|
||||
$ref: '#/components/schemas/category'
|
||||
articles:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/definitions/article'
|
||||
$ref: '#/components/schemas/article'
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
type: object
|
||||
properties:
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
description: Id of the contact
|
||||
@@ -14,4 +14,4 @@ properties:
|
||||
description: Email of the contact
|
||||
pubsub_token:
|
||||
type: string
|
||||
description: The token to be used to connect to chatwoot websocket
|
||||
description: The token to be used to connect to chatwoot websocket
|
||||
|
||||
@@ -9,7 +9,7 @@ properties:
|
||||
messages:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/definitions/message'
|
||||
$ref: '#/components/schemas/message'
|
||||
description: Messages in the conversation
|
||||
contact:
|
||||
type: object
|
||||
|
||||
@@ -19,10 +19,10 @@ properties:
|
||||
enum: ['agent', 'administrator']
|
||||
confirmed:
|
||||
type: boolean
|
||||
custom_attributes:
|
||||
custom_attributes:
|
||||
type: object
|
||||
description: Available for users who are created through platform APIs and has custom attributes associated.
|
||||
accounts:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/definitions/account'
|
||||
$ref: '#/components/schemas/account'
|
||||
|
||||
Reference in New Issue
Block a user