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/error/bad_request.yml b/swagger/definitions/error/bad_request.yml
index b6facb361..f103edcb5 100644
--- a/swagger/definitions/error/bad_request.yml
+++ b/swagger/definitions/error/bad_request.yml
@@ -6,4 +6,4 @@ properties:
errors:
type: array
items:
- $ref: '#/definitions/request_error'
+ $ref: '#/components/schemas/request_error'
diff --git a/swagger/definitions/index.yml b/swagger/definitions/index.yml
index d11ec7988..8514a3957 100644
--- a/swagger/definitions/index.yml
+++ b/swagger/definitions/index.yml
@@ -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:
diff --git a/swagger/definitions/request/account/create_update_payload.yml b/swagger/definitions/request/account/create_update_payload.yml
index 63c0eed13..b11b82373 100644
--- a/swagger/definitions/request/account/create_update_payload.yml
+++ b/swagger/definitions/request/account/create_update_payload.yml
@@ -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: {}
diff --git a/swagger/definitions/request/account_user/create_update_payload.yml b/swagger/definitions/request/account_user/create_update_payload.yml
new file mode 100644
index 000000000..d2982c4cf
--- /dev/null
+++ b/swagger/definitions/request/account_user/create_update_payload.yml
@@ -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
diff --git a/swagger/definitions/request/agent/create_payload.yml b/swagger/definitions/request/agent/create_payload.yml
new file mode 100644
index 000000000..1daeae83a
--- /dev/null
+++ b/swagger/definitions/request/agent/create_payload.yml
@@ -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
diff --git a/swagger/definitions/request/agent/update_payload.yml b/swagger/definitions/request/agent/update_payload.yml
new file mode 100644
index 000000000..fc8d1457d
--- /dev/null
+++ b/swagger/definitions/request/agent/update_payload.yml
@@ -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
diff --git a/swagger/definitions/request/agent_bot/create_update_payload.yml b/swagger/definitions/request/agent_bot/create_update_payload.yml
index 4dc74bea3..4a95b42bf 100644
--- a/swagger/definitions/request/agent_bot/create_update_payload.yml
+++ b/swagger/definitions/request/agent_bot/create_update_payload.yml
@@ -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: {}
diff --git a/swagger/definitions/request/automation_rule/create_update_payload.yml b/swagger/definitions/request/automation_rule/create_update_payload.yml
index 20d362e48..091fa2aaa 100644
--- a/swagger/definitions/request/automation_rule/create_update_payload.yml
+++ b/swagger/definitions/request/automation_rule/create_update_payload.yml
@@ -36,6 +36,6 @@ properties:
example:
attribute_key: content
filter_operator: contains
- query_operator: nil
+ query_operator: OR
values:
- help
diff --git a/swagger/definitions/request/canned_response/create_update_payload.yml b/swagger/definitions/request/canned_response/create_update_payload.yml
index ef6f7f74a..3673b4798 100644
--- a/swagger/definitions/request/canned_response/create_update_payload.yml
+++ b/swagger/definitions/request/canned_response/create_update_payload.yml
@@ -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'
diff --git a/swagger/definitions/request/contact/create_payload.yml b/swagger/definitions/request/contact/create_payload.yml
new file mode 100644
index 000000000..7f74e501c
--- /dev/null
+++ b/swagger/definitions/request/contact/create_payload.yml
@@ -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: {}
diff --git a/swagger/definitions/request/contact/update.yml b/swagger/definitions/request/contact/update.yml
deleted file mode 100644
index 4a12672a3..000000000
--- a/swagger/definitions/request/contact/update.yml
+++ /dev/null
@@ -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}
-
diff --git a/swagger/definitions/request/contact/create.yml b/swagger/definitions/request/contact/update_payload.yml
similarity index 53%
rename from swagger/definitions/request/contact/create.yml
rename to swagger/definitions/request/contact/update_payload.yml
index 5acbe5f94..99bec3548 100644
--- a/swagger/definitions/request/contact/create.yml
+++ b/swagger/definitions/request/contact/update_payload.yml
@@ -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: {}
diff --git a/swagger/definitions/request/conversation/create_message.yml b/swagger/definitions/request/conversation/create_message_payload.yml
similarity index 68%
rename from swagger/definitions/request/conversation/create_message.yml
rename to swagger/definitions/request/conversation/create_message_payload.yml
index b3c9b935b..ef1a051c2 100644
--- a/swagger/definitions/request/conversation/create_message.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']
- 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'
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_attribute/create_update_payload.yml b/swagger/definitions/request/custom_attribute/create_update_payload.yml
index fd368f98c..3ee960559 100644
--- a/swagger/definitions/request/custom_attribute/create_update_payload.yml
+++ b/swagger/definitions/request/custom_attribute/create_update_payload.yml
@@ -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'
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_payload.yml b/swagger/definitions/request/inbox/create_payload.yml
new file mode 100644
index 000000000..59584054c
--- /dev/null
+++ b/swagger/definitions/request/inbox/create_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: 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'
diff --git a/swagger/definitions/request/inbox/update_payload.yml b/swagger/definitions/request/inbox/update_payload.yml
new file mode 100644
index 000000000..f625fc5b8
--- /dev/null
+++ b/swagger/definitions/request/inbox/update_payload.yml
@@ -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'
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/platform/agent_bot/create_update_payload.yml b/swagger/definitions/request/platform/agent_bot/create_update_payload.yml
new file mode 100644
index 000000000..a258e28a6
--- /dev/null
+++ b/swagger/definitions/request/platform/agent_bot/create_update_payload.yml
@@ -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
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..67bb650cb 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 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
diff --git a/swagger/definitions/request/portal/portal_create_update_payload.yml b/swagger/definitions/request/portal/portal_create_update_payload.yml
index d1e82aaf4..56feadbda 100644
--- a/swagger/definitions/request/portal/portal_create_update_payload.yml
+++ b/swagger/definitions/request/portal/portal_create_update_payload.yml
@@ -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' }
diff --git a/swagger/definitions/request/public/contact/create_update_payload.yml b/swagger/definitions/request/public/contact/create_update_payload.yml
index 48c6e4550..f4cacafe8 100644
--- a/swagger/definitions/request/public/contact/create_update_payload.yml
+++ b/swagger/definitions/request/public/contact/create_update_payload.yml
@@ -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
\ No newline at end of file
+ description: Custom attributes of the customer
+ example: {}
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/user/create_update_payload.yml b/swagger/definitions/request/user/create_update_payload.yml
index e14a25317..1bebdc59c 100644
--- a/swagger/definitions/request/user/create_update_payload.yml
+++ b/swagger/definitions/request/user/create_update_payload.yml
@@ -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: {}
diff --git a/swagger/definitions/request/webhooks/create_update_payload.yml b/swagger/definitions/request/webhooks/create_update_payload.yml
index 417843fe6..2f4a718e4 100644
--- a/swagger/definitions/request/webhooks/create_update_payload.yml
+++ b/swagger/definitions/request/webhooks/create_update_payload.yml
@@ -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
diff --git a/swagger/definitions/resource/account_user.yml b/swagger/definitions/resource/account_user.yml
new file mode 100644
index 000000000..cfc530383
--- /dev/null
+++ b/swagger/definitions/resource/account_user.yml
@@ -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
diff --git a/swagger/definitions/resource/agent.yml b/swagger/definitions/resource/agent.yml
index e3d506a3b..dd1379b50 100644
--- a/swagger/definitions/resource/agent.yml
+++ b/swagger/definitions/resource/agent.yml
@@ -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.
-
diff --git a/swagger/definitions/resource/contact.yml b/swagger/definitions/resource/contact.yml
index bbb82e14c..57d5f98af 100644
--- a/swagger/definitions/resource/contact.yml
+++ b/swagger/definitions/resource/contact.yml
@@ -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'
diff --git a/swagger/definitions/resource/contact_inboxes.yml b/swagger/definitions/resource/contact_inboxes.yml
index a223490ff..7ccba61b1 100644
--- a/swagger/definitions/resource/contact_inboxes.yml
+++ b/swagger/definitions/resource/contact_inboxes.yml
@@ -5,4 +5,4 @@ properties:
description: Contact Inbox Source Id
inbox:
type: object
- $ref: '#/definitions/inbox'
+ $ref: '#/components/schemas/inbox'
diff --git a/swagger/definitions/resource/contactable_inboxes.yml b/swagger/definitions/resource/contactable_inboxes.yml
index a223490ff..7ccba61b1 100644
--- a/swagger/definitions/resource/contactable_inboxes.yml
+++ b/swagger/definitions/resource/contactable_inboxes.yml
@@ -5,4 +5,4 @@ properties:
description: Contact Inbox Source Id
inbox:
type: object
- $ref: '#/definitions/inbox'
+ $ref: '#/components/schemas/inbox'
diff --git a/swagger/definitions/resource/conversation.yml b/swagger/definitions/resource/conversation.yml
index 085d21879..0a16f0134 100644
--- a/swagger/definitions/resource/conversation.yml
+++ b/swagger/definitions/resource/conversation.yml
@@ -6,7 +6,7 @@ properties:
messages:
type: array
items:
- $ref: '#/definitions/message'
+ $ref: '#/components/schemas/message'
account_id:
type: number
description: Account Id
diff --git a/swagger/definitions/resource/extension/contact/conversation.yml b/swagger/definitions/resource/extension/contact/conversation.yml
index 6e6576f80..19936e7e8 100644
--- a/swagger/definitions/resource/extension/contact/conversation.yml
+++ b/swagger/definitions/resource/extension/contact/conversation.yml
@@ -19,4 +19,4 @@ properties:
type: string
description: Channel Type
assignee:
- $ref: '#/definitions/user'
+ $ref: '#/components/schemas/user'
diff --git a/swagger/definitions/resource/extension/conversation/list.yml b/swagger/definitions/resource/extension/conversation/list.yml
index 426902d4f..39e04baa0 100644
--- a/swagger/definitions/resource/extension/conversation/list.yml
+++ b/swagger/definitions/resource/extension/conversation/list.yml
@@ -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'
diff --git a/swagger/definitions/resource/extension/conversation/show.yml b/swagger/definitions/resource/extension/conversation/show.yml
index fb697ad38..27a27018b 100644
--- a/swagger/definitions/resource/extension/conversation/show.yml
+++ b/swagger/definitions/resource/extension/conversation/show.yml
@@ -1,4 +1,4 @@
type: object
allOf:
- - $ref: '#/definitions/conversation'
+ - $ref: '#/components/schemas/conversation'
- $ref: '../contact/conversation.yml'
diff --git a/swagger/definitions/resource/portal.yml b/swagger/definitions/resource/portal.yml
index a1bef33bc..5fb13e9b8 100644
--- a/swagger/definitions/resource/portal.yml
+++ b/swagger/definitions/resource/portal.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'
diff --git a/swagger/definitions/resource/public/contact.yml b/swagger/definitions/resource/public/contact.yml
index ae2eae8d3..453ac5c97 100644
--- a/swagger/definitions/resource/public/contact.yml
+++ b/swagger/definitions/resource/public/contact.yml
@@ -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
\ No newline at end of file
+ description: The token to be used to connect to chatwoot websocket
diff --git a/swagger/definitions/resource/public/conversation.yml b/swagger/definitions/resource/public/conversation.yml
index a2f797e1b..67febca2d 100644
--- a/swagger/definitions/resource/public/conversation.yml
+++ b/swagger/definitions/resource/public/conversation.yml
@@ -9,7 +9,7 @@ properties:
messages:
type: array
items:
- $ref: '#/definitions/message'
+ $ref: '#/components/schemas/message'
description: Messages in the conversation
contact:
type: object
diff --git a/swagger/definitions/resource/user.yml b/swagger/definitions/resource/user.yml
index c06cbab8e..b788713ad 100644
--- a/swagger/definitions/resource/user.yml
+++ b/swagger/definitions/resource/user.yml
@@ -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'
diff --git a/swagger/index.yml b/swagger/index.yml
index 41f78dbc4..f0a97f0a6 100644
--- a/swagger/index.yml
+++ b/swagger/index.yml
@@ -1,47 +1,39 @@
-swagger: "2.0"
+openapi: '3.0.4'
info:
- description: This is the API documentation for Chatwoot server.
- version: 1.0.0
title: Chatwoot
- termsOfService: https://www.chatwoot.com/terms-of-service/
+ description: This is the API documentation for Chatwoot server.
+ version: 1.1.0
+ termsOfService: https://www.chatwoot.com/terms-of-service/
contact:
email: hello@chatwoot.com
license:
name: MIT License
url: https://opensource.org/licenses/MIT
-host: app.chatwoot.com
-basePath: /
-schemes:
- - https
-produces:
-- application/json; charset=utf-8
-consumes:
-- application/json; charset=utf-8
-securityDefinitions:
- userApiKey:
- type: apiKey
- in: header
- name: api_access_token
- description: This token can be obtained by visiting the profile page or via rails console. Provides access to endpoints based on the user permissions levels. This token can be saved by an external system when user is created via API, to perform activities on behalf of the user.
- agentBotApiKey:
- type: apiKey
- in: header
- name: api_access_token
- description: This token should be provided by system admin or obtained via rails console. This token can be used to build bot integrations and can only access limited apis.
- platformAppApiKey:
- type: apiKey
- in: header
- name: api_access_token
- description: This token can be obtained by the system admin after creating a platformApp. This token should be used to provision agent bots, accounts, users and their roles.
-security:
- - userApiKey: []
-
+servers:
+ - url: https://app.chatwoot.com/
paths:
$ref: ./paths/index.yml
-definitions:
- $ref: ./definitions/index.yml
-parameters:
- $ref: ./parameters/index.yml
+components:
+ schemas:
+ $ref: ./definitions/index.yml
+ parameters:
+ $ref: ./parameters/index.yml
+ securitySchemes:
+ userApiKey:
+ type: apiKey
+ in: header
+ name: api_access_token
+ description: This token can be obtained by visiting the profile page or via rails console. Provides access to endpoints based on the user permissions levels. This token can be saved by an external system when user is created via API, to perform activities on behalf of the user.
+ agentBotApiKey:
+ type: apiKey
+ in: header
+ name: api_access_token
+ description: This token should be provided by system admin or obtained via rails console. This token can be used to build bot integrations and can only access limited apis.
+ platformAppApiKey:
+ type: apiKey
+ in: header
+ name: api_access_token
+ description: This token can be obtained by the system admin after creating a platformApp. This token should be used to provision agent bots, accounts, users and their roles.
x-tagGroups:
- name: Platform
@@ -56,9 +48,6 @@ x-tagGroups:
- Agents
- Canned Responses
- Contacts
- - Contact Labels
- - Conversation Assignment
- - Conversation Labels
- Conversations
- Custom Attributes
- Custom Filters
diff --git a/swagger/parameters/account_id.yml b/swagger/parameters/account_id.yml
index aa3d48a8a..133155c21 100644
--- a/swagger/parameters/account_id.yml
+++ b/swagger/parameters/account_id.yml
@@ -1,5 +1,6 @@
in: path
name: account_id
-type: integer
+schema:
+ type: integer
required: true
description: The numeric ID of the account
diff --git a/swagger/parameters/agent_bot_id.yml b/swagger/parameters/agent_bot_id.yml
index 6c94ef5dc..4d1479cb4 100644
--- a/swagger/parameters/agent_bot_id.yml
+++ b/swagger/parameters/agent_bot_id.yml
@@ -1,5 +1,6 @@
in: path
name: id
-type: integer
+schema:
+ type: integer
required: true
description: The ID of the agentbot to be updated
diff --git a/swagger/parameters/contact_sort.yml b/swagger/parameters/contact_sort.yml
index 6f3da0b1b..f25d07760 100644
--- a/swagger/parameters/contact_sort.yml
+++ b/swagger/parameters/contact_sort.yml
@@ -1,14 +1,15 @@
in: query
name: sort
-type: string
-enum:
- - name
- - email
- - phone_number
- - last_activity_at
- - -name
- - -email
- - -phone_number
- - -last_activity_at
+schema:
+ type: string
+ enum:
+ - name
+ - email
+ - phone_number
+ - last_activity_at
+ - -name
+ - -email
+ - -phone_number
+ - -last_activity_at
required: false
description: The attribute by which list should be sorted
diff --git a/swagger/parameters/conversation_id.yml b/swagger/parameters/conversation_id.yml
index d8de755fe..4f4cb19ab 100644
--- a/swagger/parameters/conversation_id.yml
+++ b/swagger/parameters/conversation_id.yml
@@ -1,5 +1,6 @@
in: path
name: conversation_id
-type: integer
+schema:
+ type: integer
required: true
description: The numeric ID of the conversation
diff --git a/swagger/parameters/conversation_uuid.yml b/swagger/parameters/conversation_uuid.yml
index b2bff7f39..c585ddc09 100644
--- a/swagger/parameters/conversation_uuid.yml
+++ b/swagger/parameters/conversation_uuid.yml
@@ -1,5 +1,6 @@
in: path
name: conversation_uuid
-type: integer
+schema:
+ type: integer
required: true
description: The uuid of the conversation
diff --git a/swagger/parameters/custom_filter_id.yml b/swagger/parameters/custom_filter_id.yml
index b19f52f8e..46776511f 100644
--- a/swagger/parameters/custom_filter_id.yml
+++ b/swagger/parameters/custom_filter_id.yml
@@ -1,5 +1,6 @@
in: path
name: custom_filter_id
-type: integer
+schema:
+ type: integer
required: true
description: The numeric ID of the custom filter
diff --git a/swagger/parameters/hook_id.yml b/swagger/parameters/hook_id.yml
index c1600def4..f1c50c3d4 100644
--- a/swagger/parameters/hook_id.yml
+++ b/swagger/parameters/hook_id.yml
@@ -1,5 +1,6 @@
in: path
name: hook_id
-type: integer
+schema:
+ type: integer
required: true
description: The numeric ID of the integration hook
diff --git a/swagger/parameters/inbox_id.yml b/swagger/parameters/inbox_id.yml
index 716d34de6..58640fb08 100644
--- a/swagger/parameters/inbox_id.yml
+++ b/swagger/parameters/inbox_id.yml
@@ -1,5 +1,6 @@
in: path
name: inbox_id
-type: integer
+schema:
+ type: integer
required: true
description: The ID of the Inbox
diff --git a/swagger/parameters/message_id.yml b/swagger/parameters/message_id.yml
index 3fc6edfcf..3064a31e2 100644
--- a/swagger/parameters/message_id.yml
+++ b/swagger/parameters/message_id.yml
@@ -1,5 +1,6 @@
in: path
name: message_id
-type: integer
+schema:
+ type: integer
required: true
description: The numeric ID of the message
diff --git a/swagger/parameters/page.yml b/swagger/parameters/page.yml
index 8cdc77b1e..3ef0f55b6 100644
--- a/swagger/parameters/page.yml
+++ b/swagger/parameters/page.yml
@@ -1,6 +1,7 @@
in: query
name: page
-type: integer
-default: 1
+schema:
+ type: integer
+ default: 1
required: false
description: The page parameter
diff --git a/swagger/parameters/platform_user_id.yml b/swagger/parameters/platform_user_id.yml
index d31f71878..708a0aad9 100644
--- a/swagger/parameters/platform_user_id.yml
+++ b/swagger/parameters/platform_user_id.yml
@@ -1,5 +1,6 @@
in: path
name: id
-type: integer
+schema:
+ type: integer
required: true
description: The numeric ID of the user on the platform
diff --git a/swagger/parameters/portal_id.yml b/swagger/parameters/portal_id.yml
index b45f69629..dcd1f8b32 100644
--- a/swagger/parameters/portal_id.yml
+++ b/swagger/parameters/portal_id.yml
@@ -1,5 +1,6 @@
in: path
-name: portal_id
-type: integer
+name: id
+schema:
+ type: string
required: true
-description: The numeric ID of the portal
+description: The slug identifier of the portal
diff --git a/swagger/parameters/public/contact_identifier.yml b/swagger/parameters/public/contact_identifier.yml
index 6bb522c6b..3dd2d28c2 100644
--- a/swagger/parameters/public/contact_identifier.yml
+++ b/swagger/parameters/public/contact_identifier.yml
@@ -1,5 +1,6 @@
in: path
name: contact_identifier
-type: string
+schema:
+ type: string
required: true
description: The source id of contact obtained on contact create
diff --git a/swagger/parameters/public/inbox_identifier.yml b/swagger/parameters/public/inbox_identifier.yml
index 091c0d73e..35e33e6c2 100644
--- a/swagger/parameters/public/inbox_identifier.yml
+++ b/swagger/parameters/public/inbox_identifier.yml
@@ -1,5 +1,6 @@
in: path
name: inbox_identifier
-type: string
+schema:
+ type: string
required: true
description: The identifier obtained from API inbox channel
diff --git a/swagger/parameters/report_metric.yml b/swagger/parameters/report_metric.yml
index 552b0d310..c4bb6cc76 100644
--- a/swagger/parameters/report_metric.yml
+++ b/swagger/parameters/report_metric.yml
@@ -1,12 +1,13 @@
in: query
name: metric
-type: string
-enum:
- - conversations_count
- - incoming_messages_count
- - outgoing_messages_count
- - avg_first_response_time
- - avg_resolution_time
- - resolutions_count
+schema:
+ type: string
+ enum:
+ - conversations_count
+ - incoming_messages_count
+ - outgoing_messages_count
+ - avg_first_response_time
+ - avg_resolution_time
+ - resolutions_count
required: true
description: The type of metric
diff --git a/swagger/parameters/report_type.yml b/swagger/parameters/report_type.yml
index 9f5fbf363..668fd0922 100644
--- a/swagger/parameters/report_type.yml
+++ b/swagger/parameters/report_type.yml
@@ -1,11 +1,12 @@
in: query
name: type
-type: string
-enum:
- - account
- - agent
- - inbox
- - label
- - team
+schema:
+ type: string
+ enum:
+ - account
+ - agent
+ - inbox
+ - label
+ - team
required: true
description: Type of report
diff --git a/swagger/parameters/source_id.yml b/swagger/parameters/source_id.yml
index 408beed86..a2c3bb807 100644
--- a/swagger/parameters/source_id.yml
+++ b/swagger/parameters/source_id.yml
@@ -1,5 +1,6 @@
in: path
name: source_id
required: true
-type: string
+schema:
+ type: string
description: "Id of the session for which the conversation is created.\n\n\n\n Source Ids can be obtained through contactable inboxes API or via generated.
Website: Chatwoot generated string which can be obtained from webhook events.
Phone Channels(Twilio): Phone number in e164 format
Email Channels: Contact Email address
API Channel: Any Random String"
diff --git a/swagger/parameters/team_id.yml b/swagger/parameters/team_id.yml
index c18532b75..9caca20b3 100644
--- a/swagger/parameters/team_id.yml
+++ b/swagger/parameters/team_id.yml
@@ -1,5 +1,6 @@
in: path
name: team_id
-type: integer
+schema:
+ type: integer
required: true
description: The ID of the team to be updated
diff --git a/swagger/parameters/webhook_id.yml b/swagger/parameters/webhook_id.yml
index 4400a082c..524a3e733 100644
--- a/swagger/parameters/webhook_id.yml
+++ b/swagger/parameters/webhook_id.yml
@@ -1,5 +1,6 @@
in: path
name: webhook_id
-type: integer
+schema:
+ type: integer
required: true
description: The numeric ID of the webhook
diff --git a/swagger/paths/application/agent_bots/create.yml b/swagger/paths/application/agent_bots/create.yml
index e0fde6184..bc97acb32 100644
--- a/swagger/paths/application/agent_bots/create.yml
+++ b/swagger/paths/application/agent_bots/create.yml
@@ -3,17 +3,24 @@ tags:
operationId: create-an-account-agent-bot
summary: Create an Agent Bot
description: Create an agent bot in the account
-parameters:
- - $ref: '#/parameters/account_id'
- - name: data
- in: body
- required: true
- schema:
- $ref: '#/definitions/agent_bot_create_update_payload'
+security:
+ - userApiKey: []
+requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/agent_bot_create_update_payload'
responses:
- 200:
+ '200':
description: Success
- schema:
- $ref: '#/definitions/agent_bot'
- 401:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/agent_bot'
+ '401':
description: Unauthorized
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/agent_bots/delete.yml b/swagger/paths/application/agent_bots/delete.yml
index 0e3daf6cb..84dcc6f55 100644
--- a/swagger/paths/application/agent_bots/delete.yml
+++ b/swagger/paths/application/agent_bots/delete.yml
@@ -3,10 +3,20 @@ tags:
operationId: delete-an-account-agent-bot
summary: Delete an AgentBot
description: Delete an AgentBot from the account
+security:
+ - userApiKey: []
responses:
200:
description: Success
401:
description: Unauthorized
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
404:
description: The agent bot does not exist in the account
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/agent_bots/index.yml b/swagger/paths/application/agent_bots/index.yml
index 2c5fe289f..20b0bab82 100644
--- a/swagger/paths/application/agent_bots/index.yml
+++ b/swagger/paths/application/agent_bots/index.yml
@@ -3,14 +3,21 @@ tags:
operationId: list-all-account-agent-bots
summary: List all AgentBots
description: List all agent bots available for the current account
+security:
+ - userApiKey: []
responses:
- 200:
+ '200':
description: Success
- schema:
- type: array
- description: 'Array of agent bots'
- items:
- $ref: '#/definitions/agent_bot'
-
- 401:
+ content:
+ application/json:
+ schema:
+ type: array
+ description: 'Array of agent bots'
+ items:
+ $ref: '#/components/schemas/agent_bot'
+ '401':
description: Unauthorized
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/agent_bots/show.yml b/swagger/paths/application/agent_bots/show.yml
index b94637690..061908c2c 100644
--- a/swagger/paths/application/agent_bots/show.yml
+++ b/swagger/paths/application/agent_bots/show.yml
@@ -3,12 +3,24 @@ tags:
operationId: get-details-of-a-single-account-agent-bot
summary: Get an agent bot details
description: Get the details of an agent bot in the account
+security:
+ - userApiKey: []
responses:
- 200:
+ '200':
description: Success
- schema:
- $ref: '#/definitions/agent_bot'
- 401:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/agent_bot'
+ '401':
description: Unauthorized
- 404:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
+ '404':
description: The given agent bot ID does not exist in the account
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/agent_bots/update.yml b/swagger/paths/application/agent_bots/update.yml
index 562d58841..0f988cb18 100644
--- a/swagger/paths/application/agent_bots/update.yml
+++ b/swagger/paths/application/agent_bots/update.yml
@@ -3,16 +3,24 @@ tags:
operationId: update-an-account-agent-bot
summary: Update an agent bot
description: Update an agent bot's attributes
-parameters:
- - name: data
- in: body
- required: true
- schema:
- $ref: '#/definitions/agent_bot_create_update_payload'
+security:
+ - userApiKey: []
+requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/agent_bot_create_update_payload'
responses:
- 200:
+ '200':
description: Success
- schema:
- $ref: '#/definitions/agent_bot'
- 401:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/agent_bot'
+ '401':
description: Unauthorized
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/agents/create.yml b/swagger/paths/application/agents/create.yml
index dd191d81f..51436381e 100644
--- a/swagger/paths/application/agents/create.yml
+++ b/swagger/paths/application/agents/create.yml
@@ -5,39 +5,23 @@ summary: Add a New Agent
description: Add a new Agent to Account
security:
- userApiKey: []
-parameters:
- - name: data
- in: body
- required: true
- schema:
- type: object
- required:
- - name
- - email
- - role
- properties:
- name:
- type: string
- description: Full Name of the agent
- email:
- type: string
- description: Email of the Agent
- role:
- type: string
- enum: ['agent', 'administrator']
- description: Whether its administrator or agent
- availability_status:
- type: string
- enum: ['available', 'busy', 'offline']
- description: The availability setting of the agent.
- auto_offline:
- type: boolean
- description: Whether the availability status of agent is configured to go offline automatically when away.
+requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/agent_create_payload'
responses:
- 200:
+ '200':
description: Success
- schema:
- description: 'Newly Created Agent'
- $ref: '#/definitions/agent'
- 403:
+ content:
+ application/json:
+ schema:
+ description: 'Newly Created Agent'
+ $ref: '#/components/schemas/agent'
+ '403':
description: Access denied
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/agents/delete.yml b/swagger/paths/application/agents/delete.yml
index 118ddf234..d006659e3 100644
--- a/swagger/paths/application/agents/delete.yml
+++ b/swagger/paths/application/agents/delete.yml
@@ -8,13 +8,22 @@ security:
parameters:
- in: path
name: id
- type: integer
+ schema:
+ type: integer
required: true
- description: The ID of the agent to be deleted
+ description: The ID of the agent to be deleted.
responses:
200:
description: Success
404:
description: Agent not found
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
403:
description: Access denied
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/agents/index.yml b/swagger/paths/application/agents/index.yml
index 7961ad3b0..2073e2ba0 100644
--- a/swagger/paths/application/agents/index.yml
+++ b/swagger/paths/application/agents/index.yml
@@ -8,10 +8,16 @@ security:
responses:
200:
description: Success
- schema:
- type: array
- description: 'Array of all active agents'
- items:
- $ref: '#/definitions/agent'
+ content:
+ application/json:
+ schema:
+ type: array
+ description: 'Array of all active agents'
+ items:
+ $ref: '#/components/schemas/agent'
403:
description: Access denied
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/agents/update.yml b/swagger/paths/application/agents/update.yml
index a72f5ed4e..afb5579f3 100644
--- a/swagger/paths/application/agents/update.yml
+++ b/swagger/paths/application/agents/update.yml
@@ -8,35 +8,33 @@ security:
parameters:
- in: path
name: id
- type: integer
+ schema:
+ type: integer
required: true
description: The ID of the agent to be updated.
- - name: data
- in: body
- required: true
- schema:
- type: object
- required:
- - role
- properties:
- role:
- type: string
- enum: ['agent', 'administrator']
- description: Whether its administrator or agent
- availability:
- type: string
- enum: ['available', 'busy', 'offline']
- description: The availability setting of the agent.
- auto_offline:
- type: boolean
- description: Whether the availability status of agent is configured to go offline automatically when away.
+requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/agent_update_payload'
responses:
200:
description: Success
- schema:
- description: 'The updated agent'
- $ref: '#/definitions/agent'
+ content:
+ application/json:
+ schema:
+ description: 'The updated agent'
+ $ref: '#/components/schemas/agent'
404:
description: Agent not found
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
403:
description: Access denied
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/article/create.yml b/swagger/paths/application/article/create.yml
index 0733fb860..02b13b6c1 100644
--- a/swagger/paths/application/article/create.yml
+++ b/swagger/paths/application/article/create.yml
@@ -5,16 +5,22 @@ summary: Add a new article
description: Add a new article to portal
security:
- userApiKey: []
-parameters:
- - name: data
- in: body
- required: true
- schema:
- $ref: '#/definitions/article_create_update_payload'
+requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/article_create_update_payload'
responses:
'200':
description: Success
- schema:
- $ref: '#/definitions/article'
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/article'
'403':
description: Access denied
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/automation_rule/create.yml b/swagger/paths/application/automation_rule/create.yml
index ac5de803a..a8a309dad 100644
--- a/swagger/paths/application/automation_rule/create.yml
+++ b/swagger/paths/application/automation_rule/create.yml
@@ -5,16 +5,22 @@ summary: Add a new automation rule
description: Add a new automation rule to account
security:
- userApiKey: []
-parameters:
- - name: data
- in: body
- required: true
- schema:
- $ref: '#/definitions/automation_rule_create_update_payload'
+requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/automation_rule_create_update_payload'
responses:
'200':
description: Success
- schema:
- $ref: '#/definitions/automation_rule'
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/automation_rule'
'403':
description: Access denied
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/automation_rule/delete.yml b/swagger/paths/application/automation_rule/delete.yml
index f82647d1d..4d30fb812 100644
--- a/swagger/paths/application/automation_rule/delete.yml
+++ b/swagger/paths/application/automation_rule/delete.yml
@@ -8,7 +8,8 @@ security:
parameters:
- in: path
name: id
- type: integer
+ schema:
+ type: integer
required: true
description: The ID of the automation rule to be deleted
responses:
@@ -16,5 +17,13 @@ responses:
description: Success
'403':
description: Access denied
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
'404':
description: automation rule not found
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/automation_rule/index.yml b/swagger/paths/application/automation_rule/index.yml
index 031696aeb..e1b78fa37 100644
--- a/swagger/paths/application/automation_rule/index.yml
+++ b/swagger/paths/application/automation_rule/index.yml
@@ -3,18 +3,24 @@ tags:
operationId: get-account-automation-rule
summary: List all automation rules in an account
parameters:
- - $ref: '#/parameters/account_id'
- - $ref: '#/parameters/page'
+ - $ref: '#/components/parameters/account_id'
+ - $ref: '#/components/parameters/page'
description: Get details of automation rules in an Account
security:
- userApiKey: []
responses:
'200':
description: Success
- schema:
- type: array
- description: Array of all automation rules
- items:
- $ref: '#/definitions/automation_rule'
+ content:
+ application/json:
+ schema:
+ type: array
+ description: Array of all automation rules
+ items:
+ $ref: '#/components/schemas/automation_rule'
'403':
description: Access denied
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/automation_rule/show.yml b/swagger/paths/application/automation_rule/show.yml
index d99f8170b..cd53ef478 100644
--- a/swagger/paths/application/automation_rule/show.yml
+++ b/swagger/paths/application/automation_rule/show.yml
@@ -3,18 +3,31 @@ tags:
operationId: get-details-of-a-single-automation-rule
summary: Get a automation rule details
description: Get the details of a automation rule in the account
+security:
+ - userApiKey: []
parameters:
- in: path
name: id
- type: integer
+ schema:
+ type: integer
required: true
description: The ID of the automation rule to be updated.
responses:
'200':
description: Success
- schema:
- $ref: '#/definitions/automation_rule'
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/automation_rule'
'401':
description: Unauthorized
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
'404':
description: The given rule ID does not exist in the account
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/automation_rule/update.yml b/swagger/paths/application/automation_rule/update.yml
index 35a4cb67a..414885799 100644
--- a/swagger/paths/application/automation_rule/update.yml
+++ b/swagger/paths/application/automation_rule/update.yml
@@ -8,20 +8,32 @@ security:
parameters:
- in: path
name: id
- type: integer
+ schema:
+ type: integer
required: true
description: The ID of the automation rule to be updated.
- - name: data
- in: body
- required: true
- schema:
- $ref: '#/definitions/automation_rule_create_update_payload'
+requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/automation_rule_create_update_payload'
responses:
'200':
description: Success
- schema:
- $ref: '#/definitions/automation_rule'
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/automation_rule'
'403':
description: Access denied
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
'404':
description: Rule not found
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/canned_responses/create.yml b/swagger/paths/application/canned_responses/create.yml
index 95eacafb1..95d822a87 100644
--- a/swagger/paths/application/canned_responses/create.yml
+++ b/swagger/paths/application/canned_responses/create.yml
@@ -5,17 +5,23 @@ summary: Add a New Canned Response
description: Add a new Canned Response to Account
security:
- userApiKey: []
-parameters:
- - name: data
- in: body
- required: true
- schema:
- $ref: '#/definitions/canned_response_create_update_payload'
+requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/canned_response_create_update_payload'
responses:
- 200:
+ '200':
description: Success
- schema:
- description: 'Newly Created Canned Response'
- $ref: '#/definitions/canned_response'
- 403:
+ content:
+ application/json:
+ schema:
+ description: 'Newly Created Canned Response'
+ $ref: '#/components/schemas/canned_response'
+ '403':
description: Access denied
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/canned_responses/delete.yml b/swagger/paths/application/canned_responses/delete.yml
index 2b1d08238..57ff1850b 100644
--- a/swagger/paths/application/canned_responses/delete.yml
+++ b/swagger/paths/application/canned_responses/delete.yml
@@ -8,13 +8,22 @@ security:
parameters:
- in: path
name: id
- type: integer
+ schema:
+ type: integer
required: true
description: The ID of the canned response to be deleted
responses:
- 200:
+ '200':
description: Success
- 404:
+ '404':
description: Canned Response not found
- 403:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
+ '403':
description: Access denied
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/canned_responses/index.yml b/swagger/paths/application/canned_responses/index.yml
index 3094a23a6..1b8ad694c 100644
--- a/swagger/paths/application/canned_responses/index.yml
+++ b/swagger/paths/application/canned_responses/index.yml
@@ -6,12 +6,18 @@ description: Get Details of Canned Responses in an Account
security:
- userApiKey: []
responses:
- 200:
+ '200':
description: Success
- schema:
- type: array
- description: 'Array of all canned responses'
- items:
- $ref: '#/definitions/canned_response'
- 403:
+ content:
+ application/json:
+ schema:
+ type: array
+ description: 'Array of all canned responses'
+ items:
+ $ref: '#/components/schemas/canned_response'
+ '403':
description: Access denied
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/canned_responses/update.yml b/swagger/paths/application/canned_responses/update.yml
index 7ea801f2f..57315d5be 100644
--- a/swagger/paths/application/canned_responses/update.yml
+++ b/swagger/paths/application/canned_responses/update.yml
@@ -1,5 +1,5 @@
tags:
- - Canned Response
+ - Canned Responses
operationId: update-canned-response-in-account
summary: Update Canned Response in Account
description: Update a Canned Response in Account
@@ -8,21 +8,33 @@ security:
parameters:
- in: path
name: id
- type: integer
+ schema:
+ type: integer
required: true
description: The ID of the canned response to be updated.
- - name: data
- in: body
- required: true
- schema:
- $ref: '#/definitions/canned_response_create_update_payload'
+requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/canned_response_create_update_payload'
responses:
- 200:
+ '200':
description: Success
- schema:
- description: 'The updated canned response'
- $ref: '#/definitions/canned_response'
- 404:
+ content:
+ application/json:
+ schema:
+ description: 'The updated canned response'
+ $ref: '#/components/schemas/canned_response'
+ '404':
description: Agent not found
- 403:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
+ '403':
description: Access denied
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/category/create.yml b/swagger/paths/application/category/create.yml
index 7b569a40b..56c757517 100644
--- a/swagger/paths/application/category/create.yml
+++ b/swagger/paths/application/category/create.yml
@@ -5,16 +5,22 @@ summary: Add a new category
description: Add a new category to portal
security:
- userApiKey: []
-parameters:
- - name: data
- in: body
- required: true
- schema:
- $ref: '#/definitions/category_create_update_payload'
+requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/category_create_update_payload'
responses:
'200':
description: Success
- schema:
- $ref: '#/definitions/category'
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/category'
'403':
description: Access denied
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/contact_inboxes/create.yml b/swagger/paths/application/contact_inboxes/create.yml
index 2b784b5dd..64ebeb21c 100644
--- a/swagger/paths/application/contact_inboxes/create.yml
+++ b/swagger/paths/application/contact_inboxes/create.yml
@@ -5,34 +5,47 @@ post:
description: Create a contact inbox record for an inbox
summary: Create contact inbox
parameters:
- - $ref: '#/parameters/account_id'
+ - $ref: '#/components/parameters/account_id'
- name: id
in: path
- type: number
+ schema:
+ type: number
description: ID of the contact
required: true
- - name: data
- in: body
- required: true
- schema:
- type: object
- required:
- - inbox_id
- properties:
- inbox_id:
- type: number
- description: The ID of the inbox
- source_id:
- type: string
- description: Contact Inbox Source Id
+ security:
+ - userApiKey: []
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ required:
+ - inbox_id
+ properties:
+ inbox_id:
+ type: number
+ description: The ID of the inbox
+ example: 1
+ source_id:
+ type: string
+ description: Contact Inbox Source Id
responses:
- 200:
+ '200':
description: Success
- schema:
- $ref: '#/definitions/contact_inboxes'
- 401:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/contact_inboxes'
+ '401':
description: Authentication error
- schema:
- $ref: '#/definitions/bad_request_error'
- 422:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
+ '422':
description: Incorrect payload
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/contactable_inboxes/get.yml b/swagger/paths/application/contactable_inboxes/get.yml
index 23ce37788..3f56f6939 100644
--- a/swagger/paths/application/contactable_inboxes/get.yml
+++ b/swagger/paths/application/contactable_inboxes/get.yml
@@ -4,21 +4,32 @@ get:
operationId: contactableInboxesGet
description: Get List of contactable Inboxes
summary: Get Contactable Inboxes
+ security:
+ - userApiKey: []
parameters:
- - $ref: '#/parameters/account_id'
+ - $ref: '#/components/parameters/account_id'
- name: id
in: path
- type: number
+ schema:
+ type: number
description: ID of the contact
required: true
responses:
- 200:
+ '200':
description: Success
- schema:
- $ref: '#/definitions/contactable_inboxes'
- 401:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/contactable_inboxes'
+ '401':
description: Authentication error
- schema:
- $ref: '#/definitions/bad_request_error'
- 422:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
+ '422':
description: Incorrect payload
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/contacts/conversations.yml b/swagger/paths/application/contacts/conversations.yml
index d08235f5e..e6c586298 100644
--- a/swagger/paths/application/contacts/conversations.yml
+++ b/swagger/paths/application/contacts/conversations.yml
@@ -1,22 +1,43 @@
+parameters:
+ - $ref: '#/components/parameters/account_id'
+ - name: id
+ in: path
+ required: true
+ schema:
+ type: number
+ description: ID of the contact
+
get:
tags:
- Contacts
operationId: contactConversations
summary: Contact Conversations
- description: Get conversations associated to that contact
+ description: Get conversations associated with that contact
parameters:
- - $ref: '#/parameters/account_id'
- name: id
in: path
- type: number
- description: ID of the contact
required: true
- responses:
- 200:
- description: Success
schema:
- $ref: '#/definitions/contact_conversations'
- 404:
+ type: number
+ description: ID of the contact
+ security:
+ - userApiKey: []
+ responses:
+ '200':
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/contact_conversations'
+ '404':
description: Contact not found
- 403:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
+ '403':
description: Access denied
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/contacts/crud.yml b/swagger/paths/application/contacts/crud.yml
index 3c982dfe9..9f76e4ba4 100644
--- a/swagger/paths/application/contacts/crud.yml
+++ b/swagger/paths/application/contacts/crud.yml
@@ -1,58 +1,94 @@
parameters:
- - $ref: '#/parameters/account_id'
+ - $ref: '#/components/parameters/account_id'
- name: id
in: path
- type: number
- description: ID of the contact
required: true
+ schema:
+ type: number
+ description: ID of the contact
get:
tags:
- Contacts
operationId: contactDetails
summary: Show Contact
+ security:
+ - userApiKey: []
description: Get a contact belonging to the account using ID
responses:
- 200:
+ '200':
description: Success
- schema:
- $ref: '#/definitions/extended_contact'
- 404:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/extended_contact'
+ '404':
description: Contact not found
- 403:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
+ '403':
description: Access denied
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
put:
tags:
- Contacts
operationId: contactUpdate
summary: Update Contact
+ security:
+ - userApiKey: []
description: Update a contact belonging to the account using ID
- parameters:
- - name: data
- in: body
- required: true
- schema:
- $ref: '#/definitions/contact_update'
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/contact_update_payload'
responses:
- 204:
+ '204':
description: Success
- schema:
- $ref: '#/definitions/contact_base'
- 404:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/contact_base'
+ '404':
description: Contact not found
- 403:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
+ '403':
description: Access denied
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
delete:
tags:
- Contacts
operationId: contactDelete
summary: Delete Contact
+ security:
+ - userApiKey: []
+ description: Delete a contact belonging to the account using ID
responses:
- 200:
+ '200':
description: Success
- 401:
+ '401':
description: Unauthorized
- 404:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
+ '404':
description: Contact not found
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/contacts/filter.yml b/swagger/paths/application/contacts/filter.yml
index 2a1d53cf7..58b297d81 100644
--- a/swagger/paths/application/contacts/filter.yml
+++ b/swagger/paths/application/contacts/filter.yml
@@ -1,58 +1,64 @@
-tags:
- - Contacts
-operationId: contactFilter
-description: Filter contacts with custom filter options and pagination
-summary: Contact Filter
-security:
- - userApiKey: []
- - agentBotApiKey: []
-parameters:
- - name: page
- in: query
- type: integer
- - name: body
- in: body
+post:
+ tags:
+ - Contacts
+ operationId: contactFilter
+ description: Filter contacts with custom filter options and pagination
+ summary: Contact Filter
+ security:
+ - userApiKey: []
+ parameters:
+ - $ref: '#/components/parameters/account_id'
+ - name: page
+ in: query
+ schema:
+ type: number
+ requestBody:
required: true
- schema:
- type: object
- properties:
- payload:
- type: array
- items:
- type: object
- properties:
- attribute_key:
- type: string
- description: filter attribute name
- filter_operator:
- type: string
- description: filter operator name
- enum: [ equal_to, not_equal_to, contains, does_not_contain ]
- values:
- type: array
- items:
- type: string
- description: array of the attribute values to filter
- query_operator:
- type: string
- description: query operator name
- enum: [ AND, OR ]
- example:
- - attribute_key: 'name'
- filter_operator: 'equal_to'
- values: ['en']
- query_operator: 'AND'
- - attribute_key: 'country_code'
- filter_operator: 'equal_to'
- values: ['us']
- query_operator: null
-
-responses:
- 200:
- description: Success
- schema:
- $ref: '#/definitions/contact_list'
- 400:
- description: Bad Request Error
- schema:
- $ref: '#/definitions/bad_request_error'
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ payload:
+ type: array
+ items:
+ type: object
+ properties:
+ attribute_key:
+ type: string
+ description: filter attribute name
+ filter_operator:
+ type: string
+ description: filter operator name
+ enum: [equal_to, not_equal_to, contains, does_not_contain]
+ values:
+ type: array
+ items:
+ type: string
+ description: array of the attribute values to filter
+ query_operator:
+ type: string
+ description: query operator name
+ enum: [AND, OR]
+ example:
+ - attribute_key: 'name'
+ filter_operator: 'equal_to'
+ values: ['en']
+ query_operator: 'AND'
+ - attribute_key: 'country_code'
+ filter_operator: 'equal_to'
+ values: ['us']
+ query_operator: null
+ responses:
+ '200':
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/contact_list'
+ '400':
+ description: Bad Request Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/contacts/labels.yml b/swagger/paths/application/contacts/labels.yml
new file mode 100644
index 000000000..61be4a545
--- /dev/null
+++ b/swagger/paths/application/contacts/labels.yml
@@ -0,0 +1,79 @@
+parameters:
+ - $ref: '#/components/parameters/account_id'
+ - name: id
+ in: path
+ required: true
+ schema:
+ type: number
+ description: ID of the contact
+
+get:
+ tags:
+ - Contacts
+ operationId: list-all-labels-of-a-contact
+ summary: List Labels
+ description: Lists all the labels of a contact
+ security:
+ - userApiKey: []
+ responses:
+ '200':
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/contact_labels'
+ '401':
+ description: Unauthorized
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
+ '404':
+ description: Contact not found
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
+
+post:
+ tags:
+ - Contacts
+ operationId: contact-add-labels
+ summary: Add Labels
+ description: Add labels to a contact. Note that this API would overwrite the existing list of labels associated to the conversation.
+ security:
+ - userApiKey: []
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ required:
+ - labels
+ properties:
+ labels:
+ type: array
+ description: Array of labels (comma-separated strings)
+ items:
+ type: string
+ example: ['support', 'billing']
+ responses:
+ '200':
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/contact_labels'
+ '401':
+ description: Unauthorized
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
+ '404':
+ description: Contact not found
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/contacts/labels/create.yml b/swagger/paths/application/contacts/labels/create.yml
deleted file mode 100644
index 01821d688..000000000
--- a/swagger/paths/application/contacts/labels/create.yml
+++ /dev/null
@@ -1,26 +0,0 @@
-tags:
- - Contact Labels
-operationId: contact-add-labels
-summary: Add Labels
-description: Add labels to a contact. Note that this API would overwrite the existing list of labels associated to the conversation.
-parameters:
- - name: data
- in: body
- required: true
- schema:
- type: object
- properties:
- labels:
- type: array
- description: Array of labels (comma-separated strings)
- items:
- type: string
-responses:
- 200:
- description: Success
- schema:
- $ref: '#/definitions/contact_labels'
- 404:
- description: Contact not found
- 401:
- description: Unauthorized
diff --git a/swagger/paths/application/contacts/labels/index.yml b/swagger/paths/application/contacts/labels/index.yml
deleted file mode 100644
index ad3c7ff81..000000000
--- a/swagger/paths/application/contacts/labels/index.yml
+++ /dev/null
@@ -1,14 +0,0 @@
-tags:
- - Contact Labels
-operationId: list-all-labels-of-a-contact
-summary: List Labels
-description: Lists all the labels of a contact
-responses:
- 200:
- description: Success
- schema:
- $ref: '#/definitions/contact_labels'
- 404:
- description: Contact not found
- 401:
- description: Unauthorized
diff --git a/swagger/paths/application/contacts/list_create.yml b/swagger/paths/application/contacts/list_create.yml
index 4329ed3b7..505fd8200 100644
--- a/swagger/paths/application/contacts/list_create.yml
+++ b/swagger/paths/application/contacts/list_create.yml
@@ -2,21 +2,27 @@ get:
tags:
- Contacts
operationId: contactList
- description: Listing all the resolved contacts with pagination (Page size = 15) . Resolved contacts are the ones with a value for identifier, email or phone number
+ description: Listing all the resolved contacts with pagination (Page size = 15). Resolved contacts are the ones with a value for identifier, email or phone number
summary: List Contacts
+ security:
+ - userApiKey: []
parameters:
- - $ref: '#/parameters/account_id'
- - $ref: '#/parameters/contact_sort_param'
- - $ref: '#/parameters/page'
+ - $ref: '#/components/parameters/account_id'
+ - $ref: '#/components/parameters/contact_sort_param'
+ - $ref: '#/components/parameters/page'
responses:
- 200:
+ '200':
description: Success
- schema:
- $ref: '#/definitions/contact_list'
- 400:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/contact_list'
+ '400':
description: Bad Request Error
- schema:
- $ref: '#/definitions/bad_request_error'
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
post:
tags:
@@ -24,19 +30,26 @@ post:
operationId: contactCreate
description: Create a new Contact
summary: Create Contact
+ security:
+ - userApiKey: []
parameters:
- - $ref: '#/parameters/account_id'
- - name: data
- in: body
- required: true
- schema:
- $ref: '#/definitions/contact_create'
+ - $ref: '#/components/parameters/account_id'
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/contact_create_payload'
responses:
- 200:
+ '200':
description: Success
- schema:
- $ref: '#/definitions/extended_contact'
- 400:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/extended_contact'
+ '400':
description: Bad Request Error
- schema:
- $ref: '#/definitions/bad_request_error'
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/contacts/search.yml b/swagger/paths/application/contacts/search.yml
index 63cc11903..c44406e6c 100644
--- a/swagger/paths/application/contacts/search.yml
+++ b/swagger/paths/application/contacts/search.yml
@@ -4,23 +4,30 @@ get:
operationId: contactSearch
description: Search the resolved contacts using a search key, currently supports email search (Page size = 15). Resolved contacts are the ones with a value for identifier, email or phone number
summary: Search Contacts
+ security:
+ - userApiKey: []
parameters:
- - $ref: '#/parameters/account_id'
+ - $ref: '#/components/parameters/account_id'
- name: q
in: query
- type: string
+ schema:
+ type: string
description: Search using contact `name`, `identifier`, `email` or `phone number`
- - $ref: '#/parameters/contact_sort_param'
- - $ref: '#/parameters/page'
+ - $ref: '#/components/parameters/contact_sort_param'
+ - $ref: '#/components/parameters/page'
responses:
- 200:
+ '200':
description: Success
- schema:
- type: object
- properties:
- payload:
- $ref: '#/definitions/contact_list'
- 401:
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ payload:
+ $ref: '#/components/schemas/contact_list'
+ '401':
description: Authentication error
- schema:
- $ref: '#/definitions/bad_request_error'
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/conversation/assignments.yml b/swagger/paths/application/conversation/assignments.yml
index a67ce59ad..50fdacbf0 100644
--- a/swagger/paths/application/conversation/assignments.yml
+++ b/swagger/paths/application/conversation/assignments.yml
@@ -1,30 +1,42 @@
tags:
- - Conversation Assignment
+ - Conversations
operationId: assign-a-conversation
summary: Assign Conversation
description: Assign a conversation to an agent or a team
security:
- userApiKey: []
- agentBotApiKey: []
-parameters:
- - name: data
- in: body
- required: true
- schema:
- type: object
- properties:
- assignee_id:
- type: number
- description: Id of the assignee user
- team_id:
- type: number
- description: Id of the team. If the assignee_id is present, this param would be ignored
+requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ 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:
+ '200':
description: Success
- schema:
- $ref: '#/definitions/user'
- 404:
- description: Conversation not found
- 401:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/user'
+ '401':
description: Unauthorized
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
+ '404':
+ description: Conversation not found
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/conversation/custom_attributes.yml b/swagger/paths/application/conversation/custom_attributes.yml
index bfd416138..6e5786742 100644
--- a/swagger/paths/application/conversation/custom_attributes.yml
+++ b/swagger/paths/application/conversation/custom_attributes.yml
@@ -5,32 +5,41 @@ summary: Update Custom Attributes
description: Updates the custom attributes of a conversation
security:
- userApiKey: []
- - agentBotApiKey: []
-parameters:
- - name: data
- in: body
- required: true
- schema:
- type: object
- required:
- - custom_attributes
- properties:
- custom_attributes:
- type: object
- description: The custom attributes to be set for the conversation
- example:
- order_id: "12345"
- previous_conversation: "67890"
+requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ required:
+ - custom_attributes
+ properties:
+ custom_attributes:
+ type: object
+ description: The custom attributes to be set for the conversation
+ example:
+ order_id: '12345'
+ previous_conversation: '67890'
responses:
- 200:
+ '200':
description: Success
- schema:
- type: object
- properties:
- custom_attributes:
+ content:
+ application/json:
+ schema:
type: object
- description: The custom attributes of the conversation
- 404:
+ properties:
+ custom_attributes:
+ type: object
+ description: The custom attributes of the conversation
+ '401':
+ description: Unauthorized
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
+ '404':
description: Conversation not found
- 401:
- description: Unauthorized
\ No newline at end of file
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/conversation/filter.yml b/swagger/paths/application/conversation/filter.yml
index 4ee5f5d54..fdb318f6a 100644
--- a/swagger/paths/application/conversation/filter.yml
+++ b/swagger/paths/application/conversation/filter.yml
@@ -5,54 +5,59 @@ description: Filter conversations with custom filter options and pagination
summary: Conversations Filter
security:
- userApiKey: []
- - agentBotApiKey: []
parameters:
- name: page
in: query
- type: integer
- - name: body
- in: body
- required: true
schema:
- type: object
- properties:
- payload:
- type: array
- items:
- type: object
- properties:
- attribute_key:
- type: string
- description: filter attribute name
- filter_operator:
- type: string
- description: filter operator name
- enum: [ equal_to, not_equal_to, contains, does_not_contain ]
- values:
- type: array
- items:
+ type: number
+requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ payload:
+ type: array
+ items:
+ type: object
+ properties:
+ attribute_key:
type: string
- description: array of the attribute values to filter
- query_operator:
- type: string
- description: query operator name
- enum: [ AND, OR ]
- example:
- - attribute_key: 'browser_language'
- filter_operator: 'not_eq'
- values: ['en']
- query_operator: 'AND'
- - attribute_key: 'status'
- filter_operator: 'eq'
- values: ['pending']
- query_operator: null
+ description: filter attribute name
+ filter_operator:
+ type: string
+ description: filter operator name
+ enum: [equal_to, not_equal_to, contains, does_not_contain]
+ values:
+ type: array
+ items:
+ type: string
+ description: array of the attribute values to filter
+ query_operator:
+ type: string
+ description: query operator name
+ enum: [AND, OR]
+ example:
+ - attribute_key: 'browser_language'
+ filter_operator: 'not_equal_to'
+ values: ['en']
+ query_operator: 'AND'
+ - attribute_key: 'status'
+ filter_operator: 'equal_to'
+ values: ['pending']
+ query_operator: null
responses:
- 200:
+ '200':
description: Success
- schema:
- $ref: '#/definitions/conversation_list'
- 400:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/conversation_list'
+ '400':
description: Bad Request Error
- schema:
- $ref: '#/definitions/bad_request_error'
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/conversation/index.yml b/swagger/paths/application/conversation/index.yml
index 6980eb2bd..e58659530 100644
--- a/swagger/paths/application/conversation/index.yml
+++ b/swagger/paths/application/conversation/index.yml
@@ -1,5 +1,5 @@
parameters:
- - $ref: '#/parameters/account_id'
+ - $ref: '#/components/parameters/account_id'
get:
tags:
@@ -7,138 +7,98 @@ get:
operationId: conversationList
description: List all the conversations with pagination
summary: Conversations List
+ security:
+ - userApiKey: []
parameters:
- name: assignee_type
in: query
- type: string
- enum: ['me', 'unassigned', 'all', 'assigned']
- default: 'all'
+ schema:
+ type: string
+ enum: ['me', 'unassigned', 'all', 'assigned']
+ default: 'all'
description: Filter conversations by assignee type.
- name: status
in: query
- type: string
- enum: ['all', 'open', 'resolved', 'pending', 'snoozed']
- default: 'open'
+ schema:
+ type: string
+ enum: ['all', 'open', 'resolved', 'pending', 'snoozed']
+ default: 'open'
description: Filter by conversation status.
- name: q
in: query
- type: string
+ schema:
+ type: string
description: Filters conversations with messages containing the search term
- name: inbox_id
in: query
- type: integer
+ schema:
+ type: integer
- name: team_id
in: query
- type: integer
+ schema:
+ type: integer
- name: labels
in: query
- type: array
- items:
- type: string
+ schema:
+ type: array
+ items:
+ type: string
- name: page
in: query
- type: integer
- default: 1
+ schema:
+ type: integer
+ default: 1
description: paginate through conversations
responses:
- 200:
+ '200':
description: Success
- schema:
- $ref: '#/definitions/conversation_list'
- 400:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/conversation_list'
+ '400':
description: Bad Request Error
- schema:
- $ref: '#/definitions/bad_request_error'
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
post:
tags:
- 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: []
- parameters:
- - name: data
- in: body
- required: true
- 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"
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/conversation_create_payload'
responses:
- 200:
+ '200':
description: Success
- schema:
- type: object
- properties:
- id:
- type: number
- description: ID of the conversation
- account_id:
- type: number
- description: Account Id
- inbox_id:
- type: number
- description: ID of the inbox
- 403:
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ id:
+ type: number
+ description: ID of the conversation
+ account_id:
+ type: number
+ description: Account Id
+ inbox_id:
+ type: number
+ description: ID of the inbox
+ '403':
description: Access denied
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/conversation/labels/create.yml b/swagger/paths/application/conversation/labels/create.yml
index 0f686ee24..6df685ccd 100644
--- a/swagger/paths/application/conversation/labels/create.yml
+++ b/swagger/paths/application/conversation/labels/create.yml
@@ -1,26 +1,41 @@
tags:
- - Conversation Labels
+ - Conversations
operationId: conversation-add-labels
summary: Add Labels
+security:
+ - userApiKey: []
description: Add labels to a conversation. Note that this API would overwrite the existing list of labels associated to the conversation.
-parameters:
- - name: data
- in: body
- required: true
- schema:
- type: object
- properties:
- labels:
- type: array
- description: Array of labels (comma-separated strings)
- items:
- type: string
+requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ required:
+ - labels
+ properties:
+ labels:
+ type: array
+ description: Array of labels (comma-separated strings)
+ items:
+ type: string
+ example: ['support', 'billing']
responses:
- 200:
+ '200':
description: Success
- schema:
- $ref: '#/definitions/conversation_labels'
- 404:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/conversation_labels'
+ '404':
description: Conversation not found
- 401:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
+ '401':
description: Unauthorized
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/conversation/labels/index.yml b/swagger/paths/application/conversation/labels/index.yml
index 107fc0132..5c8b3e597 100644
--- a/swagger/paths/application/conversation/labels/index.yml
+++ b/swagger/paths/application/conversation/labels/index.yml
@@ -1,14 +1,26 @@
tags:
- - Conversation Labels
+ - Conversations
operationId: list-all-labels-of-a-conversation
summary: List Labels
+security:
+ - userApiKey: []
description: Lists all the labels of a conversation
responses:
- 200:
+ '200':
description: Success
- schema:
- $ref: '#/definitions/conversation_labels'
- 404:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/conversation_labels'
+ '404':
description: Conversation not found
- 401:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
+ '401':
description: Unauthorized
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/conversation/messages/create.yml b/swagger/paths/application/conversation/messages/create.yml
index 4ab9e27a0..f8cd35f3c 100644
--- a/swagger/paths/application/conversation/messages/create.yml
+++ b/swagger/paths/application/conversation/messages/create.yml
@@ -6,20 +6,30 @@ description: Create a new message in the conversation
security:
- userApiKey: []
- agentBotApiKey: []
-parameters:
- - name: data
- in: body
- required: true
- schema:
- $ref: '#/definitions/conversation_message_create'
+requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/conversation_message_create_payload'
responses:
- 200:
+ '200':
description: Success
- schema:
- allOf:
- - $ref: '#/definitions/generic_id'
- - $ref: '#/definitions/message'
- 404:
+ content:
+ application/json:
+ schema:
+ allOf:
+ - $ref: '#/components/schemas/generic_id'
+ - $ref: '#/components/schemas/message'
+ '404':
description: Conversation not found
- 403:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
+ '403':
description: Access denied
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/conversation/messages/create_attachment.yml b/swagger/paths/application/conversation/messages/create_attachment.yml
index 594f9a819..63acd0aa5 100644
--- a/swagger/paths/application/conversation/messages/create_attachment.yml
+++ b/swagger/paths/application/conversation/messages/create_attachment.yml
@@ -3,46 +3,55 @@ post:
- Messages
operationId: conversationNewMessageAttachment
summary: Create New Message Attachment
- description: Create an attachment message. Refer to this discussion if you have any further doubts. https://github.com/chatwoot/chatwoot/discussions/1809#discussioncomment-1211845
- consumes:
- - multipart/form-data
+ description: Create an attachment message.
security:
- userApiKey: []
- - agentBotApiKey: []
parameters:
- - $ref: '#/parameters/account_id'
- - $ref: '#/parameters/conversation_id'
- required: true
- - in: formData
- name: content
- type: string
- description: The content of the message
- required: true
- - in: formData
- name: message_type
- type: string
- enum: ['outgoing', 'incoming']
- - in: formData
- name: private
- type: boolean
- description: Flag to identify if it is a private note
- - in: formData
- name: attachments[]
- type: array
- description: The files to be uploaded.
- items:
- type: string
- format: binary
-
+ - $ref: '#/components/parameters/account_id'
+ - $ref: '#/components/parameters/conversation_id'
+ requestBody:
+ required: true
+ content:
+ multipart/form-data:
+ schema:
+ type: object
+ required:
+ - content
+ properties:
+ content:
+ type: string
+ description: The content of the message
+ message_type:
+ type: string
+ enum: ['outgoing', 'incoming']
+ private:
+ type: boolean
+ description: Flag to identify if it is a private note
+ attachments:
+ type: array
+ description: The files to be uploaded.
+ items:
+ type: string
+ format: binary
responses:
- 200:
+ '200':
description: Success
- schema:
- allOf:
- - $ref: '#/definitions/generic_id'
- - $ref: '#/definitions/message'
- 404:
+ content:
+ application/json:
+ schema:
+ allOf:
+ - $ref: '#/components/schemas/generic_id'
+ - $ref: '#/components/schemas/message'
+ '404':
description: Conversation not found
- 403:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
+ '403':
description: Access denied
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/conversation/messages/delete.yml b/swagger/paths/application/conversation/messages/delete.yml
index f038074c7..73b1e495b 100644
--- a/swagger/paths/application/conversation/messages/delete.yml
+++ b/swagger/paths/application/conversation/messages/delete.yml
@@ -2,11 +2,21 @@ tags:
- Messages
operationId: delete-a-message
summary: Delete a message
+security:
+ - userApiKey: []
description: Delete a message and it's attachments from the conversation.
responses:
- 200:
+ '200':
description: Success
- 401:
+ '401':
description: Unauthorized
- 404:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
+ '404':
description: The message or conversation does not exist in the account
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/conversation/messages/index.yml b/swagger/paths/application/conversation/messages/index.yml
index d99e8393b..fc6882b33 100644
--- a/swagger/paths/application/conversation/messages/index.yml
+++ b/swagger/paths/application/conversation/messages/index.yml
@@ -2,18 +2,30 @@ tags:
- Messages
operationId: list-all-messages
summary: Get messages
+security:
+ - userApiKey: []
description: List all messages of a conversation
responses:
- 200:
+ '200':
description: Success
- schema:
- type: array
- description: Array of messages
- items:
- allOf:
- - $ref: '#/definitions/generic_id'
- - $ref: '#/definitions/message'
- 404:
+ content:
+ application/json:
+ schema:
+ type: array
+ description: Array of messages
+ items:
+ allOf:
+ - $ref: '#/components/schemas/generic_id'
+ - $ref: '#/components/schemas/message'
+ '404':
description: Conversation not found
- 401:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
+ '401':
description: Unauthorized
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/conversation/meta.yml b/swagger/paths/application/conversation/meta.yml
index 327fb702e..811ebbf5e 100644
--- a/swagger/paths/application/conversation/meta.yml
+++ b/swagger/paths/application/conversation/meta.yml
@@ -1,5 +1,5 @@
parameters:
- - $ref: '#/parameters/account_id'
+ - $ref: '#/components/parameters/account_id'
get:
tags:
@@ -7,47 +7,58 @@ get:
operationId: conversationListMeta
description: Get open, unassigned and all Conversation counts
summary: Get Conversation Counts
+ security:
+ - userApiKey: []
parameters:
- name: status
in: query
- type: string
- enum: ['all', 'open', 'resolved', 'pending', 'snoozed']
- default: 'open'
+ schema:
+ type: string
+ enum: ['all', 'open', 'resolved', 'pending', 'snoozed']
+ default: 'open'
description: Filter by conversation status.
- name: q
in: query
- type: string
+ schema:
+ type: string
description: Filters conversations with messages containing the search term
- name: inbox_id
in: query
- type: integer
+ schema:
+ type: integer
- name: team_id
in: query
- type: integer
+ schema:
+ type: integer
- name: labels
in: query
- type: array
- items:
- type: string
+ schema:
+ type: array
+ items:
+ type: string
responses:
- 200:
+ '200':
description: Success
- schema:
- type: object
- properties:
- meta:
+ content:
+ application/json:
+ schema:
type: object
properties:
- mine_count:
- type: number
- unassigned_count:
- type: number
- assigned_count:
- type: number
- all_count:
- type: number
- 400:
+ meta:
+ type: object
+ properties:
+ mine_count:
+ type: number
+ unassigned_count:
+ type: number
+ assigned_count:
+ type: number
+ all_count:
+ type: number
+ '400':
description: Bad Request Error
- schema:
- $ref: '#/definitions/bad_request_error'
\ No newline at end of file
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/conversation/show.yml b/swagger/paths/application/conversation/show.yml
index 56c3a292b..a57c36051 100644
--- a/swagger/paths/application/conversation/show.yml
+++ b/swagger/paths/application/conversation/show.yml
@@ -2,13 +2,25 @@ tags:
- Conversations
operationId: get-details-of-a-conversation
summary: Conversation Details
+security:
+ - userApiKey: []
description: Get all details regarding a conversation with all messages in the conversation
responses:
- 200:
+ '200':
description: Success
- schema:
- $ref: '#/definitions/conversation_show'
- 404:
- description: Conversation not found
- 403:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/conversation_show'
+ '403':
description: Access denied
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
+ '404':
+ description: Conversation not found
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/conversation/toggle_priority.yml b/swagger/paths/application/conversation/toggle_priority.yml
index 22a80c891..7ae3c252f 100644
--- a/swagger/paths/application/conversation/toggle_priority.yml
+++ b/swagger/paths/application/conversation/toggle_priority.yml
@@ -6,23 +6,32 @@ description: Toggles the priority of conversation
security:
- userApiKey: []
- agentBotApiKey: []
-parameters:
- - name: data
- in: body
- required: true
- schema:
- type: object
- required:
- - priority
- properties:
- priority:
- type: string
- enum: ["urgent", "high", "medium", "low", "none"]
- description: "The priority of the conversation"
+requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ required:
+ - priority
+ properties:
+ priority:
+ type: string
+ enum: ['urgent', 'high', 'medium', 'low', 'none']
+ description: 'The priority of the conversation'
+ example: 'high'
responses:
- 200:
+ '200':
description: Success
- 404:
- description: Conversation not found
- 401:
+ '401':
description: Unauthorized
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
+ '404':
+ description: Conversation not found
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/conversation/toggle_status.yml b/swagger/paths/application/conversation/toggle_status.yml
index 20b18d6aa..9c6f9ee6a 100644
--- a/swagger/paths/application/conversation/toggle_status.yml
+++ b/swagger/paths/application/conversation/toggle_status.yml
@@ -6,25 +6,36 @@ description: Toggles the status of the conversation between open and resolved
security:
- userApiKey: []
- agentBotApiKey: []
-parameters:
- - name: data
- in: body
- required: true
- schema:
- type: object
- required:
- - status
- properties:
- status:
- type: string
- enum: ["open", "resolved", "pending"]
- description: The status of the conversation
+requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ required:
+ - status
+ properties:
+ status:
+ type: string
+ enum: ['open', 'resolved', 'pending']
+ description: The status of the conversation
+ example: open
responses:
- 200:
+ '200':
description: Success
- schema:
- $ref: '#/definitions/conversation_status_toggle'
- 404:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/conversation_status_toggle'
+ '404':
description: Conversation not found
- 401:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
+ '401':
description: Unauthorized
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/conversation/update.yml b/swagger/paths/application/conversation/update.yml
index 3add02635..fbe8e668b 100644
--- a/swagger/paths/application/conversation/update.yml
+++ b/swagger/paths/application/conversation/update.yml
@@ -6,24 +6,34 @@ description: Update Conversation Attributes
security:
- userApiKey: []
- agentBotApiKey: []
-parameters:
- - name: data
- in: body
- required: true
- schema:
- type: object
- properties:
- priority:
- type: string
- enum: ["urgent", "high", "medium", "low", "none"]
- description: "The priority of the conversation"
- sla_policy_id:
- type: number
- description: "The ID of the SLA policy (Available only in Enterprise edition)"
+requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ priority:
+ 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:
+ '200':
description: Success
- 404:
- description: Conversation not found
- 401:
+ '401':
description: Unauthorized
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
+ '404':
+ description: Conversation not found
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/conversation/update_last_seen.yml b/swagger/paths/application/conversation/update_last_seen.yml
index 0f542dd7f..a81f6f219 100644
--- a/swagger/paths/application/conversation/update_last_seen.yml
+++ b/swagger/paths/application/conversation/update_last_seen.yml
@@ -3,6 +3,8 @@ post:
- Conversations
operationId: conversationUpdateLastSeen
summary: Update Last Seen
+ security:
+ - userApiKey: []
description: Updates the last seen of the conversation so that conversations will have the bubbles in the agents screen
parameters:
- name: id
@@ -11,9 +13,17 @@ post:
description: ID of the conversation
required: true
responses:
- 200:
+ '200':
description: Success
- 404:
- description: Contact not found
- 403:
+ '403':
description: Access denied
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
+ '404':
+ description: Contact not found
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/custom_attributes/create.yml b/swagger/paths/application/custom_attributes/create.yml
index fa01fc8e4..615dd6c74 100644
--- a/swagger/paths/application/custom_attributes/create.yml
+++ b/swagger/paths/application/custom_attributes/create.yml
@@ -5,16 +5,22 @@ summary: Add a new custom attribute
description: Add a new custom attribute to account
security:
- userApiKey: []
-parameters:
- - name: data
- in: body
- required: true
- schema:
- $ref: '#/definitions/custom_attribute_create_update_payload'
+requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/custom_attribute_create_update_payload'
responses:
- 200:
+ '200':
description: Success
- schema:
- $ref: '#/definitions/custom_attribute'
- 403:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/custom_attribute'
+ '403':
description: Access denied
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/custom_attributes/delete.yml b/swagger/paths/application/custom_attributes/delete.yml
index 0c9aaedee..313425a71 100644
--- a/swagger/paths/application/custom_attributes/delete.yml
+++ b/swagger/paths/application/custom_attributes/delete.yml
@@ -6,16 +6,25 @@ description: Remove a custom attribute from account
security:
- userApiKey: []
parameters:
- - $ref: '#/parameters/account_id'
+ - $ref: '#/components/parameters/account_id'
- in: path
name: id
- type: integer
+ schema:
+ type: integer
required: true
description: The ID of the custom attribute to be deleted
responses:
- 200:
+ '200':
description: Success
- 404:
+ '404':
description: Custom attribute not found
- 403:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
+ '403':
description: Access denied
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/custom_attributes/index.yml b/swagger/paths/application/custom_attributes/index.yml
index a3a91144b..2d61a0925 100644
--- a/swagger/paths/application/custom_attributes/index.yml
+++ b/swagger/paths/application/custom_attributes/index.yml
@@ -3,22 +3,29 @@ tags:
operationId: get-account-custom-attribute
summary: List all custom attributes in an account
parameters:
- - name: attribute_model
- in: query
+ - name: attribute_model
+ in: query
+ schema:
type: string
enum: ['0', '1']
- description: conversation_attribute(0)/contact_attribute(1)
- required: true
+ description: conversation_attribute(0)/contact_attribute(1)
+ required: true
description: Get details of custom attributes in an Account
security:
- userApiKey: []
responses:
- 200:
+ '200':
description: Success
- schema:
- type: array
- description: 'Array of all custom attributes'
- items:
- $ref: '#/definitions/custom_attribute'
- 403:
+ content:
+ application/json:
+ schema:
+ type: array
+ description: 'Array of all custom attributes'
+ items:
+ $ref: '#/components/schemas/custom_attribute'
+ '403':
description: Access denied
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/custom_attributes/show.yml b/swagger/paths/application/custom_attributes/show.yml
index 8449ba9be..9910f7f85 100644
--- a/swagger/paths/application/custom_attributes/show.yml
+++ b/swagger/paths/application/custom_attributes/show.yml
@@ -2,20 +2,33 @@ tags:
- Custom Attributes
operationId: get-details-of-a-single-custom-attribute
summary: Get a custom attribute details
+security:
+ - userApiKey: []
description: Get the details of a custom attribute in the account
parameters:
- - $ref: '#/parameters/account_id'
+ - $ref: '#/components/parameters/account_id'
- in: path
name: id
- type: integer
+ schema:
+ type: integer
required: true
description: The ID of the custom attribute to be updated.
responses:
- 200:
+ '200':
description: Success
- schema:
- $ref: '#/definitions/custom_attribute'
- 401:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/custom_attribute'
+ '401':
description: Unauthorized
- 404:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
+ '404':
description: The given attribute ID does not exist in the account
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/custom_attributes/update.yml b/swagger/paths/application/custom_attributes/update.yml
index 4b69f21bd..d3ccc6af1 100644
--- a/swagger/paths/application/custom_attributes/update.yml
+++ b/swagger/paths/application/custom_attributes/update.yml
@@ -8,21 +8,33 @@ security:
parameters:
- in: path
name: id
- type: integer
+ schema:
+ type: integer
required: true
description: The ID of the custom attribute to be updated.
- - name: data
- in: body
- required: true
- schema:
- $ref: '#/definitions/custom_attribute_create_update_payload'
+requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/custom_attribute_create_update_payload'
responses:
- 200:
+ '200':
description: Success
- schema:
- description: 'The updated custom attribute'
- $ref: '#/definitions/custom_attribute'
- 404:
+ content:
+ application/json:
+ schema:
+ description: 'The updated custom attribute'
+ $ref: '#/components/schemas/custom_attribute'
+ '404':
description: Agent not found
- 403:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
+ '403':
description: Access denied
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/custom_filters/create.yml b/swagger/paths/application/custom_filters/create.yml
index 9d9534976..5b7a6ca80 100644
--- a/swagger/paths/application/custom_filters/create.yml
+++ b/swagger/paths/application/custom_filters/create.yml
@@ -4,16 +4,25 @@ operationId: create-a-custom-filter
summary: Create a custom filter
description: Create a custom filter in the account
parameters:
- - $ref: '#/parameters/account_id'
- - name: data
- in: body
- required: true
- schema:
- $ref: '#/definitions/custom_filter_create_update_payload'
+ - $ref: '#/components/parameters/account_id'
+security:
+ - userApiKey: []
+requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/custom_filter_create_update_payload'
responses:
- 200:
+ '200':
description: Success
- schema:
- $ref: '#/definitions/custom_filter'
- 401:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/custom_filter'
+ '401':
description: Unauthorized
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/custom_filters/delete.yml b/swagger/paths/application/custom_filters/delete.yml
index e66748858..5553bbeae 100644
--- a/swagger/paths/application/custom_filters/delete.yml
+++ b/swagger/paths/application/custom_filters/delete.yml
@@ -2,11 +2,21 @@ tags:
- Custom Filters
operationId: delete-a-custom-filter
summary: Delete a custom filter
+security:
+ - userApiKey: []
description: Delete a custom filter from the account
responses:
- 200:
+ '200':
description: Success
- 401:
+ '401':
description: Unauthorized
- 404:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
+ '404':
description: The custom filter does not exist in the account
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/custom_filters/index.yml b/swagger/paths/application/custom_filters/index.yml
index b77949dc3..0c4f7578f 100644
--- a/swagger/paths/application/custom_filters/index.yml
+++ b/swagger/paths/application/custom_filters/index.yml
@@ -3,13 +3,21 @@ tags:
operationId: list-all-filters
summary: List all custom filters
description: List all custom filters in a category of a user
+security:
+ - userApiKey: []
responses:
- 200:
+ '200':
description: Success
- schema:
- type: array
- description: 'Array of custom filters'
- items:
- $ref: '#/definitions/custom_filter'
- 401:
+ content:
+ application/json:
+ schema:
+ type: array
+ description: 'Array of custom filters'
+ items:
+ $ref: '#/components/schemas/custom_filter'
+ '401':
description: Unauthorized
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/custom_filters/show.yml b/swagger/paths/application/custom_filters/show.yml
index 14de07d85..cf298a4ad 100644
--- a/swagger/paths/application/custom_filters/show.yml
+++ b/swagger/paths/application/custom_filters/show.yml
@@ -3,12 +3,24 @@ tags:
operationId: get-details-of-a-single-custom-filter
summary: Get a custom filter details
description: Get the details of a custom filter in the account
+security:
+ - userApiKey: []
responses:
- 200:
+ '200':
description: Success
- schema:
- $ref: '#/definitions/custom_filter'
- 401:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/custom_filter'
+ '401':
description: Unauthorized
- 404:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
+ '404':
description: The given team ID does not exist in the account
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/custom_filters/update.yml b/swagger/paths/application/custom_filters/update.yml
index a058b81f8..19db632d2 100644
--- a/swagger/paths/application/custom_filters/update.yml
+++ b/swagger/paths/application/custom_filters/update.yml
@@ -2,17 +2,25 @@ tags:
- Custom Filters
operationId: update-a-custom-filter
summary: Update a custom filter
+security:
+ - userApiKey: []
description: Update a custom filter's attributes
-parameters:
- - name: data
- in: body
- required: true
- schema:
- $ref: '#/definitions/custom_filter_create_update_payload'
+requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/custom_filter_create_update_payload'
responses:
- 200:
+ '200':
description: Success
- schema:
- $ref: '#/definitions/custom_filter'
- 401:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/custom_filter'
+ '401':
description: Unauthorized
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/inboxes/create.yml b/swagger/paths/application/inboxes/create.yml
index 3d649e820..6f88b0d4a 100644
--- a/swagger/paths/application/inboxes/create.yml
+++ b/swagger/paths/application/inboxes/create.yml
@@ -4,48 +4,32 @@ post:
operationId: inboxCreation
summary: Create an inbox
description: You can create more than one website inbox in each account
+ security:
+ - userApiKey: []
parameters:
- - $ref: '#/parameters/account_id'
- - name: data
- in: body
- required: true
- 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/parameters/account_id'
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/inbox_create_payload'
responses:
- 200:
+ '200':
description: Success
- schema:
- $ref: '#/definitions/inbox'
- 404:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/inbox'
+ '404':
description: Inbox not found
- 403:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
+ '403':
description: Access denied
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/inboxes/get_agent_bot.yml b/swagger/paths/application/inboxes/get_agent_bot.yml
index 178151dd3..f10d6b41f 100644
--- a/swagger/paths/application/inboxes/get_agent_bot.yml
+++ b/swagger/paths/application/inboxes/get_agent_bot.yml
@@ -4,19 +4,32 @@ get:
operationId: getInboxAgentBot
summary: Show Inbox Agent Bot
description: See if an agent bot is associated to the Inbox
+ security:
+ - userApiKey: []
parameters:
- - $ref: '#/parameters/account_id'
+ - $ref: '#/components/parameters/account_id'
- name: id
in: path
- type: number
+ schema:
+ type: number
description: ID of the inbox
required: true
responses:
- 204:
+ '204':
description: Success
- schema:
- $ref: '#/definitions/agent_bot'
- 404:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/agent_bot'
+ '404':
description: Inbox not found, Agent bot not found
- 403:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
+ '403':
description: Access denied
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/inboxes/inbox_members/create.yml b/swagger/paths/application/inboxes/inbox_members/create.yml
index 9ca5641e6..1f1396bd3 100644
--- a/swagger/paths/application/inboxes/inbox_members/create.yml
+++ b/swagger/paths/application/inboxes/inbox_members/create.yml
@@ -5,35 +5,51 @@ summary: Add a New Agent
description: Add a new Agent to Inbox
security:
- userApiKey: []
-parameters:
- - name: data
- in: body
- required: true
- schema:
- type: object
- required:
+requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ required:
- inbox_id
- user_ids
- properties:
- inbox_id:
- type: string
- description: The ID of the inbox
- user_ids:
- type: array
- items:
+ properties:
+ inbox_id:
type: integer
- description: IDs of users to be added to 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
+ example: [1]
responses:
- 200:
+ '200':
description: Success
- schema:
- type: array
- description: 'Array of all active agents'
- items:
- $ref: '#/definitions/agent'
- 404:
+ content:
+ application/json:
+ schema:
+ type: array
+ description: 'Array of all active agents'
+ items:
+ $ref: '#/components/schemas/agent'
+ '404':
description: Inbox not found
- 403:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
+ '403':
description: Access denied
- 422:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
+ '422':
description: User must exist
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/inboxes/inbox_members/delete.yml b/swagger/paths/application/inboxes/inbox_members/delete.yml
index 78f1435b5..a8df7661a 100644
--- a/swagger/paths/application/inboxes/inbox_members/delete.yml
+++ b/swagger/paths/application/inboxes/inbox_members/delete.yml
@@ -5,30 +5,42 @@ summary: Remove an Agent from Inbox
description: Remove an Agent from Inbox
security:
- userApiKey: []
-parameters:
- - name: data
- in: body
- required: true
- schema:
- type: object
- required:
- - inbox_id
- - user_ids
- properties:
- inbox_id:
- type: string
- description: The ID of the inbox
- user_ids:
- type: array
- items:
- type: integer
- description: IDs of users to be deleted from the inbox
+requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ required:
+ - inbox_id
+ - user_ids
+ properties:
+ inbox_id:
+ type: string
+ description: The ID of the inbox
+ user_ids:
+ type: array
+ items:
+ type: integer
+ description: IDs of users to be deleted from the inbox
responses:
- 200:
+ '200':
description: Success
- 404:
+ '404':
description: Inbox not found
- 403:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
+ '403':
description: Access denied
- 422:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
+ '422':
description: User must exist
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/inboxes/inbox_members/show.yml b/swagger/paths/application/inboxes/inbox_members/show.yml
index 57793f520..65ec9f969 100644
--- a/swagger/paths/application/inboxes/inbox_members/show.yml
+++ b/swagger/paths/application/inboxes/inbox_members/show.yml
@@ -6,16 +6,26 @@ description: Get Details of Agents in an Inbox
security:
- userApiKey: []
parameters:
- - $ref: '#/parameters/inbox_id'
+ - $ref: '#/components/parameters/inbox_id'
responses:
- 200:
+ '200':
description: Success
- schema:
- type: array
- description: 'Array of all active agents'
- items:
- $ref: '#/definitions/agent'
- 404:
+ content:
+ application/json:
+ schema:
+ type: array
+ description: 'Array of all active agents'
+ items:
+ $ref: '#/components/schemas/agent'
+ '404':
description: Inbox not found
- 403:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
+ '403':
description: Access denied
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/inboxes/inbox_members/update.yml b/swagger/paths/application/inboxes/inbox_members/update.yml
index 483b8f6ab..18fc3f2c8 100644
--- a/swagger/paths/application/inboxes/inbox_members/update.yml
+++ b/swagger/paths/application/inboxes/inbox_members/update.yml
@@ -5,35 +5,51 @@ summary: Update Agents in Inbox
description: All agents except the one passed in params will be removed
security:
- userApiKey: []
-parameters:
- - name: data
- in: body
- required: true
- schema:
- type: object
- required:
- - inbox_id
- - user_ids
- properties:
- inbox_id:
- type: string
- description: The ID of the inbox
- user_ids:
- type: array
- items:
- type: integer
- description: IDs of users to be added to the inbox
+requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ required:
+ - inbox_id
+ - user_ids
+ properties:
+ 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]
responses:
- 200:
+ '200':
description: Success
- schema:
- type: array
- description: 'Array of all active agents'
- items:
- $ref: '#/definitions/agent'
- 404:
+ content:
+ application/json:
+ schema:
+ type: array
+ description: 'Array of all active agents'
+ items:
+ $ref: '#/components/schemas/agent'
+ '404':
description: Inbox not found
- 403:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
+ '403':
description: Access denied
- 422:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
+ '422':
description: User must exist
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/inboxes/index.yml b/swagger/paths/application/inboxes/index.yml
index 233488228..7856319ec 100644
--- a/swagger/paths/application/inboxes/index.yml
+++ b/swagger/paths/application/inboxes/index.yml
@@ -4,17 +4,29 @@ get:
operationId: listAllInboxes
summary: List all inboxes
description: List all inboxes available in the current account
+ security:
+ - userApiKey: []
parameters:
- - $ref: '#/parameters/account_id'
+ - $ref: '#/components/parameters/account_id'
responses:
- 200:
+ '200':
description: Success
- schema:
- type: array
- description: 'Array of inboxes'
- items:
- $ref: '#/definitions/inbox'
- 404:
+ content:
+ application/json:
+ schema:
+ type: array
+ description: 'Array of inboxes'
+ items:
+ $ref: '#/components/schemas/inbox'
+ '404':
description: Inbox not found
- 403:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
+ '403':
description: Access denied
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/inboxes/set_agent_bot.yml b/swagger/paths/application/inboxes/set_agent_bot.yml
index 56a37d165..bbd6a9e89 100644
--- a/swagger/paths/application/inboxes/set_agent_bot.yml
+++ b/swagger/paths/application/inboxes/set_agent_bot.yml
@@ -3,29 +3,42 @@ post:
- Inboxes
operationId: updateAgentBot
summary: Add or remove agent bot
+ security:
+ - userApiKey: []
description: To add an agent bot pass agent_bot id, to remove agent bot from an inbox pass null
parameters:
- - $ref: '#/parameters/account_id'
+ - $ref: '#/components/parameters/account_id'
- name: id
in: path
- type: number
+ schema:
+ type: number
description: ID of the inbox
required: true
- - name: data
- in: body
- required: true
- schema:
- type: object
- required:
- - agent_bot
- properties:
- agent_bot:
- type: number
- description: 'Agent bot ID'
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ required:
+ - agent_bot
+ properties:
+ agent_bot:
+ type: number
+ description: 'Agent bot ID'
+ example: 1
responses:
- 204:
+ '204':
description: Success
- 404:
+ '404':
description: Inbox not found, Agent bot not found
- 403:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
+ '403':
description: Access denied
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/inboxes/show.yml b/swagger/paths/application/inboxes/show.yml
index 6bb2e84a5..5d145c56e 100644
--- a/swagger/paths/application/inboxes/show.yml
+++ b/swagger/paths/application/inboxes/show.yml
@@ -3,20 +3,33 @@ get:
- Inboxes
operationId: GetInbox
summary: Get an inbox
+ security:
+ - userApiKey: []
description: Get an inbox available in the current account
parameters:
- - $ref: '#/parameters/account_id'
+ - $ref: '#/components/parameters/account_id'
- name: id
in: path
- type: number
+ schema:
+ type: number
description: ID of the inbox
required: true
responses:
- 200:
+ '200':
description: Success
- schema:
- $ref: '#/definitions/inbox'
- 404:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/inbox'
+ '404':
description: Inbox not found
- 403:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
+ '403':
description: Access denied
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/inboxes/update.yml b/swagger/paths/application/inboxes/update.yml
index c5b3aaebf..e076dd532 100644
--- a/swagger/paths/application/inboxes/update.yml
+++ b/swagger/paths/application/inboxes/update.yml
@@ -3,58 +3,41 @@ patch:
- Inboxes
operationId: updateInbox
summary: Update Inbox
- description: Add avatar and disable auto assignment for an inbox
+ security:
+ - userApiKey: []
+ description: Update an existing inbox
parameters:
- - $ref: '#/parameters/account_id'
+ - $ref: '#/components/parameters/account_id'
- name: id
in: path
- type: number
+ schema:
+ type: number
description: ID of the inbox
required: true
- - name: data
- in: body
- required: true
- 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
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/inbox_update_payload'
responses:
- 200:
+ '200':
description: Success
- schema:
- type: object
- description: 'Updated inbox object'
- $ref: '#/definitions/inbox'
- 404:
+ content:
+ application/json:
+ schema:
+ type: object
+ description: 'Updated inbox object'
+ $ref: '#/components/schemas/inbox'
+ '404':
description: Inbox not found
- 403:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
+ '403':
description: Access denied
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/integrations/apps/show.yml b/swagger/paths/application/integrations/apps/show.yml
index 16ce299fe..96fab5b1b 100644
--- a/swagger/paths/application/integrations/apps/show.yml
+++ b/swagger/paths/application/integrations/apps/show.yml
@@ -2,16 +2,28 @@ tags:
- Integrations
operationId: get-details-of-all-integrations
summary: List all the Integrations
+security:
+ - userApiKey: []
description: Get the details of all Integrations available for the account
responses:
- 200:
+ '200':
description: Success
- schema:
- type: array
- description: 'Array of Integration apps'
- items:
- $ref: '#/definitions/integrations_app'
- 401:
+ content:
+ application/json:
+ schema:
+ type: array
+ description: 'Array of Integration apps'
+ items:
+ $ref: '#/components/schemas/integrations_app'
+ '401':
description: Unauthorized
- 404:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
+ '404':
description: Url not found
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/integrations/hooks/create.yml b/swagger/paths/application/integrations/hooks/create.yml
index 42bcb002e..11d43b140 100644
--- a/swagger/paths/application/integrations/hooks/create.yml
+++ b/swagger/paths/application/integrations/hooks/create.yml
@@ -3,17 +3,26 @@ tags:
operationId: create-an-integration-hook
summary: Create an integration hook
description: Create an integration hook
+security:
+ - userApiKey: []
parameters:
- - $ref: '#/parameters/account_id'
- - name: data
- in: body
- required: true
- schema:
- $ref: '#/definitions/integrations_hook_create_payload'
+ - $ref: '#/components/parameters/account_id'
+requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/integrations_hook_create_payload'
responses:
- 200:
+ '200':
description: Success
- schema:
- $ref: '#/definitions/integrations_hook'
- 401:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/integrations_hook'
+ '401':
description: Unauthorized
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/integrations/hooks/delete.yml b/swagger/paths/application/integrations/hooks/delete.yml
index 3e616613b..60172b5d8 100644
--- a/swagger/paths/application/integrations/hooks/delete.yml
+++ b/swagger/paths/application/integrations/hooks/delete.yml
@@ -1,15 +1,25 @@
tags:
- - Integrations
+ - Integrations
operationId: delete-an-integration-hook
summary: Delete an Integration Hook
description: Delete an Integration Hook
+security:
+ - userApiKey: []
parameters:
- - $ref: '#/parameters/account_id'
- - $ref: '#/parameters/hook_id'
+ - $ref: '#/components/parameters/account_id'
+ - $ref: '#/components/parameters/hook_id'
responses:
- 200:
+ '200':
description: Success
- 401:
+ '401':
description: Unauthorized
- 404:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
+ '404':
description: The hook does not exist in the account
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/integrations/hooks/update.yml b/swagger/paths/application/integrations/hooks/update.yml
index 2cfd6877a..eaa80cf20 100644
--- a/swagger/paths/application/integrations/hooks/update.yml
+++ b/swagger/paths/application/integrations/hooks/update.yml
@@ -3,18 +3,27 @@ tags:
operationId: update-an-integrations-hook
summary: Update an Integration Hook
description: Update an Integration Hook
+security:
+ - userApiKey: []
parameters:
- - $ref: '#/parameters/account_id'
- - $ref: '#/parameters/hook_id'
- - name: data
- in: body
- required: true
- schema:
- $ref: '#/definitions/integrations_hook_update_payload'
+ - $ref: '#/components/parameters/account_id'
+ - $ref: '#/components/parameters/hook_id'
+requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/integrations_hook_update_payload'
responses:
- 200:
+ '200':
description: Success
- schema:
- $ref: '#/definitions/integrations_hook'
- 401:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/integrations_hook'
+ '401':
description: Unauthorized
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/portal/create.yml b/swagger/paths/application/portal/create.yml
index 187c20008..b08fc2931 100644
--- a/swagger/paths/application/portal/create.yml
+++ b/swagger/paths/application/portal/create.yml
@@ -5,16 +5,22 @@ summary: Add a new portal
description: Add a new portal to account
security:
- userApiKey: []
-parameters:
- - name: data
- in: body
- required: true
- schema:
- $ref: '#/definitions/portal_create_update_payload'
+requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/portal_create_update_payload'
responses:
'200':
description: Success
- schema:
- $ref: '#/definitions/portal'
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/portal'
'403':
description: Access denied
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/portal/index.yml b/swagger/paths/application/portal/index.yml
index ea56563a4..5cafe09e5 100644
--- a/swagger/paths/application/portal/index.yml
+++ b/swagger/paths/application/portal/index.yml
@@ -3,17 +3,23 @@ tags:
operationId: get-portal
summary: List all portals in an account
parameters:
- - $ref: '#/parameters/account_id'
+ - $ref: '#/components/parameters/account_id'
description: Get details of portals in an Account
security:
- userApiKey: []
responses:
'200':
description: Success
- schema:
- type: array
- description: Array of all portals
- items:
- $ref: '#/definitions/portal'
+ content:
+ application/json:
+ schema:
+ type: array
+ description: Array of all portals
+ items:
+ $ref: '#/components/schemas/portal'
'403':
description: Access denied
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/portal/update.yml b/swagger/paths/application/portal/update.yml
index 8c6a74e85..5faa170cc 100644
--- a/swagger/paths/application/portal/update.yml
+++ b/swagger/paths/application/portal/update.yml
@@ -1,20 +1,26 @@
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: []
-parameters:
- - name: data
- in: body
- required: true
- schema:
- $ref: '#/definitions/portal_create_update_payload'
+requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/portal_create_update_payload'
responses:
'200':
description: Success
- schema:
- $ref: '#/definitions/portal'
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/portal'
'403':
description: Access denied
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/reports/conversation/account.yml b/swagger/paths/application/reports/conversation/account.yml
index 28aac72e7..d0fa9a3c3 100644
--- a/swagger/paths/application/reports/conversation/account.yml
+++ b/swagger/paths/application/reports/conversation/account.yml
@@ -2,22 +2,33 @@ tags:
- Reports
operationId: get-account-conversation-metrics
summary: Account Conversation Metrics
+security:
+ - userApiKey: []
description: Get conversation metrics for Account
responses:
- 200:
+ '200':
description: Success
- schema:
- type: object
- description: 'Object of account conversation metrics'
- properties:
- open:
- type: number
- unattended:
- type: number
- unassigned:
- type: number
-
- 404:
+ content:
+ application/json:
+ schema:
+ type: object
+ description: 'Object of account conversation metrics'
+ properties:
+ open:
+ type: number
+ unattended:
+ type: number
+ unassigned:
+ type: number
+ '404':
description: reports not found
- 403:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
+ '403':
description: Access denied
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/reports/conversation/agent.yml b/swagger/paths/application/reports/conversation/agent.yml
index 90f433e4a..3cbf48403 100644
--- a/swagger/paths/application/reports/conversation/agent.yml
+++ b/swagger/paths/application/reports/conversation/agent.yml
@@ -2,17 +2,28 @@ tags:
- Reports
operationId: get-agent-conversation-metrics
summary: Agent Conversation Metrics
+security:
+ - userApiKey: []
description: Get conversation metrics for Agent
responses:
- 200:
+ '200':
description: Success
- schema:
- type: array
- description: 'Array of agent based conversation metrics'
- items:
- $ref: '#/definitions/agent_conversation_metrics'
-
- 404:
+ content:
+ application/json:
+ schema:
+ type: array
+ description: 'Array of agent based conversation metrics'
+ items:
+ $ref: '#/components/schemas/agent_conversation_metrics'
+ '404':
description: reports not found
- 403:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
+ '403':
description: Access denied
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/reports/index.yml b/swagger/paths/application/reports/index.yml
index 3d86df38d..73aca86ea 100644
--- a/swagger/paths/application/reports/index.yml
+++ b/swagger/paths/application/reports/index.yml
@@ -2,21 +2,33 @@ tags:
- Reports
operationId: list-all-conversation-statistics
summary: Get Account reports
+security:
+ - userApiKey: []
description: Get Account reports for a specific type, metric and date range
responses:
- 200:
+ '200':
description: Success
- schema:
- type: array
- description: 'Array of date based conversation statistics'
- items:
- type: object
- properties:
- value:
- type: string
- timestamp:
- type: number
- 404:
+ content:
+ application/json:
+ schema:
+ type: array
+ description: 'Array of date based conversation statistics'
+ items:
+ type: object
+ properties:
+ value:
+ type: string
+ timestamp:
+ type: number
+ '404':
description: reports not found
- 403:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
+ '403':
description: Access denied
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/reports/summary.yml b/swagger/paths/application/reports/summary.yml
index f9538a9f8..20497cc52 100644
--- a/swagger/paths/application/reports/summary.yml
+++ b/swagger/paths/application/reports/summary.yml
@@ -2,14 +2,26 @@ tags:
- Reports
operationId: list-all-conversation-statistics-summary
summary: Get Account reports summary
+security:
+ - userApiKey: []
description: Get Account reports summary for a specific type and date range
responses:
- 200:
+ '200':
description: Success
- schema:
- description: 'Object of summary metrics'
- $ref: '#/definitions/account_summary'
- 404:
+ content:
+ application/json:
+ schema:
+ description: 'Object of summary metrics'
+ $ref: '#/components/schemas/account_summary'
+ '404':
description: reports not found
- 403:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
+ '403':
description: Access denied
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/team_members/create.yml b/swagger/paths/application/team_members/create.yml
index 724769319..bea148f73 100644
--- a/swagger/paths/application/team_members/create.yml
+++ b/swagger/paths/application/team_members/create.yml
@@ -5,31 +5,46 @@ summary: Add a New Agent
description: Add a new Agent to Team
security:
- userApiKey: []
-parameters:
- - name: data
- in: body
- required: true
- schema:
- type: object
- required:
+requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ required:
- user_ids
- properties:
- user_ids:
- type: array
- items:
- type: integer
- description: IDs of users to be added to the team
+ properties:
+ user_ids:
+ type: array
+ items:
+ type: integer
+ description: IDs of users to be added to the team
+ example: [1]
responses:
- 200:
+ '200':
description: Success
- schema:
- type: array
- description: 'Array of all active agents'
- items:
- $ref: '#/definitions/agent'
- 404:
- description: Team not found
- 403:
+ content:
+ application/json:
+ schema:
+ type: array
+ description: 'Array of all active agents'
+ items:
+ $ref: '#/components/schemas/agent'
+ '403':
description: Access denied
- 422:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
+ '404':
+ description: Team not found
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
+ '422':
description: User must exist
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/team_members/delete.yml b/swagger/paths/application/team_members/delete.yml
index ac7dbb451..99deed83d 100644
--- a/swagger/paths/application/team_members/delete.yml
+++ b/swagger/paths/application/team_members/delete.yml
@@ -5,27 +5,38 @@ summary: Remove an Agent from Team
description: Remove an Agent from Team
security:
- userApiKey: []
-parameters:
- - name: data
- in: body
- required: true
- schema:
- type: object
- required:
- - team_id
- - user_ids
- properties:
- user_ids:
- type: array
- items:
- type: integer
- description: IDs of users to be deleted from the team
+requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ required:
+ - user_ids
+ properties:
+ user_ids:
+ type: array
+ items:
+ type: integer
+ description: IDs of users to be deleted from the team
responses:
- 200:
+ '200':
description: Success
- 404:
- description: Team not found
- 403:
+ '403':
description: Access denied
- 422:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
+ '404':
+ description: Team not found
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
+ '422':
description: User must exist
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/team_members/index.yml b/swagger/paths/application/team_members/index.yml
index c57705223..dfa505363 100644
--- a/swagger/paths/application/team_members/index.yml
+++ b/swagger/paths/application/team_members/index.yml
@@ -6,17 +6,27 @@ description: Get Details of Agents in an Team
security:
- userApiKey: []
parameters:
- - $ref: '#/parameters/account_id'
- - $ref: '#/parameters/team_id'
+ - $ref: '#/components/parameters/account_id'
+ - $ref: '#/components/parameters/team_id'
responses:
- 200:
+ '200':
description: Success
- schema:
- type: array
- description: 'Array of all agents in the team'
- items:
- $ref: '#/definitions/agent'
- 404:
- description: Inbox not found
- 403:
+ content:
+ application/json:
+ schema:
+ type: array
+ description: 'Array of all agents in the team'
+ items:
+ $ref: '#/components/schemas/agent'
+ '403':
description: Access denied
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
+ '404':
+ description: Team not found
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/team_members/update.yml b/swagger/paths/application/team_members/update.yml
index 81034b9c7..34a2de82f 100644
--- a/swagger/paths/application/team_members/update.yml
+++ b/swagger/paths/application/team_members/update.yml
@@ -5,31 +5,46 @@ summary: Update Agents in Team
description: All agents except the one passed in params will be removed
security:
- userApiKey: []
-parameters:
- - name: data
- in: body
- required: true
- schema:
- type: object
- required:
- - user_ids
- properties:
- user_ids:
- type: array
- items:
- type: integer
- description: IDs of users to be added to the team
+requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ required:
+ - user_ids
+ properties:
+ user_ids:
+ type: array
+ items:
+ type: integer
+ description: IDs of users to be added to the team
+ example: [1]
responses:
- 200:
+ '200':
description: Success
- schema:
- type: array
- description: 'Array of all agents in the team'
- items:
- $ref: '#/definitions/agent'
- 404:
- description: Team not found
- 403:
+ content:
+ application/json:
+ schema:
+ type: array
+ description: 'Array of all agents in the team'
+ items:
+ $ref: '#/components/schemas/agent'
+ '403':
description: Access denied
- 422:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
+ '404':
+ description: Team not found
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
+ '422':
description: User must exist
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/teams/create.yml b/swagger/paths/application/teams/create.yml
index 2ec066738..b96068b11 100644
--- a/swagger/paths/application/teams/create.yml
+++ b/swagger/paths/application/teams/create.yml
@@ -2,18 +2,27 @@ tags:
- Teams
operationId: create-a-team
summary: Create a team
+security:
+ - userApiKey: []
description: Create a team in the account
parameters:
- - $ref: '#/parameters/account_id'
- - name: data
- in: body
- required: true
- schema:
- $ref: '#/definitions/team_create_update_payload'
+ - $ref: '#/components/parameters/account_id'
+requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/team_create_update_payload'
responses:
- 200:
+ '200':
description: Success
- schema:
- $ref: '#/definitions/team'
- 401:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/team'
+ '401':
description: Unauthorized
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/teams/delete.yml b/swagger/paths/application/teams/delete.yml
index 7c5698b99..eae30ecba 100644
--- a/swagger/paths/application/teams/delete.yml
+++ b/swagger/paths/application/teams/delete.yml
@@ -2,11 +2,21 @@ tags:
- Teams
operationId: delete-a-team
summary: Delete a team
+security:
+ - userApiKey: []
description: Delete a team from the account
responses:
- 200:
+ '200':
description: Success
- 401:
+ '401':
description: Unauthorized
- 404:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
+ '404':
description: The team does not exist in the account
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/teams/index.yml b/swagger/paths/application/teams/index.yml
index f93b6a553..85ac0ff8f 100644
--- a/swagger/paths/application/teams/index.yml
+++ b/swagger/paths/application/teams/index.yml
@@ -2,14 +2,22 @@ tags:
- Teams
operationId: list-all-teams
summary: List all teams
+security:
+ - userApiKey: []
description: List all teams available in the current account
responses:
- 200:
+ '200':
description: Success
- schema:
- type: array
- description: 'Array of teams'
- items:
- $ref: '#/definitions/team'
- 401:
+ content:
+ application/json:
+ schema:
+ type: array
+ description: 'Array of teams'
+ items:
+ $ref: '#/components/schemas/team'
+ '401':
description: Unauthorized
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/teams/show.yml b/swagger/paths/application/teams/show.yml
index 485b4730b..15869beda 100644
--- a/swagger/paths/application/teams/show.yml
+++ b/swagger/paths/application/teams/show.yml
@@ -2,13 +2,25 @@ tags:
- Teams
operationId: get-details-of-a-single-team
summary: Get a team details
+security:
+ - userApiKey: []
description: Get the details of a team in the account
responses:
- 200:
+ '200':
description: Success
- schema:
- $ref: '#/definitions/team'
- 401:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/team'
+ '401':
description: Unauthorized
- 404:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
+ '404':
description: The given team ID does not exist in the account
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/teams/update.yml b/swagger/paths/application/teams/update.yml
index 8afeddc02..5b620e888 100644
--- a/swagger/paths/application/teams/update.yml
+++ b/swagger/paths/application/teams/update.yml
@@ -2,17 +2,25 @@ tags:
- Teams
operationId: update-a-team
summary: Update a team
+security:
+ - userApiKey: []
description: Update a team's attributes
-parameters:
- - name: data
- in: body
- required: true
- schema:
- $ref: '#/definitions/team_create_update_payload'
+requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/team_create_update_payload'
responses:
- 200:
+ '200':
description: Success
- schema:
- $ref: '#/definitions/team'
- 401:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/team'
+ '401':
description: Unauthorized
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/webhooks/create.yml b/swagger/paths/application/webhooks/create.yml
index e4d3053ee..81d7bbf1a 100644
--- a/swagger/paths/application/webhooks/create.yml
+++ b/swagger/paths/application/webhooks/create.yml
@@ -2,18 +2,27 @@ tags:
- Webhooks
operationId: create-a-webhook
summary: Add a webhook
+security:
+ - userApiKey: []
description: Add a webhook subscription to the account
parameters:
- - $ref: '#/parameters/account_id'
- - name: data
- in: body
- required: true
- schema:
- $ref: '#/definitions/webhook_create_update_payload'
+ - $ref: '#/components/parameters/account_id'
+requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/webhook_create_update_payload'
responses:
- 200:
+ '200':
description: Success
- schema:
- $ref: '#/definitions/webhook'
- 401:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/webhook'
+ '401':
description: Unauthorized
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/webhooks/delete.yml b/swagger/paths/application/webhooks/delete.yml
index 525c22dfc..07cfdbaf8 100644
--- a/swagger/paths/application/webhooks/delete.yml
+++ b/swagger/paths/application/webhooks/delete.yml
@@ -2,11 +2,21 @@ tags:
- Webhooks
operationId: delete-a-webhook
summary: Delete a webhook
+security:
+ - userApiKey: []
description: Delete a webhook from the account
responses:
- 200:
+ '200':
description: Success
- 401:
+ '401':
description: Unauthorized
- 404:
+ content:
+ application/json:
+ schema:
+ type: object
+ '404':
description: The webhook does not exist in the account
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/webhooks/index.yml b/swagger/paths/application/webhooks/index.yml
index f96fa00de..d385a9ad1 100644
--- a/swagger/paths/application/webhooks/index.yml
+++ b/swagger/paths/application/webhooks/index.yml
@@ -2,14 +2,22 @@ tags:
- Webhooks
operationId: list-all-webhooks
summary: List all webhooks
-description: List all webhooks in the account
+security:
+ - userApiKey: []
+description: List all webhooks in the account
responses:
- 200:
+ '200':
description: Success
- schema:
- type: array
- description: 'Array of webhook objects'
- items:
- $ref: '#/definitions/webhook'
- 401:
+ content:
+ application/json:
+ schema:
+ type: array
+ description: 'Array of webhook objects'
+ items:
+ $ref: '#/components/schemas/webhook'
+ '401':
description: Unauthorized
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/application/webhooks/update.yml b/swagger/paths/application/webhooks/update.yml
index b395e7362..5e6a36782 100644
--- a/swagger/paths/application/webhooks/update.yml
+++ b/swagger/paths/application/webhooks/update.yml
@@ -2,18 +2,27 @@ tags:
- Webhooks
operationId: update-a-webhook
summary: Update a webhook object
+security:
+ - userApiKey: []
description: Update a webhook object in the account
parameters:
- - $ref: '#/parameters/account_id'
- - name: data
- in: body
- required: true
- schema:
- $ref: '#/definitions/webhook_create_update_payload'
+ - $ref: '#/components/parameters/account_id'
+requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/webhook_create_update_payload'
responses:
- 200:
+ '200':
description: Success
- schema:
- $ref: '#/definitions/webhook'
- 401:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/webhook'
+ '401':
description: Unauthorized
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/index.yml b/swagger/paths/index.yml
index 79ecd1c2e..59d7c06b8 100644
--- a/swagger/paths/index.yml
+++ b/swagger/paths/index.yml
@@ -7,7 +7,7 @@
$ref: ./platform/accounts/create.yml
/platform/api/v1/accounts/{account_id}:
parameters:
- - $ref: '#/parameters/account_id'
+ - $ref: '#/components/parameters/account_id'
get:
$ref: './platform/accounts/show.yml'
patch:
@@ -15,12 +15,11 @@
delete:
$ref: ./platform/accounts/delete.yml
-
# Account Users
/platform/api/v1/accounts/{account_id}/account_users:
parameters:
- - $ref: '#/parameters/account_id'
+ - $ref: '#/components/parameters/account_id'
get:
$ref: './platform/account_users/index.yml'
post:
@@ -37,7 +36,7 @@
$ref: ./platform/agent_bots/create.yml
/platform/api/v1/agent_bots/{id}:
parameters:
- - $ref: '#/parameters/agent_bot_id'
+ - $ref: '#/components/parameters/agent_bot_id'
get:
$ref: './platform/agent_bots/show.yml'
patch:
@@ -52,7 +51,7 @@
$ref: ./platform/users/create.yml
/platform/api/v1/users/{id}:
parameters:
- - $ref: '#/parameters/platform_user_id'
+ - $ref: '#/components/parameters/platform_user_id'
get:
$ref: './platform/users/show.yml'
patch:
@@ -61,7 +60,7 @@
$ref: ./platform/users/delete.yml
/platform/api/v1/users/{id}/login:
parameters:
- - $ref: '#/parameters/platform_user_id'
+ - $ref: '#/components/parameters/platform_user_id'
get:
$ref: './platform/users/login.yml'
/platform/api/v1/users/{id}/token:
@@ -70,7 +69,6 @@
post:
$ref: './platform/users/token.yml'
-
# ---------------- end of platform path -----------#
# ------------ Public API routes ------------#
@@ -79,7 +77,7 @@
/public/api/v1/inboxes/{inbox_identifier}:
parameters:
- - $ref: '#/parameters/public_inbox_identifier'
+ - $ref: '#/components/parameters/public_inbox_identifier'
get:
$ref: './public/inboxes/show.yml'
@@ -87,13 +85,13 @@
/public/api/v1/inboxes/{inbox_identifier}/contacts:
parameters:
- - $ref: '#/parameters/public_inbox_identifier'
+ - $ref: '#/components/parameters/public_inbox_identifier'
post:
$ref: ./public/inboxes/contacts/create.yml
/public/api/v1/inboxes/{inbox_identifier}/contacts/{contact_identifier}:
parameters:
- - $ref: '#/parameters/public_inbox_identifier'
- - $ref: '#/parameters/public_contact_identifier'
+ - $ref: '#/components/parameters/public_inbox_identifier'
+ - $ref: '#/components/parameters/public_contact_identifier'
get:
$ref: './public/inboxes/contacts/show.yml'
patch:
@@ -101,8 +99,8 @@
/public/api/v1/inboxes/{inbox_identifier}/contacts/{contact_identifier}/conversations:
parameters:
- - $ref: '#/parameters/public_inbox_identifier'
- - $ref: '#/parameters/public_contact_identifier'
+ - $ref: '#/components/parameters/public_inbox_identifier'
+ - $ref: '#/components/parameters/public_contact_identifier'
post:
$ref: ./public/inboxes/conversations/create.yml
get:
@@ -110,61 +108,54 @@
/public/api/v1/inboxes/{inbox_identifier}/contacts/{contact_identifier}/conversations/{conversation_id}:
parameters:
- - $ref: '#/parameters/public_inbox_identifier'
- - $ref: '#/parameters/public_contact_identifier'
- - $ref: '#/parameters/conversation_id'
+ - $ref: '#/components/parameters/public_inbox_identifier'
+ - $ref: '#/components/parameters/public_contact_identifier'
+ - $ref: '#/components/parameters/conversation_id'
get:
$ref: ./public/inboxes/conversations/show.yml
/public/api/v1/inboxes/{inbox_identifier}/contacts/{contact_identifier}/conversations/{conversation_id}/toggle_status:
parameters:
- - $ref: '#/parameters/public_inbox_identifier'
- - $ref: '#/parameters/public_contact_identifier'
- - $ref: '#/parameters/conversation_id'
+ - $ref: '#/components/parameters/public_inbox_identifier'
+ - $ref: '#/components/parameters/public_contact_identifier'
+ - $ref: '#/components/parameters/conversation_id'
post:
$ref: ./public/inboxes/conversations/toggle_status.yml
/public/api/v1/inboxes/{inbox_identifier}/contacts/{contact_identifier}/conversations/{conversation_id}/toggle_typing:
parameters:
- - $ref: '#/parameters/public_inbox_identifier'
- - $ref: '#/parameters/public_contact_identifier'
- - $ref: '#/parameters/conversation_id'
+ - $ref: '#/components/parameters/public_inbox_identifier'
+ - $ref: '#/components/parameters/public_contact_identifier'
+ - $ref: '#/components/parameters/conversation_id'
post:
$ref: ./public/inboxes/conversations/toggle_typing.yml
/public/api/v1/inboxes/{inbox_identifier}/contacts/{contact_identifier}/conversations/{conversation_id}/update_last_seen:
parameters:
- - $ref: '#/parameters/public_inbox_identifier'
- - $ref: '#/parameters/public_contact_identifier'
- - $ref: '#/parameters/conversation_id'
+ - $ref: '#/components/parameters/public_inbox_identifier'
+ - $ref: '#/components/parameters/public_contact_identifier'
+ - $ref: '#/components/parameters/conversation_id'
post:
$ref: ./public/inboxes/conversations/update_last_seen.yml
/public/api/v1/inboxes/{inbox_identifier}/contacts/{contact_identifier}/conversations/{conversation_id}/messages:
parameters:
- - $ref: '#/parameters/public_inbox_identifier'
- - $ref: '#/parameters/public_contact_identifier'
- - $ref: '#/parameters/conversation_id'
+ - $ref: '#/components/parameters/public_inbox_identifier'
+ - $ref: '#/components/parameters/public_contact_identifier'
+ - $ref: '#/components/parameters/conversation_id'
post:
$ref: ./public/inboxes/messages/create.yml
get:
$ref: ./public/inboxes/messages/index.yml
+
/public/api/v1/inboxes/{inbox_identifier}/contacts/{contact_identifier}/conversations/{conversation_id}/messages/{message_id}:
parameters:
- - $ref: '#/parameters/public_inbox_identifier'
- - $ref: '#/parameters/public_contact_identifier'
- - $ref: '#/parameters/conversation_id'
- - $ref: '#/parameters/message_id'
+ - $ref: '#/components/parameters/public_inbox_identifier'
+ - $ref: '#/components/parameters/public_contact_identifier'
+ - $ref: '#/components/parameters/conversation_id'
+ - $ref: '#/components/parameters/message_id'
patch:
$ref: ./public/inboxes/messages/update.yml
-/api/v1/accounts/{account_id}/contacts/{contact_identifier}/labels:
- parameters:
- - $ref: '#/parameters/account_id'
- - $ref: '#/parameters/public_contact_identifier'
- get:
- $ref: ./application/contacts/labels/index.yml
- post:
- $ref: ./application/contacts/labels/create.yml
# ---------------- end of public api routes-----------#
@@ -172,7 +163,7 @@
/survey/responses/{conversation_uuid}:
parameters:
- - $ref: '#/parameters/conversation_uuid'
+ - $ref: '#/components/parameters/conversation_uuid'
get:
$ref: ./survey/show.yml
@@ -180,19 +171,18 @@
# ------------ Application API routes ------------#
-
# AgentBots
/api/v1/accounts/{account_id}/agent_bots:
parameters:
- - $ref: '#/parameters/account_id'
+ - $ref: '#/components/parameters/account_id'
get:
$ref: ./application/agent_bots/index.yml
post:
$ref: ./application/agent_bots/create.yml
/api/v1/accounts/{account_id}/agent_bots/{id}:
parameters:
- - $ref: '#/parameters/account_id'
- - $ref: '#/parameters/agent_bot_id'
+ - $ref: '#/components/parameters/account_id'
+ - $ref: '#/components/parameters/agent_bot_id'
get:
$ref: './application/agent_bots/show.yml'
patch:
@@ -203,14 +193,14 @@
# Agents
/api/v1/accounts/{account_id}/agents:
parameters:
- - $ref: '#/parameters/account_id'
+ - $ref: '#/components/parameters/account_id'
get:
$ref: ./application/agents/index.yml
post:
$ref: ./application/agents/create.yml
/api/v1/accounts/{account_id}/agents/{id}:
parameters:
- - $ref: '#/parameters/account_id'
+ - $ref: '#/components/parameters/account_id'
patch:
$ref: ./application/agents/update.yml
delete:
@@ -219,14 +209,14 @@
# Canned Responses
/api/v1/accounts/{account_id}/canned_responses:
parameters:
- - $ref: '#/parameters/account_id'
+ - $ref: '#/components/parameters/account_id'
get:
$ref: ./application/canned_responses/index.yml
post:
$ref: ./application/canned_responses/create.yml
/api/v1/accounts/{account_id}/canned_responses/{id}:
parameters:
- - $ref: '#/parameters/account_id'
+ - $ref: '#/components/parameters/account_id'
patch:
$ref: ./application/canned_responses/update.yml
delete:
@@ -235,17 +225,18 @@
# Custom Attributes
/api/v1/accounts/{account_id}/custom_attribute_definitions:
parameters:
- - $ref: '#/parameters/account_id'
+ - $ref: '#/components/parameters/account_id'
get:
$ref: ./application/custom_attributes/index.yml
post:
$ref: ./application/custom_attributes/create.yml
/api/v1/accounts/{account_id}/custom_attribute_definitions/{id}:
parameters:
- - $ref: '#/parameters/account_id'
+ - $ref: '#/components/parameters/account_id'
- name: id
in: path
- type: number
+ schema:
+ type: number
description: ID of the custom attribute
required: true
get:
@@ -262,13 +253,12 @@
$ref: ./application/contacts/crud.yml
/api/v1/accounts/{account_id}/contacts/{id}/conversations:
$ref: ./application/contacts/conversations.yml
+/api/v1/accounts/{account_id}/contacts/{id}/labels:
+ $ref: ./application/contacts/labels.yml
/api/v1/accounts/{account_id}/contacts/search:
$ref: ./application/contacts/search.yml
/api/v1/accounts/{account_id}/contacts/filter:
- parameters:
- - $ref: '#/parameters/account_id'
- post:
- $ref: ./application/contacts/filter.yml
+ $ref: ./application/contacts/filter.yml
/api/v1/accounts/{account_id}/contacts/{id}/contact_inboxes:
$ref: ./application/contact_inboxes/create.yml
/api/v1/accounts/{account_id}/contacts/{id}/contactable_inboxes:
@@ -278,17 +268,18 @@
# Automation Rule
/api/v1/accounts/{account_id}/automation_rules:
parameters:
- - $ref: '#/parameters/account_id'
+ - $ref: '#/components/parameters/account_id'
get:
$ref: ./application/automation_rule/index.yml
post:
$ref: ./application/automation_rule/create.yml
/api/v1/accounts/{account_id}/automation_rules/{id}:
parameters:
- - $ref: '#/parameters/account_id'
+ - $ref: '#/components/parameters/account_id'
- name: id
in: path
- type: number
+ schema:
+ type: number
description: ID of the Automation Rule
required: true
get:
@@ -298,36 +289,37 @@
delete:
$ref: ./application/automation_rule/delete.yml
-
# Help Center
/api/v1/accounts/{account_id}/portals:
parameters:
- - $ref: '#/parameters/account_id'
+ - $ref: '#/components/parameters/account_id'
post:
$ref: ./application/portal/create.yml
get:
$ref: ./application/portal/index.yml
+/api/v1/accounts/{account_id}/portals/{id}:
+ parameters:
+ - $ref: '#/components/parameters/account_id'
+ - $ref: '#/components/parameters/portal_id'
patch:
$ref: ./application/portal/update.yml
-
# Help Center category
-/api/v1/accounts/{account_id}/portals/{portal_id}/categories:
+/api/v1/accounts/{account_id}/portals/{id}/categories:
parameters:
- - $ref: '#/parameters/account_id'
- - $ref: '#/parameters/portal_id'
+ - $ref: '#/components/parameters/account_id'
+ - $ref: '#/components/parameters/portal_id'
post:
$ref: ./application/category/create.yml
# Help Center article
-/api/v1/accounts/{account_id}/portals/{portal_id}/articles:
+/api/v1/accounts/{account_id}/portals/{id}/articles:
parameters:
- - $ref: '#/parameters/account_id'
- - $ref: '#/parameters/portal_id'
+ - $ref: '#/components/parameters/account_id'
+ - $ref: '#/components/parameters/portal_id'
post:
$ref: ./application/article/create.yml
-
# Conversations
/api/v1/accounts/{account_id}/conversations/meta:
$ref: ./application/conversation/meta.yml
@@ -335,34 +327,34 @@
$ref: ./application/conversation/index.yml
/api/v1/accounts/{account_id}/conversations/filter:
parameters:
- - $ref: '#/parameters/account_id'
+ - $ref: '#/components/parameters/account_id'
post:
$ref: ./application/conversation/filter.yml
/api/v1/accounts/{account_id}/conversations/{conversation_id}:
parameters:
- - $ref: '#/parameters/account_id'
- - $ref: '#/parameters/conversation_id'
+ - $ref: '#/components/parameters/account_id'
+ - $ref: '#/components/parameters/conversation_id'
get:
$ref: ./application/conversation/show.yml
patch:
$ref: ./application/conversation/update.yml
/api/v1/accounts/{account_id}/conversations/{conversation_id}/toggle_status:
parameters:
- - $ref: '#/parameters/account_id'
- - $ref: '#/parameters/conversation_id'
+ - $ref: '#/components/parameters/account_id'
+ - $ref: '#/components/parameters/conversation_id'
post:
$ref: ./application/conversation/toggle_status.yml
/api/v1/accounts/{account_id}/conversations/{conversation_id}/toggle_priority:
parameters:
- - $ref: '#/parameters/account_id'
- - $ref: '#/parameters/conversation_id'
+ - $ref: '#/components/parameters/account_id'
+ - $ref: '#/components/parameters/conversation_id'
post:
$ref: ./application/conversation/toggle_priority.yml
/api/v1/accounts/{account_id}/conversations/{conversation_id}/custom_attributes:
parameters:
- - $ref: '#/parameters/account_id'
- - $ref: '#/parameters/conversation_id'
+ - $ref: '#/components/parameters/account_id'
+ - $ref: '#/components/parameters/conversation_id'
post:
$ref: ./application/conversation/custom_attributes.yml
@@ -370,8 +362,8 @@
/api/v1/accounts/{account_id}/conversations/{conversation_id}/assignments:
parameters:
- - $ref: '#/parameters/account_id'
- - $ref: '#/parameters/conversation_id'
+ - $ref: '#/components/parameters/account_id'
+ - $ref: '#/components/parameters/conversation_id'
post:
$ref: ./application/conversation/assignments.yml
@@ -379,14 +371,13 @@
/api/v1/accounts/{account_id}/conversations/{conversation_id}/labels:
parameters:
- - $ref: '#/parameters/account_id'
- - $ref: '#/parameters/conversation_id'
+ - $ref: '#/components/parameters/account_id'
+ - $ref: '#/components/parameters/conversation_id'
get:
$ref: ./application/conversation/labels/index.yml
post:
$ref: ./application/conversation/labels/create.yml
-
# Inboxes
/api/v1/accounts/{account_id}/inboxes:
$ref: ./application/inboxes/index.yml
@@ -404,14 +395,14 @@
# Inbox Members
/api/v1/accounts/{account_id}/inbox_members/{inbox_id}:
parameters:
- - $ref: '#/parameters/account_id'
- - $ref: '#/parameters/inbox_id'
+ - $ref: '#/components/parameters/account_id'
+ - $ref: '#/components/parameters/inbox_id'
get:
$ref: ./application/inboxes/inbox_members/show.yml
/api/v1/accounts/{account_id}/inbox_members:
parameters:
- - $ref: '#/parameters/account_id'
+ - $ref: '#/components/parameters/account_id'
post:
$ref: ./application/inboxes/inbox_members/create.yml
patch:
@@ -419,31 +410,27 @@
delete:
$ref: ./application/inboxes/inbox_members/delete.yml
-
-
# Messages
/api/v1/accounts/{account_id}/conversations/{conversation_id}/messages:
parameters:
- - $ref: '#/parameters/account_id'
- - $ref: '#/parameters/conversation_id'
+ - $ref: '#/components/parameters/account_id'
+ - $ref: '#/components/parameters/conversation_id'
get:
$ref: ./application/conversation/messages/index.yml
post:
$ref: ./application/conversation/messages/create.yml
/api/v1/accounts/{account_id}/conversations/{conversation_id}/messages/{message_id}:
parameters:
- - $ref: '#/parameters/account_id'
- - $ref: '#/parameters/conversation_id'
- - $ref: '#/parameters/message_id'
+ - $ref: '#/components/parameters/account_id'
+ - $ref: '#/components/parameters/conversation_id'
+ - $ref: '#/components/parameters/message_id'
delete:
$ref: ./application/conversation/messages/delete.yml
-
-
# Integrations
/api/v1/accounts/{account_id}/integrations/apps:
parameters:
- - $ref: '#/parameters/account_id'
+ - $ref: '#/components/parameters/account_id'
get:
$ref: './application/integrations/apps/show.yml'
/api/v1/accounts/{account_id}/integrations/hooks:
@@ -455,25 +442,22 @@
delete:
$ref: ./application/integrations/hooks/delete.yml
-
-
# Profile
/api/v1/profile:
$ref: ./profile/index.yml
-
# Teams
/api/v1/accounts/{account_id}/teams:
parameters:
- - $ref: '#/parameters/account_id'
+ - $ref: '#/components/parameters/account_id'
get:
$ref: ./application/teams/index.yml
post:
$ref: ./application/teams/create.yml
/api/v1/accounts/{account_id}/teams/{team_id}:
parameters:
- - $ref: '#/parameters/account_id'
- - $ref: '#/parameters/team_id'
+ - $ref: '#/components/parameters/account_id'
+ - $ref: '#/components/parameters/team_id'
get:
$ref: './application/teams/show.yml'
patch:
@@ -482,8 +466,8 @@
$ref: ./application/teams/delete.yml
/api/v1/accounts/{account_id}/teams/{team_id}/team_members:
parameters:
- - $ref: '#/parameters/account_id'
- - $ref: '#/parameters/team_id'
+ - $ref: '#/components/parameters/account_id'
+ - $ref: '#/components/parameters/team_id'
get:
$ref: ./application/team_members/index.yml
post:
@@ -498,11 +482,12 @@
# Custom Filters
/api/v1/accounts/{account_id}/custom_filters:
parameters:
- - $ref: '#/parameters/account_id'
+ - $ref: '#/components/parameters/account_id'
- in: query
name: filter_type
- type: string
- enum: ['conversation', 'contact', 'report']
+ schema:
+ type: string
+ enum: ['conversation', 'contact', 'report']
required: false
description: The type of custom filter
get:
@@ -511,8 +496,8 @@
$ref: ./application/custom_filters/create.yml
/api/v1/accounts/{account_id}/custom_filters/{custom_filter_id}:
parameters:
- - $ref: '#/parameters/account_id'
- - $ref: '#/parameters/custom_filter_id'
+ - $ref: '#/components/parameters/account_id'
+ - $ref: '#/components/parameters/custom_filter_id'
get:
$ref: './application/custom_filters/show.yml'
patch:
@@ -523,15 +508,15 @@
# webhooks
/api/v1/accounts/{account_id}/webhooks:
parameters:
- - $ref: '#/parameters/account_id'
+ - $ref: '#/components/parameters/account_id'
get:
$ref: ./application/webhooks/index.yml
post:
$ref: ./application/webhooks/create.yml
/api/v1/accounts/{account_id}/webhooks/{webhook_id}:
parameters:
- - $ref: '#/parameters/account_id'
- - $ref: '#/parameters/webhook_id'
+ - $ref: '#/components/parameters/account_id'
+ - $ref: '#/components/parameters/webhook_id'
patch:
$ref: ./application/webhooks/update.yml
delete:
@@ -542,20 +527,23 @@
# List
/api/v2/accounts/{account_id}/reports:
parameters:
- - $ref: '#/parameters/account_id'
- - $ref: '#/parameters/report_metric'
- - $ref: '#/parameters/report_type'
+ - $ref: '#/components/parameters/account_id'
+ - $ref: '#/components/parameters/report_metric'
+ - $ref: '#/components/parameters/report_type'
- in: query
name: id
- type: string
+ schema:
+ type: string
description: The Id of specific object in case of agent/inbox/label
- in: query
name: since
- type: string
+ schema:
+ type: string
description: The timestamp from where report should start.
- in: query
name: until
- type: string
+ schema:
+ type: string
description: The timestamp from where report should stop.
get:
$ref: './application/reports/index.yml'
@@ -563,19 +551,22 @@
# Summary
/api/v2/accounts/{account_id}/reports/summary:
parameters:
- - $ref: '#/parameters/account_id'
- - $ref: '#/parameters/report_type'
+ - $ref: '#/components/parameters/account_id'
+ - $ref: '#/components/parameters/report_type'
- in: query
name: id
- type: string
+ schema:
+ type: string
description: The Id of specific object in case of agent/inbox/label
- in: query
name: since
- type: string
+ schema:
+ type: string
description: The timestamp from where report should start.
- in: query
name: until
- type: string
+ schema:
+ type: string
description: The timestamp from where report should stop.
get:
$ref: './application/reports/summary.yml'
@@ -583,12 +574,13 @@
# Conversation metrics for account
/api/v2/accounts/{account_id}/reports/conversations:
parameters:
- - $ref: '#/parameters/account_id'
+ - $ref: '#/components/parameters/account_id'
- in: query
name: type
- type: string
- enum:
- - account
+ schema:
+ type: string
+ enum:
+ - account
required: true
description: Type of report
get:
@@ -597,17 +589,19 @@
# Conversation metrics for agent
/api/v2/accounts/{account_id}/reports/conversations/:
parameters:
- - $ref: '#/parameters/account_id'
+ - $ref: '#/components/parameters/account_id'
- in: query
name: type
- type: string
- enum:
- - agent
+ schema:
+ type: string
+ enum:
+ - agent
required: true
description: Type of report
- in: query
name: user_id
- type: string
+ schema:
+ type: string
description: The numeric ID of the user
get:
$ref: './application/reports/conversation/agent.yml'
diff --git a/swagger/paths/platform/account_users/create.yml b/swagger/paths/platform/account_users/create.yml
index 97dc7127d..69d7c4b98 100644
--- a/swagger/paths/platform/account_users/create.yml
+++ b/swagger/paths/platform/account_users/create.yml
@@ -5,37 +5,33 @@ summary: Create an Account User
description: Create an Account User
security:
- platformAppApiKey: []
-parameters:
- - name: data
- in: body
- required: true
- schema:
- type: object
- required:
- - user_id
- - role
- properties:
- user_id:
- type: integer
- description: The ID of the user
- role:
- type: string
- description: whether user is an administrator or agent
-
+requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/account_user_create_update_payload'
responses:
- 200:
+ '200':
description: Success
- schema:
- properties:
- account_id:
- type: integer
- description: The ID of the user
- user_id:
- type: integer
- description: The ID of the user
- role:
- type: string
- description: whether user is an administrator or agent
-
- 401:
+ content:
+ application/json:
+ schema:
+ 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
+
+ '401':
description: Unauthorized
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/platform/account_users/delete.yml b/swagger/paths/platform/account_users/delete.yml
index d864619f7..f2fc35535 100644
--- a/swagger/paths/platform/account_users/delete.yml
+++ b/swagger/paths/platform/account_users/delete.yml
@@ -5,23 +5,18 @@ summary: Delete an Account User
description: Delete an Account User
security:
- platformAppApiKey: []
-parameters:
- - name: data
- in: body
- required: true
- schema:
- type: object
- required:
- - user_id
- properties:
- user_id:
- type: integer
- description: The ID of the user
-
responses:
- 200:
+ '200':
description: Success
- 401:
+ '401':
description: Unauthorized
- 404:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
+ '404':
description: The account does not exist
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/platform/account_users/index.yml b/swagger/paths/platform/account_users/index.yml
index bcaed1807..dfcdded99 100644
--- a/swagger/paths/platform/account_users/index.yml
+++ b/swagger/paths/platform/account_users/index.yml
@@ -6,23 +6,15 @@ description: List all account users
security:
- platformAppApiKey: []
responses:
- 200:
+ '200':
description: Success
- schema:
- type: array
- description: 'Array of account users'
- items:
- type: object
- properties:
- account_id:
- type: integer
- description: The ID of the user
- user_id:
- type: integer
- description: The ID of the user
- role:
- type: string
- description: whether user is an administrator or agent
-
- 401:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/account_user'
+ '401':
description: Unauthorized
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/platform/accounts/create.yml b/swagger/paths/platform/accounts/create.yml
index a6e9841b9..a8ea455f5 100644
--- a/swagger/paths/platform/accounts/create.yml
+++ b/swagger/paths/platform/accounts/create.yml
@@ -5,16 +5,22 @@ summary: Create an Account
description: Create an Account
security:
- platformAppApiKey: []
-parameters:
- - name: data
- in: body
- required: true
- schema:
- $ref: '#/definitions/account_create_update_payload'
+requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/account_create_update_payload'
responses:
200:
description: Success
- schema:
- $ref: '#/definitions/platform_account'
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/platform_account'
401:
description: Unauthorized
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/platform/accounts/delete.yml b/swagger/paths/platform/accounts/delete.yml
index 755b76d1e..d7e25795b 100644
--- a/swagger/paths/platform/accounts/delete.yml
+++ b/swagger/paths/platform/accounts/delete.yml
@@ -6,9 +6,17 @@ description: Delete an Account
security:
- platformAppApiKey: []
responses:
- 200:
+ '200':
description: Success
- 401:
+ '401':
description: Unauthorized
- 404:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
+ '404':
description: The account does not exist
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/platform/accounts/show.yml b/swagger/paths/platform/accounts/show.yml
index d8ec94fe6..1df201701 100644
--- a/swagger/paths/platform/accounts/show.yml
+++ b/swagger/paths/platform/accounts/show.yml
@@ -6,11 +6,21 @@ description: Get the details of an account
security:
- platformAppApiKey: []
responses:
- 200:
+ '200':
description: Success
- schema:
- $ref: '#/definitions/platform_account'
- 401:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/platform_account'
+ '401':
description: Unauthorized
- 404:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
+ '404':
description: The given account does not exist
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/platform/accounts/update.yml b/swagger/paths/platform/accounts/update.yml
index a70ce9468..a30caea1f 100644
--- a/swagger/paths/platform/accounts/update.yml
+++ b/swagger/paths/platform/accounts/update.yml
@@ -5,16 +5,22 @@ summary: Update an account
description: Update an account's attributes
security:
- platformAppApiKey: []
-parameters:
- - name: data
- in: body
- required: true
- schema:
- $ref: '#/definitions/account_create_update_payload'
+requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/account_create_update_payload'
responses:
200:
description: Success
- schema:
- $ref: '#/definitions/platform_account'
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/platform_account'
401:
description: Unauthorized
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/platform/agent_bots/create.yml b/swagger/paths/platform/agent_bots/create.yml
index a862ca131..4f916d672 100644
--- a/swagger/paths/platform/agent_bots/create.yml
+++ b/swagger/paths/platform/agent_bots/create.yml
@@ -5,16 +5,22 @@ summary: Create an Agent Bot
description: Create an agent bot
security:
- platformAppApiKey: []
-parameters:
- - name: data
- in: body
- required: true
- schema:
- $ref: '#/definitions/agent_bot_create_update_payload'
+requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/platform_agent_bot_create_update_payload'
responses:
- 200:
+ '200':
description: Success
- schema:
- $ref: '#/definitions/agent_bot'
- 401:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/agent_bot'
+ '401':
description: Unauthorized
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/platform/agent_bots/delete.yml b/swagger/paths/platform/agent_bots/delete.yml
index 676c8f525..a89fed307 100644
--- a/swagger/paths/platform/agent_bots/delete.yml
+++ b/swagger/paths/platform/agent_bots/delete.yml
@@ -6,9 +6,17 @@ description: Delete an AgentBot
security:
- platformAppApiKey: []
responses:
- 200:
+ '200':
description: Success
- 401:
+ '401':
description: Unauthorized
- 404:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
+ '404':
description: The agent bot does not exist
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/platform/agent_bots/index.yml b/swagger/paths/platform/agent_bots/index.yml
index 7ef3ee9c9..054085471 100644
--- a/swagger/paths/platform/agent_bots/index.yml
+++ b/swagger/paths/platform/agent_bots/index.yml
@@ -6,12 +6,18 @@ description: List all agent bots available
security:
- platformAppApiKey: []
responses:
- 200:
+ '200':
description: Success
- schema:
- type: array
- description: 'Array of agent bots'
- items:
- $ref: '#/definitions/agent_bot'
- 401:
+ content:
+ application/json:
+ schema:
+ type: array
+ description: 'Array of agent bots'
+ items:
+ $ref: '#/components/schemas/agent_bot'
+ '401':
description: Unauthorized
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/platform/agent_bots/show.yml b/swagger/paths/platform/agent_bots/show.yml
index dfbd43a27..d0a8ba37c 100644
--- a/swagger/paths/platform/agent_bots/show.yml
+++ b/swagger/paths/platform/agent_bots/show.yml
@@ -6,11 +6,21 @@ description: Get the details of an agent bot
security:
- platformAppApiKey: []
responses:
- 200:
+ '200':
description: Success
- schema:
- $ref: '#/definitions/agent_bot'
- 401:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/agent_bot'
+ '401':
description: Unauthorized
- 404:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
+ '404':
description: The given agent bot ID does not exist
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/platform/agent_bots/update.yml b/swagger/paths/platform/agent_bots/update.yml
index 842b4854d..7abc46ab8 100644
--- a/swagger/paths/platform/agent_bots/update.yml
+++ b/swagger/paths/platform/agent_bots/update.yml
@@ -5,16 +5,22 @@ summary: Update an agent bot
description: Update an agent bot's attributes
security:
- platformAppApiKey: []
-parameters:
- - name: data
- in: body
- required: true
- schema:
- $ref: '#/definitions/agent_bot_create_update_payload'
+requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/platform_agent_bot_create_update_payload'
responses:
- 200:
+ '200':
description: Success
- schema:
- $ref: '#/definitions/agent_bot'
- 401:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/agent_bot'
+ '401':
description: Unauthorized
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/platform/users/create.yml b/swagger/paths/platform/users/create.yml
index 7433b8dc6..3d2bdb412 100644
--- a/swagger/paths/platform/users/create.yml
+++ b/swagger/paths/platform/users/create.yml
@@ -5,16 +5,22 @@ summary: Create a User
description: Create a User
security:
- platformAppApiKey: []
-parameters:
- - name: data
- in: body
- required: true
- schema:
- $ref: '#/definitions/user_create_update_payload'
+requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/user_create_update_payload'
responses:
- 200:
+ '200':
description: Success
- schema:
- $ref: '#/definitions/user'
- 401:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/user'
+ '401':
description: Unauthorized
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/platform/users/delete.yml b/swagger/paths/platform/users/delete.yml
index a7658c215..d26e9d285 100644
--- a/swagger/paths/platform/users/delete.yml
+++ b/swagger/paths/platform/users/delete.yml
@@ -6,9 +6,17 @@ description: Delete a User
security:
- platformAppApiKey: []
responses:
- 200:
+ '200':
description: Success
- 401:
+ '401':
description: Unauthorized
- 404:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
+ '404':
description: The user does not exist
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/platform/users/login.yml b/swagger/paths/platform/users/login.yml
index be210c7aa..9e327e745 100644
--- a/swagger/paths/platform/users/login.yml
+++ b/swagger/paths/platform/users/login.yml
@@ -6,15 +6,25 @@ description: Get the sso link of a user
security:
- platformAppApiKey: []
responses:
- 200:
+ '200':
description: Success
- schema:
- type: object
- properties:
- url:
- type: string
- description: SSO url to autenticate the user
- 401:
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ url:
+ type: string
+ description: SSO url to autenticate the user
+ '401':
description: Unauthorized
- 404:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
+ '404':
description: The given user does not exist
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/platform/users/show.yml b/swagger/paths/platform/users/show.yml
index bf937b49a..e42b3854e 100644
--- a/swagger/paths/platform/users/show.yml
+++ b/swagger/paths/platform/users/show.yml
@@ -6,11 +6,21 @@ description: Get the details of an user
security:
- platformAppApiKey: []
responses:
- 200:
+ '200':
description: Success
- schema:
- $ref: '#/definitions/user'
- 401:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/user'
+ '401':
description: Unauthorized
- 404:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
+ '404':
description: The given user does not exist
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/platform/users/update.yml b/swagger/paths/platform/users/update.yml
index 56ea0026d..f340448da 100644
--- a/swagger/paths/platform/users/update.yml
+++ b/swagger/paths/platform/users/update.yml
@@ -5,16 +5,22 @@ summary: Update a user
description: Update a user's attributes
security:
- platformAppApiKey: []
-parameters:
- - name: data
- in: body
- required: true
- schema:
- $ref: '#/definitions/user_create_update_payload'
+requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/user_create_update_payload'
responses:
- 200:
+ '200':
description: Success
- schema:
- $ref: '#/definitions/user'
- 401:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/user'
+ '401':
description: Unauthorized
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/profile/index.yml b/swagger/paths/profile/index.yml
index e20004cac..17eda92d0 100644
--- a/swagger/paths/profile/index.yml
+++ b/swagger/paths/profile/index.yml
@@ -4,10 +4,18 @@ get:
operationId: fetchProfile
summary: Fetch user profile
description: Get the user profile details
+ security:
+ - userApiKey: []
responses:
- 200:
+ '200':
description: Success
- schema:
- $ref: '#/definitions/user'
- 401:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/user'
+ '401':
description: Unauthorized
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/public/inboxes/contacts/create.yml b/swagger/paths/public/inboxes/contacts/create.yml
index 51d894f3e..4e8d1f6eb 100644
--- a/swagger/paths/public/inboxes/contacts/create.yml
+++ b/swagger/paths/public/inboxes/contacts/create.yml
@@ -4,16 +4,22 @@ operationId: create-a-contact
summary: Create a contact
description: Create a contact
security: []
-parameters:
- - name: data
- in: body
- required: true
- schema:
- $ref: '#/definitions/public_contact_create_update_payload'
+requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/public_contact_create_update_payload'
responses:
- 200:
+ '200':
description: Success
- schema:
- $ref: '#/definitions/public_contact'
- 401:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/public_contact'
+ '401':
description: Unauthorized
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/public/inboxes/contacts/show.yml b/swagger/paths/public/inboxes/contacts/show.yml
index a5d8b8fdc..49039266a 100644
--- a/swagger/paths/public/inboxes/contacts/show.yml
+++ b/swagger/paths/public/inboxes/contacts/show.yml
@@ -5,11 +5,21 @@ summary: Get a contact
description: Get the details of a contact
security: []
responses:
- 200:
+ '200':
description: Success
- schema:
- $ref: '#/definitions/public_contact'
- 401:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/public_contact'
+ '401':
description: Unauthorized
- 404:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
+ '404':
description: The given contact does not exist
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/public/inboxes/contacts/update.yml b/swagger/paths/public/inboxes/contacts/update.yml
index a413c76b3..8134d7bfd 100644
--- a/swagger/paths/public/inboxes/contacts/update.yml
+++ b/swagger/paths/public/inboxes/contacts/update.yml
@@ -4,16 +4,22 @@ operationId: update-a-contact
summary: Update a contact
description: Update a contact's attributes
security: []
-parameters:
- - name: data
- in: body
- required: true
- schema:
- $ref: '#/definitions/public_contact_create_update_payload'
+requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/public_contact_create_update_payload'
responses:
- 200:
+ '200':
description: Success
- schema:
- $ref: '#/definitions/public_contact'
- 401:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/public_contact'
+ '401':
description: Unauthorized
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/public/inboxes/conversations/create.yml b/swagger/paths/public/inboxes/conversations/create.yml
index 4c2a85d22..31bd9ac86 100644
--- a/swagger/paths/public/inboxes/conversations/create.yml
+++ b/swagger/paths/public/inboxes/conversations/create.yml
@@ -4,16 +4,22 @@ operationId: create-a-conversation
summary: Create a conversation
description: Create a conversation
security: []
-parameters:
- - name: data
- in: body
- required: true
- schema:
- $ref: '#/definitions/public_conversation_create_payload'
+requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/public_conversation_create_payload'
responses:
- 200:
+ '200':
description: Success
- schema:
- $ref: '#/definitions/public_conversation'
- 401:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/public_conversation'
+ '401':
description: Unauthorized
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/public/inboxes/conversations/index.yml b/swagger/paths/public/inboxes/conversations/index.yml
index bcd598758..3bfc89873 100644
--- a/swagger/paths/public/inboxes/conversations/index.yml
+++ b/swagger/paths/public/inboxes/conversations/index.yml
@@ -3,13 +3,20 @@ tags:
operationId: list-all-contact-conversations
summary: List all conversations
description: List all conversations for the contact
+security: []
responses:
- 200:
+ '200':
description: Success
- schema:
- type: array
- description: 'Array of conversations'
- items:
- $ref: '#/definitions/public_conversation'
- 401:
+ content:
+ application/json:
+ schema:
+ type: array
+ description: 'Array of conversations'
+ items:
+ $ref: '#/components/schemas/public_conversation'
+ '401':
description: Unauthorized
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/public/inboxes/conversations/show.yml b/swagger/paths/public/inboxes/conversations/show.yml
index 2ec6caa63..320457c48 100644
--- a/swagger/paths/public/inboxes/conversations/show.yml
+++ b/swagger/paths/public/inboxes/conversations/show.yml
@@ -3,12 +3,23 @@ tags:
operationId: get-single-conversation
summary: Get a single conversation
description: Retrieves the details of a specific conversation
+security: []
responses:
- 200:
+ '200':
description: Success
- schema:
- $ref: '#/definitions/public_conversation'
- 401:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/public_conversation'
+ '401':
description: Unauthorized
- 404:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
+ '404':
description: Conversation not found
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/public/inboxes/conversations/toggle_status.yml b/swagger/paths/public/inboxes/conversations/toggle_status.yml
index cac1c3d8d..bfbd41c70 100644
--- a/swagger/paths/public/inboxes/conversations/toggle_status.yml
+++ b/swagger/paths/public/inboxes/conversations/toggle_status.yml
@@ -3,12 +3,23 @@ tags:
operationId: resolve-conversation
summary: Resolve a conversation
description: Marks a conversation as resolved
+security: []
responses:
- 200:
+ '200':
description: Conversation resolved successfully
- schema:
- $ref: '#/definitions/public_conversation'
- 401:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/public_conversation'
+ '401':
description: Unauthorized
- 404:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
+ '404':
description: Conversation not found
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/public/inboxes/conversations/toggle_typing.yml b/swagger/paths/public/inboxes/conversations/toggle_typing.yml
index af01c77f6..603ed0f8d 100644
--- a/swagger/paths/public/inboxes/conversations/toggle_typing.yml
+++ b/swagger/paths/public/inboxes/conversations/toggle_typing.yml
@@ -3,16 +3,38 @@ tags:
operationId: toggle-typing-status
summary: Toggle typing status
description: Toggles the typing status in a conversation
+security: []
parameters:
- name: typing_status
in: query
required: true
- type: string
+ 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:
+ '200':
description: Typing status toggled successfully
- 401:
+ '401':
description: Unauthorized
- 404:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
+ '404':
description: Conversation not found
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/public/inboxes/conversations/update_last_seen.yml b/swagger/paths/public/inboxes/conversations/update_last_seen.yml
index 4e56aa11d..a3e199e73 100644
--- a/swagger/paths/public/inboxes/conversations/update_last_seen.yml
+++ b/swagger/paths/public/inboxes/conversations/update_last_seen.yml
@@ -3,10 +3,19 @@ tags:
operationId: update-last-seen
summary: Update last seen
description: Updates the last seen time of the contact in a conversation
+security: []
responses:
- 200:
+ '200':
description: Last seen updated successfully
- 401:
+ '401':
description: Unauthorized
- 404:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
+ '404':
description: Conversation not found
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/public/inboxes/messages/create.yml b/swagger/paths/public/inboxes/messages/create.yml
index 902090952..1afa7d731 100644
--- a/swagger/paths/public/inboxes/messages/create.yml
+++ b/swagger/paths/public/inboxes/messages/create.yml
@@ -4,16 +4,22 @@ operationId: create-a-message
summary: Create a message
description: Create a message
security: []
-parameters:
- - name: data
- in: body
- required: true
- schema:
- $ref: '#/definitions/public_message_create_payload'
+requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/public_message_create_payload'
responses:
- 200:
+ '200':
description: Success
- schema:
- $ref: '#/definitions/public_message'
- 401:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/public_message'
+ '401':
description: Unauthorized
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/public/inboxes/messages/index.yml b/swagger/paths/public/inboxes/messages/index.yml
index 0c9eaeab3..68e34fed7 100644
--- a/swagger/paths/public/inboxes/messages/index.yml
+++ b/swagger/paths/public/inboxes/messages/index.yml
@@ -3,13 +3,20 @@ tags:
operationId: list-all-converation-messages
summary: List all messages
description: List all messages in the conversation
+security: []
responses:
- 200:
+ '200':
description: Success
- schema:
- type: array
- description: 'Array of messages'
- items:
- $ref: '#/definitions/public_message'
- 401:
+ content:
+ application/json:
+ schema:
+ type: array
+ description: 'Array of messages'
+ items:
+ $ref: '#/components/schemas/public_message'
+ '401':
description: Unauthorized
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/public/inboxes/messages/update.yml b/swagger/paths/public/inboxes/messages/update.yml
index a211f39ca..38e41beed 100644
--- a/swagger/paths/public/inboxes/messages/update.yml
+++ b/swagger/paths/public/inboxes/messages/update.yml
@@ -4,16 +4,22 @@ operationId: update-a-message
summary: Update a message
description: Update a message
security: []
-parameters:
- - name: data
- in: body
- required: true
- schema:
- $ref: '#/definitions/public_message_update_payload'
+requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/public_message_update_payload'
responses:
- 200:
+ '200':
description: Success
- schema:
- $ref: '#/definitions/public_message'
- 401:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/public_message'
+ '401':
description: Unauthorized
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/public/inboxes/show.yml b/swagger/paths/public/inboxes/show.yml
index 094caabbf..1effd078b 100644
--- a/swagger/paths/public/inboxes/show.yml
+++ b/swagger/paths/public/inboxes/show.yml
@@ -5,11 +5,21 @@ summary: Inbox details
description: Get the details of an inbox
security: []
responses:
- 200:
+ '200':
description: Success
- schema:
- $ref: '#/definitions/public_inbox'
- 401:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/public_inbox'
+ '401':
description: Unauthorized
- 404:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
+ '404':
description: The given inbox does not exist
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bad_request_error'
diff --git a/swagger/paths/survey/show.yml b/swagger/paths/survey/show.yml
index c2bd1e8e8..ed9c71785 100644
--- a/swagger/paths/survey/show.yml
+++ b/swagger/paths/survey/show.yml
@@ -5,5 +5,5 @@ summary: Get CSAT survey page
description: You can redirect the client to this URL, instead of implementing the CSAT survey component yourself.
security: []
responses:
- 200:
+ '200':
description: Success
diff --git a/swagger/swagger.json b/swagger/swagger.json
index 68cd11eff..8ce34b4ab 100644
--- a/swagger/swagger.json
+++ b/swagger/swagger.json
@@ -1,9 +1,9 @@
{
- "swagger": "2.0",
+ "openapi": "3.0.4",
"info": {
- "description": "This is the API documentation for Chatwoot server.",
- "version": "1.0.0",
"title": "Chatwoot",
+ "description": "This is the API documentation for Chatwoot server.",
+ "version": "1.1.0",
"termsOfService": "https://www.chatwoot.com/terms-of-service/",
"contact": {
"email": "hello@chatwoot.com"
@@ -13,40 +13,9 @@
"url": "https://opensource.org/licenses/MIT"
}
},
- "host": "app.chatwoot.com",
- "basePath": "/",
- "schemes": [
- "https"
- ],
- "produces": [
- "application/json; charset=utf-8"
- ],
- "consumes": [
- "application/json; charset=utf-8"
- ],
- "securityDefinitions": {
- "userApiKey": {
- "type": "apiKey",
- "in": "header",
- "name": "api_access_token",
- "description": "This token can be obtained by visiting the profile page or via rails console. Provides access to endpoints based on the user permissions levels. This token can be saved by an external system when user is created via API, to perform activities on behalf of the user."
- },
- "agentBotApiKey": {
- "type": "apiKey",
- "in": "header",
- "name": "api_access_token",
- "description": "This token should be provided by system admin or obtained via rails console. This token can be used to build bot integrations and can only access limited apis."
- },
- "platformAppApiKey": {
- "type": "apiKey",
- "in": "header",
- "name": "api_access_token",
- "description": "This token can be obtained by the system admin after creating a platformApp. This token should be used to provision agent bots, accounts, users and their roles."
- }
- },
- "security": [
+ "servers": [
{
- "userApiKey": []
+ "url": "https://app.chatwoot.com/"
}
],
"paths": {
@@ -63,25 +32,36 @@
"platformAppApiKey": []
}
],
- "parameters": [
- {
- "name": "data",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/account_create_update_payload"
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/account_create_update_payload"
+ }
}
}
- ],
+ },
"responses": {
"200": {
"description": "Success",
- "schema": {
- "$ref": "#/definitions/platform_account"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/platform_account"
+ }
+ }
}
},
"401": {
- "description": "Unauthorized"
+ "description": "Unauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
}
@@ -89,7 +69,7 @@
"/platform/api/v1/accounts/{account_id}": {
"parameters": [
{
- "$ref": "#/parameters/account_id"
+ "$ref": "#/components/parameters/account_id"
}
],
"get": {
@@ -107,15 +87,33 @@
"responses": {
"200": {
"description": "Success",
- "schema": {
- "$ref": "#/definitions/platform_account"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/platform_account"
+ }
+ }
}
},
"401": {
- "description": "Unauthorized"
+ "description": "Unauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
},
"404": {
- "description": "The given account does not exist"
+ "description": "The given account does not exist",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
},
@@ -131,25 +129,36 @@
"platformAppApiKey": []
}
],
- "parameters": [
- {
- "name": "data",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/account_create_update_payload"
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/account_create_update_payload"
+ }
}
}
- ],
+ },
"responses": {
"200": {
"description": "Success",
- "schema": {
- "$ref": "#/definitions/platform_account"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/platform_account"
+ }
+ }
}
},
"401": {
- "description": "Unauthorized"
+ "description": "Unauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
},
@@ -170,10 +179,24 @@
"description": "Success"
},
"401": {
- "description": "Unauthorized"
+ "description": "Unauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
},
"404": {
- "description": "The account does not exist"
+ "description": "The account does not exist",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
}
@@ -181,7 +204,7 @@
"/platform/api/v1/accounts/{account_id}/account_users": {
"parameters": [
{
- "$ref": "#/parameters/account_id"
+ "$ref": "#/components/parameters/account_id"
}
],
"get": {
@@ -199,30 +222,23 @@
"responses": {
"200": {
"description": "Success",
- "schema": {
- "type": "array",
- "description": "Array of account users",
- "items": {
- "type": "object",
- "properties": {
- "account_id": {
- "type": "integer",
- "description": "The ID of the user"
- },
- "user_id": {
- "type": "integer",
- "description": "The ID of the user"
- },
- "role": {
- "type": "string",
- "description": "whether user is an administrator or agent"
- }
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/account_user"
}
}
}
},
"401": {
- "description": "Unauthorized"
+ "description": "Unauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
},
@@ -238,52 +254,50 @@
"platformAppApiKey": []
}
],
- "parameters": [
- {
- "name": "data",
- "in": "body",
- "required": true,
- "schema": {
- "type": "object",
- "required": [
- "user_id",
- "role"
- ],
- "properties": {
- "user_id": {
- "type": "integer",
- "description": "The ID of the user"
- },
- "role": {
- "type": "string",
- "description": "whether user is an administrator or agent"
- }
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/account_user_create_update_payload"
}
}
}
- ],
+ },
"responses": {
"200": {
"description": "Success",
- "schema": {
- "properties": {
- "account_id": {
- "type": "integer",
- "description": "The ID of the user"
- },
- "user_id": {
- "type": "integer",
- "description": "The ID of the user"
- },
- "role": {
- "type": "string",
- "description": "whether user is an administrator or agent"
+ "content": {
+ "application/json": {
+ "schema": {
+ "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"
+ }
+ }
}
}
}
},
"401": {
- "description": "Unauthorized"
+ "description": "Unauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
},
@@ -299,34 +313,29 @@
"platformAppApiKey": []
}
],
- "parameters": [
- {
- "name": "data",
- "in": "body",
- "required": true,
- "schema": {
- "type": "object",
- "required": [
- "user_id"
- ],
- "properties": {
- "user_id": {
- "type": "integer",
- "description": "The ID of the user"
- }
- }
- }
- }
- ],
"responses": {
"200": {
"description": "Success"
},
"401": {
- "description": "Unauthorized"
+ "description": "Unauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
},
"404": {
- "description": "The account does not exist"
+ "description": "The account does not exist",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
}
@@ -347,16 +356,27 @@
"responses": {
"200": {
"description": "Success",
- "schema": {
- "type": "array",
- "description": "Array of agent bots",
- "items": {
- "$ref": "#/definitions/agent_bot"
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "description": "Array of agent bots",
+ "items": {
+ "$ref": "#/components/schemas/agent_bot"
+ }
+ }
}
}
},
"401": {
- "description": "Unauthorized"
+ "description": "Unauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
},
@@ -372,25 +392,36 @@
"platformAppApiKey": []
}
],
- "parameters": [
- {
- "name": "data",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/agent_bot_create_update_payload"
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/platform_agent_bot_create_update_payload"
+ }
}
}
- ],
+ },
"responses": {
"200": {
"description": "Success",
- "schema": {
- "$ref": "#/definitions/agent_bot"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/agent_bot"
+ }
+ }
}
},
"401": {
- "description": "Unauthorized"
+ "description": "Unauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
}
@@ -398,7 +429,7 @@
"/platform/api/v1/agent_bots/{id}": {
"parameters": [
{
- "$ref": "#/parameters/agent_bot_id"
+ "$ref": "#/components/parameters/agent_bot_id"
}
],
"get": {
@@ -416,15 +447,33 @@
"responses": {
"200": {
"description": "Success",
- "schema": {
- "$ref": "#/definitions/agent_bot"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/agent_bot"
+ }
+ }
}
},
"401": {
- "description": "Unauthorized"
+ "description": "Unauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
},
"404": {
- "description": "The given agent bot ID does not exist"
+ "description": "The given agent bot ID does not exist",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
},
@@ -440,25 +489,36 @@
"platformAppApiKey": []
}
],
- "parameters": [
- {
- "name": "data",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/agent_bot_create_update_payload"
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/platform_agent_bot_create_update_payload"
+ }
}
}
- ],
+ },
"responses": {
"200": {
"description": "Success",
- "schema": {
- "$ref": "#/definitions/agent_bot"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/agent_bot"
+ }
+ }
}
},
"401": {
- "description": "Unauthorized"
+ "description": "Unauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
},
@@ -479,10 +539,24 @@
"description": "Success"
},
"401": {
- "description": "Unauthorized"
+ "description": "Unauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
},
"404": {
- "description": "The agent bot does not exist"
+ "description": "The agent bot does not exist",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
}
@@ -500,25 +574,36 @@
"platformAppApiKey": []
}
],
- "parameters": [
- {
- "name": "data",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/user_create_update_payload"
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/user_create_update_payload"
+ }
}
}
- ],
+ },
"responses": {
"200": {
"description": "Success",
- "schema": {
- "$ref": "#/definitions/user"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/user"
+ }
+ }
}
},
"401": {
- "description": "Unauthorized"
+ "description": "Unauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
}
@@ -526,7 +611,7 @@
"/platform/api/v1/users/{id}": {
"parameters": [
{
- "$ref": "#/parameters/platform_user_id"
+ "$ref": "#/components/parameters/platform_user_id"
}
],
"get": {
@@ -544,15 +629,33 @@
"responses": {
"200": {
"description": "Success",
- "schema": {
- "$ref": "#/definitions/user"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/user"
+ }
+ }
}
},
"401": {
- "description": "Unauthorized"
+ "description": "Unauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
},
"404": {
- "description": "The given user does not exist"
+ "description": "The given user does not exist",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
},
@@ -568,25 +671,36 @@
"platformAppApiKey": []
}
],
- "parameters": [
- {
- "name": "data",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/user_create_update_payload"
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/user_create_update_payload"
+ }
}
}
- ],
+ },
"responses": {
"200": {
"description": "Success",
- "schema": {
- "$ref": "#/definitions/user"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/user"
+ }
+ }
}
},
"401": {
- "description": "Unauthorized"
+ "description": "Unauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
},
@@ -607,10 +721,24 @@
"description": "Success"
},
"401": {
- "description": "Unauthorized"
+ "description": "Unauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
},
"404": {
- "description": "The user does not exist"
+ "description": "The user does not exist",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
}
@@ -618,7 +746,7 @@
"/platform/api/v1/users/{id}/login": {
"parameters": [
{
- "$ref": "#/parameters/platform_user_id"
+ "$ref": "#/components/parameters/platform_user_id"
}
],
"get": {
@@ -636,21 +764,39 @@
"responses": {
"200": {
"description": "Success",
- "schema": {
- "type": "object",
- "properties": {
- "url": {
- "type": "string",
- "description": "SSO url to autenticate the user"
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "url": {
+ "type": "string",
+ "description": "SSO url to autenticate the user"
+ }
+ }
}
}
}
},
"401": {
- "description": "Unauthorized"
+ "description": "Unauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
},
"404": {
- "description": "The given user does not exist"
+ "description": "The given user does not exist",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
}
@@ -730,7 +876,7 @@
"/public/api/v1/inboxes/{inbox_identifier}": {
"parameters": [
{
- "$ref": "#/parameters/public_inbox_identifier"
+ "$ref": "#/components/parameters/public_inbox_identifier"
}
],
"get": {
@@ -744,15 +890,33 @@
"responses": {
"200": {
"description": "Success",
- "schema": {
- "$ref": "#/definitions/public_inbox"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/public_inbox"
+ }
+ }
}
},
"401": {
- "description": "Unauthorized"
+ "description": "Unauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
},
"404": {
- "description": "The given inbox does not exist"
+ "description": "The given inbox does not exist",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
}
@@ -760,7 +924,7 @@
"/public/api/v1/inboxes/{inbox_identifier}/contacts": {
"parameters": [
{
- "$ref": "#/parameters/public_inbox_identifier"
+ "$ref": "#/components/parameters/public_inbox_identifier"
}
],
"post": {
@@ -771,25 +935,36 @@
"summary": "Create a contact",
"description": "Create a contact",
"security": [],
- "parameters": [
- {
- "name": "data",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/public_contact_create_update_payload"
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/public_contact_create_update_payload"
+ }
}
}
- ],
+ },
"responses": {
"200": {
"description": "Success",
- "schema": {
- "$ref": "#/definitions/public_contact"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/public_contact"
+ }
+ }
}
},
"401": {
- "description": "Unauthorized"
+ "description": "Unauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
}
@@ -797,10 +972,10 @@
"/public/api/v1/inboxes/{inbox_identifier}/contacts/{contact_identifier}": {
"parameters": [
{
- "$ref": "#/parameters/public_inbox_identifier"
+ "$ref": "#/components/parameters/public_inbox_identifier"
},
{
- "$ref": "#/parameters/public_contact_identifier"
+ "$ref": "#/components/parameters/public_contact_identifier"
}
],
"get": {
@@ -814,15 +989,33 @@
"responses": {
"200": {
"description": "Success",
- "schema": {
- "$ref": "#/definitions/public_contact"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/public_contact"
+ }
+ }
}
},
"401": {
- "description": "Unauthorized"
+ "description": "Unauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
},
"404": {
- "description": "The given contact does not exist"
+ "description": "The given contact does not exist",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
},
@@ -834,25 +1027,36 @@
"summary": "Update a contact",
"description": "Update a contact's attributes",
"security": [],
- "parameters": [
- {
- "name": "data",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/public_contact_create_update_payload"
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/public_contact_create_update_payload"
+ }
}
}
- ],
+ },
"responses": {
"200": {
"description": "Success",
- "schema": {
- "$ref": "#/definitions/public_contact"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/public_contact"
+ }
+ }
}
},
"401": {
- "description": "Unauthorized"
+ "description": "Unauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
}
@@ -860,10 +1064,10 @@
"/public/api/v1/inboxes/{inbox_identifier}/contacts/{contact_identifier}/conversations": {
"parameters": [
{
- "$ref": "#/parameters/public_inbox_identifier"
+ "$ref": "#/components/parameters/public_inbox_identifier"
},
{
- "$ref": "#/parameters/public_contact_identifier"
+ "$ref": "#/components/parameters/public_contact_identifier"
}
],
"post": {
@@ -874,25 +1078,36 @@
"summary": "Create a conversation",
"description": "Create a conversation",
"security": [],
- "parameters": [
- {
- "name": "data",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/public_conversation_create_payload"
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/public_conversation_create_payload"
+ }
}
}
- ],
+ },
"responses": {
"200": {
"description": "Success",
- "schema": {
- "$ref": "#/definitions/public_conversation"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/public_conversation"
+ }
+ }
}
},
"401": {
- "description": "Unauthorized"
+ "description": "Unauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
},
@@ -903,19 +1118,31 @@
"operationId": "list-all-contact-conversations",
"summary": "List all conversations",
"description": "List all conversations for the contact",
+ "security": [],
"responses": {
"200": {
"description": "Success",
- "schema": {
- "type": "array",
- "description": "Array of conversations",
- "items": {
- "$ref": "#/definitions/public_conversation"
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "description": "Array of conversations",
+ "items": {
+ "$ref": "#/components/schemas/public_conversation"
+ }
+ }
}
}
},
"401": {
- "description": "Unauthorized"
+ "description": "Unauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
}
@@ -923,13 +1150,13 @@
"/public/api/v1/inboxes/{inbox_identifier}/contacts/{contact_identifier}/conversations/{conversation_id}": {
"parameters": [
{
- "$ref": "#/parameters/public_inbox_identifier"
+ "$ref": "#/components/parameters/public_inbox_identifier"
},
{
- "$ref": "#/parameters/public_contact_identifier"
+ "$ref": "#/components/parameters/public_contact_identifier"
},
{
- "$ref": "#/parameters/conversation_id"
+ "$ref": "#/components/parameters/conversation_id"
}
],
"get": {
@@ -939,18 +1166,37 @@
"operationId": "get-single-conversation",
"summary": "Get a single conversation",
"description": "Retrieves the details of a specific conversation",
+ "security": [],
"responses": {
"200": {
"description": "Success",
- "schema": {
- "$ref": "#/definitions/public_conversation"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/public_conversation"
+ }
+ }
}
},
"401": {
- "description": "Unauthorized"
+ "description": "Unauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
},
"404": {
- "description": "Conversation not found"
+ "description": "Conversation not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
}
@@ -958,13 +1204,13 @@
"/public/api/v1/inboxes/{inbox_identifier}/contacts/{contact_identifier}/conversations/{conversation_id}/toggle_status": {
"parameters": [
{
- "$ref": "#/parameters/public_inbox_identifier"
+ "$ref": "#/components/parameters/public_inbox_identifier"
},
{
- "$ref": "#/parameters/public_contact_identifier"
+ "$ref": "#/components/parameters/public_contact_identifier"
},
{
- "$ref": "#/parameters/conversation_id"
+ "$ref": "#/components/parameters/conversation_id"
}
],
"post": {
@@ -974,18 +1220,37 @@
"operationId": "resolve-conversation",
"summary": "Resolve a conversation",
"description": "Marks a conversation as resolved",
+ "security": [],
"responses": {
"200": {
"description": "Conversation resolved successfully",
- "schema": {
- "$ref": "#/definitions/public_conversation"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/public_conversation"
+ }
+ }
}
},
"401": {
- "description": "Unauthorized"
+ "description": "Unauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
},
"404": {
- "description": "Conversation not found"
+ "description": "Conversation not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
}
@@ -993,13 +1258,13 @@
"/public/api/v1/inboxes/{inbox_identifier}/contacts/{contact_identifier}/conversations/{conversation_id}/toggle_typing": {
"parameters": [
{
- "$ref": "#/parameters/public_inbox_identifier"
+ "$ref": "#/components/parameters/public_inbox_identifier"
},
{
- "$ref": "#/parameters/public_contact_identifier"
+ "$ref": "#/components/parameters/public_contact_identifier"
},
{
- "$ref": "#/parameters/conversation_id"
+ "$ref": "#/components/parameters/conversation_id"
}
],
"post": {
@@ -1009,24 +1274,62 @@
"operationId": "toggle-typing-status",
"summary": "Toggle typing status",
"description": "Toggles the typing status in a conversation",
+ "security": [],
"parameters": [
{
"name": "typing_status",
"in": "query",
"required": true,
- "type": "string",
+ "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"
},
"401": {
- "description": "Unauthorized"
+ "description": "Unauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
},
"404": {
- "description": "Conversation not found"
+ "description": "Conversation not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
}
@@ -1034,13 +1337,13 @@
"/public/api/v1/inboxes/{inbox_identifier}/contacts/{contact_identifier}/conversations/{conversation_id}/update_last_seen": {
"parameters": [
{
- "$ref": "#/parameters/public_inbox_identifier"
+ "$ref": "#/components/parameters/public_inbox_identifier"
},
{
- "$ref": "#/parameters/public_contact_identifier"
+ "$ref": "#/components/parameters/public_contact_identifier"
},
{
- "$ref": "#/parameters/conversation_id"
+ "$ref": "#/components/parameters/conversation_id"
}
],
"post": {
@@ -1050,15 +1353,30 @@
"operationId": "update-last-seen",
"summary": "Update last seen",
"description": "Updates the last seen time of the contact in a conversation",
+ "security": [],
"responses": {
"200": {
"description": "Last seen updated successfully"
},
"401": {
- "description": "Unauthorized"
+ "description": "Unauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
},
"404": {
- "description": "Conversation not found"
+ "description": "Conversation not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
}
@@ -1066,13 +1384,13 @@
"/public/api/v1/inboxes/{inbox_identifier}/contacts/{contact_identifier}/conversations/{conversation_id}/messages": {
"parameters": [
{
- "$ref": "#/parameters/public_inbox_identifier"
+ "$ref": "#/components/parameters/public_inbox_identifier"
},
{
- "$ref": "#/parameters/public_contact_identifier"
+ "$ref": "#/components/parameters/public_contact_identifier"
},
{
- "$ref": "#/parameters/conversation_id"
+ "$ref": "#/components/parameters/conversation_id"
}
],
"post": {
@@ -1083,25 +1401,36 @@
"summary": "Create a message",
"description": "Create a message",
"security": [],
- "parameters": [
- {
- "name": "data",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/public_message_create_payload"
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/public_message_create_payload"
+ }
}
}
- ],
+ },
"responses": {
"200": {
"description": "Success",
- "schema": {
- "$ref": "#/definitions/public_message"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/public_message"
+ }
+ }
}
},
"401": {
- "description": "Unauthorized"
+ "description": "Unauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
},
@@ -1112,19 +1441,31 @@
"operationId": "list-all-converation-messages",
"summary": "List all messages",
"description": "List all messages in the conversation",
+ "security": [],
"responses": {
"200": {
"description": "Success",
- "schema": {
- "type": "array",
- "description": "Array of messages",
- "items": {
- "$ref": "#/definitions/public_message"
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "description": "Array of messages",
+ "items": {
+ "$ref": "#/components/schemas/public_message"
+ }
+ }
}
}
},
"401": {
- "description": "Unauthorized"
+ "description": "Unauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
}
@@ -1132,16 +1473,16 @@
"/public/api/v1/inboxes/{inbox_identifier}/contacts/{contact_identifier}/conversations/{conversation_id}/messages/{message_id}": {
"parameters": [
{
- "$ref": "#/parameters/public_inbox_identifier"
+ "$ref": "#/components/parameters/public_inbox_identifier"
},
{
- "$ref": "#/parameters/public_contact_identifier"
+ "$ref": "#/components/parameters/public_contact_identifier"
},
{
- "$ref": "#/parameters/conversation_id"
+ "$ref": "#/components/parameters/conversation_id"
},
{
- "$ref": "#/parameters/message_id"
+ "$ref": "#/components/parameters/message_id"
}
],
"patch": {
@@ -1152,98 +1493,36 @@
"summary": "Update a message",
"description": "Update a message",
"security": [],
- "parameters": [
- {
- "name": "data",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/public_message_update_payload"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Success",
- "schema": {
- "$ref": "#/definitions/public_message"
- }
- },
- "401": {
- "description": "Unauthorized"
- }
- }
- }
- },
- "/api/v1/accounts/{account_id}/contacts/{contact_identifier}/labels": {
- "parameters": [
- {
- "$ref": "#/parameters/account_id"
- },
- {
- "$ref": "#/parameters/public_contact_identifier"
- }
- ],
- "get": {
- "tags": [
- "Contact Labels"
- ],
- "operationId": "list-all-labels-of-a-contact",
- "summary": "List Labels",
- "description": "Lists all the labels of a contact",
- "responses": {
- "200": {
- "description": "Success",
- "schema": {
- "$ref": "#/definitions/contact_labels"
- }
- },
- "404": {
- "description": "Contact not found"
- },
- "401": {
- "description": "Unauthorized"
- }
- }
- },
- "post": {
- "tags": [
- "Contact Labels"
- ],
- "operationId": "contact-add-labels",
- "summary": "Add Labels",
- "description": "Add labels to a contact. Note that this API would overwrite the existing list of labels associated to the conversation.",
- "parameters": [
- {
- "name": "data",
- "in": "body",
- "required": true,
- "schema": {
- "type": "object",
- "properties": {
- "labels": {
- "type": "array",
- "description": "Array of labels (comma-separated strings)",
- "items": {
- "type": "string"
- }
- }
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/public_message_update_payload"
}
}
}
- ],
+ },
"responses": {
"200": {
"description": "Success",
- "schema": {
- "$ref": "#/definitions/contact_labels"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/public_message"
+ }
+ }
}
},
- "404": {
- "description": "Contact not found"
- },
"401": {
- "description": "Unauthorized"
+ "description": "Unauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
}
@@ -1251,7 +1530,7 @@
"/survey/responses/{conversation_uuid}": {
"parameters": [
{
- "$ref": "#/parameters/conversation_uuid"
+ "$ref": "#/components/parameters/conversation_uuid"
}
],
"get": {
@@ -1272,7 +1551,7 @@
"/api/v1/accounts/{account_id}/agent_bots": {
"parameters": [
{
- "$ref": "#/parameters/account_id"
+ "$ref": "#/components/parameters/account_id"
}
],
"get": {
@@ -1282,19 +1561,35 @@
"operationId": "list-all-account-agent-bots",
"summary": "List all AgentBots",
"description": "List all agent bots available for the current account",
+ "security": [
+ {
+ "userApiKey": []
+ }
+ ],
"responses": {
"200": {
"description": "Success",
- "schema": {
- "type": "array",
- "description": "Array of agent bots",
- "items": {
- "$ref": "#/definitions/agent_bot"
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "description": "Array of agent bots",
+ "items": {
+ "$ref": "#/components/schemas/agent_bot"
+ }
+ }
}
}
},
"401": {
- "description": "Unauthorized"
+ "description": "Unauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
},
@@ -1305,28 +1600,41 @@
"operationId": "create-an-account-agent-bot",
"summary": "Create an Agent Bot",
"description": "Create an agent bot in the account",
- "parameters": [
+ "security": [
{
- "$ref": "#/parameters/account_id"
- },
- {
- "name": "data",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/agent_bot_create_update_payload"
- }
+ "userApiKey": []
}
],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/agent_bot_create_update_payload"
+ }
+ }
+ }
+ },
"responses": {
"200": {
"description": "Success",
- "schema": {
- "$ref": "#/definitions/agent_bot"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/agent_bot"
+ }
+ }
}
},
"401": {
- "description": "Unauthorized"
+ "description": "Unauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
}
@@ -1334,10 +1642,10 @@
"/api/v1/accounts/{account_id}/agent_bots/{id}": {
"parameters": [
{
- "$ref": "#/parameters/account_id"
+ "$ref": "#/components/parameters/account_id"
},
{
- "$ref": "#/parameters/agent_bot_id"
+ "$ref": "#/components/parameters/agent_bot_id"
}
],
"get": {
@@ -1347,18 +1655,41 @@
"operationId": "get-details-of-a-single-account-agent-bot",
"summary": "Get an agent bot details",
"description": "Get the details of an agent bot in the account",
+ "security": [
+ {
+ "userApiKey": []
+ }
+ ],
"responses": {
"200": {
"description": "Success",
- "schema": {
- "$ref": "#/definitions/agent_bot"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/agent_bot"
+ }
+ }
}
},
"401": {
- "description": "Unauthorized"
+ "description": "Unauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
},
"404": {
- "description": "The given agent bot ID does not exist in the account"
+ "description": "The given agent bot ID does not exist in the account",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
},
@@ -1369,25 +1700,41 @@
"operationId": "update-an-account-agent-bot",
"summary": "Update an agent bot",
"description": "Update an agent bot's attributes",
- "parameters": [
+ "security": [
{
- "name": "data",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/agent_bot_create_update_payload"
- }
+ "userApiKey": []
}
],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/agent_bot_create_update_payload"
+ }
+ }
+ }
+ },
"responses": {
"200": {
"description": "Success",
- "schema": {
- "$ref": "#/definitions/agent_bot"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/agent_bot"
+ }
+ }
}
},
"401": {
- "description": "Unauthorized"
+ "description": "Unauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
},
@@ -1398,15 +1745,34 @@
"operationId": "delete-an-account-agent-bot",
"summary": "Delete an AgentBot",
"description": "Delete an AgentBot from the account",
+ "security": [
+ {
+ "userApiKey": []
+ }
+ ],
"responses": {
"200": {
"description": "Success"
},
"401": {
- "description": "Unauthorized"
+ "description": "Unauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
},
"404": {
- "description": "The agent bot does not exist in the account"
+ "description": "The agent bot does not exist in the account",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
}
@@ -1414,7 +1780,7 @@
"/api/v1/accounts/{account_id}/agents": {
"parameters": [
{
- "$ref": "#/parameters/account_id"
+ "$ref": "#/components/parameters/account_id"
}
],
"get": {
@@ -1432,16 +1798,27 @@
"responses": {
"200": {
"description": "Success",
- "schema": {
- "type": "array",
- "description": "Array of all active agents",
- "items": {
- "$ref": "#/definitions/agent"
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "description": "Array of all active agents",
+ "items": {
+ "$ref": "#/components/schemas/agent"
+ }
+ }
}
}
},
"403": {
- "description": "Access denied"
+ "description": "Access denied",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
},
@@ -1457,61 +1834,36 @@
"userApiKey": []
}
],
- "parameters": [
- {
- "name": "data",
- "in": "body",
- "required": true,
- "schema": {
- "type": "object",
- "required": [
- "name",
- "email",
- "role"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Full Name of the agent"
- },
- "email": {
- "type": "string",
- "description": "Email of the Agent"
- },
- "role": {
- "type": "string",
- "enum": [
- "agent",
- "administrator"
- ],
- "description": "Whether its administrator or agent"
- },
- "availability_status": {
- "type": "string",
- "enum": [
- "available",
- "busy",
- "offline"
- ],
- "description": "The availability setting of the agent."
- },
- "auto_offline": {
- "type": "boolean",
- "description": "Whether the availability status of agent is configured to go offline automatically when away."
- }
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/agent_create_payload"
}
}
}
- ],
+ },
"responses": {
"200": {
"description": "Success",
- "schema": {
- "$ref": "#/definitions/agent"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/agent"
+ }
+ }
}
},
"403": {
- "description": "Access denied"
+ "description": "Access denied",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
}
@@ -1519,7 +1871,7 @@
"/api/v1/accounts/{account_id}/agents/{id}": {
"parameters": [
{
- "$ref": "#/parameters/account_id"
+ "$ref": "#/components/parameters/account_id"
}
],
"patch": {
@@ -1538,57 +1890,53 @@
{
"in": "path",
"name": "id",
- "type": "integer",
+ "schema": {
+ "type": "integer"
+ },
"required": true,
"description": "The ID of the agent to be updated."
- },
- {
- "name": "data",
- "in": "body",
- "required": true,
- "schema": {
- "type": "object",
- "required": [
- "role"
- ],
- "properties": {
- "role": {
- "type": "string",
- "enum": [
- "agent",
- "administrator"
- ],
- "description": "Whether its administrator or agent"
- },
- "availability": {
- "type": "string",
- "enum": [
- "available",
- "busy",
- "offline"
- ],
- "description": "The availability setting of the agent."
- },
- "auto_offline": {
- "type": "boolean",
- "description": "Whether the availability status of agent is configured to go offline automatically when away."
- }
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/agent_update_payload"
}
}
}
- ],
+ },
"responses": {
"200": {
"description": "Success",
- "schema": {
- "$ref": "#/definitions/agent"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/agent"
+ }
+ }
}
},
"404": {
- "description": "Agent not found"
+ "description": "Agent not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
},
"403": {
- "description": "Access denied"
+ "description": "Access denied",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
},
@@ -1608,9 +1956,11 @@
{
"in": "path",
"name": "id",
- "type": "integer",
+ "schema": {
+ "type": "integer"
+ },
"required": true,
- "description": "The ID of the agent to be deleted"
+ "description": "The ID of the agent to be deleted."
}
],
"responses": {
@@ -1618,10 +1968,24 @@
"description": "Success"
},
"404": {
- "description": "Agent not found"
+ "description": "Agent not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
},
"403": {
- "description": "Access denied"
+ "description": "Access denied",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
}
@@ -1629,7 +1993,7 @@
"/api/v1/accounts/{account_id}/canned_responses": {
"parameters": [
{
- "$ref": "#/parameters/account_id"
+ "$ref": "#/components/parameters/account_id"
}
],
"get": {
@@ -1647,16 +2011,27 @@
"responses": {
"200": {
"description": "Success",
- "schema": {
- "type": "array",
- "description": "Array of all canned responses",
- "items": {
- "$ref": "#/definitions/canned_response"
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "description": "Array of all canned responses",
+ "items": {
+ "$ref": "#/components/schemas/canned_response"
+ }
+ }
}
}
},
"403": {
- "description": "Access denied"
+ "description": "Access denied",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
},
@@ -1672,25 +2047,36 @@
"userApiKey": []
}
],
- "parameters": [
- {
- "name": "data",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/canned_response_create_update_payload"
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/canned_response_create_update_payload"
+ }
}
}
- ],
+ },
"responses": {
"200": {
"description": "Success",
- "schema": {
- "$ref": "#/definitions/canned_response"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/canned_response"
+ }
+ }
}
},
"403": {
- "description": "Access denied"
+ "description": "Access denied",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
}
@@ -1698,12 +2084,12 @@
"/api/v1/accounts/{account_id}/canned_responses/{id}": {
"parameters": [
{
- "$ref": "#/parameters/account_id"
+ "$ref": "#/components/parameters/account_id"
}
],
"patch": {
"tags": [
- "Canned Response"
+ "Canned Responses"
],
"operationId": "update-canned-response-in-account",
"summary": "Update Canned Response in Account",
@@ -1717,31 +2103,53 @@
{
"in": "path",
"name": "id",
- "type": "integer",
+ "schema": {
+ "type": "integer"
+ },
"required": true,
"description": "The ID of the canned response to be updated."
- },
- {
- "name": "data",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/canned_response_create_update_payload"
- }
}
],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/canned_response_create_update_payload"
+ }
+ }
+ }
+ },
"responses": {
"200": {
"description": "Success",
- "schema": {
- "$ref": "#/definitions/canned_response"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/canned_response"
+ }
+ }
}
},
"404": {
- "description": "Agent not found"
+ "description": "Agent not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
},
"403": {
- "description": "Access denied"
+ "description": "Access denied",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
},
@@ -1761,7 +2169,9 @@
{
"in": "path",
"name": "id",
- "type": "integer",
+ "schema": {
+ "type": "integer"
+ },
"required": true,
"description": "The ID of the canned response to be deleted"
}
@@ -1771,10 +2181,24 @@
"description": "Success"
},
"404": {
- "description": "Canned Response not found"
+ "description": "Canned Response not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
},
"403": {
- "description": "Access denied"
+ "description": "Access denied",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
}
@@ -1782,7 +2206,7 @@
"/api/v1/accounts/{account_id}/custom_attribute_definitions": {
"parameters": [
{
- "$ref": "#/parameters/account_id"
+ "$ref": "#/components/parameters/account_id"
}
],
"get": {
@@ -1795,11 +2219,13 @@
{
"name": "attribute_model",
"in": "query",
- "type": "string",
- "enum": [
- "0",
- "1"
- ],
+ "schema": {
+ "type": "string",
+ "enum": [
+ "0",
+ "1"
+ ]
+ },
"description": "conversation_attribute(0)/contact_attribute(1)",
"required": true
}
@@ -1813,16 +2239,27 @@
"responses": {
"200": {
"description": "Success",
- "schema": {
- "type": "array",
- "description": "Array of all custom attributes",
- "items": {
- "$ref": "#/definitions/custom_attribute"
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "description": "Array of all custom attributes",
+ "items": {
+ "$ref": "#/components/schemas/custom_attribute"
+ }
+ }
}
}
},
"403": {
- "description": "Access denied"
+ "description": "Access denied",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
},
@@ -1838,25 +2275,36 @@
"userApiKey": []
}
],
- "parameters": [
- {
- "name": "data",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/custom_attribute_create_update_payload"
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/custom_attribute_create_update_payload"
+ }
}
}
- ],
+ },
"responses": {
"200": {
"description": "Success",
- "schema": {
- "$ref": "#/definitions/custom_attribute"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/custom_attribute"
+ }
+ }
}
},
"403": {
- "description": "Access denied"
+ "description": "Access denied",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
}
@@ -1864,12 +2312,14 @@
"/api/v1/accounts/{account_id}/custom_attribute_definitions/{id}": {
"parameters": [
{
- "$ref": "#/parameters/account_id"
+ "$ref": "#/components/parameters/account_id"
},
{
"name": "id",
"in": "path",
- "type": "number",
+ "schema": {
+ "type": "number"
+ },
"description": "ID of the custom attribute",
"required": true
}
@@ -1880,15 +2330,22 @@
],
"operationId": "get-details-of-a-single-custom-attribute",
"summary": "Get a custom attribute details",
+ "security": [
+ {
+ "userApiKey": []
+ }
+ ],
"description": "Get the details of a custom attribute in the account",
"parameters": [
{
- "$ref": "#/parameters/account_id"
+ "$ref": "#/components/parameters/account_id"
},
{
"in": "path",
"name": "id",
- "type": "integer",
+ "schema": {
+ "type": "integer"
+ },
"required": true,
"description": "The ID of the custom attribute to be updated."
}
@@ -1896,15 +2353,33 @@
"responses": {
"200": {
"description": "Success",
- "schema": {
- "$ref": "#/definitions/custom_attribute"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/custom_attribute"
+ }
+ }
}
},
"401": {
- "description": "Unauthorized"
+ "description": "Unauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
},
"404": {
- "description": "The given attribute ID does not exist in the account"
+ "description": "The given attribute ID does not exist in the account",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
},
@@ -1924,31 +2399,53 @@
{
"in": "path",
"name": "id",
- "type": "integer",
+ "schema": {
+ "type": "integer"
+ },
"required": true,
"description": "The ID of the custom attribute to be updated."
- },
- {
- "name": "data",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/custom_attribute_create_update_payload"
- }
}
],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/custom_attribute_create_update_payload"
+ }
+ }
+ }
+ },
"responses": {
"200": {
"description": "Success",
- "schema": {
- "$ref": "#/definitions/custom_attribute"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/custom_attribute"
+ }
+ }
}
},
"404": {
- "description": "Agent not found"
+ "description": "Agent not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
},
"403": {
- "description": "Access denied"
+ "description": "Access denied",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
},
@@ -1966,12 +2463,14 @@
],
"parameters": [
{
- "$ref": "#/parameters/account_id"
+ "$ref": "#/components/parameters/account_id"
},
{
"in": "path",
"name": "id",
- "type": "integer",
+ "schema": {
+ "type": "integer"
+ },
"required": true,
"description": "The ID of the custom attribute to be deleted"
}
@@ -1981,10 +2480,24 @@
"description": "Success"
},
"404": {
- "description": "Custom attribute not found"
+ "description": "Custom attribute not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
},
"403": {
- "description": "Access denied"
+ "description": "Access denied",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
}
@@ -1995,30 +2508,43 @@
"Contacts"
],
"operationId": "contactList",
- "description": "Listing all the resolved contacts with pagination (Page size = 15) . Resolved contacts are the ones with a value for identifier, email or phone number",
+ "description": "Listing all the resolved contacts with pagination (Page size = 15). Resolved contacts are the ones with a value for identifier, email or phone number",
"summary": "List Contacts",
+ "security": [
+ {
+ "userApiKey": []
+ }
+ ],
"parameters": [
{
- "$ref": "#/parameters/account_id"
+ "$ref": "#/components/parameters/account_id"
},
{
- "$ref": "#/parameters/contact_sort_param"
+ "$ref": "#/components/parameters/contact_sort_param"
},
{
- "$ref": "#/parameters/page"
+ "$ref": "#/components/parameters/page"
}
],
"responses": {
"200": {
"description": "Success",
- "schema": {
- "$ref": "#/definitions/contact_list"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/contact_list"
+ }
+ }
}
},
"400": {
"description": "Bad Request Error",
- "schema": {
- "$ref": "#/definitions/bad_request_error"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
}
}
}
@@ -2030,30 +2556,45 @@
"operationId": "contactCreate",
"description": "Create a new Contact",
"summary": "Create Contact",
- "parameters": [
+ "security": [
{
- "$ref": "#/parameters/account_id"
- },
- {
- "name": "data",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/contact_create"
- }
+ "userApiKey": []
}
],
+ "parameters": [
+ {
+ "$ref": "#/components/parameters/account_id"
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/contact_create_payload"
+ }
+ }
+ }
+ },
"responses": {
"200": {
"description": "Success",
- "schema": {
- "$ref": "#/definitions/extended_contact"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/extended_contact"
+ }
+ }
}
},
"400": {
"description": "Bad Request Error",
- "schema": {
- "$ref": "#/definitions/bad_request_error"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
}
}
}
@@ -2062,14 +2603,16 @@
"/api/v1/accounts/{account_id}/contacts/{id}": {
"parameters": [
{
- "$ref": "#/parameters/account_id"
+ "$ref": "#/components/parameters/account_id"
},
{
"name": "id",
"in": "path",
- "type": "number",
- "description": "ID of the contact",
- "required": true
+ "required": true,
+ "schema": {
+ "type": "number"
+ },
+ "description": "ID of the contact"
}
],
"get": {
@@ -2078,19 +2621,42 @@
],
"operationId": "contactDetails",
"summary": "Show Contact",
+ "security": [
+ {
+ "userApiKey": []
+ }
+ ],
"description": "Get a contact belonging to the account using ID",
"responses": {
"200": {
"description": "Success",
- "schema": {
- "$ref": "#/definitions/extended_contact"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/extended_contact"
+ }
+ }
}
},
"404": {
- "description": "Contact not found"
+ "description": "Contact not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
},
"403": {
- "description": "Access denied"
+ "description": "Access denied",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
},
@@ -2100,29 +2666,52 @@
],
"operationId": "contactUpdate",
"summary": "Update Contact",
- "description": "Update a contact belonging to the account using ID",
- "parameters": [
+ "security": [
{
- "name": "data",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/contact_update"
- }
+ "userApiKey": []
}
],
+ "description": "Update a contact belonging to the account using ID",
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/contact_update_payload"
+ }
+ }
+ }
+ },
"responses": {
"204": {
"description": "Success",
- "schema": {
- "$ref": "#/definitions/contact_base"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/contact_base"
+ }
+ }
}
},
"404": {
- "description": "Contact not found"
+ "description": "Contact not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
},
"403": {
- "description": "Access denied"
+ "description": "Access denied",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
},
@@ -2132,51 +2721,239 @@
],
"operationId": "contactDelete",
"summary": "Delete Contact",
+ "security": [
+ {
+ "userApiKey": []
+ }
+ ],
+ "description": "Delete a contact belonging to the account using ID",
"responses": {
"200": {
"description": "Success"
},
"401": {
- "description": "Unauthorized"
+ "description": "Unauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
},
"404": {
- "description": "Contact not found"
+ "description": "Contact not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
}
},
"/api/v1/accounts/{account_id}/contacts/{id}/conversations": {
+ "parameters": [
+ {
+ "$ref": "#/components/parameters/account_id"
+ },
+ {
+ "name": "id",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "number"
+ },
+ "description": "ID of the contact"
+ }
+ ],
"get": {
"tags": [
"Contacts"
],
"operationId": "contactConversations",
"summary": "Contact Conversations",
- "description": "Get conversations associated to that contact",
+ "description": "Get conversations associated with that contact",
"parameters": [
- {
- "$ref": "#/parameters/account_id"
- },
{
"name": "id",
"in": "path",
- "type": "number",
- "description": "ID of the contact",
- "required": true
+ "required": true,
+ "schema": {
+ "type": "number"
+ },
+ "description": "ID of the contact"
+ }
+ ],
+ "security": [
+ {
+ "userApiKey": []
}
],
"responses": {
"200": {
"description": "Success",
- "schema": {
- "$ref": "#/definitions/contact_conversations"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/contact_conversations"
+ }
+ }
}
},
"404": {
- "description": "Contact not found"
+ "description": "Contact not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
},
"403": {
- "description": "Access denied"
+ "description": "Access denied",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/api/v1/accounts/{account_id}/contacts/{id}/labels": {
+ "parameters": [
+ {
+ "$ref": "#/components/parameters/account_id"
+ },
+ {
+ "name": "id",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "number"
+ },
+ "description": "ID of the contact"
+ }
+ ],
+ "get": {
+ "tags": [
+ "Contacts"
+ ],
+ "operationId": "list-all-labels-of-a-contact",
+ "summary": "List Labels",
+ "description": "Lists all the labels of a contact",
+ "security": [
+ {
+ "userApiKey": []
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Success",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/contact_labels"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Unauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Contact not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
+ }
+ }
+ },
+ "post": {
+ "tags": [
+ "Contacts"
+ ],
+ "operationId": "contact-add-labels",
+ "summary": "Add Labels",
+ "description": "Add labels to a contact. Note that this API would overwrite the existing list of labels associated to the conversation.",
+ "security": [
+ {
+ "userApiKey": []
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "labels"
+ ],
+ "properties": {
+ "labels": {
+ "type": "array",
+ "description": "Array of labels (comma-separated strings)",
+ "items": {
+ "type": "string"
+ },
+ "example": [
+ "support",
+ "billing"
+ ]
+ }
+ }
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Success",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/contact_labels"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Unauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Contact not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
}
@@ -2189,50 +2966,60 @@
"operationId": "contactSearch",
"description": "Search the resolved contacts using a search key, currently supports email search (Page size = 15). Resolved contacts are the ones with a value for identifier, email or phone number",
"summary": "Search Contacts",
+ "security": [
+ {
+ "userApiKey": []
+ }
+ ],
"parameters": [
{
- "$ref": "#/parameters/account_id"
+ "$ref": "#/components/parameters/account_id"
},
{
"name": "q",
"in": "query",
- "type": "string",
+ "schema": {
+ "type": "string"
+ },
"description": "Search using contact `name`, `identifier`, `email` or `phone number`"
},
{
- "$ref": "#/parameters/contact_sort_param"
+ "$ref": "#/components/parameters/contact_sort_param"
},
{
- "$ref": "#/parameters/page"
+ "$ref": "#/components/parameters/page"
}
],
"responses": {
"200": {
"description": "Success",
- "schema": {
- "type": "object",
- "properties": {
- "payload": {
- "$ref": "#/definitions/contact_list"
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "payload": {
+ "$ref": "#/components/schemas/contact_list"
+ }
+ }
}
}
}
},
"401": {
"description": "Authentication error",
- "schema": {
- "$ref": "#/definitions/bad_request_error"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
}
}
}
}
},
"/api/v1/accounts/{account_id}/contacts/filter": {
- "parameters": [
- {
- "$ref": "#/parameters/account_id"
- }
- ],
"post": {
"tags": [
"Contacts"
@@ -2243,94 +3030,106 @@
"security": [
{
"userApiKey": []
- },
- {
- "agentBotApiKey": []
}
],
"parameters": [
{
- "name": "page",
- "in": "query",
- "type": "integer"
+ "$ref": "#/components/parameters/account_id"
},
{
- "name": "body",
- "in": "body",
- "required": true,
+ "name": "page",
+ "in": "query",
"schema": {
- "type": "object",
- "properties": {
- "payload": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "attribute_key": {
- "type": "string",
- "description": "filter attribute name"
- },
- "filter_operator": {
- "type": "string",
- "description": "filter operator name",
- "enum": [
- "equal_to",
- "not_equal_to",
- "contains",
- "does_not_contain"
- ]
- },
- "values": {
- "type": "array",
- "items": {
- "type": "string"
+ "type": "number"
+ }
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "payload": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "attribute_key": {
+ "type": "string",
+ "description": "filter attribute name"
},
- "description": "array of the attribute values to filter"
- },
- "query_operator": {
- "type": "string",
- "description": "query operator name",
- "enum": [
- "AND",
- "OR"
- ]
+ "filter_operator": {
+ "type": "string",
+ "description": "filter operator name",
+ "enum": [
+ "equal_to",
+ "not_equal_to",
+ "contains",
+ "does_not_contain"
+ ]
+ },
+ "values": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "description": "array of the attribute values to filter"
+ },
+ "query_operator": {
+ "type": "string",
+ "description": "query operator name",
+ "enum": [
+ "AND",
+ "OR"
+ ]
+ }
}
- }
- },
- "example": [
- {
- "attribute_key": "name",
- "filter_operator": "equal_to",
- "values": [
- "en"
- ],
- "query_operator": "AND"
},
- {
- "attribute_key": "country_code",
- "filter_operator": "equal_to",
- "values": [
- "us"
- ],
- "query_operator": null
- }
- ]
+ "example": [
+ {
+ "attribute_key": "name",
+ "filter_operator": "equal_to",
+ "values": [
+ "en"
+ ],
+ "query_operator": "AND"
+ },
+ {
+ "attribute_key": "country_code",
+ "filter_operator": "equal_to",
+ "values": [
+ "us"
+ ],
+ "query_operator": null
+ }
+ ]
+ }
}
}
}
}
- ],
+ },
"responses": {
"200": {
"description": "Success",
- "schema": {
- "$ref": "#/definitions/contact_list"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/contact_list"
+ }
+ }
}
},
"400": {
"description": "Bad Request Error",
- "schema": {
- "$ref": "#/definitions/bad_request_error"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
}
}
}
@@ -2346,52 +3145,77 @@
"summary": "Create contact inbox",
"parameters": [
{
- "$ref": "#/parameters/account_id"
+ "$ref": "#/components/parameters/account_id"
},
{
"name": "id",
"in": "path",
- "type": "number",
+ "schema": {
+ "type": "number"
+ },
"description": "ID of the contact",
"required": true
- },
+ }
+ ],
+ "security": [
{
- "name": "data",
- "in": "body",
- "required": true,
- "schema": {
- "type": "object",
- "required": [
- "inbox_id"
- ],
- "properties": {
- "inbox_id": {
- "type": "number",
- "description": "The ID of the inbox"
- },
- "source_id": {
- "type": "string",
- "description": "Contact Inbox Source Id"
+ "userApiKey": []
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "inbox_id"
+ ],
+ "properties": {
+ "inbox_id": {
+ "type": "number",
+ "description": "The ID of the inbox",
+ "example": 1
+ },
+ "source_id": {
+ "type": "string",
+ "description": "Contact Inbox Source Id"
+ }
}
}
}
}
- ],
+ },
"responses": {
"200": {
"description": "Success",
- "schema": {
- "$ref": "#/definitions/contact_inboxes"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/contact_inboxes"
+ }
+ }
}
},
"401": {
"description": "Authentication error",
- "schema": {
- "$ref": "#/definitions/bad_request_error"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
}
},
"422": {
- "description": "Incorrect payload"
+ "description": "Incorrect payload",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
}
@@ -2404,14 +3228,21 @@
"operationId": "contactableInboxesGet",
"description": "Get List of contactable Inboxes",
"summary": "Get Contactable Inboxes",
+ "security": [
+ {
+ "userApiKey": []
+ }
+ ],
"parameters": [
{
- "$ref": "#/parameters/account_id"
+ "$ref": "#/components/parameters/account_id"
},
{
"name": "id",
"in": "path",
- "type": "number",
+ "schema": {
+ "type": "number"
+ },
"description": "ID of the contact",
"required": true
}
@@ -2419,18 +3250,33 @@
"responses": {
"200": {
"description": "Success",
- "schema": {
- "$ref": "#/definitions/contactable_inboxes"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/contactable_inboxes"
+ }
+ }
}
},
"401": {
"description": "Authentication error",
- "schema": {
- "$ref": "#/definitions/bad_request_error"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
}
},
"422": {
- "description": "Incorrect payload"
+ "description": "Incorrect payload",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
}
@@ -2438,7 +3284,7 @@
"/api/v1/accounts/{account_id}/automation_rules": {
"parameters": [
{
- "$ref": "#/parameters/account_id"
+ "$ref": "#/components/parameters/account_id"
}
],
"get": {
@@ -2449,10 +3295,10 @@
"summary": "List all automation rules in an account",
"parameters": [
{
- "$ref": "#/parameters/account_id"
+ "$ref": "#/components/parameters/account_id"
},
{
- "$ref": "#/parameters/page"
+ "$ref": "#/components/parameters/page"
}
],
"description": "Get details of automation rules in an Account",
@@ -2464,16 +3310,27 @@
"responses": {
"200": {
"description": "Success",
- "schema": {
- "type": "array",
- "description": "Array of all automation rules",
- "items": {
- "$ref": "#/definitions/automation_rule"
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "description": "Array of all automation rules",
+ "items": {
+ "$ref": "#/components/schemas/automation_rule"
+ }
+ }
}
}
},
"403": {
- "description": "Access denied"
+ "description": "Access denied",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
},
@@ -2489,25 +3346,36 @@
"userApiKey": []
}
],
- "parameters": [
- {
- "name": "data",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/automation_rule_create_update_payload"
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/automation_rule_create_update_payload"
+ }
}
}
- ],
+ },
"responses": {
"200": {
"description": "Success",
- "schema": {
- "$ref": "#/definitions/automation_rule"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/automation_rule"
+ }
+ }
}
},
"403": {
- "description": "Access denied"
+ "description": "Access denied",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
}
@@ -2515,12 +3383,14 @@
"/api/v1/accounts/{account_id}/automation_rules/{id}": {
"parameters": [
{
- "$ref": "#/parameters/account_id"
+ "$ref": "#/components/parameters/account_id"
},
{
"name": "id",
"in": "path",
- "type": "number",
+ "schema": {
+ "type": "number"
+ },
"description": "ID of the Automation Rule",
"required": true
}
@@ -2532,11 +3402,18 @@
"operationId": "get-details-of-a-single-automation-rule",
"summary": "Get a automation rule details",
"description": "Get the details of a automation rule in the account",
+ "security": [
+ {
+ "userApiKey": []
+ }
+ ],
"parameters": [
{
"in": "path",
"name": "id",
- "type": "integer",
+ "schema": {
+ "type": "integer"
+ },
"required": true,
"description": "The ID of the automation rule to be updated."
}
@@ -2544,15 +3421,33 @@
"responses": {
"200": {
"description": "Success",
- "schema": {
- "$ref": "#/definitions/automation_rule"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/automation_rule"
+ }
+ }
}
},
"401": {
- "description": "Unauthorized"
+ "description": "Unauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
},
"404": {
- "description": "The given rule ID does not exist in the account"
+ "description": "The given rule ID does not exist in the account",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
},
@@ -2572,31 +3467,53 @@
{
"in": "path",
"name": "id",
- "type": "integer",
+ "schema": {
+ "type": "integer"
+ },
"required": true,
"description": "The ID of the automation rule to be updated."
- },
- {
- "name": "data",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/automation_rule_create_update_payload"
- }
}
],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/automation_rule_create_update_payload"
+ }
+ }
+ }
+ },
"responses": {
"200": {
"description": "Success",
- "schema": {
- "$ref": "#/definitions/automation_rule"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/automation_rule"
+ }
+ }
}
},
"403": {
- "description": "Access denied"
+ "description": "Access denied",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
},
"404": {
- "description": "Rule not found"
+ "description": "Rule not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
},
@@ -2616,7 +3533,9 @@
{
"in": "path",
"name": "id",
- "type": "integer",
+ "schema": {
+ "type": "integer"
+ },
"required": true,
"description": "The ID of the automation rule to be deleted"
}
@@ -2626,10 +3545,24 @@
"description": "Success"
},
"403": {
- "description": "Access denied"
+ "description": "Access denied",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
},
"404": {
- "description": "automation rule not found"
+ "description": "automation rule not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
}
@@ -2637,7 +3570,7 @@
"/api/v1/accounts/{account_id}/portals": {
"parameters": [
{
- "$ref": "#/parameters/account_id"
+ "$ref": "#/components/parameters/account_id"
}
],
"post": {
@@ -2652,25 +3585,36 @@
"userApiKey": []
}
],
- "parameters": [
- {
- "name": "data",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/portal_create_update_payload"
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/portal_create_update_payload"
+ }
}
}
- ],
+ },
"responses": {
"200": {
"description": "Success",
- "schema": {
- "$ref": "#/definitions/portal"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/portal"
+ }
+ }
}
},
"403": {
- "description": "Access denied"
+ "description": "Access denied",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
},
@@ -2682,7 +3626,7 @@
"summary": "List all portals in an account",
"parameters": [
{
- "$ref": "#/parameters/account_id"
+ "$ref": "#/components/parameters/account_id"
}
],
"description": "Get details of portals in an Account",
@@ -2694,61 +3638,93 @@
"responses": {
"200": {
"description": "Success",
- "schema": {
- "type": "array",
- "description": "Array of all portals",
- "items": {
- "$ref": "#/definitions/portal"
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "description": "Array of all portals",
+ "items": {
+ "$ref": "#/components/schemas/portal"
+ }
+ }
}
}
},
"403": {
- "description": "Access denied"
+ "description": "Access denied",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
- },
+ }
+ },
+ "/api/v1/accounts/{account_id}/portals/{id}": {
+ "parameters": [
+ {
+ "$ref": "#/components/parameters/account_id"
+ },
+ {
+ "$ref": "#/components/parameters/portal_id"
+ }
+ ],
"patch": {
"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": []
}
],
- "parameters": [
- {
- "name": "data",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/portal_create_update_payload"
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/portal_create_update_payload"
+ }
}
}
- ],
+ },
"responses": {
"200": {
"description": "Success",
- "schema": {
- "$ref": "#/definitions/portal"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/portal"
+ }
+ }
}
},
"403": {
- "description": "Access denied"
+ "description": "Access denied",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
}
},
- "/api/v1/accounts/{account_id}/portals/{portal_id}/categories": {
+ "/api/v1/accounts/{account_id}/portals/{id}/categories": {
"parameters": [
{
- "$ref": "#/parameters/account_id"
+ "$ref": "#/components/parameters/account_id"
},
{
- "$ref": "#/parameters/portal_id"
+ "$ref": "#/components/parameters/portal_id"
}
],
"post": {
@@ -2763,36 +3739,47 @@
"userApiKey": []
}
],
- "parameters": [
- {
- "name": "data",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/category_create_update_payload"
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/category_create_update_payload"
+ }
}
}
- ],
+ },
"responses": {
"200": {
"description": "Success",
- "schema": {
- "$ref": "#/definitions/category"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/category"
+ }
+ }
}
},
"403": {
- "description": "Access denied"
+ "description": "Access denied",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
}
},
- "/api/v1/accounts/{account_id}/portals/{portal_id}/articles": {
+ "/api/v1/accounts/{account_id}/portals/{id}/articles": {
"parameters": [
{
- "$ref": "#/parameters/account_id"
+ "$ref": "#/components/parameters/account_id"
},
{
- "$ref": "#/parameters/portal_id"
+ "$ref": "#/components/parameters/portal_id"
}
],
"post": {
@@ -2807,25 +3794,36 @@
"userApiKey": []
}
],
- "parameters": [
- {
- "name": "data",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/article_create_update_payload"
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/article_create_update_payload"
+ }
}
}
- ],
+ },
"responses": {
"200": {
"description": "Success",
- "schema": {
- "$ref": "#/definitions/article"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/article"
+ }
+ }
}
},
"403": {
- "description": "Access denied"
+ "description": "Access denied",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
}
@@ -2833,7 +3831,7 @@
"/api/v1/accounts/{account_id}/conversations/meta": {
"parameters": [
{
- "$ref": "#/parameters/account_id"
+ "$ref": "#/components/parameters/account_id"
}
],
"get": {
@@ -2843,66 +3841,85 @@
"operationId": "conversationListMeta",
"description": "Get open, unassigned and all Conversation counts",
"summary": "Get Conversation Counts",
+ "security": [
+ {
+ "userApiKey": []
+ }
+ ],
"parameters": [
{
"name": "status",
"in": "query",
- "type": "string",
- "enum": [
- "all",
- "open",
- "resolved",
- "pending",
- "snoozed"
- ],
- "default": "open",
+ "schema": {
+ "type": "string",
+ "enum": [
+ "all",
+ "open",
+ "resolved",
+ "pending",
+ "snoozed"
+ ],
+ "default": "open"
+ },
"description": "Filter by conversation status."
},
{
"name": "q",
"in": "query",
- "type": "string",
+ "schema": {
+ "type": "string"
+ },
"description": "Filters conversations with messages containing the search term"
},
{
"name": "inbox_id",
"in": "query",
- "type": "integer"
+ "schema": {
+ "type": "integer"
+ }
},
{
"name": "team_id",
"in": "query",
- "type": "integer"
+ "schema": {
+ "type": "integer"
+ }
},
{
"name": "labels",
"in": "query",
- "type": "array",
- "items": {
- "type": "string"
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
}
}
],
"responses": {
"200": {
"description": "Success",
- "schema": {
- "type": "object",
- "properties": {
- "meta": {
+ "content": {
+ "application/json": {
+ "schema": {
"type": "object",
"properties": {
- "mine_count": {
- "type": "number"
- },
- "unassigned_count": {
- "type": "number"
- },
- "assigned_count": {
- "type": "number"
- },
- "all_count": {
- "type": "number"
+ "meta": {
+ "type": "object",
+ "properties": {
+ "mine_count": {
+ "type": "number"
+ },
+ "unassigned_count": {
+ "type": "number"
+ },
+ "assigned_count": {
+ "type": "number"
+ },
+ "all_count": {
+ "type": "number"
+ }
+ }
}
}
}
@@ -2911,8 +3928,12 @@
},
"400": {
"description": "Bad Request Error",
- "schema": {
- "$ref": "#/definitions/bad_request_error"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
}
}
}
@@ -2921,7 +3942,7 @@
"/api/v1/accounts/{account_id}/conversations": {
"parameters": [
{
- "$ref": "#/parameters/account_id"
+ "$ref": "#/components/parameters/account_id"
}
],
"get": {
@@ -2931,77 +3952,104 @@
"operationId": "conversationList",
"description": "List all the conversations with pagination",
"summary": "Conversations List",
+ "security": [
+ {
+ "userApiKey": []
+ }
+ ],
"parameters": [
{
"name": "assignee_type",
"in": "query",
- "type": "string",
- "enum": [
- "me",
- "unassigned",
- "all",
- "assigned"
- ],
- "default": "all",
+ "schema": {
+ "type": "string",
+ "enum": [
+ "me",
+ "unassigned",
+ "all",
+ "assigned"
+ ],
+ "default": "all"
+ },
"description": "Filter conversations by assignee type."
},
{
"name": "status",
"in": "query",
- "type": "string",
- "enum": [
- "all",
- "open",
- "resolved",
- "pending",
- "snoozed"
- ],
- "default": "open",
+ "schema": {
+ "type": "string",
+ "enum": [
+ "all",
+ "open",
+ "resolved",
+ "pending",
+ "snoozed"
+ ],
+ "default": "open"
+ },
"description": "Filter by conversation status."
},
{
"name": "q",
"in": "query",
- "type": "string",
+ "schema": {
+ "type": "string"
+ },
"description": "Filters conversations with messages containing the search term"
},
{
"name": "inbox_id",
"in": "query",
- "type": "integer"
+ "schema": {
+ "type": "integer"
+ }
},
{
"name": "team_id",
"in": "query",
- "type": "integer"
+ "schema": {
+ "type": "integer"
+ }
},
{
"name": "labels",
"in": "query",
- "type": "array",
- "items": {
- "type": "string"
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
}
},
{
"name": "page",
"in": "query",
- "type": "integer",
- "default": 1,
+ "schema": {
+ "type": "integer",
+ "default": 1
+ },
"description": "paginate through conversations"
}
],
"responses": {
"200": {
"description": "Success",
- "schema": {
- "$ref": "#/definitions/conversation_list"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/conversation_list"
+ }
+ }
}
},
"400": {
"description": "Bad Request Error",
- "schema": {
- "$ref": "#/definitions/bad_request_error"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
}
}
}
@@ -3012,7 +4060,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": []
@@ -3021,127 +4069,50 @@
"agentBotApiKey": []
}
],
- "parameters": [
- {
- "name": "data",
- "in": "body",
- "required": true,
- "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": {
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/conversation_create_payload"
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Success",
+ "content": {
+ "application/json": {
+ "schema": {
"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"
+ "id": {
+ "type": "number",
+ "description": "ID of the conversation"
},
- "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"
- }
- }
- }
+ "account_id": {
+ "type": "number",
+ "description": "Account Id"
+ },
+ "inbox_id": {
+ "type": "number",
+ "description": "ID of the inbox"
}
}
}
}
}
- }
- ],
- "responses": {
- "200": {
- "description": "Success",
- "schema": {
- "type": "object",
- "properties": {
- "id": {
- "type": "number",
- "description": "ID of the conversation"
- },
- "account_id": {
- "type": "number",
- "description": "Account Id"
- },
- "inbox_id": {
- "type": "number",
- "description": "ID of the inbox"
+ },
+ "403": {
+ "description": "Access denied",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
}
}
}
- },
- "403": {
- "description": "Access denied"
}
}
}
@@ -3149,7 +4120,7 @@
"/api/v1/accounts/{account_id}/conversations/filter": {
"parameters": [
{
- "$ref": "#/parameters/account_id"
+ "$ref": "#/components/parameters/account_id"
}
],
"post": {
@@ -3162,94 +4133,103 @@
"security": [
{
"userApiKey": []
- },
- {
- "agentBotApiKey": []
}
],
"parameters": [
{
"name": "page",
"in": "query",
- "type": "integer"
- },
- {
- "name": "body",
- "in": "body",
- "required": true,
"schema": {
- "type": "object",
- "properties": {
- "payload": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "attribute_key": {
- "type": "string",
- "description": "filter attribute name"
- },
- "filter_operator": {
- "type": "string",
- "description": "filter operator name",
- "enum": [
- "equal_to",
- "not_equal_to",
- "contains",
- "does_not_contain"
- ]
- },
- "values": {
- "type": "array",
- "items": {
- "type": "string"
+ "type": "number"
+ }
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "payload": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "attribute_key": {
+ "type": "string",
+ "description": "filter attribute name"
},
- "description": "array of the attribute values to filter"
- },
- "query_operator": {
- "type": "string",
- "description": "query operator name",
- "enum": [
- "AND",
- "OR"
- ]
+ "filter_operator": {
+ "type": "string",
+ "description": "filter operator name",
+ "enum": [
+ "equal_to",
+ "not_equal_to",
+ "contains",
+ "does_not_contain"
+ ]
+ },
+ "values": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "description": "array of the attribute values to filter"
+ },
+ "query_operator": {
+ "type": "string",
+ "description": "query operator name",
+ "enum": [
+ "AND",
+ "OR"
+ ]
+ }
}
- }
- },
- "example": [
- {
- "attribute_key": "browser_language",
- "filter_operator": "not_eq",
- "values": [
- "en"
- ],
- "query_operator": "AND"
},
- {
- "attribute_key": "status",
- "filter_operator": "eq",
- "values": [
- "pending"
- ],
- "query_operator": null
- }
- ]
+ "example": [
+ {
+ "attribute_key": "browser_language",
+ "filter_operator": "not_equal_to",
+ "values": [
+ "en"
+ ],
+ "query_operator": "AND"
+ },
+ {
+ "attribute_key": "status",
+ "filter_operator": "equal_to",
+ "values": [
+ "pending"
+ ],
+ "query_operator": null
+ }
+ ]
+ }
}
}
}
}
- ],
+ },
"responses": {
"200": {
"description": "Success",
- "schema": {
- "$ref": "#/definitions/conversation_list"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/conversation_list"
+ }
+ }
}
},
"400": {
"description": "Bad Request Error",
- "schema": {
- "$ref": "#/definitions/bad_request_error"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
}
}
}
@@ -3258,10 +4238,10 @@
"/api/v1/accounts/{account_id}/conversations/{conversation_id}": {
"parameters": [
{
- "$ref": "#/parameters/account_id"
+ "$ref": "#/components/parameters/account_id"
},
{
- "$ref": "#/parameters/conversation_id"
+ "$ref": "#/components/parameters/conversation_id"
}
],
"get": {
@@ -3270,19 +4250,42 @@
],
"operationId": "get-details-of-a-conversation",
"summary": "Conversation Details",
+ "security": [
+ {
+ "userApiKey": []
+ }
+ ],
"description": "Get all details regarding a conversation with all messages in the conversation",
"responses": {
"200": {
"description": "Success",
- "schema": {
- "$ref": "#/definitions/conversation_show"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/conversation_show"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Access denied",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
}
},
"404": {
- "description": "Conversation not found"
- },
- "403": {
- "description": "Access denied"
+ "description": "Conversation not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
},
@@ -3301,42 +4304,58 @@
"agentBotApiKey": []
}
],
- "parameters": [
- {
- "name": "data",
- "in": "body",
- "required": true,
- "schema": {
- "type": "object",
- "properties": {
- "priority": {
- "type": "string",
- "enum": [
- "urgent",
- "high",
- "medium",
- "low",
- "none"
- ],
- "description": "The priority of the conversation"
- },
- "sla_policy_id": {
- "type": "number",
- "description": "The ID of the SLA policy (Available only in Enterprise edition)"
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "priority": {
+ "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"
},
- "404": {
- "description": "Conversation not found"
- },
"401": {
- "description": "Unauthorized"
+ "description": "Unauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Conversation not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
}
@@ -3344,10 +4363,10 @@
"/api/v1/accounts/{account_id}/conversations/{conversation_id}/toggle_status": {
"parameters": [
{
- "$ref": "#/parameters/account_id"
+ "$ref": "#/components/parameters/account_id"
},
{
- "$ref": "#/parameters/conversation_id"
+ "$ref": "#/components/parameters/conversation_id"
}
],
"post": {
@@ -3365,42 +4384,61 @@
"agentBotApiKey": []
}
],
- "parameters": [
- {
- "name": "data",
- "in": "body",
- "required": true,
- "schema": {
- "type": "object",
- "required": [
- "status"
- ],
- "properties": {
- "status": {
- "type": "string",
- "enum": [
- "open",
- "resolved",
- "pending"
- ],
- "description": "The status of the conversation"
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "status"
+ ],
+ "properties": {
+ "status": {
+ "type": "string",
+ "enum": [
+ "open",
+ "resolved",
+ "pending"
+ ],
+ "description": "The status of the conversation",
+ "example": "open"
+ }
}
}
}
}
- ],
+ },
"responses": {
"200": {
"description": "Success",
- "schema": {
- "$ref": "#/definitions/conversation_status_toggle"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/conversation_status_toggle"
+ }
+ }
}
},
"404": {
- "description": "Conversation not found"
+ "description": "Conversation not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
},
"401": {
- "description": "Unauthorized"
+ "description": "Unauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
}
@@ -3408,10 +4446,10 @@
"/api/v1/accounts/{account_id}/conversations/{conversation_id}/toggle_priority": {
"parameters": [
{
- "$ref": "#/parameters/account_id"
+ "$ref": "#/components/parameters/account_id"
},
{
- "$ref": "#/parameters/conversation_id"
+ "$ref": "#/components/parameters/conversation_id"
}
],
"post": {
@@ -3429,41 +4467,56 @@
"agentBotApiKey": []
}
],
- "parameters": [
- {
- "name": "data",
- "in": "body",
- "required": true,
- "schema": {
- "type": "object",
- "required": [
- "priority"
- ],
- "properties": {
- "priority": {
- "type": "string",
- "enum": [
- "urgent",
- "high",
- "medium",
- "low",
- "none"
- ],
- "description": "The priority of the conversation"
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "priority"
+ ],
+ "properties": {
+ "priority": {
+ "type": "string",
+ "enum": [
+ "urgent",
+ "high",
+ "medium",
+ "low",
+ "none"
+ ],
+ "description": "The priority of the conversation",
+ "example": "high"
+ }
}
}
}
}
- ],
+ },
"responses": {
"200": {
"description": "Success"
},
- "404": {
- "description": "Conversation not found"
- },
"401": {
- "description": "Unauthorized"
+ "description": "Unauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Conversation not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
}
@@ -3471,10 +4524,10 @@
"/api/v1/accounts/{account_id}/conversations/{conversation_id}/custom_attributes": {
"parameters": [
{
- "$ref": "#/parameters/account_id"
+ "$ref": "#/components/parameters/account_id"
},
{
- "$ref": "#/parameters/conversation_id"
+ "$ref": "#/components/parameters/conversation_id"
}
],
"post": {
@@ -3487,52 +4540,67 @@
"security": [
{
"userApiKey": []
- },
- {
- "agentBotApiKey": []
}
],
- "parameters": [
- {
- "name": "data",
- "in": "body",
- "required": true,
- "schema": {
- "type": "object",
- "required": [
- "custom_attributes"
- ],
- "properties": {
- "custom_attributes": {
- "type": "object",
- "description": "The custom attributes to be set for the conversation",
- "example": {
- "order_id": "12345",
- "previous_conversation": "67890"
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "custom_attributes"
+ ],
+ "properties": {
+ "custom_attributes": {
+ "type": "object",
+ "description": "The custom attributes to be set for the conversation",
+ "example": {
+ "order_id": "12345",
+ "previous_conversation": "67890"
+ }
}
}
}
}
}
- ],
+ },
"responses": {
"200": {
"description": "Success",
- "schema": {
- "type": "object",
- "properties": {
- "custom_attributes": {
+ "content": {
+ "application/json": {
+ "schema": {
"type": "object",
- "description": "The custom attributes of the conversation"
+ "properties": {
+ "custom_attributes": {
+ "type": "object",
+ "description": "The custom attributes of the conversation"
+ }
+ }
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Unauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
}
}
}
},
"404": {
- "description": "Conversation not found"
- },
- "401": {
- "description": "Unauthorized"
+ "description": "Conversation not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
}
@@ -3540,15 +4608,15 @@
"/api/v1/accounts/{account_id}/conversations/{conversation_id}/assignments": {
"parameters": [
{
- "$ref": "#/parameters/account_id"
+ "$ref": "#/components/parameters/account_id"
},
{
- "$ref": "#/parameters/conversation_id"
+ "$ref": "#/components/parameters/conversation_id"
}
],
"post": {
"tags": [
- "Conversation Assignment"
+ "Conversations"
],
"operationId": "assign-a-conversation",
"summary": "Assign Conversation",
@@ -3561,38 +4629,58 @@
"agentBotApiKey": []
}
],
- "parameters": [
- {
- "name": "data",
- "in": "body",
- "required": true,
- "schema": {
- "type": "object",
- "properties": {
- "assignee_id": {
- "type": "number",
- "description": "Id of the assignee user"
- },
- "team_id": {
- "type": "number",
- "description": "Id of the team. If the assignee_id is present, this param would be ignored"
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "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",
- "schema": {
- "$ref": "#/definitions/user"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/user"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Unauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
}
},
"404": {
- "description": "Conversation not found"
- },
- "401": {
- "description": "Unauthorized"
+ "description": "Conversation not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
}
@@ -3600,72 +4688,125 @@
"/api/v1/accounts/{account_id}/conversations/{conversation_id}/labels": {
"parameters": [
{
- "$ref": "#/parameters/account_id"
+ "$ref": "#/components/parameters/account_id"
},
{
- "$ref": "#/parameters/conversation_id"
+ "$ref": "#/components/parameters/conversation_id"
}
],
"get": {
"tags": [
- "Conversation Labels"
+ "Conversations"
],
"operationId": "list-all-labels-of-a-conversation",
"summary": "List Labels",
+ "security": [
+ {
+ "userApiKey": []
+ }
+ ],
"description": "Lists all the labels of a conversation",
"responses": {
"200": {
"description": "Success",
- "schema": {
- "$ref": "#/definitions/conversation_labels"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/conversation_labels"
+ }
+ }
}
},
"404": {
- "description": "Conversation not found"
+ "description": "Conversation not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
},
"401": {
- "description": "Unauthorized"
+ "description": "Unauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
},
"post": {
"tags": [
- "Conversation Labels"
+ "Conversations"
],
"operationId": "conversation-add-labels",
"summary": "Add Labels",
- "description": "Add labels to a conversation. Note that this API would overwrite the existing list of labels associated to the conversation.",
- "parameters": [
+ "security": [
{
- "name": "data",
- "in": "body",
- "required": true,
- "schema": {
- "type": "object",
- "properties": {
- "labels": {
- "type": "array",
- "description": "Array of labels (comma-separated strings)",
- "items": {
- "type": "string"
+ "userApiKey": []
+ }
+ ],
+ "description": "Add labels to a conversation. Note that this API would overwrite the existing list of labels associated to the conversation.",
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "labels"
+ ],
+ "properties": {
+ "labels": {
+ "type": "array",
+ "description": "Array of labels (comma-separated strings)",
+ "items": {
+ "type": "string"
+ },
+ "example": [
+ "support",
+ "billing"
+ ]
}
}
}
}
}
- ],
+ },
"responses": {
"200": {
"description": "Success",
- "schema": {
- "$ref": "#/definitions/conversation_labels"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/conversation_labels"
+ }
+ }
}
},
"404": {
- "description": "Conversation not found"
+ "description": "Conversation not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
},
"401": {
- "description": "Unauthorized"
+ "description": "Unauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
}
@@ -3678,27 +4819,50 @@
"operationId": "listAllInboxes",
"summary": "List all inboxes",
"description": "List all inboxes available in the current account",
+ "security": [
+ {
+ "userApiKey": []
+ }
+ ],
"parameters": [
{
- "$ref": "#/parameters/account_id"
+ "$ref": "#/components/parameters/account_id"
}
],
"responses": {
"200": {
"description": "Success",
- "schema": {
- "type": "array",
- "description": "Array of inboxes",
- "items": {
- "$ref": "#/definitions/inbox"
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "description": "Array of inboxes",
+ "items": {
+ "$ref": "#/components/schemas/inbox"
+ }
+ }
}
}
},
"404": {
- "description": "Inbox not found"
+ "description": "Inbox not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
},
"403": {
- "description": "Access denied"
+ "description": "Access denied",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
}
@@ -3710,15 +4874,22 @@
],
"operationId": "GetInbox",
"summary": "Get an inbox",
+ "security": [
+ {
+ "userApiKey": []
+ }
+ ],
"description": "Get an inbox available in the current account",
"parameters": [
{
- "$ref": "#/parameters/account_id"
+ "$ref": "#/components/parameters/account_id"
},
{
"name": "id",
"in": "path",
- "type": "number",
+ "schema": {
+ "type": "number"
+ },
"description": "ID of the inbox",
"required": true
}
@@ -3726,15 +4897,33 @@
"responses": {
"200": {
"description": "Success",
- "schema": {
- "$ref": "#/definitions/inbox"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/inbox"
+ }
+ }
}
},
"404": {
- "description": "Inbox not found"
+ "description": "Inbox not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
},
"403": {
- "description": "Access denied"
+ "description": "Access denied",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
}
@@ -3747,73 +4936,56 @@
"operationId": "inboxCreation",
"summary": "Create an inbox",
"description": "You can create more than one website inbox in each account",
+ "security": [
+ {
+ "userApiKey": []
+ }
+ ],
"parameters": [
{
- "$ref": "#/parameters/account_id"
- },
- {
- "name": "data",
- "in": "body",
- "required": true,
- "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/parameters/account_id"
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/inbox_create_payload"
}
}
}
- ],
+ },
"responses": {
"200": {
"description": "Success",
- "schema": {
- "$ref": "#/definitions/inbox"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/inbox"
+ }
+ }
}
},
"404": {
- "description": "Inbox not found"
+ "description": "Inbox not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
},
"403": {
- "description": "Access denied"
+ "description": "Access denied",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
}
@@ -3825,82 +4997,66 @@
],
"operationId": "updateInbox",
"summary": "Update Inbox",
- "description": "Add avatar and disable auto assignment for an inbox",
+ "security": [
+ {
+ "userApiKey": []
+ }
+ ],
+ "description": "Update an existing inbox",
"parameters": [
{
- "$ref": "#/parameters/account_id"
+ "$ref": "#/components/parameters/account_id"
},
{
"name": "id",
"in": "path",
- "type": "number",
+ "schema": {
+ "type": "number"
+ },
"description": "ID of the inbox",
"required": true
- },
- {
- "name": "data",
- "in": "body",
- "required": true,
- "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"
- }
- }
- }
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/inbox_update_payload"
}
}
}
- ],
+ },
"responses": {
"200": {
"description": "Success",
- "schema": {
- "$ref": "#/definitions/inbox"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/inbox"
+ }
+ }
}
},
"404": {
- "description": "Inbox not found"
+ "description": "Inbox not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
},
"403": {
- "description": "Access denied"
+ "description": "Access denied",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
}
@@ -3913,14 +5069,21 @@
"operationId": "getInboxAgentBot",
"summary": "Show Inbox Agent Bot",
"description": "See if an agent bot is associated to the Inbox",
+ "security": [
+ {
+ "userApiKey": []
+ }
+ ],
"parameters": [
{
- "$ref": "#/parameters/account_id"
+ "$ref": "#/components/parameters/account_id"
},
{
"name": "id",
"in": "path",
- "type": "number",
+ "schema": {
+ "type": "number"
+ },
"description": "ID of the inbox",
"required": true
}
@@ -3928,15 +5091,33 @@
"responses": {
"204": {
"description": "Success",
- "schema": {
- "$ref": "#/definitions/agent_bot"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/agent_bot"
+ }
+ }
}
},
"404": {
- "description": "Inbox not found, Agent bot not found"
+ "description": "Inbox not found, Agent bot not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
},
"403": {
- "description": "Access denied"
+ "description": "Access denied",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
}
@@ -3948,45 +5129,69 @@
],
"operationId": "updateAgentBot",
"summary": "Add or remove agent bot",
+ "security": [
+ {
+ "userApiKey": []
+ }
+ ],
"description": "To add an agent bot pass agent_bot id, to remove agent bot from an inbox pass null",
"parameters": [
{
- "$ref": "#/parameters/account_id"
+ "$ref": "#/components/parameters/account_id"
},
{
"name": "id",
"in": "path",
- "type": "number",
+ "schema": {
+ "type": "number"
+ },
"description": "ID of the inbox",
"required": true
- },
- {
- "name": "data",
- "in": "body",
- "required": true,
- "schema": {
- "type": "object",
- "required": [
- "agent_bot"
- ],
- "properties": {
- "agent_bot": {
- "type": "number",
- "description": "Agent bot ID"
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "agent_bot"
+ ],
+ "properties": {
+ "agent_bot": {
+ "type": "number",
+ "description": "Agent bot ID",
+ "example": 1
+ }
}
}
}
}
- ],
+ },
"responses": {
"204": {
"description": "Success"
},
"404": {
- "description": "Inbox not found, Agent bot not found"
+ "description": "Inbox not found, Agent bot not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
},
"403": {
- "description": "Access denied"
+ "description": "Access denied",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
}
@@ -3994,10 +5199,10 @@
"/api/v1/accounts/{account_id}/inbox_members/{inbox_id}": {
"parameters": [
{
- "$ref": "#/parameters/account_id"
+ "$ref": "#/components/parameters/account_id"
},
{
- "$ref": "#/parameters/inbox_id"
+ "$ref": "#/components/parameters/inbox_id"
}
],
"get": {
@@ -4014,25 +5219,43 @@
],
"parameters": [
{
- "$ref": "#/parameters/inbox_id"
+ "$ref": "#/components/parameters/inbox_id"
}
],
"responses": {
"200": {
"description": "Success",
- "schema": {
- "type": "array",
- "description": "Array of all active agents",
- "items": {
- "$ref": "#/definitions/agent"
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "description": "Array of all active agents",
+ "items": {
+ "$ref": "#/components/schemas/agent"
+ }
+ }
}
}
},
"404": {
- "description": "Inbox not found"
+ "description": "Inbox not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
},
"403": {
- "description": "Access denied"
+ "description": "Access denied",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
}
@@ -4040,7 +5263,7 @@
"/api/v1/accounts/{account_id}/inbox_members": {
"parameters": [
{
- "$ref": "#/parameters/account_id"
+ "$ref": "#/components/parameters/account_id"
}
],
"post": {
@@ -4055,52 +5278,81 @@
"userApiKey": []
}
],
- "parameters": [
- {
- "name": "data",
- "in": "body",
- "required": true,
- "schema": {
- "type": "object",
- "required": [
- "inbox_id",
- "user_ids"
- ],
- "properties": {
- "inbox_id": {
- "type": "string",
- "description": "The ID of the inbox"
- },
- "user_ids": {
- "type": "array",
- "items": {
- "type": "integer"
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "inbox_id",
+ "user_ids"
+ ],
+ "properties": {
+ "inbox_id": {
+ "type": "integer",
+ "description": "The ID of the inbox",
+ "example": 1
},
- "description": "IDs of users to be added to the inbox"
+ "user_ids": {
+ "type": "array",
+ "items": {
+ "type": "integer"
+ },
+ "description": "IDs of users to be added to the inbox",
+ "example": [
+ 1
+ ]
+ }
}
}
}
}
- ],
+ },
"responses": {
"200": {
"description": "Success",
- "schema": {
- "type": "array",
- "description": "Array of all active agents",
- "items": {
- "$ref": "#/definitions/agent"
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "description": "Array of all active agents",
+ "items": {
+ "$ref": "#/components/schemas/agent"
+ }
+ }
}
}
},
"404": {
- "description": "Inbox not found"
+ "description": "Inbox not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
},
"403": {
- "description": "Access denied"
+ "description": "Access denied",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
},
"422": {
- "description": "User must exist"
+ "description": "User must exist",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
},
@@ -4116,52 +5368,81 @@
"userApiKey": []
}
],
- "parameters": [
- {
- "name": "data",
- "in": "body",
- "required": true,
- "schema": {
- "type": "object",
- "required": [
- "inbox_id",
- "user_ids"
- ],
- "properties": {
- "inbox_id": {
- "type": "string",
- "description": "The ID of the inbox"
- },
- "user_ids": {
- "type": "array",
- "items": {
- "type": "integer"
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "inbox_id",
+ "user_ids"
+ ],
+ "properties": {
+ "inbox_id": {
+ "type": "string",
+ "description": "The ID of the inbox",
+ "example": 1
},
- "description": "IDs of users to be added to the inbox"
+ "user_ids": {
+ "type": "array",
+ "items": {
+ "type": "integer"
+ },
+ "description": "IDs of users to be added to the inbox",
+ "example": [
+ 1
+ ]
+ }
}
}
}
}
- ],
+ },
"responses": {
"200": {
"description": "Success",
- "schema": {
- "type": "array",
- "description": "Array of all active agents",
- "items": {
- "$ref": "#/definitions/agent"
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "description": "Array of all active agents",
+ "items": {
+ "$ref": "#/components/schemas/agent"
+ }
+ }
}
}
},
"404": {
- "description": "Inbox not found"
+ "description": "Inbox not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
},
"403": {
- "description": "Access denied"
+ "description": "Access denied",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
},
"422": {
- "description": "User must exist"
+ "description": "User must exist",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
},
@@ -4177,45 +5458,66 @@
"userApiKey": []
}
],
- "parameters": [
- {
- "name": "data",
- "in": "body",
- "required": true,
- "schema": {
- "type": "object",
- "required": [
- "inbox_id",
- "user_ids"
- ],
- "properties": {
- "inbox_id": {
- "type": "string",
- "description": "The ID of the inbox"
- },
- "user_ids": {
- "type": "array",
- "items": {
- "type": "integer"
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "inbox_id",
+ "user_ids"
+ ],
+ "properties": {
+ "inbox_id": {
+ "type": "string",
+ "description": "The ID of the inbox"
},
- "description": "IDs of users to be deleted from the inbox"
+ "user_ids": {
+ "type": "array",
+ "items": {
+ "type": "integer"
+ },
+ "description": "IDs of users to be deleted from the inbox"
+ }
}
}
}
}
- ],
+ },
"responses": {
"200": {
"description": "Success"
},
"404": {
- "description": "Inbox not found"
+ "description": "Inbox not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
},
"403": {
- "description": "Access denied"
+ "description": "Access denied",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
},
"422": {
- "description": "User must exist"
+ "description": "User must exist",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
}
@@ -4223,10 +5525,10 @@
"/api/v1/accounts/{account_id}/conversations/{conversation_id}/messages": {
"parameters": [
{
- "$ref": "#/parameters/account_id"
+ "$ref": "#/components/parameters/account_id"
},
{
- "$ref": "#/parameters/conversation_id"
+ "$ref": "#/components/parameters/conversation_id"
}
],
"get": {
@@ -4235,30 +5537,53 @@
],
"operationId": "list-all-messages",
"summary": "Get messages",
+ "security": [
+ {
+ "userApiKey": []
+ }
+ ],
"description": "List all messages of a conversation",
"responses": {
"200": {
"description": "Success",
- "schema": {
- "type": "array",
- "description": "Array of messages",
- "items": {
- "allOf": [
- {
- "$ref": "#/definitions/generic_id"
- },
- {
- "$ref": "#/definitions/message"
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "description": "Array of messages",
+ "items": {
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/generic_id"
+ },
+ {
+ "$ref": "#/components/schemas/message"
+ }
+ ]
}
- ]
+ }
}
}
},
"404": {
- "description": "Conversation not found"
+ "description": "Conversation not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
},
"401": {
- "description": "Unauthorized"
+ "description": "Unauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
},
@@ -4277,35 +5602,53 @@
"agentBotApiKey": []
}
],
- "parameters": [
- {
- "name": "data",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/conversation_message_create"
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/conversation_message_create_payload"
+ }
}
}
- ],
+ },
"responses": {
"200": {
"description": "Success",
- "schema": {
- "allOf": [
- {
- "$ref": "#/definitions/generic_id"
- },
- {
- "$ref": "#/definitions/message"
+ "content": {
+ "application/json": {
+ "schema": {
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/generic_id"
+ },
+ {
+ "$ref": "#/components/schemas/message"
+ }
+ ]
}
- ]
+ }
}
},
"404": {
- "description": "Conversation not found"
+ "description": "Conversation not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
},
"403": {
- "description": "Access denied"
+ "description": "Access denied",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
}
@@ -4313,13 +5656,13 @@
"/api/v1/accounts/{account_id}/conversations/{conversation_id}/messages/{message_id}": {
"parameters": [
{
- "$ref": "#/parameters/account_id"
+ "$ref": "#/components/parameters/account_id"
},
{
- "$ref": "#/parameters/conversation_id"
+ "$ref": "#/components/parameters/conversation_id"
},
{
- "$ref": "#/parameters/message_id"
+ "$ref": "#/components/parameters/message_id"
}
],
"delete": {
@@ -4328,16 +5671,35 @@
],
"operationId": "delete-a-message",
"summary": "Delete a message",
+ "security": [
+ {
+ "userApiKey": []
+ }
+ ],
"description": "Delete a message and it's attachments from the conversation.",
"responses": {
"200": {
"description": "Success"
},
"401": {
- "description": "Unauthorized"
+ "description": "Unauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
},
"404": {
- "description": "The message or conversation does not exist in the account"
+ "description": "The message or conversation does not exist in the account",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
}
@@ -4345,7 +5707,7 @@
"/api/v1/accounts/{account_id}/integrations/apps": {
"parameters": [
{
- "$ref": "#/parameters/account_id"
+ "$ref": "#/components/parameters/account_id"
}
],
"get": {
@@ -4354,23 +5716,46 @@
],
"operationId": "get-details-of-all-integrations",
"summary": "List all the Integrations",
+ "security": [
+ {
+ "userApiKey": []
+ }
+ ],
"description": "Get the details of all Integrations available for the account",
"responses": {
"200": {
"description": "Success",
- "schema": {
- "type": "array",
- "description": "Array of Integration apps",
- "items": {
- "$ref": "#/definitions/integrations_app"
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "description": "Array of Integration apps",
+ "items": {
+ "$ref": "#/components/schemas/integrations_app"
+ }
+ }
}
}
},
"401": {
- "description": "Unauthorized"
+ "description": "Unauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
},
"404": {
- "description": "Url not found"
+ "description": "Url not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
}
@@ -4383,28 +5768,46 @@
"operationId": "create-an-integration-hook",
"summary": "Create an integration hook",
"description": "Create an integration hook",
- "parameters": [
+ "security": [
{
- "$ref": "#/parameters/account_id"
- },
- {
- "name": "data",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/integrations_hook_create_payload"
- }
+ "userApiKey": []
}
],
+ "parameters": [
+ {
+ "$ref": "#/components/parameters/account_id"
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/integrations_hook_create_payload"
+ }
+ }
+ }
+ },
"responses": {
"200": {
"description": "Success",
- "schema": {
- "$ref": "#/definitions/integrations_hook"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/integrations_hook"
+ }
+ }
}
},
"401": {
- "description": "Unauthorized"
+ "description": "Unauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
}
@@ -4417,31 +5820,49 @@
"operationId": "update-an-integrations-hook",
"summary": "Update an Integration Hook",
"description": "Update an Integration Hook",
- "parameters": [
+ "security": [
{
- "$ref": "#/parameters/account_id"
- },
- {
- "$ref": "#/parameters/hook_id"
- },
- {
- "name": "data",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/integrations_hook_update_payload"
- }
+ "userApiKey": []
}
],
+ "parameters": [
+ {
+ "$ref": "#/components/parameters/account_id"
+ },
+ {
+ "$ref": "#/components/parameters/hook_id"
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/integrations_hook_update_payload"
+ }
+ }
+ }
+ },
"responses": {
"200": {
"description": "Success",
- "schema": {
- "$ref": "#/definitions/integrations_hook"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/integrations_hook"
+ }
+ }
}
},
"401": {
- "description": "Unauthorized"
+ "description": "Unauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
},
@@ -4452,12 +5873,17 @@
"operationId": "delete-an-integration-hook",
"summary": "Delete an Integration Hook",
"description": "Delete an Integration Hook",
+ "security": [
+ {
+ "userApiKey": []
+ }
+ ],
"parameters": [
{
- "$ref": "#/parameters/account_id"
+ "$ref": "#/components/parameters/account_id"
},
{
- "$ref": "#/parameters/hook_id"
+ "$ref": "#/components/parameters/hook_id"
}
],
"responses": {
@@ -4465,10 +5891,24 @@
"description": "Success"
},
"401": {
- "description": "Unauthorized"
+ "description": "Unauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
},
"404": {
- "description": "The hook does not exist in the account"
+ "description": "The hook does not exist in the account",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
}
@@ -4481,15 +5921,31 @@
"operationId": "fetchProfile",
"summary": "Fetch user profile",
"description": "Get the user profile details",
+ "security": [
+ {
+ "userApiKey": []
+ }
+ ],
"responses": {
"200": {
"description": "Success",
- "schema": {
- "$ref": "#/definitions/user"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/user"
+ }
+ }
}
},
"401": {
- "description": "Unauthorized"
+ "description": "Unauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
}
@@ -4497,7 +5953,7 @@
"/api/v1/accounts/{account_id}/teams": {
"parameters": [
{
- "$ref": "#/parameters/account_id"
+ "$ref": "#/components/parameters/account_id"
}
],
"get": {
@@ -4506,20 +5962,36 @@
],
"operationId": "list-all-teams",
"summary": "List all teams",
+ "security": [
+ {
+ "userApiKey": []
+ }
+ ],
"description": "List all teams available in the current account",
"responses": {
"200": {
"description": "Success",
- "schema": {
- "type": "array",
- "description": "Array of teams",
- "items": {
- "$ref": "#/definitions/team"
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "description": "Array of teams",
+ "items": {
+ "$ref": "#/components/schemas/team"
+ }
+ }
}
}
},
"401": {
- "description": "Unauthorized"
+ "description": "Unauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
},
@@ -4529,29 +6001,47 @@
],
"operationId": "create-a-team",
"summary": "Create a team",
+ "security": [
+ {
+ "userApiKey": []
+ }
+ ],
"description": "Create a team in the account",
"parameters": [
{
- "$ref": "#/parameters/account_id"
- },
- {
- "name": "data",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/team_create_update_payload"
- }
+ "$ref": "#/components/parameters/account_id"
}
],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/team_create_update_payload"
+ }
+ }
+ }
+ },
"responses": {
"200": {
"description": "Success",
- "schema": {
- "$ref": "#/definitions/team"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/team"
+ }
+ }
}
},
"401": {
- "description": "Unauthorized"
+ "description": "Unauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
}
@@ -4559,10 +6049,10 @@
"/api/v1/accounts/{account_id}/teams/{team_id}": {
"parameters": [
{
- "$ref": "#/parameters/account_id"
+ "$ref": "#/components/parameters/account_id"
},
{
- "$ref": "#/parameters/team_id"
+ "$ref": "#/components/parameters/team_id"
}
],
"get": {
@@ -4571,19 +6061,42 @@
],
"operationId": "get-details-of-a-single-team",
"summary": "Get a team details",
+ "security": [
+ {
+ "userApiKey": []
+ }
+ ],
"description": "Get the details of a team in the account",
"responses": {
"200": {
"description": "Success",
- "schema": {
- "$ref": "#/definitions/team"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/team"
+ }
+ }
}
},
"401": {
- "description": "Unauthorized"
+ "description": "Unauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
},
"404": {
- "description": "The given team ID does not exist in the account"
+ "description": "The given team ID does not exist in the account",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
},
@@ -4593,26 +6106,42 @@
],
"operationId": "update-a-team",
"summary": "Update a team",
- "description": "Update a team's attributes",
- "parameters": [
+ "security": [
{
- "name": "data",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/team_create_update_payload"
- }
+ "userApiKey": []
}
],
+ "description": "Update a team's attributes",
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/team_create_update_payload"
+ }
+ }
+ }
+ },
"responses": {
"200": {
"description": "Success",
- "schema": {
- "$ref": "#/definitions/team"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/team"
+ }
+ }
}
},
"401": {
- "description": "Unauthorized"
+ "description": "Unauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
},
@@ -4622,16 +6151,35 @@
],
"operationId": "delete-a-team",
"summary": "Delete a team",
+ "security": [
+ {
+ "userApiKey": []
+ }
+ ],
"description": "Delete a team from the account",
"responses": {
"200": {
"description": "Success"
},
"401": {
- "description": "Unauthorized"
+ "description": "Unauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
},
"404": {
- "description": "The team does not exist in the account"
+ "description": "The team does not exist in the account",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
}
@@ -4639,10 +6187,10 @@
"/api/v1/accounts/{account_id}/teams/{team_id}/team_members": {
"parameters": [
{
- "$ref": "#/parameters/account_id"
+ "$ref": "#/components/parameters/account_id"
},
{
- "$ref": "#/parameters/team_id"
+ "$ref": "#/components/parameters/team_id"
}
],
"get": {
@@ -4659,28 +6207,46 @@
],
"parameters": [
{
- "$ref": "#/parameters/account_id"
+ "$ref": "#/components/parameters/account_id"
},
{
- "$ref": "#/parameters/team_id"
+ "$ref": "#/components/parameters/team_id"
}
],
"responses": {
"200": {
"description": "Success",
- "schema": {
- "type": "array",
- "description": "Array of all agents in the team",
- "items": {
- "$ref": "#/definitions/agent"
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "description": "Array of all agents in the team",
+ "items": {
+ "$ref": "#/components/schemas/agent"
+ }
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Access denied",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
}
}
},
"404": {
- "description": "Inbox not found"
- },
- "403": {
- "description": "Access denied"
+ "description": "Team not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
},
@@ -4696,47 +6262,75 @@
"userApiKey": []
}
],
- "parameters": [
- {
- "name": "data",
- "in": "body",
- "required": true,
- "schema": {
- "type": "object",
- "required": [
- "user_ids"
- ],
- "properties": {
- "user_ids": {
- "type": "array",
- "items": {
- "type": "integer"
- },
- "description": "IDs of users to be added to the team"
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "user_ids"
+ ],
+ "properties": {
+ "user_ids": {
+ "type": "array",
+ "items": {
+ "type": "integer"
+ },
+ "description": "IDs of users to be added to the team",
+ "example": [
+ 1
+ ]
+ }
}
}
}
}
- ],
+ },
"responses": {
"200": {
"description": "Success",
- "schema": {
- "type": "array",
- "description": "Array of all active agents",
- "items": {
- "$ref": "#/definitions/agent"
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "description": "Array of all active agents",
+ "items": {
+ "$ref": "#/components/schemas/agent"
+ }
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Access denied",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
}
}
},
"404": {
- "description": "Team not found"
- },
- "403": {
- "description": "Access denied"
+ "description": "Team not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
},
"422": {
- "description": "User must exist"
+ "description": "User must exist",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
},
@@ -4752,47 +6346,75 @@
"userApiKey": []
}
],
- "parameters": [
- {
- "name": "data",
- "in": "body",
- "required": true,
- "schema": {
- "type": "object",
- "required": [
- "user_ids"
- ],
- "properties": {
- "user_ids": {
- "type": "array",
- "items": {
- "type": "integer"
- },
- "description": "IDs of users to be added to the team"
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "user_ids"
+ ],
+ "properties": {
+ "user_ids": {
+ "type": "array",
+ "items": {
+ "type": "integer"
+ },
+ "description": "IDs of users to be added to the team",
+ "example": [
+ 1
+ ]
+ }
}
}
}
}
- ],
+ },
"responses": {
"200": {
"description": "Success",
- "schema": {
- "type": "array",
- "description": "Array of all agents in the team",
- "items": {
- "$ref": "#/definitions/agent"
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "description": "Array of all agents in the team",
+ "items": {
+ "$ref": "#/components/schemas/agent"
+ }
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Access denied",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
}
}
},
"404": {
- "description": "Team not found"
- },
- "403": {
- "description": "Access denied"
+ "description": "Team not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
},
"422": {
- "description": "User must exist"
+ "description": "User must exist",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
},
@@ -4808,41 +6430,61 @@
"userApiKey": []
}
],
- "parameters": [
- {
- "name": "data",
- "in": "body",
- "required": true,
- "schema": {
- "type": "object",
- "required": [
- "team_id",
- "user_ids"
- ],
- "properties": {
- "user_ids": {
- "type": "array",
- "items": {
- "type": "integer"
- },
- "description": "IDs of users to be deleted from the team"
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "user_ids"
+ ],
+ "properties": {
+ "user_ids": {
+ "type": "array",
+ "items": {
+ "type": "integer"
+ },
+ "description": "IDs of users to be deleted from the team"
+ }
}
}
}
}
- ],
+ },
"responses": {
"200": {
"description": "Success"
},
- "404": {
- "description": "Team not found"
- },
"403": {
- "description": "Access denied"
+ "description": "Access denied",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Team not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
},
"422": {
- "description": "User must exist"
+ "description": "User must exist",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
}
@@ -4850,17 +6492,19 @@
"/api/v1/accounts/{account_id}/custom_filters": {
"parameters": [
{
- "$ref": "#/parameters/account_id"
+ "$ref": "#/components/parameters/account_id"
},
{
"in": "query",
"name": "filter_type",
- "type": "string",
- "enum": [
- "conversation",
- "contact",
- "report"
- ],
+ "schema": {
+ "type": "string",
+ "enum": [
+ "conversation",
+ "contact",
+ "report"
+ ]
+ },
"required": false,
"description": "The type of custom filter"
}
@@ -4872,19 +6516,35 @@
"operationId": "list-all-filters",
"summary": "List all custom filters",
"description": "List all custom filters in a category of a user",
+ "security": [
+ {
+ "userApiKey": []
+ }
+ ],
"responses": {
"200": {
"description": "Success",
- "schema": {
- "type": "array",
- "description": "Array of custom filters",
- "items": {
- "$ref": "#/definitions/custom_filter"
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "description": "Array of custom filters",
+ "items": {
+ "$ref": "#/components/schemas/custom_filter"
+ }
+ }
}
}
},
"401": {
- "description": "Unauthorized"
+ "description": "Unauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
},
@@ -4897,26 +6557,44 @@
"description": "Create a custom filter in the account",
"parameters": [
{
- "$ref": "#/parameters/account_id"
- },
- {
- "name": "data",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/custom_filter_create_update_payload"
- }
+ "$ref": "#/components/parameters/account_id"
}
],
+ "security": [
+ {
+ "userApiKey": []
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/custom_filter_create_update_payload"
+ }
+ }
+ }
+ },
"responses": {
"200": {
"description": "Success",
- "schema": {
- "$ref": "#/definitions/custom_filter"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/custom_filter"
+ }
+ }
}
},
"401": {
- "description": "Unauthorized"
+ "description": "Unauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
}
@@ -4924,10 +6602,10 @@
"/api/v1/accounts/{account_id}/custom_filters/{custom_filter_id}": {
"parameters": [
{
- "$ref": "#/parameters/account_id"
+ "$ref": "#/components/parameters/account_id"
},
{
- "$ref": "#/parameters/custom_filter_id"
+ "$ref": "#/components/parameters/custom_filter_id"
}
],
"get": {
@@ -4937,18 +6615,41 @@
"operationId": "get-details-of-a-single-custom-filter",
"summary": "Get a custom filter details",
"description": "Get the details of a custom filter in the account",
+ "security": [
+ {
+ "userApiKey": []
+ }
+ ],
"responses": {
"200": {
"description": "Success",
- "schema": {
- "$ref": "#/definitions/custom_filter"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/custom_filter"
+ }
+ }
}
},
"401": {
- "description": "Unauthorized"
+ "description": "Unauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
},
"404": {
- "description": "The given team ID does not exist in the account"
+ "description": "The given team ID does not exist in the account",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
},
@@ -4958,26 +6659,42 @@
],
"operationId": "update-a-custom-filter",
"summary": "Update a custom filter",
- "description": "Update a custom filter's attributes",
- "parameters": [
+ "security": [
{
- "name": "data",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/custom_filter_create_update_payload"
- }
+ "userApiKey": []
}
],
+ "description": "Update a custom filter's attributes",
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/custom_filter_create_update_payload"
+ }
+ }
+ }
+ },
"responses": {
"200": {
"description": "Success",
- "schema": {
- "$ref": "#/definitions/custom_filter"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/custom_filter"
+ }
+ }
}
},
"401": {
- "description": "Unauthorized"
+ "description": "Unauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
},
@@ -4987,16 +6704,35 @@
],
"operationId": "delete-a-custom-filter",
"summary": "Delete a custom filter",
+ "security": [
+ {
+ "userApiKey": []
+ }
+ ],
"description": "Delete a custom filter from the account",
"responses": {
"200": {
"description": "Success"
},
"401": {
- "description": "Unauthorized"
+ "description": "Unauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
},
"404": {
- "description": "The custom filter does not exist in the account"
+ "description": "The custom filter does not exist in the account",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
}
@@ -5004,7 +6740,7 @@
"/api/v1/accounts/{account_id}/webhooks": {
"parameters": [
{
- "$ref": "#/parameters/account_id"
+ "$ref": "#/components/parameters/account_id"
}
],
"get": {
@@ -5013,20 +6749,36 @@
],
"operationId": "list-all-webhooks",
"summary": "List all webhooks",
+ "security": [
+ {
+ "userApiKey": []
+ }
+ ],
"description": "List all webhooks in the account",
"responses": {
"200": {
"description": "Success",
- "schema": {
- "type": "array",
- "description": "Array of webhook objects",
- "items": {
- "$ref": "#/definitions/webhook"
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "description": "Array of webhook objects",
+ "items": {
+ "$ref": "#/components/schemas/webhook"
+ }
+ }
}
}
},
"401": {
- "description": "Unauthorized"
+ "description": "Unauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
},
@@ -5036,29 +6788,47 @@
],
"operationId": "create-a-webhook",
"summary": "Add a webhook",
+ "security": [
+ {
+ "userApiKey": []
+ }
+ ],
"description": "Add a webhook subscription to the account",
"parameters": [
{
- "$ref": "#/parameters/account_id"
- },
- {
- "name": "data",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/webhook_create_update_payload"
- }
+ "$ref": "#/components/parameters/account_id"
}
],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/webhook_create_update_payload"
+ }
+ }
+ }
+ },
"responses": {
"200": {
"description": "Success",
- "schema": {
- "$ref": "#/definitions/webhook"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/webhook"
+ }
+ }
}
},
"401": {
- "description": "Unauthorized"
+ "description": "Unauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
}
@@ -5066,10 +6836,10 @@
"/api/v1/accounts/{account_id}/webhooks/{webhook_id}": {
"parameters": [
{
- "$ref": "#/parameters/account_id"
+ "$ref": "#/components/parameters/account_id"
},
{
- "$ref": "#/parameters/webhook_id"
+ "$ref": "#/components/parameters/webhook_id"
}
],
"patch": {
@@ -5078,29 +6848,47 @@
],
"operationId": "update-a-webhook",
"summary": "Update a webhook object",
+ "security": [
+ {
+ "userApiKey": []
+ }
+ ],
"description": "Update a webhook object in the account",
"parameters": [
{
- "$ref": "#/parameters/account_id"
- },
- {
- "name": "data",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/webhook_create_update_payload"
- }
+ "$ref": "#/components/parameters/account_id"
}
],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/webhook_create_update_payload"
+ }
+ }
+ }
+ },
"responses": {
"200": {
"description": "Success",
- "schema": {
- "$ref": "#/definitions/webhook"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/webhook"
+ }
+ }
}
},
"401": {
- "description": "Unauthorized"
+ "description": "Unauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
},
@@ -5110,16 +6898,35 @@
],
"operationId": "delete-a-webhook",
"summary": "Delete a webhook",
+ "security": [
+ {
+ "userApiKey": []
+ }
+ ],
"description": "Delete a webhook from the account",
"responses": {
"200": {
"description": "Success"
},
"401": {
- "description": "Unauthorized"
+ "description": "Unauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object"
+ }
+ }
+ }
},
"404": {
- "description": "The webhook does not exist in the account"
+ "description": "The webhook does not exist in the account",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
}
@@ -5127,30 +6934,36 @@
"/api/v2/accounts/{account_id}/reports": {
"parameters": [
{
- "$ref": "#/parameters/account_id"
+ "$ref": "#/components/parameters/account_id"
},
{
- "$ref": "#/parameters/report_metric"
+ "$ref": "#/components/parameters/report_metric"
},
{
- "$ref": "#/parameters/report_type"
+ "$ref": "#/components/parameters/report_type"
},
{
"in": "query",
"name": "id",
- "type": "string",
+ "schema": {
+ "type": "string"
+ },
"description": "The Id of specific object in case of agent/inbox/label"
},
{
"in": "query",
"name": "since",
- "type": "string",
+ "schema": {
+ "type": "string"
+ },
"description": "The timestamp from where report should start."
},
{
"in": "query",
"name": "until",
- "type": "string",
+ "schema": {
+ "type": "string"
+ },
"description": "The timestamp from where report should stop."
}
],
@@ -5160,31 +6973,54 @@
],
"operationId": "list-all-conversation-statistics",
"summary": "Get Account reports",
+ "security": [
+ {
+ "userApiKey": []
+ }
+ ],
"description": "Get Account reports for a specific type, metric and date range",
"responses": {
"200": {
"description": "Success",
- "schema": {
- "type": "array",
- "description": "Array of date based conversation statistics",
- "items": {
- "type": "object",
- "properties": {
- "value": {
- "type": "string"
- },
- "timestamp": {
- "type": "number"
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "description": "Array of date based conversation statistics",
+ "items": {
+ "type": "object",
+ "properties": {
+ "value": {
+ "type": "string"
+ },
+ "timestamp": {
+ "type": "number"
+ }
+ }
}
}
}
}
},
"404": {
- "description": "reports not found"
+ "description": "reports not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
},
"403": {
- "description": "Access denied"
+ "description": "Access denied",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
}
@@ -5192,27 +7028,33 @@
"/api/v2/accounts/{account_id}/reports/summary": {
"parameters": [
{
- "$ref": "#/parameters/account_id"
+ "$ref": "#/components/parameters/account_id"
},
{
- "$ref": "#/parameters/report_type"
+ "$ref": "#/components/parameters/report_type"
},
{
"in": "query",
"name": "id",
- "type": "string",
+ "schema": {
+ "type": "string"
+ },
"description": "The Id of specific object in case of agent/inbox/label"
},
{
"in": "query",
"name": "since",
- "type": "string",
+ "schema": {
+ "type": "string"
+ },
"description": "The timestamp from where report should start."
},
{
"in": "query",
"name": "until",
- "type": "string",
+ "schema": {
+ "type": "string"
+ },
"description": "The timestamp from where report should stop."
}
],
@@ -5222,19 +7064,42 @@
],
"operationId": "list-all-conversation-statistics-summary",
"summary": "Get Account reports summary",
+ "security": [
+ {
+ "userApiKey": []
+ }
+ ],
"description": "Get Account reports summary for a specific type and date range",
"responses": {
"200": {
"description": "Success",
- "schema": {
- "$ref": "#/definitions/account_summary"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/account_summary"
+ }
+ }
}
},
"404": {
- "description": "reports not found"
+ "description": "reports not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
},
"403": {
- "description": "Access denied"
+ "description": "Access denied",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
}
@@ -5242,15 +7107,17 @@
"/api/v2/accounts/{account_id}/reports/conversations": {
"parameters": [
{
- "$ref": "#/parameters/account_id"
+ "$ref": "#/components/parameters/account_id"
},
{
"in": "query",
"name": "type",
- "type": "string",
- "enum": [
- "account"
- ],
+ "schema": {
+ "type": "string",
+ "enum": [
+ "account"
+ ]
+ },
"required": true,
"description": "Type of report"
}
@@ -5261,31 +7128,54 @@
],
"operationId": "get-account-conversation-metrics",
"summary": "Account Conversation Metrics",
+ "security": [
+ {
+ "userApiKey": []
+ }
+ ],
"description": "Get conversation metrics for Account",
"responses": {
"200": {
"description": "Success",
- "schema": {
- "type": "object",
- "description": "Object of account conversation metrics",
- "properties": {
- "open": {
- "type": "number"
- },
- "unattended": {
- "type": "number"
- },
- "unassigned": {
- "type": "number"
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "description": "Object of account conversation metrics",
+ "properties": {
+ "open": {
+ "type": "number"
+ },
+ "unattended": {
+ "type": "number"
+ },
+ "unassigned": {
+ "type": "number"
+ }
+ }
}
}
}
},
"404": {
- "description": "reports not found"
+ "description": "reports not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
},
"403": {
- "description": "Access denied"
+ "description": "Access denied",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
}
}
}
@@ -5293,22 +7183,26 @@
"/api/v2/accounts/{account_id}/reports/conversations/": {
"parameters": [
{
- "$ref": "#/parameters/account_id"
+ "$ref": "#/components/parameters/account_id"
},
{
"in": "query",
"name": "type",
- "type": "string",
- "enum": [
- "agent"
- ],
+ "schema": {
+ "type": "string",
+ "enum": [
+ "agent"
+ ]
+ },
"required": true,
"description": "Type of report"
},
{
"in": "query",
"name": "user_id",
- "type": "string",
+ "schema": {
+ "type": "string"
+ },
"description": "The numeric ID of the user"
}
],
@@ -5318,1718 +7212,2593 @@
],
"operationId": "get-agent-conversation-metrics",
"summary": "Agent Conversation Metrics",
+ "security": [
+ {
+ "userApiKey": []
+ }
+ ],
"description": "Get conversation metrics for Agent",
"responses": {
"200": {
"description": "Success",
- "schema": {
- "type": "array",
- "description": "Array of agent based conversation metrics",
- "items": {
- "$ref": "#/definitions/agent_conversation_metrics"
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "description": "Array of agent based conversation metrics",
+ "items": {
+ "$ref": "#/components/schemas/agent_conversation_metrics"
+ }
+ }
}
}
},
"404": {
- "description": "reports not found"
+ "description": "reports not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
+ }
+ }
+ }
},
"403": {
- "description": "Access denied"
- }
- }
- }
- }
- },
- "definitions": {
- "bad_request_error": {
- "title": "data",
- "type": "object",
- "properties": {
- "description": {
- "type": "string"
- },
- "errors": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/request_error"
- }
- }
- }
- },
- "request_error": {
- "type": "object",
- "properties": {
- "field": {
- "type": "string"
- },
- "message": {
- "type": "string"
- },
- "code": {
- "type": "string"
- }
- }
- },
- "generic_id": {
- "type": "object",
- "properties": {
- "id": {
- "type": "number"
- }
- }
- },
- "canned_response": {
- "type": "object",
- "properties": {
- "id": {
- "type": "integer",
- "description": "ID of the canned response"
- },
- "content": {
- "type": "string",
- "description": "Message content for canned response"
- },
- "short_code": {
- "type": "string",
- "description": "Short Code for quick access of the canned response"
- },
- "account_id": {
- "type": "integer",
- "description": "Account Id"
- }
- }
- },
- "custom_attribute": {
- "type": "object",
- "properties": {
- "id": {
- "type": "integer",
- "description": "Identifier"
- },
- "attribute_display_name": {
- "type": "string",
- "description": "Attribute display name"
- },
- "attribute_display_type": {
- "type": "string",
- "description": "Attribute display type (text, number, currency, percent, link, date, list, checkbox)"
- },
- "attribute_description": {
- "type": "string",
- "description": "Attribute description"
- },
- "attribute_key": {
- "type": "string",
- "description": "Attribute unique key value"
- },
- "attribute_values": {
- "type": "string",
- "description": "Attribute values"
- },
- "default_value": {
- "type": "string",
- "description": "Attribute default value"
- },
- "attribute_model": {
- "type": "string",
- "description": "Attribute type(conversation_attribute/contact_attribute)"
- },
- "account_id": {
- "type": "integer",
- "description": "Account Id"
- }
- }
- },
- "automation_rule": {
- "type": "object",
- "properties": {
- "event_name": {
- "type": "string",
- "description": "Automation Rule event, on which we call the actions(conversation_created, conversation_updated, message_created)",
- "enum": [
- "conversation_created",
- "conversation_updated",
- "message_created"
- ],
- "example": "message_created"
- },
- "name": {
- "type": "string",
- "description": "The name of the rule",
- "example": "Add label on message create event"
- },
- "description": {
- "type": "string",
- "description": "Description to give more context about the rule",
- "example": "Add label support and sales on message create event if incoming message content contains text help"
- },
- "active": {
- "type": "boolean",
- "description": "Enable/disable automation rule"
- },
- "actions": {
- "type": "array",
- "description": "Array of actions which we perform when condition matches",
- "items": {
- "type": "object",
- "example": {
- "action_name": "add_label",
- "action_params": [
- "support",
- "sales"
- ]
- }
- }
- },
- "conditions": {
- "type": "array",
- "description": "Array of conditions on which conversation/message filter would work",
- "items": {
- "type": "object",
- "example": {
- "attribute_key": "content",
- "filter_operator": "contains",
- "values": [
- "help"
- ],
- "query_operator": "nil"
- }
- }
- },
- "account_id": {
- "type": "integer",
- "description": "Account Id"
- }
- }
- },
- "portal": {
- "type": "object",
- "properties": {
- "id": {
- "type": "integer"
- },
- "archived": {
- "type": "boolean"
- },
- "color": {
- "type": "string"
- },
- "config": {
- "type": "object",
- "description": "Save information about locales, allowed_locales and default portal/help-center locale"
- },
- "custom_domain": {
- "type": "string"
- },
- "header_text": {
- "type": "string",
- "description": "The text content."
- },
- "homepage_link": {
- "type": "string"
- },
- "name": {
- "type": "string"
- },
- "slug": {
- "type": "string"
- },
- "page_title": {
- "type": "string"
- },
- "account_id": {
- "type": "integer"
- },
- "categories": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/category"
- }
- },
- "articles": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/article"
- }
- }
- }
- },
- "category": {
- "type": "object",
- "properties": {
- "id": {
- "type": "integer"
- },
- "description": {
- "type": "string",
- "description": "The text content."
- },
- "locale": {
- "type": "string"
- },
- "name": {
- "type": "string"
- },
- "slug": {
- "type": "string"
- },
- "position": {
- "type": "integer"
- },
- "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"
- },
- "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."
- }
- }
- },
- "article": {
- "type": "object",
- "properties": {
- "id": {
- "type": "integer"
- },
- "content": {
- "type": "string",
- "description": "The text content."
- },
- "meta": {
- "type": "object"
- },
- "position": {
- "type": "integer"
- },
- "status": {
- "type": "integer",
- "enum": [
- "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."
- }
- }
- },
- "contact": {
- "type": "object",
- "properties": {
- "payload": {
- "type": "object",
- "properties": {
- "contact": {
- "type": "object",
- "properties": {
- "email": {
- "type": "string",
- "description": "Email address of the contact"
- },
- "name": {
- "type": "string",
- "description": "The name of the contact"
- },
- "phone_number": {
- "type": "string",
- "description": "Phone number of the contact"
- },
- "thumbnail": {
- "type": "string",
- "description": "Avatar URL of the contact"
- },
- "additional_attributes": {
- "type": "object",
- "description": "The object containing additional attributes related to the contact"
- },
- "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"
- }
- },
- "contact_inboxes": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/contact_inboxes"
- }
+ "description": "Access denied",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/bad_request_error"
}
}
}
}
}
}
- },
- "conversation": {
- "type": "object",
- "properties": {
- "id": {
- "type": "number",
- "description": "ID of the conversation"
- },
- "messages": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/message"
- }
- },
- "account_id": {
- "type": "number",
- "description": "Account Id"
- },
- "inbox_id": {
- "type": "number",
- "description": "ID of the inbox"
- },
- "status": {
- "type": "string",
- "enum": [
- "open",
- "resolved",
- "pending"
- ],
- "description": "The status of the conversation"
- },
- "timestamp": {
- "type": "string",
- "description": "The time at which conversation was created"
- },
- "contact_last_seen_at": {
- "type": "string"
- },
- "agent_last_seen_at": {
- "type": "string"
- },
- "unread_count": {
- "type": "number",
- "description": "The number of unread messages"
- },
- "additional_attributes": {
- "type": "object",
- "description": "The object containing additional attributes related to the conversation"
- },
- "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
- }
- }
- }
- },
- "message": {
- "type": "object",
- "properties": {
- "content": {
- "type": "string",
- "description": "The text content of the message"
- },
- "content_type": {
- "type": "string",
- "enum": [
- "text",
- "input_select",
- "cards",
- "form"
- ],
- "description": "The type of the template message"
- },
- "content_attributes": {
- "type": "object",
- "description": "The content attributes for each content_type"
- },
- "message_type": {
- "type": "string",
- "enum": [
- "incoming",
- "outgoing",
- "activity",
- "template"
- ],
- "description": "The type of the message"
- },
- "created_at": {
- "type": "integer",
- "description": "The time at which message was created"
- },
- "private": {
- "type": "boolean",
- "description": "The flags which shows whether the message is private or not"
- },
- "attachment": {
- "type": "object",
- "description": "The file object attached to the image"
- },
- "sender": {
- "type": "object",
- "description": "User/Agent/AgentBot object"
- },
- "conversation_id": {
- "type": "number",
- "description": "ID of the conversation"
- }
- }
- },
- "user": {
- "type": "object",
- "properties": {
- "id": {
- "type": "number"
- },
- "uid": {
- "type": "string"
- },
- "name": {
- "type": "string"
- },
- "available_name": {
- "type": "string"
- },
- "display_name": {
- "type": "string"
- },
- "email": {
- "type": "string"
- },
- "account_id": {
- "type": "number"
- },
- "role": {
- "type": "string",
- "enum": [
- "agent",
- "administrator"
- ]
- },
- "confirmed": {
- "type": "boolean"
- },
- "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"
- }
- }
- }
- },
- "agent": {
- "type": "object",
- "properties": {
- "id": {
- "type": "integer"
- },
- "uid": {
- "type": "string"
- },
- "name": {
- "type": "string"
- },
- "available_name": {
- "type": "string"
- },
- "display_name": {
- "type": "string"
- },
- "email": {
- "type": "string"
- },
- "account_id": {
- "type": "integer"
- },
- "role": {
- "type": "string",
- "enum": [
- "agent",
- "administrator"
- ]
- },
- "confirmed": {
- "type": "boolean"
- },
- "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": {
- "type": "object",
- "description": "Available for users who are created through platform APIs and has custom attributes associated."
- }
- }
- },
- "inbox": {
- "type": "object",
- "properties": {
- "id": {
- "type": "number",
- "description": "ID of the inbox"
- },
- "name": {
- "type": "string",
- "description": "The name of the inbox"
- },
- "website_url": {
- "type": "string",
- "description": "Website URL"
- },
- "channel_type": {
- "type": "string",
- "description": "The type of the inbox"
- },
- "avatar_url": {
- "type": "string",
- "description": "The avatar image of the inbox"
- },
- "widget_color": {
- "type": "string",
- "description": "Widget Color used for customization of the widget"
- },
- "website_token": {
- "type": "string",
- "description": "Website Token"
- },
- "enable_auto_assignment": {
- "type": "boolean",
- "description": "The flag which shows whether Auto Assignment is enabled or not"
- },
- "web_widget_script": {
- "type": "string",
- "description": "Script used to load the website widget"
- },
- "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"
- },
- "greeting_enabled": {
- "type": "boolean",
- "description": "The flag which shows whether greeting is enabled"
- },
- "greeting_message": {
- "type": "string",
- "description": "A greeting message when the user starts the conversation"
- }
- }
- },
- "agent_bot": {
- "type": "object",
- "properties": {
- "id": {
- "type": "number",
- "description": "ID of the agent bot"
- },
- "name": {
- "type": "string",
- "description": "The name of the agent bot"
- },
- "description": {
- "type": "string",
- "description": "The description about the agent bot"
- },
- "account_id": {
- "type": "number",
- "description": "Account ID if it's an account specific bot"
- },
- "outgoing_url": {
- "type": "string",
- "description": "The webhook URL for the bot"
- }
- }
- },
- "contact_inboxes": {
- "type": "object",
- "properties": {
- "source_id": {
- "type": "string",
- "description": "Contact Inbox Source Id"
- },
- "inbox": {
- "$ref": "#/definitions/inbox"
- }
- }
- },
- "contactable_inboxes": {
- "type": "object",
- "properties": {
- "source_id": {
- "type": "string",
- "description": "Contact Inbox Source Id"
- },
- "inbox": {
- "$ref": "#/definitions/inbox"
- }
- }
- },
- "custom_filter": {
- "type": "object",
- "properties": {
- "id": {
- "type": "number",
- "description": "The ID of the custom filter"
- },
- "name": {
- "type": "string",
- "description": "The name of the custom filter"
- },
- "type": {
- "type": "string",
- "enum": [
- "conversation",
- "contact",
- "report"
- ],
- "description": "The description about the custom filter"
- },
- "query": {
- "type": "object",
- "description": "A query that needs to be saved as a custom filter"
- },
- "created_at": {
- "type": "string",
- "format": "date-time",
- "description": "The time at which the custom filter was created"
- },
- "updated_at": {
- "type": "string",
- "format": "date-time",
- "description": "The time at which the custom filter was updated"
- }
- }
- },
- "webhook": {
- "type": "object",
- "properties": {
- "id": {
- "type": "number",
- "description": "The ID of the webhook"
- },
- "url": {
- "type": "string",
- "description": "The url to which the events will be send"
- },
- "subscriptions": {
- "type": "array",
- "items": {
- "type": "string",
- "enum": [
- "conversation_created",
- "conversation_status_changed",
- "conversation_updated",
- "contact_created",
- "contact_updated",
- "message_created",
- "message_updated",
- "webwidget_triggered"
- ]
+ }
+ },
+ "components": {
+ "schemas": {
+ "bad_request_error": {
+ "title": "data",
+ "type": "object",
+ "properties": {
+ "description": {
+ "type": "string"
},
- "description": "The list of subscribed events"
- },
- "account_id": {
- "type": "number",
- "description": "The id of the account which the webhook object belongs to"
- }
- }
- },
- "account": {
- "type": "object",
- "properties": {
- "id": {
- "type": "number",
- "description": "Account ID"
- },
- "name": {
- "type": "string",
- "description": "Name of the account"
- },
- "role": {
- "type": "string",
- "enum": [
- "administrator",
- "agent"
- ],
- "description": "The user role in the account"
- }
- }
- },
- "platform_account": {
- "type": "object",
- "properties": {
- "id": {
- "type": "number",
- "description": "Account ID"
- },
- "name": {
- "type": "string",
- "description": "Name of the account"
- }
- }
- },
- "team": {
- "type": "object",
- "properties": {
- "id": {
- "type": "number",
- "description": "The ID of the team"
- },
- "name": {
- "type": "string",
- "description": "The name of the team"
- },
- "description": {
- "type": "string",
- "description": "The description about the team"
- },
- "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"
- },
- "account_id": {
- "type": "number",
- "description": "The ID of the account with the team is a part of"
- },
- "is_member": {
- "type": "boolean",
- "description": "This field shows whether the current user is a part of the team"
- }
- }
- },
- "integrations_app": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "description": "The ID of the integration"
- },
- "name": {
- "type": "string",
- "description": "The name of the integration"
- },
- "description": {
- "type": "string",
- "description": "The description about the team"
- },
- "hook_type": {
- "type": "string",
- "description": "Whether the integration is an account or inbox integration"
- },
- "enabled": {
- "type": "boolean",
- "description": "Whether the integration is enabled for the account"
- },
- "allow_multiple_hooks": {
- "type": "boolean",
- "description": "Whether multiple hooks can be created for the integration"
- },
- "hooks": {
- "type": "array",
- "items": {
- "type": "object"
- },
- "description": "If there are any hooks created for this integration"
- }
- }
- },
- "integrations_hook": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "description": "The ID of the integration hook"
- },
- "app_id": {
- "type": "string",
- "description": "The ID of the integration app"
- },
- "inbox_id": {
- "type": "string",
- "description": "Inbox ID if its an Inbox integration"
- },
- "account_id": {
- "type": "string",
- "description": "Account ID of the integration"
- },
- "status": {
- "type": "boolean",
- "description": "Whether the integration hook is enabled for the account"
- },
- "hook_type": {
- "type": "boolean",
- "description": "Whether its an account or inbox integration hook"
- },
- "settings": {
- "type": "object",
- "description": "The associated settings for the integration"
- }
- }
- },
- "public_contact": {
- "type": "object",
- "properties": {
- "id": {
- "type": "integer",
- "description": "Id of the contact"
- },
- "source_id": {
- "type": "string",
- "description": "The session identifier of the contact"
- },
- "name": {
- "type": "string",
- "description": "Name of the contact"
- },
- "email": {
- "type": "string",
- "description": "Email of the contact"
- },
- "pubsub_token": {
- "type": "string",
- "description": "The token to be used to connect to chatwoot websocket"
- }
- }
- },
- "public_conversation": {
- "type": "object",
- "properties": {
- "id": {
- "type": "integer",
- "description": "Id of the conversation"
- },
- "inbox_id": {
- "type": "string",
- "description": "The inbox id of the conversation"
- },
- "messages": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/message"
- },
- "description": "Messages in the conversation"
- },
- "contact": {
- "type": "object",
- "description": "The contact information associated to the conversation"
- }
- }
- },
- "public_message": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "description": "Id of the message"
- },
- "content": {
- "type": "string",
- "description": "Text content of the message"
- },
- "message_type": {
- "type": "string",
- "description": "Denotes the message type"
- },
- "content_type": {
- "type": "string",
- "description": "Content type of the message"
- },
- "content_attributes": {
- "type": "string",
- "description": "Additional content attributes of the message"
- },
- "created_at": {
- "type": "string",
- "description": "Created at time stamp of the message"
- },
- "conversation_id": {
- "type": "string",
- "description": "Conversation Id of the message"
- },
- "attachments": {
- "type": "array",
- "items": {
- "type": "object"
- },
- "description": "Attachments if any"
- },
- "sender": {
- "type": "object",
- "description": "Details of the sender"
- }
- }
- },
- "public_inbox": {
- "type": "object",
- "properties": {
- "identifier": {
- "type": "string",
- "description": "Inbox identifier"
- },
- "name": {
- "type": "string",
- "description": "Name of the inbox"
- },
- "timezone": {
- "type": "string",
- "description": "The timezone defined on the inbox"
- },
- "working_hours": {
- "type": "array",
- "description": "The working hours defined on the inbox",
- "items": {
- "type": "object",
- "properties": {
- "day_of_week": {
- "type": "integer",
- "description": "Day of the week as a number. Sunday -> 0, Saturday -> 6"
- },
- "open_all_day": {
- "type": "boolean",
- "description": "Whether or not the business is open the whole day"
- },
- "closed_all_day": {
- "type": "boolean",
- "description": "Whether or not the business is closed the whole day"
- },
- "open_hour": {
- "type": "integer",
- "description": "Opening hour. Can be null if closed all day"
- },
- "open_minutes": {
- "type": "integer",
- "description": "Opening minute. Can be null if closed all day"
- },
- "close_hour": {
- "type": "integer",
- "description": "Closing hour. Can be null if closed all day"
- },
- "close_minutes": {
- "type": "integer",
- "description": "Closing minute. Can be null if closed all day"
- }
+ "errors": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/request_error"
}
}
- },
- "working_hours_enabled": {
- "type": "boolean",
- "description": "Whether of not the working hours are enabled on the inbox"
- },
- "csat_survey_enabled": {
- "type": "boolean",
- "description": "Whether of not the Customer Satisfaction survey is enabled on the inbox"
- },
- "greeting_enabled": {
- "type": "boolean",
- "description": "Whether of not the Greeting Message is enabled on the inbox"
- },
- "identity_validation_enabled": {
- "type": "boolean",
- "description": "Whether of not the User Identity Validation is enforced on the inbox"
}
- }
- },
- "account_create_update_payload": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the account"
- }
- }
- },
- "agent_bot_create_update_payload": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "description": "The name of the agent bot"
- },
- "description": {
- "type": "string",
- "description": "The description about the agent bot"
- },
- "outgoing_url": {
- "type": "string",
- "description": "The webhook URL for the bot"
- }
- }
- },
- "user_create_update_payload": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the user"
- },
- "email": {
- "type": "string",
- "description": "Email of the user"
- },
- "password": {
- "type": "string",
- "description": "Password must contain uppercase, lowercase letters, number and a special character"
- },
- "custom_attributes": {
- "type": "object",
- "description": "Custom attributes you want to associate with the user"
- }
- }
- },
- "canned_response_create_update_payload": {
- "type": "object",
- "properties": {
- "content": {
- "type": "string",
- "description": "Message content for canned response"
- },
- "short_code": {
- "type": "string",
- "description": "Short Code for quick access of the canned response"
- }
- }
- },
- "custom_attribute_create_update_payload": {
- "type": "object",
- "properties": {
- "attribute_display_name": {
- "type": "string",
- "description": "Attribute display name"
- },
- "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)"
- },
- "attribute_description": {
- "type": "string",
- "description": "Attribute description"
- },
- "attribute_key": {
- "type": "string",
- "description": "Attribute unique key value"
- },
- "attribute_values": {
- "type": "array",
- "description": "Attribute values",
- "items": {
+ },
+ "request_error": {
+ "type": "object",
+ "properties": {
+ "field": {
+ "type": "string"
+ },
+ "message": {
+ "type": "string"
+ },
+ "code": {
"type": "string"
}
- },
- "attribute_model": {
- "type": "integer",
- "description": "Attribute type(conversation_attribute- 0, contact_attribute- 1)"
}
- }
- },
- "contact_create": {
- "type": "object",
- "required": [
- "inbox_id"
- ],
- "properties": {
- "inbox_id": {
- "type": "number"
- },
- "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}"
+ },
+ "generic_id": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "number"
+ }
}
- }
- },
- "contact_update": {
- "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}"
+ },
+ "canned_response": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "integer",
+ "description": "ID of the canned response"
+ },
+ "content": {
+ "type": "string",
+ "description": "Message content for canned response"
+ },
+ "short_code": {
+ "type": "string",
+ "description": "Short Code for quick access of the canned response"
+ },
+ "account_id": {
+ "type": "integer",
+ "description": "Account Id"
+ }
}
- }
- },
- "conversation_message_create": {
- "type": "object",
- "required": [
- "content"
- ],
- "properties": {
- "content": {
- "type": "string",
- "description": "The content of the message"
- },
- "message_type": {
- "type": "string",
- "enum": [
- "outgoing",
- "incoming"
- ]
- },
- "private": {
- "type": "boolean",
- "description": "Flag to identify if it is a private note"
- },
- "content_type": {
- "type": "string",
- "enum": [
- "text",
- "input_email",
- "cards",
- "input_select",
- "form",
- "article"
- ],
- "example": "cards",
- "description": "if you want to create custom message types"
- },
- "content_attributes": {
- "type": "object",
- "description": "attributes based on your content type"
- },
- "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": {
+ },
+ "custom_attribute": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "integer",
+ "description": "Identifier"
+ },
+ "attribute_display_name": {
+ "type": "string",
+ "description": "Attribute display name"
+ },
+ "attribute_display_type": {
+ "type": "string",
+ "description": "Attribute display type (text, number, currency, percent, link, date, list, checkbox)"
+ },
+ "attribute_description": {
+ "type": "string",
+ "description": "Attribute description"
+ },
+ "attribute_key": {
+ "type": "string",
+ "description": "Attribute unique key value"
+ },
+ "attribute_values": {
+ "type": "string",
+ "description": "Attribute values"
+ },
+ "default_value": {
+ "type": "string",
+ "description": "Attribute default value"
+ },
+ "attribute_model": {
+ "type": "string",
+ "description": "Attribute type(conversation_attribute/contact_attribute)"
+ },
+ "account_id": {
+ "type": "integer",
+ "description": "Account Id"
+ }
+ }
+ },
+ "automation_rule": {
+ "type": "object",
+ "properties": {
+ "event_name": {
+ "type": "string",
+ "description": "Automation Rule event, on which we call the actions(conversation_created, conversation_updated, message_created)",
+ "enum": [
+ "conversation_created",
+ "conversation_updated",
+ "message_created"
+ ],
+ "example": "message_created"
+ },
+ "name": {
+ "type": "string",
+ "description": "The name of the rule",
+ "example": "Add label on message create event"
+ },
+ "description": {
+ "type": "string",
+ "description": "Description to give more context about the rule",
+ "example": "Add label support and sales on message create event if incoming message content contains text help"
+ },
+ "active": {
+ "type": "boolean",
+ "description": "Enable/disable automation rule"
+ },
+ "actions": {
+ "type": "array",
+ "description": "Array of actions which we perform when condition matches",
+ "items": {
"type": "object",
- "description": "The processed param values for template variables in template",
"example": {
- "1": "Chatwoot"
+ "action_name": "add_label",
+ "action_params": [
+ "support",
+ "sales"
+ ]
+ }
+ }
+ },
+ "conditions": {
+ "type": "array",
+ "description": "Array of conditions on which conversation/message filter would work",
+ "items": {
+ "type": "object",
+ "example": {
+ "attribute_key": "content",
+ "filter_operator": "contains",
+ "values": [
+ "help"
+ ],
+ "query_operator": "nil"
+ }
+ }
+ },
+ "account_id": {
+ "type": "integer",
+ "description": "Account Id"
+ }
+ }
+ },
+ "portal": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "integer"
+ },
+ "archived": {
+ "type": "boolean"
+ },
+ "color": {
+ "type": "string"
+ },
+ "config": {
+ "type": "object",
+ "description": "Save information about locales, allowed_locales and default portal/help-center locale"
+ },
+ "custom_domain": {
+ "type": "string"
+ },
+ "header_text": {
+ "type": "string",
+ "description": "The text content."
+ },
+ "homepage_link": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "slug": {
+ "type": "string"
+ },
+ "page_title": {
+ "type": "string"
+ },
+ "account_id": {
+ "type": "integer"
+ },
+ "categories": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/category"
+ }
+ },
+ "articles": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/article"
+ }
+ }
+ }
+ },
+ "category": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "integer"
+ },
+ "description": {
+ "type": "string",
+ "description": "The text content."
+ },
+ "locale": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "slug": {
+ "type": "string"
+ },
+ "position": {
+ "type": "integer"
+ },
+ "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"
+ },
+ "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."
+ }
+ }
+ },
+ "article": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "integer"
+ },
+ "content": {
+ "type": "string",
+ "description": "The text content."
+ },
+ "meta": {
+ "type": "object"
+ },
+ "position": {
+ "type": "integer"
+ },
+ "status": {
+ "type": "integer",
+ "enum": [
+ "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."
+ }
+ }
+ },
+ "contact": {
+ "type": "object",
+ "properties": {
+ "payload": {
+ "type": "object",
+ "properties": {
+ "contact": {
+ "type": "object",
+ "properties": {
+ "email": {
+ "type": "string",
+ "description": "Email address of the contact"
+ },
+ "name": {
+ "type": "string",
+ "description": "The name of the contact"
+ },
+ "phone_number": {
+ "type": "string",
+ "description": "Phone number of the contact"
+ },
+ "thumbnail": {
+ "type": "string",
+ "description": "Avatar URL of the contact"
+ },
+ "additional_attributes": {
+ "type": "object",
+ "description": "The object containing additional attributes related to the contact"
+ },
+ "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"
+ }
+ },
+ "contact_inboxes": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/contact_inboxes"
+ }
+ }
+ }
}
}
}
}
- }
- },
- "team_create_update_payload": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "description": "The name of the team"
- },
- "description": {
- "type": "string",
- "description": "The description of the team"
- },
- "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"
+ },
+ "conversation": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "number",
+ "description": "ID of the conversation"
+ },
+ "messages": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/message"
+ }
+ },
+ "account_id": {
+ "type": "number",
+ "description": "Account Id"
+ },
+ "inbox_id": {
+ "type": "number",
+ "description": "ID of the inbox"
+ },
+ "status": {
+ "type": "string",
+ "enum": [
+ "open",
+ "resolved",
+ "pending"
+ ],
+ "description": "The status of the conversation"
+ },
+ "timestamp": {
+ "type": "string",
+ "description": "The time at which conversation was created"
+ },
+ "contact_last_seen_at": {
+ "type": "string"
+ },
+ "agent_last_seen_at": {
+ "type": "string"
+ },
+ "unread_count": {
+ "type": "number",
+ "description": "The number of unread messages"
+ },
+ "additional_attributes": {
+ "type": "object",
+ "description": "The object containing additional attributes related to the conversation"
+ },
+ "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
+ }
+ }
}
- }
- },
- "custom_filter_create_update_payload": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "description": "The name of the custom filter"
- },
- "type": {
- "type": "string",
- "enum": [
- "conversation",
- "contact",
- "report"
- ],
- "description": "The description about the custom filter"
- },
- "query": {
+ },
+ "message": {
+ "type": "object",
+ "properties": {
+ "content": {
+ "type": "string",
+ "description": "The text content of the message"
+ },
+ "content_type": {
+ "type": "string",
+ "enum": [
+ "text",
+ "input_select",
+ "cards",
+ "form"
+ ],
+ "description": "The type of the template message"
+ },
+ "content_attributes": {
+ "type": "object",
+ "description": "The content attributes for each content_type"
+ },
+ "message_type": {
+ "type": "string",
+ "enum": [
+ "incoming",
+ "outgoing",
+ "activity",
+ "template"
+ ],
+ "description": "The type of the message"
+ },
+ "created_at": {
+ "type": "integer",
+ "description": "The time at which message was created"
+ },
+ "private": {
+ "type": "boolean",
+ "description": "The flags which shows whether the message is private or not"
+ },
+ "attachment": {
+ "type": "object",
+ "description": "The file object attached to the image"
+ },
+ "sender": {
+ "type": "object",
+ "description": "User/Agent/AgentBot object"
+ },
+ "conversation_id": {
+ "type": "number",
+ "description": "ID of the conversation"
+ }
+ }
+ },
+ "user": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "number"
+ },
+ "uid": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "available_name": {
+ "type": "string"
+ },
+ "display_name": {
+ "type": "string"
+ },
+ "email": {
+ "type": "string"
+ },
+ "account_id": {
+ "type": "number"
+ },
+ "role": {
+ "type": "string",
+ "enum": [
+ "agent",
+ "administrator"
+ ]
+ },
+ "confirmed": {
+ "type": "boolean"
+ },
+ "custom_attributes": {
+ "type": "object",
+ "description": "Available for users who are created through platform APIs and has custom attributes associated."
+ },
+ "accounts": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/account"
+ }
+ }
+ }
+ },
+ "agent": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "integer"
+ },
+ "uid": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "available_name": {
+ "type": "string"
+ },
+ "display_name": {
+ "type": "string"
+ },
+ "email": {
+ "type": "string"
+ },
+ "account_id": {
+ "type": "integer"
+ },
+ "role": {
+ "type": "string",
+ "enum": [
+ "agent",
+ "administrator"
+ ]
+ },
+ "confirmed": {
+ "type": "boolean"
+ },
+ "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": {
+ "type": "object",
+ "description": "Available for users who are created through platform APIs and has custom attributes associated."
+ }
+ }
+ },
+ "inbox": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "number",
+ "description": "ID of the inbox"
+ },
+ "name": {
+ "type": "string",
+ "description": "The name of the inbox"
+ },
+ "website_url": {
+ "type": "string",
+ "description": "Website URL"
+ },
+ "channel_type": {
+ "type": "string",
+ "description": "The type of the inbox"
+ },
+ "avatar_url": {
+ "type": "string",
+ "description": "The avatar image of the inbox"
+ },
+ "widget_color": {
+ "type": "string",
+ "description": "Widget Color used for customization of the widget"
+ },
+ "website_token": {
+ "type": "string",
+ "description": "Website Token"
+ },
+ "enable_auto_assignment": {
+ "type": "boolean",
+ "description": "The flag which shows whether Auto Assignment is enabled or not"
+ },
+ "web_widget_script": {
+ "type": "string",
+ "description": "Script used to load the website widget"
+ },
+ "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"
+ },
+ "greeting_enabled": {
+ "type": "boolean",
+ "description": "The flag which shows whether greeting is enabled"
+ },
+ "greeting_message": {
+ "type": "string",
+ "description": "A greeting message when the user starts the conversation"
+ }
+ }
+ },
+ "agent_bot": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "number",
+ "description": "ID of the agent bot"
+ },
+ "name": {
+ "type": "string",
+ "description": "The name of the agent bot"
+ },
+ "description": {
+ "type": "string",
+ "description": "The description about the agent bot"
+ },
+ "account_id": {
+ "type": "number",
+ "description": "Account ID if it's an account specific bot"
+ },
+ "outgoing_url": {
+ "type": "string",
+ "description": "The webhook URL for the bot"
+ }
+ }
+ },
+ "contact_inboxes": {
+ "type": "object",
+ "properties": {
+ "source_id": {
+ "type": "string",
+ "description": "Contact Inbox Source Id"
+ },
+ "inbox": {
+ "$ref": "#/components/schemas/inbox"
+ }
+ }
+ },
+ "contactable_inboxes": {
+ "type": "object",
+ "properties": {
+ "source_id": {
+ "type": "string",
+ "description": "Contact Inbox Source Id"
+ },
+ "inbox": {
+ "$ref": "#/components/schemas/inbox"
+ }
+ }
+ },
+ "custom_filter": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "number",
+ "description": "The ID of the custom filter"
+ },
+ "name": {
+ "type": "string",
+ "description": "The name of the custom filter"
+ },
+ "type": {
+ "type": "string",
+ "enum": [
+ "conversation",
+ "contact",
+ "report"
+ ],
+ "description": "The description about the custom filter"
+ },
+ "query": {
+ "type": "object",
+ "description": "A query that needs to be saved as a custom filter"
+ },
+ "created_at": {
+ "type": "string",
+ "format": "date-time",
+ "description": "The time at which the custom filter was created"
+ },
+ "updated_at": {
+ "type": "string",
+ "format": "date-time",
+ "description": "The time at which the custom filter was updated"
+ }
+ }
+ },
+ "webhook": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "number",
+ "description": "The ID of the webhook"
+ },
+ "url": {
+ "type": "string",
+ "description": "The url to which the events will be send"
+ },
+ "subscriptions": {
+ "type": "array",
+ "items": {
+ "type": "string",
+ "enum": [
+ "conversation_created",
+ "conversation_status_changed",
+ "conversation_updated",
+ "contact_created",
+ "contact_updated",
+ "message_created",
+ "message_updated",
+ "webwidget_triggered"
+ ]
+ },
+ "description": "The list of subscribed events"
+ },
+ "account_id": {
+ "type": "number",
+ "description": "The id of the account which the webhook object belongs to"
+ }
+ }
+ },
+ "account": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "number",
+ "description": "Account ID"
+ },
+ "name": {
+ "type": "string",
+ "description": "Name of the account"
+ },
+ "role": {
+ "type": "string",
+ "enum": [
+ "administrator",
+ "agent"
+ ],
+ "description": "The user role in the account"
+ }
+ }
+ },
+ "account_user": {
+ "type": "array",
+ "description": "Array of account users",
+ "items": {
"type": "object",
- "description": "A query that needs to be saved as a custom filter"
+ "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"
+ }
+ }
}
- }
- },
- "webhook_create_update_payload": {
- "type": "object",
- "properties": {
- "url": {
- "type": "string",
- "description": "The url where the events should be sent"
- },
- "subscriptions": {
- "type": "array",
- "items": {
+ },
+ "platform_account": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "number",
+ "description": "Account ID"
+ },
+ "name": {
+ "type": "string",
+ "description": "Name of the account"
+ }
+ }
+ },
+ "team": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "number",
+ "description": "The ID of the team"
+ },
+ "name": {
+ "type": "string",
+ "description": "The name of the team"
+ },
+ "description": {
+ "type": "string",
+ "description": "The description about the team"
+ },
+ "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"
+ },
+ "account_id": {
+ "type": "number",
+ "description": "The ID of the account with the team is a part of"
+ },
+ "is_member": {
+ "type": "boolean",
+ "description": "This field shows whether the current user is a part of the team"
+ }
+ }
+ },
+ "integrations_app": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "The ID of the integration"
+ },
+ "name": {
+ "type": "string",
+ "description": "The name of the integration"
+ },
+ "description": {
+ "type": "string",
+ "description": "The description about the team"
+ },
+ "hook_type": {
+ "type": "string",
+ "description": "Whether the integration is an account or inbox integration"
+ },
+ "enabled": {
+ "type": "boolean",
+ "description": "Whether the integration is enabled for the account"
+ },
+ "allow_multiple_hooks": {
+ "type": "boolean",
+ "description": "Whether multiple hooks can be created for the integration"
+ },
+ "hooks": {
+ "type": "array",
+ "items": {
+ "type": "object"
+ },
+ "description": "If there are any hooks created for this integration"
+ }
+ }
+ },
+ "integrations_hook": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "The ID of the integration hook"
+ },
+ "app_id": {
+ "type": "string",
+ "description": "The ID of the integration app"
+ },
+ "inbox_id": {
+ "type": "string",
+ "description": "Inbox ID if its an Inbox integration"
+ },
+ "account_id": {
+ "type": "string",
+ "description": "Account ID of the integration"
+ },
+ "status": {
+ "type": "boolean",
+ "description": "Whether the integration hook is enabled for the account"
+ },
+ "hook_type": {
+ "type": "boolean",
+ "description": "Whether its an account or inbox integration hook"
+ },
+ "settings": {
+ "type": "object",
+ "description": "The associated settings for the integration"
+ }
+ }
+ },
+ "public_contact": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "integer",
+ "description": "Id of the contact"
+ },
+ "source_id": {
+ "type": "string",
+ "description": "The session identifier of the contact"
+ },
+ "name": {
+ "type": "string",
+ "description": "Name of the contact"
+ },
+ "email": {
+ "type": "string",
+ "description": "Email of the contact"
+ },
+ "pubsub_token": {
+ "type": "string",
+ "description": "The token to be used to connect to chatwoot websocket"
+ }
+ }
+ },
+ "public_conversation": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "integer",
+ "description": "Id of the conversation"
+ },
+ "inbox_id": {
+ "type": "string",
+ "description": "The inbox id of the conversation"
+ },
+ "messages": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/message"
+ },
+ "description": "Messages in the conversation"
+ },
+ "contact": {
+ "type": "object",
+ "description": "The contact information associated to the conversation"
+ }
+ }
+ },
+ "public_message": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "Id of the message"
+ },
+ "content": {
+ "type": "string",
+ "description": "Text content of the message"
+ },
+ "message_type": {
+ "type": "string",
+ "description": "Denotes the message type"
+ },
+ "content_type": {
+ "type": "string",
+ "description": "Content type of the message"
+ },
+ "content_attributes": {
+ "type": "string",
+ "description": "Additional content attributes of the message"
+ },
+ "created_at": {
+ "type": "string",
+ "description": "Created at time stamp of the message"
+ },
+ "conversation_id": {
+ "type": "string",
+ "description": "Conversation Id of the message"
+ },
+ "attachments": {
+ "type": "array",
+ "items": {
+ "type": "object"
+ },
+ "description": "Attachments if any"
+ },
+ "sender": {
+ "type": "object",
+ "description": "Details of the sender"
+ }
+ }
+ },
+ "public_inbox": {
+ "type": "object",
+ "properties": {
+ "identifier": {
+ "type": "string",
+ "description": "Inbox identifier"
+ },
+ "name": {
+ "type": "string",
+ "description": "Name of the inbox"
+ },
+ "timezone": {
+ "type": "string",
+ "description": "The timezone defined on the inbox"
+ },
+ "working_hours": {
+ "type": "array",
+ "description": "The working hours defined on the inbox",
+ "items": {
+ "type": "object",
+ "properties": {
+ "day_of_week": {
+ "type": "integer",
+ "description": "Day of the week as a number. Sunday -> 0, Saturday -> 6"
+ },
+ "open_all_day": {
+ "type": "boolean",
+ "description": "Whether or not the business is open the whole day"
+ },
+ "closed_all_day": {
+ "type": "boolean",
+ "description": "Whether or not the business is closed the whole day"
+ },
+ "open_hour": {
+ "type": "integer",
+ "description": "Opening hour. Can be null if closed all day"
+ },
+ "open_minutes": {
+ "type": "integer",
+ "description": "Opening minute. Can be null if closed all day"
+ },
+ "close_hour": {
+ "type": "integer",
+ "description": "Closing hour. Can be null if closed all day"
+ },
+ "close_minutes": {
+ "type": "integer",
+ "description": "Closing minute. Can be null if closed all day"
+ }
+ }
+ }
+ },
+ "working_hours_enabled": {
+ "type": "boolean",
+ "description": "Whether of not the working hours are enabled on the inbox"
+ },
+ "csat_survey_enabled": {
+ "type": "boolean",
+ "description": "Whether of not the Customer Satisfaction survey is enabled on the inbox"
+ },
+ "greeting_enabled": {
+ "type": "boolean",
+ "description": "Whether of not the Greeting Message is enabled on the inbox"
+ },
+ "identity_validation_enabled": {
+ "type": "boolean",
+ "description": "Whether of not the User Identity Validation is enforced on the inbox"
+ }
+ }
+ },
+ "account_create_update_payload": {
+ "type": "object",
+ "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": {}
+ }
+ }
+ },
+ "account_user_create_update_payload": {
+ "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"
+ }
+ }
+ },
+ "platform_agent_bot_create_update_payload": {
+ "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"
+ }
+ }
+ },
+ "agent_bot_create_update_payload": {
+ "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"
+ },
+ "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": {}
+ }
+ }
+ },
+ "user_create_update_payload": {
+ "type": "object",
+ "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": {}
+ }
+ }
+ },
+ "canned_response_create_update_payload": {
+ "type": "object",
+ "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"
+ }
+ }
+ },
+ "custom_attribute_create_update_payload": {
+ "type": "object",
+ "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"
+ }
+ }
+ },
+ "agent_create_payload": {
+ "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
+ }
+ }
+ },
+ "agent_update_payload": {
+ "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
+ }
+ }
+ },
+ "contact_create_payload": {
+ "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": {}
+ }
+ }
+ },
+ "contact_update_payload": {
+ "type": "object",
+ "properties": {
+ "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": {}
+ }
+ }
+ },
+ "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": [
+ "content"
+ ],
+ "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": "text"
+ },
+ "content_attributes": {
+ "type": "object",
+ "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",
+ "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"
+ }
+ }
+ }
+ }
+ }
+ },
+ "inbox_create_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": 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"
+ }
+ }
+ }
+ }
+ },
+ "inbox_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": 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"
+ }
+ }
+ }
+ }
+ },
+ "team_create_update_payload": {
+ "type": "object",
+ "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
+ }
+ }
+ },
+ "custom_filter_create_update_payload": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "The name of the custom filter",
+ "example": "My Custom Filter"
+ },
+ "type": {
+ "type": "string",
+ "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": {}
+ }
+ }
+ },
+ "webhook_create_update_payload": {
+ "type": "object",
+ "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",
+ "contact_created",
+ "contact_updated",
+ "webwidget_triggered"
+ ]
+ },
+ "description": "The events you want to subscribe to.",
+ "example": [
+ "conversation_created",
+ "conversation_status_changed"
+ ]
+ }
+ }
+ },
+ "integrations_hook_create_payload": {
+ "type": "object",
+ "properties": {
+ "app_id": {
+ "type": "integer",
+ "description": "The ID of app for which integration hook is being created",
+ "example": 1
+ },
+ "inbox_id": {
+ "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": {}
+ }
+ }
+ },
+ "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",
+ "example": {}
+ }
+ }
+ },
+ "automation_rule_create_update_payload": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Rule name",
+ "example": "Add label on message create event"
+ },
+ "description": {
+ "type": "string",
+ "description": "The description about the automation and actions",
+ "example": "Add label support and sales on message create event if incoming message content contains text help"
+ },
+ "event_name": {
"type": "string",
"enum": [
"conversation_created",
- "conversation_status_changed",
"conversation_updated",
- "message_created",
- "message_updated",
- "webwidget_triggered"
- ]
+ "message_created"
+ ],
+ "example": "message_created",
+ "description": "The event when you want to execute the automation actions"
},
- "description": "The events you want to subscribe to."
- }
- }
- },
- "integrations_hook_create_payload": {
- "type": "object",
- "properties": {
- "app_id": {
- "type": "string",
- "description": "The ID of app for which integration hook is being created"
- },
- "inbox_id": {
- "type": "string",
- "description": "The inbox ID, if the hook is an inbox hook"
- },
- "settings": {
- "type": "object",
- "description": "The settings required by the integration"
- }
- }
- },
- "integrations_hook_update_payload": {
- "type": "object",
- "properties": {
- "settings": {
- "type": "object",
- "description": "The settings required by the integration"
- }
- }
- },
- "automation_rule_create_update_payload": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "description": "Rule name",
- "example": "Add label on message create event"
- },
- "description": {
- "type": "string",
- "description": "The description about the automation and actions",
- "example": "Add label support and sales on message create event if incoming message content contains text help"
- },
- "event_name": {
- "type": "string",
- "enum": [
- "conversation_created",
- "conversation_updated",
- "message_created"
- ],
- "example": "message_created",
- "description": "The event when you want to execute the automation actions"
- },
- "active": {
- "type": "boolean",
- "description": "Enable/disable automation rule"
- },
- "actions": {
- "type": "array",
- "description": "Array of actions which you want to perform when condition matches, e.g add label support if message contains content help.",
- "items": {
- "type": "object",
- "example": {
- "action_name": "add_label",
- "action_params": [
- "support"
- ]
+ "active": {
+ "type": "boolean",
+ "description": "Enable/disable automation rule"
+ },
+ "actions": {
+ "type": "array",
+ "description": "Array of actions which you want to perform when condition matches, e.g add label support if message contains content help.",
+ "items": {
+ "type": "object",
+ "example": {
+ "action_name": "add_label",
+ "action_params": [
+ "support"
+ ]
+ }
}
- }
- },
- "conditions": {
- "type": "array",
- "description": "Array of conditions on which conversation filter would work, e.g message content contains text help.",
- "items": {
- "type": "object",
- "example": {
- "attribute_key": "content",
- "filter_operator": "contains",
- "query_operator": "nil",
- "values": [
- "help"
- ]
+ },
+ "conditions": {
+ "type": "array",
+ "description": "Array of conditions on which conversation filter would work, e.g message content contains text help.",
+ "items": {
+ "type": "object",
+ "example": {
+ "attribute_key": "content",
+ "filter_operator": "contains",
+ "query_operator": "OR",
+ "values": [
+ "help"
+ ]
+ }
}
}
}
- }
- },
- "portal_create_update_payload": {
- "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"
- }
- },
- "custom_domain": {
- "type": "string",
- "description": "Custom domain to display help center.",
- "example": "https://chatwoot.help/."
- },
- "header_text": {
- "type": "string",
- "description": "Help center header",
- "example": "Handbook"
- },
- "homepage_link": {
- "type": "string",
- "description": "link to main dashboard",
- "example": "https://www.chatwoot.com/"
- },
- "name": {
- "type": "string",
- "description": "Name for the portal"
- },
- "slug": {
- "type": "string",
- "description": "Slug for the portal to display in link"
- },
- "page_title": {
- "type": "string",
- "description": "Page title for the portal"
- },
- "account_id": {
- "type": "integer"
- }
- }
- },
- "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"
- },
- "slug": {
- "type": "string",
- "description": "Category slug"
- },
- "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"
- },
- "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."
- }
- }
- },
- "article_create_update_payload": {
- "type": "object",
- "properties": {
- "content": {
- "type": "string",
- "description": "The text content."
- },
- "meta": {
- "type": "object",
- "description": "Use for search",
- "example": {
- "tags": [
- "article_name"
- ],
- "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."
- }
- }
- },
- "public_contact_create_update_payload": {
- "type": "object",
- "properties": {
- "identifier": {
- "type": "string",
- "description": "External identifier of the contact"
- },
- "identifier_hash": {
- "type": "string",
- "description": "Identifier hash prepared for HMAC authentication"
- },
- "email": {
- "type": "string",
- "description": "Email of the contact"
- },
- "name": {
- "type": "string",
- "description": "Name of the contact"
- },
- "phone_number": {
- "type": "string",
- "description": "Phone number of the contact"
- },
- "avatar_url": {
- "type": "string",
- "description": "The url to a jpeg, png file for the user avatar"
- },
- "custom_attributes": {
- "type": "object",
- "description": "Custom attributes of the customer"
- }
- }
- },
- "public_message_create_payload": {
- "type": "object",
- "properties": {
- "content": {
- "type": "string",
- "description": "Content for the message"
- },
- "echo_id": {
- "type": "string",
- "description": "Temporary identifier which will be passed back via websockets"
- }
- }
- },
- "public_message_update_payload": {
- "type": "object",
- "properties": {
- "submitted_values": {
- "type": "object",
- "description": "Replies to the Bot Message Types"
- }
- }
- },
- "public_conversation_create_payload": {
- "type": "object",
- "properties": {
- "custom_attributes": {
- "type": "object",
- "description": "Custom attributes of the conversation"
- }
- }
- },
- "extended_contact": {
- "allOf": [
- {
- "$ref": "#/definitions/contact"
- },
- {
- "type": "object",
- "properties": {
- "id": {
- "type": "number",
- "description": "Id of the user"
- },
- "availability_status": {
- "type": "string",
- "enum": [
- "online",
- "offline"
+ },
+ "portal_create_update_payload": {
+ "type": "object",
+ "properties": {
+ "color": {
+ "type": "string",
+ "description": "Header color for help-center in hex format",
+ "example": "#FFFFFF"
+ },
+ "custom_domain": {
+ "type": "string",
+ "description": "Custom domain to display help center.",
+ "example": "chatwoot.help"
+ },
+ "header_text": {
+ "type": "string",
+ "description": "Help center header",
+ "example": "Handbook"
+ },
+ "homepage_link": {
+ "type": "string",
+ "description": "link to main dashboard",
+ "example": "https://www.chatwoot.com/"
+ },
+ "name": {
+ "type": "string",
+ "description": "Name for the portal",
+ "example": "Handbook"
+ },
+ "page_title": {
+ "type": "string",
+ "description": "Page title for the portal",
+ "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"
],
- "description": "Availability status of the user"
+ "default_locale": "en"
}
}
}
- ]
- },
- "contact_base": {
- "allOf": [
- {
- "$ref": "#/definitions/generic_id"
- },
- {
- "$ref": "#/definitions/contact"
+ },
+ "category_create_update_payload": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "The name of the category",
+ "example": "Category Name"
+ },
+ "description": {
+ "type": "string",
+ "description": "A description for the category",
+ "example": "Category description"
+ },
+ "position": {
+ "type": "integer",
+ "description": "Category position in the portal list to sort",
+ "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
+ }
}
- ]
- },
- "contact_list": {
- "type": "array",
- "description": "array of contacts",
- "items": {
+ },
+ "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.",
+ "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",
+ "description": "Use for search",
+ "example": {
+ "tags": [
+ "article_name"
+ ],
+ "title": "article title",
+ "description": "article description"
+ }
+ }
+ }
+ },
+ "public_contact_create_update_payload": {
+ "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",
+ "example": "+123456789"
+ },
+ "avatar": {
+ "type": "string",
+ "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",
+ "example": {}
+ }
+ }
+ },
+ "public_message_create_payload": {
+ "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"
+ }
+ }
+ },
+ "public_message_update_payload": {
+ "type": "object",
+ "properties": {
+ "submitted_values": {
+ "type": "object",
+ "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
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "public_conversation_create_payload": {
+ "type": "object",
+ "properties": {
+ "custom_attributes": {
+ "type": "object",
+ "description": "Custom attributes of the conversation",
+ "example": {}
+ }
+ }
+ },
+ "extended_contact": {
"allOf": [
{
- "$ref": "#/definitions/generic_id"
+ "$ref": "#/components/schemas/contact"
},
{
- "$ref": "#/definitions/contact"
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "number",
+ "description": "Id of the user"
+ },
+ "availability_status": {
+ "type": "string",
+ "enum": [
+ "online",
+ "offline"
+ ],
+ "description": "Availability status of the user"
+ }
+ }
}
]
- }
- },
- "contact_conversations": {
- "type": "array",
- "description": "array of conversations",
- "items": {
+ },
+ "contact_base": {
"allOf": [
{
- "$ref": "#/definitions/conversation"
+ "$ref": "#/components/schemas/generic_id"
+ },
+ {
+ "$ref": "#/components/schemas/contact"
+ }
+ ]
+ },
+ "contact_list": {
+ "type": "array",
+ "description": "array of contacts",
+ "items": {
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/generic_id"
+ },
+ {
+ "$ref": "#/components/schemas/contact"
+ }
+ ]
+ }
+ },
+ "contact_conversations": {
+ "type": "array",
+ "description": "array of conversations",
+ "items": {
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/conversation"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "meta": {
+ "type": "object",
+ "properties": {
+ "sender": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "number",
+ "description": "ID fo the sender"
+ },
+ "name": {
+ "type": "string",
+ "description": "The name of the sender"
+ },
+ "thumbnail": {
+ "type": "string",
+ "description": "Avatar URL of the contact"
+ },
+ "channel": {
+ "type": "string",
+ "description": "Channel Type"
+ }
+ }
+ },
+ "assignee": {
+ "$ref": "#/components/schemas/user"
+ }
+ }
+ }
+ }
+ },
+ {
+ "type": "object",
+ "properties": {
+ "display_id": {
+ "type": "number"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "contact_labels": {
+ "type": "object",
+ "properties": {
+ "payload": {
+ "type": "array",
+ "description": "Array of labels",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "conversation_list": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "object",
+ "properties": {
+ "meta": {
+ "type": "object",
+ "properties": {
+ "mine_count": {
+ "type": "number"
+ },
+ "unassigned_count": {
+ "type": "number"
+ },
+ "assigned_count": {
+ "type": "number"
+ },
+ "all_count": {
+ "type": "number"
+ }
+ }
+ },
+ "payload": {
+ "type": "array",
+ "description": "array of conversations",
+ "items": {
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/generic_id"
+ },
+ {
+ "$ref": "#/components/schemas/conversation"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "meta": {
+ "type": "object",
+ "properties": {
+ "sender": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "number",
+ "description": "ID fo the sender"
+ },
+ "name": {
+ "type": "string",
+ "description": "The name of the sender"
+ },
+ "thumbnail": {
+ "type": "string",
+ "description": "Avatar URL of the contact"
+ },
+ "channel": {
+ "type": "string",
+ "description": "Channel Type"
+ }
+ }
+ },
+ "assignee": {
+ "$ref": "#/components/schemas/user"
+ }
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ }
+ },
+ "conversation_show": {
+ "type": "object",
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/conversation"
},
{
"type": "object",
@@ -7059,427 +9828,348 @@
}
},
"assignee": {
- "$ref": "#/definitions/user"
+ "$ref": "#/components/schemas/user"
}
}
}
}
- },
- {
- "type": "object",
- "properties": {
- "display_id": {
- "type": "number"
- }
- }
}
]
- }
- },
- "contact_labels": {
- "type": "object",
- "properties": {
- "payload": {
- "type": "array",
- "description": "Array of labels",
- "items": {
- "type": "string"
- }
- }
- }
- },
- "conversation_list": {
- "type": "object",
- "properties": {
- "data": {
- "type": "object",
- "properties": {
- "meta": {
- "type": "object",
- "properties": {
- "mine_count": {
- "type": "number"
- },
- "unassigned_count": {
- "type": "number"
- },
- "assigned_count": {
- "type": "number"
- },
- "all_count": {
- "type": "number"
- }
- }
- },
- "payload": {
- "type": "array",
- "description": "array of conversations",
- "items": {
- "allOf": [
- {
- "$ref": "#/definitions/generic_id"
- },
- {
- "$ref": "#/definitions/conversation"
- },
- {
- "type": "object",
- "properties": {
- "meta": {
- "type": "object",
- "properties": {
- "sender": {
- "type": "object",
- "properties": {
- "id": {
- "type": "number",
- "description": "ID fo the sender"
- },
- "name": {
- "type": "string",
- "description": "The name of the sender"
- },
- "thumbnail": {
- "type": "string",
- "description": "Avatar URL of the contact"
- },
- "channel": {
- "type": "string",
- "description": "Channel Type"
- }
- }
- },
- "assignee": {
- "$ref": "#/definitions/user"
- }
- }
- }
- }
- }
+ },
+ "conversation_status_toggle": {
+ "type": "object",
+ "properties": {
+ "meta": {
+ "type": "object"
+ },
+ "payload": {
+ "type": "object",
+ "properties": {
+ "success": {
+ "type": "boolean"
+ },
+ "current_status": {
+ "type": "string",
+ "enum": [
+ "open",
+ "resolved"
]
+ },
+ "conversation_id": {
+ "type": "number"
}
}
}
}
- }
- },
- "conversation_show": {
- "type": "object",
- "allOf": [
- {
- "$ref": "#/definitions/conversation"
- },
- {
- "type": "object",
- "properties": {
- "meta": {
- "type": "object",
- "properties": {
- "sender": {
- "type": "object",
- "properties": {
- "id": {
- "type": "number",
- "description": "ID fo the sender"
- },
- "name": {
- "type": "string",
- "description": "The name of the sender"
- },
- "thumbnail": {
- "type": "string",
- "description": "Avatar URL of the contact"
- },
- "channel": {
- "type": "string",
- "description": "Channel Type"
- }
- }
- },
- "assignee": {
- "$ref": "#/definitions/user"
- }
- }
+ },
+ "conversation_labels": {
+ "type": "object",
+ "properties": {
+ "payload": {
+ "type": "array",
+ "description": "Array of labels",
+ "items": {
+ "type": "string"
}
}
}
- ]
- },
- "conversation_status_toggle": {
- "type": "object",
- "properties": {
- "meta": {
- "type": "object"
- },
- "payload": {
- "type": "object",
- "properties": {
- "success": {
- "type": "boolean"
- },
- "current_status": {
- "type": "string",
- "enum": [
- "open",
- "resolved"
- ]
- },
- "conversation_id": {
- "type": "number"
- }
- }
- }
- }
- },
- "conversation_labels": {
- "type": "object",
- "properties": {
- "payload": {
- "type": "array",
- "description": "Array of labels",
- "items": {
+ },
+ "account_summary": {
+ "type": "object",
+ "properties": {
+ "avg_first_response_time": {
"type": "string"
+ },
+ "avg_resolution_time": {
+ "type": "string"
+ },
+ "conversations_count": {
+ "type": "number"
+ },
+ "incoming_messages_count": {
+ "type": "number"
+ },
+ "outgoing_messages_count": {
+ "type": "number"
+ },
+ "resolutions_count": {
+ "type": "number"
+ },
+ "previous": {
+ "type": "object",
+ "properties": {
+ "avg_first_response_time": {
+ "type": "string"
+ },
+ "avg_resolution_time": {
+ "type": "string"
+ },
+ "conversations_count": {
+ "type": "number"
+ },
+ "incoming_messages_count": {
+ "type": "number"
+ },
+ "outgoing_messages_count": {
+ "type": "number"
+ },
+ "resolutions_count": {
+ "type": "number"
+ }
+ }
}
}
- }
- },
- "account_summary": {
- "type": "object",
- "properties": {
- "avg_first_response_time": {
- "type": "string"
- },
- "avg_resolution_time": {
- "type": "string"
- },
- "conversations_count": {
- "type": "number"
- },
- "incoming_messages_count": {
- "type": "number"
- },
- "outgoing_messages_count": {
- "type": "number"
- },
- "resolutions_count": {
- "type": "number"
- },
- "previous": {
- "type": "object",
- "properties": {
- "avg_first_response_time": {
- "type": "string"
- },
- "avg_resolution_time": {
- "type": "string"
- },
- "conversations_count": {
- "type": "number"
- },
- "incoming_messages_count": {
- "type": "number"
- },
- "outgoing_messages_count": {
- "type": "number"
- },
- "resolutions_count": {
- "type": "number"
+ },
+ "agent_conversation_metrics": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "number"
+ },
+ "name": {
+ "type": "string"
+ },
+ "email": {
+ "type": "string"
+ },
+ "thumbnail": {
+ "type": "string"
+ },
+ "availability": {
+ "type": "string"
+ },
+ "metric": {
+ "type": "object",
+ "properties": {
+ "open": {
+ "type": "number"
+ },
+ "unattended": {
+ "type": "number"
+ }
}
}
}
}
},
- "agent_conversation_metrics": {
- "type": "object",
- "properties": {
- "id": {
- "type": "number"
+ "parameters": {
+ "account_id": {
+ "in": "path",
+ "name": "account_id",
+ "schema": {
+ "type": "integer"
},
- "name": {
+ "required": true,
+ "description": "The numeric ID of the account"
+ },
+ "agent_bot_id": {
+ "in": "path",
+ "name": "id",
+ "schema": {
+ "type": "integer"
+ },
+ "required": true,
+ "description": "The ID of the agentbot to be updated"
+ },
+ "team_id": {
+ "in": "path",
+ "name": "team_id",
+ "schema": {
+ "type": "integer"
+ },
+ "required": true,
+ "description": "The ID of the team to be updated"
+ },
+ "inbox_id": {
+ "in": "path",
+ "name": "inbox_id",
+ "schema": {
+ "type": "integer"
+ },
+ "required": true,
+ "description": "The ID of the Inbox"
+ },
+ "hook_id": {
+ "in": "path",
+ "name": "hook_id",
+ "schema": {
+ "type": "integer"
+ },
+ "required": true,
+ "description": "The numeric ID of the integration hook"
+ },
+ "source_id": {
+ "in": "path",
+ "name": "source_id",
+ "required": true,
+ "schema": {
"type": "string"
},
- "email": {
+ "description": "Id of the session for which the conversation is created.\n\n\n\n Source Ids can be obtained through contactable inboxes API or via generated.
Website: Chatwoot generated string which can be obtained from webhook events.
Phone Channels(Twilio): Phone number in e164 format
Email Channels: Contact Email address
API Channel: Any Random String"
+ },
+ "contact_sort_param": {
+ "in": "query",
+ "name": "sort",
+ "schema": {
+ "type": "string",
+ "enum": [
+ "name",
+ "email",
+ "phone_number",
+ "last_activity_at",
+ "-name",
+ "-email",
+ "-phone_number",
+ "-last_activity_at"
+ ]
+ },
+ "required": false,
+ "description": "The attribute by which list should be sorted"
+ },
+ "conversation_id": {
+ "in": "path",
+ "name": "conversation_id",
+ "schema": {
+ "type": "integer"
+ },
+ "required": true,
+ "description": "The numeric ID of the conversation"
+ },
+ "conversation_uuid": {
+ "in": "path",
+ "name": "conversation_uuid",
+ "schema": {
+ "type": "integer"
+ },
+ "required": true,
+ "description": "The uuid of the conversation"
+ },
+ "custom_filter_id": {
+ "in": "path",
+ "name": "custom_filter_id",
+ "schema": {
+ "type": "integer"
+ },
+ "required": true,
+ "description": "The numeric ID of the custom filter"
+ },
+ "webhook_id": {
+ "in": "path",
+ "name": "webhook_id",
+ "schema": {
+ "type": "integer"
+ },
+ "required": true,
+ "description": "The numeric ID of the webhook"
+ },
+ "message_id": {
+ "in": "path",
+ "name": "message_id",
+ "schema": {
+ "type": "integer"
+ },
+ "required": true,
+ "description": "The numeric ID of the message"
+ },
+ "page": {
+ "in": "query",
+ "name": "page",
+ "schema": {
+ "type": "integer",
+ "default": 1
+ },
+ "required": false,
+ "description": "The page parameter"
+ },
+ "platform_user_id": {
+ "in": "path",
+ "name": "id",
+ "schema": {
+ "type": "integer"
+ },
+ "required": true,
+ "description": "The numeric ID of the user on the platform"
+ },
+ "report_type": {
+ "in": "query",
+ "name": "type",
+ "schema": {
+ "type": "string",
+ "enum": [
+ "account",
+ "agent",
+ "inbox",
+ "label",
+ "team"
+ ]
+ },
+ "required": true,
+ "description": "Type of report"
+ },
+ "report_metric": {
+ "in": "query",
+ "name": "metric",
+ "schema": {
+ "type": "string",
+ "enum": [
+ "conversations_count",
+ "incoming_messages_count",
+ "outgoing_messages_count",
+ "avg_first_response_time",
+ "avg_resolution_time",
+ "resolutions_count"
+ ]
+ },
+ "required": true,
+ "description": "The type of metric"
+ },
+ "public_inbox_identifier": {
+ "in": "path",
+ "name": "inbox_identifier",
+ "schema": {
"type": "string"
},
- "thumbnail": {
+ "required": true,
+ "description": "The identifier obtained from API inbox channel"
+ },
+ "public_contact_identifier": {
+ "in": "path",
+ "name": "contact_identifier",
+ "schema": {
"type": "string"
},
- "availability": {
+ "required": true,
+ "description": "The source id of contact obtained on contact create"
+ },
+ "portal_id": {
+ "in": "path",
+ "name": "id",
+ "schema": {
"type": "string"
},
- "metric": {
- "type": "object",
- "properties": {
- "open": {
- "type": "number"
- },
- "unattended": {
- "type": "number"
- }
- }
- }
+ "required": true,
+ "description": "The slug identifier of the portal"
}
- }
- },
- "parameters": {
- "account_id": {
- "in": "path",
- "name": "account_id",
- "type": "integer",
- "required": true,
- "description": "The numeric ID of the account"
},
- "agent_bot_id": {
- "in": "path",
- "name": "id",
- "type": "integer",
- "required": true,
- "description": "The ID of the agentbot to be updated"
- },
- "team_id": {
- "in": "path",
- "name": "team_id",
- "type": "integer",
- "required": true,
- "description": "The ID of the team to be updated"
- },
- "inbox_id": {
- "in": "path",
- "name": "inbox_id",
- "type": "integer",
- "required": true,
- "description": "The ID of the Inbox"
- },
- "hook_id": {
- "in": "path",
- "name": "hook_id",
- "type": "integer",
- "required": true,
- "description": "The numeric ID of the integration hook"
- },
- "source_id": {
- "in": "path",
- "name": "source_id",
- "required": true,
- "type": "string",
- "description": "Id of the session for which the conversation is created.\n\n\n\n Source Ids can be obtained through contactable inboxes API or via generated.
Website: Chatwoot generated string which can be obtained from webhook events.
Phone Channels(Twilio): Phone number in e164 format
Email Channels: Contact Email address
API Channel: Any Random String"
- },
- "contact_sort_param": {
- "in": "query",
- "name": "sort",
- "type": "string",
- "enum": [
- "name",
- "email",
- "phone_number",
- "last_activity_at",
- "-name",
- "-email",
- "-phone_number",
- "-last_activity_at"
- ],
- "required": false,
- "description": "The attribute by which list should be sorted"
- },
- "conversation_id": {
- "in": "path",
- "name": "conversation_id",
- "type": "integer",
- "required": true,
- "description": "The numeric ID of the conversation"
- },
- "conversation_uuid": {
- "in": "path",
- "name": "conversation_uuid",
- "type": "integer",
- "required": true,
- "description": "The uuid of the conversation"
- },
- "custom_filter_id": {
- "in": "path",
- "name": "custom_filter_id",
- "type": "integer",
- "required": true,
- "description": "The numeric ID of the custom filter"
- },
- "webhook_id": {
- "in": "path",
- "name": "webhook_id",
- "type": "integer",
- "required": true,
- "description": "The numeric ID of the webhook"
- },
- "message_id": {
- "in": "path",
- "name": "message_id",
- "type": "integer",
- "required": true,
- "description": "The numeric ID of the message"
- },
- "page": {
- "in": "query",
- "name": "page",
- "type": "integer",
- "default": 1,
- "required": false,
- "description": "The page parameter"
- },
- "platform_user_id": {
- "in": "path",
- "name": "id",
- "type": "integer",
- "required": true,
- "description": "The numeric ID of the user on the platform"
- },
- "report_type": {
- "in": "query",
- "name": "type",
- "type": "string",
- "enum": [
- "account",
- "agent",
- "inbox",
- "label",
- "team"
- ],
- "required": true,
- "description": "Type of report"
- },
- "report_metric": {
- "in": "query",
- "name": "metric",
- "type": "string",
- "enum": [
- "conversations_count",
- "incoming_messages_count",
- "outgoing_messages_count",
- "avg_first_response_time",
- "avg_resolution_time",
- "resolutions_count"
- ],
- "required": true,
- "description": "The type of metric"
- },
- "public_inbox_identifier": {
- "in": "path",
- "name": "inbox_identifier",
- "type": "string",
- "required": true,
- "description": "The identifier obtained from API inbox channel"
- },
- "public_contact_identifier": {
- "in": "path",
- "name": "contact_identifier",
- "type": "string",
- "required": true,
- "description": "The source id of contact obtained on contact create"
- },
- "portal_id": {
- "in": "path",
- "name": "portal_id",
- "type": "integer",
- "required": true,
- "description": "The numeric ID of the portal"
+ "securitySchemes": {
+ "userApiKey": {
+ "type": "apiKey",
+ "in": "header",
+ "name": "api_access_token",
+ "description": "This token can be obtained by visiting the profile page or via rails console. Provides access to endpoints based on the user permissions levels. This token can be saved by an external system when user is created via API, to perform activities on behalf of the user."
+ },
+ "agentBotApiKey": {
+ "type": "apiKey",
+ "in": "header",
+ "name": "api_access_token",
+ "description": "This token should be provided by system admin or obtained via rails console. This token can be used to build bot integrations and can only access limited apis."
+ },
+ "platformAppApiKey": {
+ "type": "apiKey",
+ "in": "header",
+ "name": "api_access_token",
+ "description": "This token can be obtained by the system admin after creating a platformApp. This token should be used to provision agent bots, accounts, users and their roles."
+ }
}
},
"x-tagGroups": [
@@ -7499,9 +10189,6 @@
"Agents",
"Canned Responses",
"Contacts",
- "Contact Labels",
- "Conversation Assignment",
- "Conversation Labels",
"Conversations",
"Custom Attributes",
"Custom Filters",