Initial commit: Add logistics and order_detail message types
Some checks failed
Lock Threads / action (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
Publish Chatwoot EE docker images / build (linux/amd64, ubuntu-latest) (push) Has been cancelled
Publish Chatwoot EE docker images / build (linux/arm64, ubuntu-22.04-arm) (push) Has been cancelled
Publish Chatwoot EE docker images / merge (push) Has been cancelled
Publish Chatwoot CE docker images / build (linux/amd64, ubuntu-latest) (push) Has been cancelled
Publish Chatwoot CE docker images / build (linux/arm64, ubuntu-22.04-arm) (push) Has been cancelled
Publish Chatwoot CE docker images / merge (push) Has been cancelled
Run Chatwoot CE spec / lint-backend (push) Has been cancelled
Run Chatwoot CE spec / lint-frontend (push) Has been cancelled
Run Chatwoot CE spec / frontend-tests (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (0, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (1, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (10, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (11, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (12, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (13, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (14, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (15, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (2, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (3, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (4, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (5, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (6, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (7, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (8, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (9, 16) (push) Has been cancelled
Run Linux nightly installer / nightly (push) Has been cancelled
Some checks failed
Lock Threads / action (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
Publish Chatwoot EE docker images / build (linux/amd64, ubuntu-latest) (push) Has been cancelled
Publish Chatwoot EE docker images / build (linux/arm64, ubuntu-22.04-arm) (push) Has been cancelled
Publish Chatwoot EE docker images / merge (push) Has been cancelled
Publish Chatwoot CE docker images / build (linux/amd64, ubuntu-latest) (push) Has been cancelled
Publish Chatwoot CE docker images / build (linux/arm64, ubuntu-22.04-arm) (push) Has been cancelled
Publish Chatwoot CE docker images / merge (push) Has been cancelled
Run Chatwoot CE spec / lint-backend (push) Has been cancelled
Run Chatwoot CE spec / lint-frontend (push) Has been cancelled
Run Chatwoot CE spec / frontend-tests (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (0, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (1, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (10, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (11, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (12, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (13, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (14, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (15, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (2, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (3, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (4, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (5, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (6, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (7, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (8, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (9, 16) (push) Has been cancelled
Run Linux nightly installer / nightly (push) Has been cancelled
- Add Logistics component with progress tracking - Add OrderDetail component for order information - Support data-driven steps and actions - Add blue color scale to widget SCSS - Fix node overflow and progress bar rendering issues - Add English translations for dashboard components Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
28
swagger/paths/application/accounts/show.yml
Normal file
28
swagger/paths/application/accounts/show.yml
Normal file
@@ -0,0 +1,28 @@
|
||||
tags:
|
||||
- Account
|
||||
operationId: get-account-details
|
||||
summary: Get account details
|
||||
description: Get the details of the current account
|
||||
security:
|
||||
- userApiKey: []
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/account_id'
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/account_show_response'
|
||||
'401':
|
||||
description: Unauthorized
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
'404':
|
||||
description: Account not found
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
43
swagger/paths/application/accounts/update.yml
Normal file
43
swagger/paths/application/accounts/update.yml
Normal file
@@ -0,0 +1,43 @@
|
||||
tags:
|
||||
- Account
|
||||
operationId: update-account
|
||||
summary: Update account
|
||||
description: Update account details, settings, and custom attributes
|
||||
security:
|
||||
- userApiKey: []
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/account_id'
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/account_update_payload'
|
||||
application/x-www-form-urlencoded:
|
||||
schema:
|
||||
$ref: '#/components/schemas/account_update_payload'
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/account_detail'
|
||||
'401':
|
||||
description: Unauthorized (requires administrator role)
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
'404':
|
||||
description: Account not found
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
'422':
|
||||
description: Validation error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
26
swagger/paths/application/agent_bots/create.yml
Normal file
26
swagger/paths/application/agent_bots/create.yml
Normal file
@@ -0,0 +1,26 @@
|
||||
tags:
|
||||
- Account AgentBots
|
||||
operationId: create-an-account-agent-bot
|
||||
summary: Create an Agent Bot
|
||||
description: Create an agent bot in the account
|
||||
security:
|
||||
- userApiKey: []
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/agent_bot_create_update_payload'
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/agent_bot'
|
||||
'401':
|
||||
description: Unauthorized
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
22
swagger/paths/application/agent_bots/delete.yml
Normal file
22
swagger/paths/application/agent_bots/delete.yml
Normal file
@@ -0,0 +1,22 @@
|
||||
tags:
|
||||
- Account AgentBots
|
||||
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'
|
||||
23
swagger/paths/application/agent_bots/index.yml
Normal file
23
swagger/paths/application/agent_bots/index.yml
Normal file
@@ -0,0 +1,23 @@
|
||||
tags:
|
||||
- Account AgentBots
|
||||
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
|
||||
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'
|
||||
26
swagger/paths/application/agent_bots/show.yml
Normal file
26
swagger/paths/application/agent_bots/show.yml
Normal file
@@ -0,0 +1,26 @@
|
||||
tags:
|
||||
- Account AgentBots
|
||||
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
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/agent_bot'
|
||||
'401':
|
||||
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
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
26
swagger/paths/application/agent_bots/update.yml
Normal file
26
swagger/paths/application/agent_bots/update.yml
Normal file
@@ -0,0 +1,26 @@
|
||||
tags:
|
||||
- Account AgentBots
|
||||
operationId: update-an-account-agent-bot
|
||||
summary: Update an agent bot
|
||||
description: Update an agent bot's attributes
|
||||
security:
|
||||
- userApiKey: []
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/agent_bot_create_update_payload'
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/agent_bot'
|
||||
'401':
|
||||
description: Unauthorized
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
27
swagger/paths/application/agents/create.yml
Normal file
27
swagger/paths/application/agents/create.yml
Normal file
@@ -0,0 +1,27 @@
|
||||
tags:
|
||||
- Agents
|
||||
operationId: add-new-agent-to-account
|
||||
summary: Add a New Agent
|
||||
description: Add a new Agent to Account
|
||||
security:
|
||||
- userApiKey: []
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/agent_create_payload'
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
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'
|
||||
29
swagger/paths/application/agents/delete.yml
Normal file
29
swagger/paths/application/agents/delete.yml
Normal file
@@ -0,0 +1,29 @@
|
||||
tags:
|
||||
- Agents
|
||||
operationId: delete-agent-from-account
|
||||
summary: Remove an Agent from Account
|
||||
description: Remove an Agent from Account
|
||||
security:
|
||||
- userApiKey: []
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
schema:
|
||||
type: integer
|
||||
required: true
|
||||
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'
|
||||
23
swagger/paths/application/agents/index.yml
Normal file
23
swagger/paths/application/agents/index.yml
Normal file
@@ -0,0 +1,23 @@
|
||||
tags:
|
||||
- Agents
|
||||
operationId: get-account-agents
|
||||
summary: List Agents in Account
|
||||
description: Get Details of Agents in an Account
|
||||
security:
|
||||
- userApiKey: []
|
||||
responses:
|
||||
200:
|
||||
description: Success
|
||||
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'
|
||||
40
swagger/paths/application/agents/update.yml
Normal file
40
swagger/paths/application/agents/update.yml
Normal file
@@ -0,0 +1,40 @@
|
||||
tags:
|
||||
- Agents
|
||||
operationId: update-agent-in-account
|
||||
summary: Update Agent in Account
|
||||
description: Update an Agent in Account
|
||||
security:
|
||||
- userApiKey: []
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
schema:
|
||||
type: integer
|
||||
required: true
|
||||
description: The ID of the agent to be updated.
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/agent_update_payload'
|
||||
responses:
|
||||
200:
|
||||
description: Success
|
||||
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'
|
||||
26
swagger/paths/application/article/create.yml
Normal file
26
swagger/paths/application/article/create.yml
Normal file
@@ -0,0 +1,26 @@
|
||||
tags:
|
||||
- Help Center
|
||||
operationId: add-new-article-to-account
|
||||
summary: Add a new article
|
||||
description: Add a new article to portal
|
||||
security:
|
||||
- userApiKey: []
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/article_create_update_payload'
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/article'
|
||||
'403':
|
||||
description: Access denied
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
52
swagger/paths/application/audit_logs/index.yml
Normal file
52
swagger/paths/application/audit_logs/index.yml
Normal file
@@ -0,0 +1,52 @@
|
||||
tags:
|
||||
- Audit Logs
|
||||
operationId: get-account-audit-logs
|
||||
summary: List Audit Logs in Account
|
||||
description: Get Details of Audit Log entries for an Account. This endpoint is only available in Enterprise editions and requires the audit_logs feature to be enabled.
|
||||
security:
|
||||
- userApiKey: []
|
||||
parameters:
|
||||
- name: page
|
||||
in: query
|
||||
description: Page number for pagination
|
||||
required: false
|
||||
schema:
|
||||
type: integer
|
||||
default: 1
|
||||
responses:
|
||||
200:
|
||||
description: Success
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
per_page:
|
||||
type: integer
|
||||
description: Number of items per page
|
||||
example: 15
|
||||
total_entries:
|
||||
type: integer
|
||||
description: Total number of audit log entries
|
||||
example: 150
|
||||
current_page:
|
||||
type: integer
|
||||
description: Current page number
|
||||
example: 1
|
||||
audit_logs:
|
||||
type: array
|
||||
description: Array of audit log entries
|
||||
items:
|
||||
$ref: '#/components/schemas/audit_log'
|
||||
403:
|
||||
description: Access denied
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
422:
|
||||
description: Feature not enabled or not available in current plan
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
26
swagger/paths/application/automation_rule/create.yml
Normal file
26
swagger/paths/application/automation_rule/create.yml
Normal file
@@ -0,0 +1,26 @@
|
||||
tags:
|
||||
- Automation Rule
|
||||
operationId: add-new-automation-rule-to-account
|
||||
summary: Add a new automation rule
|
||||
description: Add a new automation rule to account
|
||||
security:
|
||||
- userApiKey: []
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/automation_rule_create_update_payload'
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/automation_rule'
|
||||
'403':
|
||||
description: Access denied
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
29
swagger/paths/application/automation_rule/delete.yml
Normal file
29
swagger/paths/application/automation_rule/delete.yml
Normal file
@@ -0,0 +1,29 @@
|
||||
tags:
|
||||
- Automation Rule
|
||||
operationId: delete-automation-rule-from-account
|
||||
summary: Remove a automation rule from account
|
||||
description: Remove a automation rule from account
|
||||
security:
|
||||
- userApiKey: []
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
schema:
|
||||
type: integer
|
||||
required: true
|
||||
description: The ID of the automation rule to be deleted
|
||||
responses:
|
||||
'200':
|
||||
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'
|
||||
23
swagger/paths/application/automation_rule/index.yml
Normal file
23
swagger/paths/application/automation_rule/index.yml
Normal file
@@ -0,0 +1,23 @@
|
||||
tags:
|
||||
- Automation Rule
|
||||
operationId: get-account-automation-rule
|
||||
summary: List all automation rules in an account
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/account_id'
|
||||
- $ref: '#/components/parameters/page'
|
||||
description: Get details of automation rules in an Account
|
||||
security:
|
||||
- userApiKey: []
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/automation_rule'
|
||||
'403':
|
||||
description: Access denied
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
53
swagger/paths/application/automation_rule/show.yml
Normal file
53
swagger/paths/application/automation_rule/show.yml
Normal file
@@ -0,0 +1,53 @@
|
||||
tags:
|
||||
- Automation Rule
|
||||
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
|
||||
schema:
|
||||
type: integer
|
||||
required: true
|
||||
description: The ID of the automation rule to be updated.
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/automation_rule'
|
||||
example:
|
||||
payload:
|
||||
id: 90
|
||||
account_id: 1
|
||||
name: "add-label-bug-if-message-contains-bug"
|
||||
description: "add-label-bug-if-message-contains-bug"
|
||||
event_name: "message_created"
|
||||
conditions:
|
||||
- values: ["incoming"]
|
||||
attribute_key: "message_type"
|
||||
query_operator: "and"
|
||||
filter_operator: "equal_to"
|
||||
- values: ["bug"]
|
||||
attribute_key: "content"
|
||||
filter_operator: "contains"
|
||||
actions:
|
||||
- action_name: "add_label"
|
||||
action_params: ["bugs", "support-query"]
|
||||
created_on: 1650555440
|
||||
active: true
|
||||
'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'
|
||||
39
swagger/paths/application/automation_rule/update.yml
Normal file
39
swagger/paths/application/automation_rule/update.yml
Normal file
@@ -0,0 +1,39 @@
|
||||
tags:
|
||||
- Automation Rule
|
||||
operationId: update-automation-rule-in-account
|
||||
summary: Update automation rule in Account
|
||||
description: Update a automation rule in account
|
||||
security:
|
||||
- userApiKey: []
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
schema:
|
||||
type: integer
|
||||
required: true
|
||||
description: The ID of the automation rule to be updated.
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/automation_rule_create_update_payload'
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
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'
|
||||
27
swagger/paths/application/canned_responses/create.yml
Normal file
27
swagger/paths/application/canned_responses/create.yml
Normal file
@@ -0,0 +1,27 @@
|
||||
tags:
|
||||
- Canned Responses
|
||||
operationId: add-new-canned-response-to-account
|
||||
summary: Add a New Canned Response
|
||||
description: Add a new Canned Response to Account
|
||||
security:
|
||||
- userApiKey: []
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/canned_response_create_update_payload'
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
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'
|
||||
29
swagger/paths/application/canned_responses/delete.yml
Normal file
29
swagger/paths/application/canned_responses/delete.yml
Normal file
@@ -0,0 +1,29 @@
|
||||
tags:
|
||||
- Canned Responses
|
||||
operationId: delete-canned-response-from-account
|
||||
summary: Remove a Canned Response from Account
|
||||
description: Remove a Canned Response from Account
|
||||
security:
|
||||
- userApiKey: []
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
schema:
|
||||
type: integer
|
||||
required: true
|
||||
description: The ID of the canned response to be deleted
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
'404':
|
||||
description: Canned Response 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'
|
||||
23
swagger/paths/application/canned_responses/index.yml
Normal file
23
swagger/paths/application/canned_responses/index.yml
Normal file
@@ -0,0 +1,23 @@
|
||||
tags:
|
||||
- Canned Responses
|
||||
operationId: get-account-canned-response
|
||||
summary: List all Canned Responses in an Account
|
||||
description: Get Details of Canned Responses in an Account
|
||||
security:
|
||||
- userApiKey: []
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
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'
|
||||
40
swagger/paths/application/canned_responses/update.yml
Normal file
40
swagger/paths/application/canned_responses/update.yml
Normal file
@@ -0,0 +1,40 @@
|
||||
tags:
|
||||
- Canned Responses
|
||||
operationId: update-canned-response-in-account
|
||||
summary: Update Canned Response in Account
|
||||
description: Update a Canned Response in Account
|
||||
security:
|
||||
- userApiKey: []
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
schema:
|
||||
type: integer
|
||||
required: true
|
||||
description: The ID of the canned response to be updated.
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/canned_response_create_update_payload'
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
description: 'The updated canned response'
|
||||
$ref: '#/components/schemas/canned_response'
|
||||
'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'
|
||||
26
swagger/paths/application/category/create.yml
Normal file
26
swagger/paths/application/category/create.yml
Normal file
@@ -0,0 +1,26 @@
|
||||
tags:
|
||||
- Help Center
|
||||
operationId: add-new-category-to-account
|
||||
summary: Add a new category
|
||||
description: Add a new category to portal
|
||||
security:
|
||||
- userApiKey: []
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/category_create_update_payload'
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/category'
|
||||
'403':
|
||||
description: Access denied
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
51
swagger/paths/application/contact_inboxes/create.yml
Normal file
51
swagger/paths/application/contact_inboxes/create.yml
Normal file
@@ -0,0 +1,51 @@
|
||||
post:
|
||||
tags:
|
||||
- Contacts
|
||||
operationId: contactInboxCreation
|
||||
description: Create a contact inbox record for an inbox
|
||||
summary: Create contact inbox
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/account_id'
|
||||
- name: id
|
||||
in: path
|
||||
schema:
|
||||
type: number
|
||||
description: ID of the contact
|
||||
required: true
|
||||
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':
|
||||
description: Success
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/contact_inboxes'
|
||||
'401':
|
||||
description: Authentication error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
'422':
|
||||
description: Incorrect payload
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
35
swagger/paths/application/contactable_inboxes/get.yml
Normal file
35
swagger/paths/application/contactable_inboxes/get.yml
Normal file
@@ -0,0 +1,35 @@
|
||||
get:
|
||||
tags:
|
||||
- Contacts
|
||||
operationId: contactableInboxesGet
|
||||
description: Get List of contactable Inboxes
|
||||
summary: Get Contactable Inboxes
|
||||
security:
|
||||
- userApiKey: []
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/account_id'
|
||||
- name: id
|
||||
in: path
|
||||
schema:
|
||||
type: number
|
||||
description: ID of the contact
|
||||
required: true
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/contactable_inboxes_response'
|
||||
'401':
|
||||
description: Authentication error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
'422':
|
||||
description: Incorrect payload
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
43
swagger/paths/application/contacts/conversations.yml
Normal file
43
swagger/paths/application/contacts/conversations.yml
Normal file
@@ -0,0 +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 with that contact
|
||||
parameters:
|
||||
- name: id
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: number
|
||||
description: ID of the contact
|
||||
security:
|
||||
- userApiKey: []
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/contact_conversations_response'
|
||||
'404':
|
||||
description: Contact 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'
|
||||
94
swagger/paths/application/contacts/crud.yml
Normal file
94
swagger/paths/application/contacts/crud.yml
Normal file
@@ -0,0 +1,94 @@
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/account_id'
|
||||
- name: id
|
||||
in: path
|
||||
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':
|
||||
description: Success
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/contact_show_response'
|
||||
'404':
|
||||
description: Contact 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'
|
||||
|
||||
put:
|
||||
tags:
|
||||
- Contacts
|
||||
operationId: contactUpdate
|
||||
summary: Update Contact
|
||||
security:
|
||||
- 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
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/contact_base'
|
||||
'404':
|
||||
description: Contact 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'
|
||||
|
||||
delete:
|
||||
tags:
|
||||
- Contacts
|
||||
operationId: contactDelete
|
||||
summary: Delete Contact
|
||||
security:
|
||||
- userApiKey: []
|
||||
description: Delete a contact belonging to the account using ID
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
'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'
|
||||
64
swagger/paths/application/contacts/filter.yml
Normal file
64
swagger/paths/application/contacts/filter.yml
Normal file
@@ -0,0 +1,64 @@
|
||||
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
|
||||
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/contacts_list_response'
|
||||
'400':
|
||||
description: Bad Request Error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
79
swagger/paths/application/contacts/labels.yml
Normal file
79
swagger/paths/application/contacts/labels.yml
Normal file
@@ -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:
|
||||
- Contact Labels
|
||||
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:
|
||||
- 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.
|
||||
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'
|
||||
55
swagger/paths/application/contacts/list_create.yml
Normal file
55
swagger/paths/application/contacts/list_create.yml
Normal file
@@ -0,0 +1,55 @@
|
||||
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
|
||||
summary: List Contacts
|
||||
security:
|
||||
- userApiKey: []
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/account_id'
|
||||
- $ref: '#/components/parameters/contact_sort_param'
|
||||
- $ref: '#/components/parameters/page'
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/contacts_list_response'
|
||||
'400':
|
||||
description: Bad Request Error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
|
||||
post:
|
||||
tags:
|
||||
- Contacts
|
||||
operationId: contactCreate
|
||||
description: Create a new Contact
|
||||
summary: Create Contact
|
||||
security:
|
||||
- userApiKey: []
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/account_id'
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/contact_create_payload'
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/extended_contact'
|
||||
'400':
|
||||
description: Bad Request Error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
55
swagger/paths/application/contacts/merge.yml
Normal file
55
swagger/paths/application/contacts/merge.yml
Normal file
@@ -0,0 +1,55 @@
|
||||
tags:
|
||||
- Contacts
|
||||
operationId: contactMerge
|
||||
summary: Merge Contacts
|
||||
security:
|
||||
- userApiKey: []
|
||||
description: |
|
||||
Merge two contacts into a single contact. The base contact remains and receives all
|
||||
data from the mergee contact. After the merge, the mergee contact is permanently deleted.
|
||||
|
||||
This action is irreversible. All conversations, labels, and custom attributes from the
|
||||
mergee contact will be moved to the base contact.
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
required:
|
||||
- base_contact_id
|
||||
- mergee_contact_id
|
||||
properties:
|
||||
base_contact_id:
|
||||
type: integer
|
||||
description: ID of the contact that will remain after the merge and receive all data
|
||||
example: 1
|
||||
mergee_contact_id:
|
||||
type: integer
|
||||
description: ID of the contact that will be merged into the base contact and deleted
|
||||
example: 2
|
||||
responses:
|
||||
'200':
|
||||
description: Contacts merged successfully
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/contact_base'
|
||||
'400':
|
||||
description: Bad request - invalid contact IDs or contacts cannot be merged
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
'401':
|
||||
description: Unauthorized
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
'404':
|
||||
description: One or both contacts not found
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
30
swagger/paths/application/contacts/search.yml
Normal file
30
swagger/paths/application/contacts/search.yml
Normal file
@@ -0,0 +1,30 @@
|
||||
get:
|
||||
tags:
|
||||
- Contacts
|
||||
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: '#/components/parameters/account_id'
|
||||
- name: q
|
||||
in: query
|
||||
schema:
|
||||
type: string
|
||||
description: Search using contact `name`, `identifier`, `email` or `phone number`
|
||||
- $ref: '#/components/parameters/contact_sort_param'
|
||||
- $ref: '#/components/parameters/page'
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/contacts_list_response'
|
||||
'401':
|
||||
description: Authentication error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
42
swagger/paths/application/conversation/assignments.yml
Normal file
42
swagger/paths/application/conversation/assignments.yml
Normal file
@@ -0,0 +1,42 @@
|
||||
tags:
|
||||
- Conversation Assignments
|
||||
operationId: assign-a-conversation
|
||||
summary: Assign Conversation
|
||||
description: Assign a conversation to an agent or a team
|
||||
security:
|
||||
- userApiKey: []
|
||||
- agentBotApiKey: []
|
||||
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
|
||||
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'
|
||||
45
swagger/paths/application/conversation/custom_attributes.yml
Normal file
45
swagger/paths/application/conversation/custom_attributes.yml
Normal file
@@ -0,0 +1,45 @@
|
||||
tags:
|
||||
- Conversations
|
||||
operationId: update-custom-attributes-of-a-conversation
|
||||
summary: Update Custom Attributes
|
||||
description: Updates the custom attributes of a conversation
|
||||
security:
|
||||
- userApiKey: []
|
||||
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
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
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
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
63
swagger/paths/application/conversation/filter.yml
Normal file
63
swagger/paths/application/conversation/filter.yml
Normal file
@@ -0,0 +1,63 @@
|
||||
tags:
|
||||
- Conversations
|
||||
operationId: conversationFilter
|
||||
description: Filter conversations with custom filter options and pagination
|
||||
summary: Conversations Filter
|
||||
security:
|
||||
- userApiKey: []
|
||||
parameters:
|
||||
- name: page
|
||||
in: query
|
||||
schema:
|
||||
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
|
||||
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':
|
||||
description: Success
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/conversation_list'
|
||||
'400':
|
||||
description: Bad Request Error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
104
swagger/paths/application/conversation/index.yml
Normal file
104
swagger/paths/application/conversation/index.yml
Normal file
@@ -0,0 +1,104 @@
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/account_id'
|
||||
|
||||
get:
|
||||
tags:
|
||||
- Conversations
|
||||
operationId: conversationList
|
||||
description: List all the conversations with pagination
|
||||
summary: Conversations List
|
||||
security:
|
||||
- userApiKey: []
|
||||
parameters:
|
||||
- name: assignee_type
|
||||
in: query
|
||||
schema:
|
||||
type: string
|
||||
enum: ['me', 'unassigned', 'all', 'assigned']
|
||||
default: 'all'
|
||||
description: Filter conversations by assignee type.
|
||||
- name: status
|
||||
in: query
|
||||
schema:
|
||||
type: string
|
||||
enum: ['all', 'open', 'resolved', 'pending', 'snoozed']
|
||||
default: 'open'
|
||||
description: Filter by conversation status.
|
||||
- name: q
|
||||
in: query
|
||||
schema:
|
||||
type: string
|
||||
description: Filters conversations with messages containing the search term
|
||||
- name: inbox_id
|
||||
in: query
|
||||
schema:
|
||||
type: integer
|
||||
- name: team_id
|
||||
in: query
|
||||
schema:
|
||||
type: integer
|
||||
- name: labels
|
||||
in: query
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
- name: page
|
||||
in: query
|
||||
schema:
|
||||
type: integer
|
||||
default: 1
|
||||
description: paginate through conversations
|
||||
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/conversation_list'
|
||||
'400':
|
||||
description: 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://www.chatwoot.com/hc/user-guide/articles/1677839703-how-to-create-an-api-channel-inbox#send-messages-to-the-api-channel"
|
||||
security:
|
||||
- userApiKey: []
|
||||
- agentBotApiKey: []
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/conversation_create_payload'
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
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'
|
||||
41
swagger/paths/application/conversation/labels/create.yml
Normal file
41
swagger/paths/application/conversation/labels/create.yml
Normal file
@@ -0,0 +1,41 @@
|
||||
tags:
|
||||
- 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.
|
||||
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/conversation_labels'
|
||||
'404':
|
||||
description: Conversation not found
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
'401':
|
||||
description: Unauthorized
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
26
swagger/paths/application/conversation/labels/index.yml
Normal file
26
swagger/paths/application/conversation/labels/index.yml
Normal file
@@ -0,0 +1,26 @@
|
||||
tags:
|
||||
- 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
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/conversation_labels'
|
||||
'404':
|
||||
description: Conversation not found
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
'401':
|
||||
description: Unauthorized
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
85
swagger/paths/application/conversation/messages/create.yml
Normal file
85
swagger/paths/application/conversation/messages/create.yml
Normal file
@@ -0,0 +1,85 @@
|
||||
tags:
|
||||
- Messages
|
||||
operationId: create-a-new-message-in-a-conversation
|
||||
summary: Create New Message
|
||||
description: |
|
||||
Create a new message in the conversation.
|
||||
|
||||
## WhatsApp Template Messages
|
||||
|
||||
For WhatsApp channels, you can send structured template messages using the `template_params` field.
|
||||
Templates must be pre-approved in WhatsApp Business Manager.
|
||||
|
||||
### Example Templates
|
||||
|
||||
**Text with Image Header:**
|
||||
```json
|
||||
{
|
||||
"content": "Hi your order 121212 is confirmed. Please wait for further updates",
|
||||
"template_params": {
|
||||
"name": "order_confirmation",
|
||||
"category": "MARKETING",
|
||||
"language": "en",
|
||||
"processed_params": {
|
||||
"body": {
|
||||
"1": "121212"
|
||||
},
|
||||
"header": {
|
||||
"media_url": "https://picsum.photos/200/300",
|
||||
"media_type": "image"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**Text with Copy Code Button:**
|
||||
```json
|
||||
{
|
||||
"content": "Special offer! Get 30% off your next purchase. Use the code below",
|
||||
"template_params": {
|
||||
"name": "discount_coupon",
|
||||
"category": "MARKETING",
|
||||
"language": "en",
|
||||
"processed_params": {
|
||||
"body": {
|
||||
"discount_percentage": "30"
|
||||
},
|
||||
"buttons": [{
|
||||
"type": "copy_code",
|
||||
"parameter": "SAVE20"
|
||||
}]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
security:
|
||||
- userApiKey: []
|
||||
- agentBotApiKey: []
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/conversation_message_create_payload'
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/generic_id'
|
||||
- $ref: '#/components/schemas/message'
|
||||
'404':
|
||||
description: Conversation 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'
|
||||
@@ -0,0 +1,57 @@
|
||||
post:
|
||||
tags:
|
||||
- Messages
|
||||
operationId: conversationNewMessageAttachment
|
||||
summary: Create New Message Attachment
|
||||
description: Create an attachment message.
|
||||
security:
|
||||
- userApiKey: []
|
||||
parameters:
|
||||
- $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':
|
||||
description: Success
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/generic_id'
|
||||
- $ref: '#/components/schemas/message'
|
||||
'404':
|
||||
description: Conversation 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'
|
||||
22
swagger/paths/application/conversation/messages/delete.yml
Normal file
22
swagger/paths/application/conversation/messages/delete.yml
Normal file
@@ -0,0 +1,22 @@
|
||||
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':
|
||||
description: Success
|
||||
'401':
|
||||
description: Unauthorized
|
||||
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'
|
||||
51
swagger/paths/application/conversation/messages/index.yml
Normal file
51
swagger/paths/application/conversation/messages/index.yml
Normal file
@@ -0,0 +1,51 @@
|
||||
tags:
|
||||
- Messages
|
||||
operationId: list-all-messages
|
||||
summary: Get messages
|
||||
security:
|
||||
- userApiKey: []
|
||||
description: List all messages of a conversation
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
meta:
|
||||
type: object
|
||||
properties:
|
||||
labels:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
additional_attributes:
|
||||
type: object
|
||||
contact:
|
||||
$ref: '#/components/schemas/contact'
|
||||
assignee:
|
||||
$ref: '#/components/schemas/agent'
|
||||
agent_last_seen_at:
|
||||
type: string
|
||||
format: date-time
|
||||
assignee_last_seen_at:
|
||||
type: string
|
||||
format: date-time
|
||||
payload:
|
||||
type: array
|
||||
description: Array of messages
|
||||
items:
|
||||
$ref: '#/components/schemas/message'
|
||||
'404':
|
||||
description: Conversation not found
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
'401':
|
||||
description: Unauthorized
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
64
swagger/paths/application/conversation/meta.yml
Normal file
64
swagger/paths/application/conversation/meta.yml
Normal file
@@ -0,0 +1,64 @@
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/account_id'
|
||||
|
||||
get:
|
||||
tags:
|
||||
- Conversations
|
||||
operationId: conversationListMeta
|
||||
description: Get open, unassigned and all Conversation counts
|
||||
summary: Get Conversation Counts
|
||||
security:
|
||||
- userApiKey: []
|
||||
parameters:
|
||||
- name: status
|
||||
in: query
|
||||
schema:
|
||||
type: string
|
||||
enum: ['all', 'open', 'resolved', 'pending', 'snoozed']
|
||||
default: 'open'
|
||||
description: Filter by conversation status.
|
||||
- name: q
|
||||
in: query
|
||||
schema:
|
||||
type: string
|
||||
description: Filters conversations with messages containing the search term
|
||||
- name: inbox_id
|
||||
in: query
|
||||
schema:
|
||||
type: integer
|
||||
- name: team_id
|
||||
in: query
|
||||
schema:
|
||||
type: integer
|
||||
- name: labels
|
||||
in: query
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
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
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
29
swagger/paths/application/conversation/reporting_events.yml
Normal file
29
swagger/paths/application/conversation/reporting_events.yml
Normal file
@@ -0,0 +1,29 @@
|
||||
tags:
|
||||
- Conversations
|
||||
operationId: get-conversation-reporting-events
|
||||
summary: Conversation Reporting Events
|
||||
security:
|
||||
- userApiKey: []
|
||||
description: Get reporting events for a specific conversation. This endpoint returns events such as first response time, resolution time, and other metrics for the conversation, sorted by creation time in ascending order.
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/reporting_event'
|
||||
description: Array of reporting events for the conversation
|
||||
'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'
|
||||
26
swagger/paths/application/conversation/show.yml
Normal file
26
swagger/paths/application/conversation/show.yml
Normal file
@@ -0,0 +1,26 @@
|
||||
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':
|
||||
description: Success
|
||||
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'
|
||||
37
swagger/paths/application/conversation/toggle_priority.yml
Normal file
37
swagger/paths/application/conversation/toggle_priority.yml
Normal file
@@ -0,0 +1,37 @@
|
||||
tags:
|
||||
- Conversations
|
||||
operationId: toggle-priority-of-a-conversation
|
||||
summary: Toggle Priority
|
||||
description: Toggles the priority of conversation
|
||||
security:
|
||||
- userApiKey: []
|
||||
- agentBotApiKey: []
|
||||
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
|
||||
'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'
|
||||
67
swagger/paths/application/conversation/toggle_status.yml
Normal file
67
swagger/paths/application/conversation/toggle_status.yml
Normal file
@@ -0,0 +1,67 @@
|
||||
tags:
|
||||
- Conversations
|
||||
operationId: toggle-status-of-a-conversation
|
||||
summary: Toggle Status
|
||||
description: |-
|
||||
Toggle the status of a conversation. Pass `status` to explicitly set the
|
||||
conversation state. Use `snoozed` along with `snoozed_until` to snooze a
|
||||
conversation until a specific time. If `snoozed_until` is omitted, the
|
||||
conversation is snoozed until the next reply from the contact. Regardless
|
||||
of the value provided, snoozed conversations always reopen on the next
|
||||
reply from the contact.
|
||||
security:
|
||||
- userApiKey: []
|
||||
- agentBotApiKey: []
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
required:
|
||||
- status
|
||||
properties:
|
||||
status:
|
||||
type: string
|
||||
enum: ['open', 'resolved', 'pending', 'snoozed']
|
||||
description: The status of the conversation
|
||||
example: open
|
||||
snoozed_until:
|
||||
type: number
|
||||
description: When status is `snoozed`, schedule the reopen time as a Unix timestamp in seconds.
|
||||
If not provided, the conversation is snoozed until the next
|
||||
customer reply. The conversation always reopens when the
|
||||
customer replies.
|
||||
example: 1757506877
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
meta:
|
||||
type: object
|
||||
payload:
|
||||
type: object
|
||||
properties:
|
||||
success:
|
||||
type: boolean
|
||||
current_status:
|
||||
type: string
|
||||
enum: ['open', 'resolved', 'pending', 'snoozed']
|
||||
conversation_id:
|
||||
type: number
|
||||
'404':
|
||||
description: Conversation not found
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
'401':
|
||||
description: Unauthorized
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
39
swagger/paths/application/conversation/update.yml
Normal file
39
swagger/paths/application/conversation/update.yml
Normal file
@@ -0,0 +1,39 @@
|
||||
tags:
|
||||
- Conversations
|
||||
operationId: update-conversation
|
||||
summary: Update Conversation
|
||||
description: Update Conversation Attributes
|
||||
security:
|
||||
- userApiKey: []
|
||||
- agentBotApiKey: []
|
||||
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
|
||||
'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'
|
||||
29
swagger/paths/application/conversation/update_last_seen.yml
Normal file
29
swagger/paths/application/conversation/update_last_seen.yml
Normal file
@@ -0,0 +1,29 @@
|
||||
post:
|
||||
tags:
|
||||
- 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
|
||||
in: path
|
||||
type: number
|
||||
description: ID of the conversation
|
||||
required: true
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
'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'
|
||||
26
swagger/paths/application/custom_attributes/create.yml
Normal file
26
swagger/paths/application/custom_attributes/create.yml
Normal file
@@ -0,0 +1,26 @@
|
||||
tags:
|
||||
- Custom Attributes
|
||||
operationId: add-new-custom-attribute-to-account
|
||||
summary: Add a new custom attribute
|
||||
description: Add a new custom attribute to account
|
||||
security:
|
||||
- userApiKey: []
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/custom_attribute_create_update_payload'
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/custom_attribute'
|
||||
'403':
|
||||
description: Access denied
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
30
swagger/paths/application/custom_attributes/delete.yml
Normal file
30
swagger/paths/application/custom_attributes/delete.yml
Normal file
@@ -0,0 +1,30 @@
|
||||
tags:
|
||||
- Custom Attributes
|
||||
operationId: delete-custom-attribute-from-account
|
||||
summary: Remove a custom attribute from account
|
||||
description: Remove a custom attribute from account
|
||||
security:
|
||||
- userApiKey: []
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/account_id'
|
||||
- in: path
|
||||
name: id
|
||||
schema:
|
||||
type: integer
|
||||
required: true
|
||||
description: The ID of the custom attribute to be deleted
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
'404':
|
||||
description: Custom attribute 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'
|
||||
31
swagger/paths/application/custom_attributes/index.yml
Normal file
31
swagger/paths/application/custom_attributes/index.yml
Normal file
@@ -0,0 +1,31 @@
|
||||
tags:
|
||||
- Custom Attributes
|
||||
operationId: get-account-custom-attribute
|
||||
summary: List all custom attributes in an account
|
||||
parameters:
|
||||
- name: attribute_model
|
||||
in: query
|
||||
schema:
|
||||
type: string
|
||||
enum: ['0', '1']
|
||||
description: conversation_attribute(0)/contact_attribute(1)
|
||||
required: true
|
||||
description: Get details of custom attributes in an Account
|
||||
security:
|
||||
- userApiKey: []
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
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'
|
||||
34
swagger/paths/application/custom_attributes/show.yml
Normal file
34
swagger/paths/application/custom_attributes/show.yml
Normal file
@@ -0,0 +1,34 @@
|
||||
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: '#/components/parameters/account_id'
|
||||
- in: path
|
||||
name: id
|
||||
schema:
|
||||
type: integer
|
||||
required: true
|
||||
description: The ID of the custom attribute to be updated.
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/custom_attribute'
|
||||
'401':
|
||||
description: Unauthorized
|
||||
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'
|
||||
40
swagger/paths/application/custom_attributes/update.yml
Normal file
40
swagger/paths/application/custom_attributes/update.yml
Normal file
@@ -0,0 +1,40 @@
|
||||
tags:
|
||||
- Custom Attributes
|
||||
operationId: update-custom-attribute-in-account
|
||||
summary: Update custom attribute in Account
|
||||
description: Update a custom attribute in account
|
||||
security:
|
||||
- userApiKey: []
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
schema:
|
||||
type: integer
|
||||
required: true
|
||||
description: The ID of the custom attribute to be updated.
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/custom_attribute_create_update_payload'
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
description: 'The updated custom attribute'
|
||||
$ref: '#/components/schemas/custom_attribute'
|
||||
'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'
|
||||
28
swagger/paths/application/custom_filters/create.yml
Normal file
28
swagger/paths/application/custom_filters/create.yml
Normal file
@@ -0,0 +1,28 @@
|
||||
tags:
|
||||
- Custom Filters
|
||||
operationId: create-a-custom-filter
|
||||
summary: Create a custom filter
|
||||
description: Create a custom filter in the account
|
||||
parameters:
|
||||
- $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
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/custom_filter'
|
||||
'401':
|
||||
description: Unauthorized
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
22
swagger/paths/application/custom_filters/delete.yml
Normal file
22
swagger/paths/application/custom_filters/delete.yml
Normal file
@@ -0,0 +1,22 @@
|
||||
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':
|
||||
description: Success
|
||||
'401':
|
||||
description: Unauthorized
|
||||
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'
|
||||
23
swagger/paths/application/custom_filters/index.yml
Normal file
23
swagger/paths/application/custom_filters/index.yml
Normal file
@@ -0,0 +1,23 @@
|
||||
tags:
|
||||
- Custom Filters
|
||||
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
|
||||
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'
|
||||
26
swagger/paths/application/custom_filters/show.yml
Normal file
26
swagger/paths/application/custom_filters/show.yml
Normal file
@@ -0,0 +1,26 @@
|
||||
tags:
|
||||
- Custom Filters
|
||||
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
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/custom_filter'
|
||||
'401':
|
||||
description: Unauthorized
|
||||
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'
|
||||
26
swagger/paths/application/custom_filters/update.yml
Normal file
26
swagger/paths/application/custom_filters/update.yml
Normal file
@@ -0,0 +1,26 @@
|
||||
tags:
|
||||
- Custom Filters
|
||||
operationId: update-a-custom-filter
|
||||
summary: Update a custom filter
|
||||
security:
|
||||
- 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
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/custom_filter'
|
||||
'401':
|
||||
description: Unauthorized
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
35
swagger/paths/application/inboxes/create.yml
Normal file
35
swagger/paths/application/inboxes/create.yml
Normal file
@@ -0,0 +1,35 @@
|
||||
post:
|
||||
tags:
|
||||
- Inboxes
|
||||
operationId: inboxCreation
|
||||
summary: Create an inbox
|
||||
description: You can create more than one website inbox in each account
|
||||
security:
|
||||
- userApiKey: []
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/account_id'
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/inbox_create_payload'
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/inbox'
|
||||
'404':
|
||||
description: Inbox not found
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
'403':
|
||||
description: Access denied
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
35
swagger/paths/application/inboxes/get_agent_bot.yml
Normal file
35
swagger/paths/application/inboxes/get_agent_bot.yml
Normal file
@@ -0,0 +1,35 @@
|
||||
get:
|
||||
tags:
|
||||
- Inboxes
|
||||
operationId: getInboxAgentBot
|
||||
summary: Show Inbox Agent Bot
|
||||
description: See if an agent bot is associated to the Inbox
|
||||
security:
|
||||
- userApiKey: []
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/account_id'
|
||||
- name: id
|
||||
in: path
|
||||
schema:
|
||||
type: number
|
||||
description: ID of the inbox
|
||||
required: true
|
||||
responses:
|
||||
'204':
|
||||
description: Success
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/agent_bot'
|
||||
'404':
|
||||
description: Inbox not found, Agent bot 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'
|
||||
58
swagger/paths/application/inboxes/inbox_members/create.yml
Normal file
58
swagger/paths/application/inboxes/inbox_members/create.yml
Normal file
@@ -0,0 +1,58 @@
|
||||
tags:
|
||||
- Inboxes
|
||||
operationId: add-new-agent-to-inbox
|
||||
summary: Add a New Agent
|
||||
description: Add a new Agent to Inbox
|
||||
security:
|
||||
- userApiKey: []
|
||||
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
|
||||
user_ids:
|
||||
type: array
|
||||
items:
|
||||
type: integer
|
||||
description: IDs of users to be added to the inbox
|
||||
example: [1]
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
payload:
|
||||
type: array
|
||||
description: 'Array of all active agents'
|
||||
items:
|
||||
$ref: '#/components/schemas/agent'
|
||||
'404':
|
||||
description: Inbox not found
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
'403':
|
||||
description: Access denied
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
'422':
|
||||
description: User must exist
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
46
swagger/paths/application/inboxes/inbox_members/delete.yml
Normal file
46
swagger/paths/application/inboxes/inbox_members/delete.yml
Normal file
@@ -0,0 +1,46 @@
|
||||
tags:
|
||||
- Inboxes
|
||||
operationId: delete-agent-in-inbox
|
||||
summary: Remove an Agent from Inbox
|
||||
description: Remove an Agent from Inbox
|
||||
security:
|
||||
- userApiKey: []
|
||||
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':
|
||||
description: Success
|
||||
'404':
|
||||
description: Inbox not found
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
'403':
|
||||
description: Access denied
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
'422':
|
||||
description: User must exist
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
34
swagger/paths/application/inboxes/inbox_members/show.yml
Normal file
34
swagger/paths/application/inboxes/inbox_members/show.yml
Normal file
@@ -0,0 +1,34 @@
|
||||
tags:
|
||||
- Inboxes
|
||||
operationId: get-inbox-members
|
||||
summary: List Agents in Inbox
|
||||
description: Get Details of Agents in an Inbox
|
||||
security:
|
||||
- userApiKey: []
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/inbox_id'
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
payload:
|
||||
type: array
|
||||
description: 'Array of all active agents'
|
||||
items:
|
||||
$ref: '#/components/schemas/agent'
|
||||
'404':
|
||||
description: Inbox not found
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
'403':
|
||||
description: Access denied
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
58
swagger/paths/application/inboxes/inbox_members/update.yml
Normal file
58
swagger/paths/application/inboxes/inbox_members/update.yml
Normal file
@@ -0,0 +1,58 @@
|
||||
tags:
|
||||
- Inboxes
|
||||
operationId: update-agents-in-inbox
|
||||
summary: Update Agents in Inbox
|
||||
description: All agents except the one passed in params will be removed
|
||||
security:
|
||||
- userApiKey: []
|
||||
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':
|
||||
description: Success
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
payload:
|
||||
type: array
|
||||
description: 'Array of all active agents'
|
||||
items:
|
||||
$ref: '#/components/schemas/agent'
|
||||
'404':
|
||||
description: Inbox not found
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
'403':
|
||||
description: Access denied
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
'422':
|
||||
description: User must exist
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
35
swagger/paths/application/inboxes/index.yml
Normal file
35
swagger/paths/application/inboxes/index.yml
Normal file
@@ -0,0 +1,35 @@
|
||||
get:
|
||||
tags:
|
||||
- Inboxes
|
||||
operationId: listAllInboxes
|
||||
summary: List all inboxes
|
||||
description: List all inboxes available in the current account
|
||||
security:
|
||||
- userApiKey: []
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/account_id'
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
payload:
|
||||
type: array
|
||||
description: 'Array of inboxes'
|
||||
items:
|
||||
$ref: '#/components/schemas/inbox'
|
||||
'404':
|
||||
description: Inbox not found
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
'403':
|
||||
description: Access denied
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
44
swagger/paths/application/inboxes/set_agent_bot.yml
Normal file
44
swagger/paths/application/inboxes/set_agent_bot.yml
Normal file
@@ -0,0 +1,44 @@
|
||||
post:
|
||||
tags:
|
||||
- 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: '#/components/parameters/account_id'
|
||||
- name: id
|
||||
in: path
|
||||
schema:
|
||||
type: number
|
||||
description: ID of the inbox
|
||||
required: true
|
||||
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
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
'403':
|
||||
description: Access denied
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
35
swagger/paths/application/inboxes/show.yml
Normal file
35
swagger/paths/application/inboxes/show.yml
Normal file
@@ -0,0 +1,35 @@
|
||||
get:
|
||||
tags:
|
||||
- Inboxes
|
||||
operationId: GetInbox
|
||||
summary: Get an inbox
|
||||
security:
|
||||
- userApiKey: []
|
||||
description: Get an inbox available in the current account
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/account_id'
|
||||
- name: id
|
||||
in: path
|
||||
schema:
|
||||
type: number
|
||||
description: ID of the inbox
|
||||
required: true
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/inbox'
|
||||
'404':
|
||||
description: Inbox not found
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
'403':
|
||||
description: Access denied
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
43
swagger/paths/application/inboxes/update.yml
Normal file
43
swagger/paths/application/inboxes/update.yml
Normal file
@@ -0,0 +1,43 @@
|
||||
patch:
|
||||
tags:
|
||||
- Inboxes
|
||||
operationId: updateInbox
|
||||
summary: Update Inbox
|
||||
security:
|
||||
- userApiKey: []
|
||||
description: Update an existing inbox
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/account_id'
|
||||
- name: id
|
||||
in: path
|
||||
schema:
|
||||
type: number
|
||||
description: ID of the inbox
|
||||
required: true
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/inbox_update_payload'
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
description: 'Updated inbox object'
|
||||
$ref: '#/components/schemas/inbox'
|
||||
'404':
|
||||
description: Inbox not found
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
'403':
|
||||
description: Access denied
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
32
swagger/paths/application/integrations/apps/show.yml
Normal file
32
swagger/paths/application/integrations/apps/show.yml
Normal file
@@ -0,0 +1,32 @@
|
||||
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':
|
||||
description: Success
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
payload:
|
||||
type: array
|
||||
description: 'Array of Integration apps'
|
||||
items:
|
||||
$ref: '#/components/schemas/integrations_app'
|
||||
'401':
|
||||
description: Unauthorized
|
||||
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'
|
||||
28
swagger/paths/application/integrations/hooks/create.yml
Normal file
28
swagger/paths/application/integrations/hooks/create.yml
Normal file
@@ -0,0 +1,28 @@
|
||||
tags:
|
||||
- Integrations
|
||||
operationId: create-an-integration-hook
|
||||
summary: Create an integration hook
|
||||
description: Create an integration hook
|
||||
security:
|
||||
- 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
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/integrations_hook'
|
||||
'401':
|
||||
description: Unauthorized
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
25
swagger/paths/application/integrations/hooks/delete.yml
Normal file
25
swagger/paths/application/integrations/hooks/delete.yml
Normal file
@@ -0,0 +1,25 @@
|
||||
tags:
|
||||
- Integrations
|
||||
operationId: delete-an-integration-hook
|
||||
summary: Delete an Integration Hook
|
||||
description: Delete an Integration Hook
|
||||
security:
|
||||
- userApiKey: []
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/account_id'
|
||||
- $ref: '#/components/parameters/hook_id'
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
'401':
|
||||
description: Unauthorized
|
||||
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'
|
||||
29
swagger/paths/application/integrations/hooks/update.yml
Normal file
29
swagger/paths/application/integrations/hooks/update.yml
Normal file
@@ -0,0 +1,29 @@
|
||||
tags:
|
||||
- Integrations
|
||||
operationId: update-an-integrations-hook
|
||||
summary: Update an Integration Hook
|
||||
description: Update an Integration Hook
|
||||
security:
|
||||
- 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
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/integrations_hook'
|
||||
'401':
|
||||
description: Unauthorized
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
26
swagger/paths/application/portal/create.yml
Normal file
26
swagger/paths/application/portal/create.yml
Normal file
@@ -0,0 +1,26 @@
|
||||
tags:
|
||||
- Help Center
|
||||
operationId: add-new-portal-to-account
|
||||
summary: Add a new portal
|
||||
description: Add a new portal to account
|
||||
security:
|
||||
- userApiKey: []
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/portal_create_update_payload'
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/portal'
|
||||
'403':
|
||||
description: Access denied
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
60
swagger/paths/application/portal/index.yml
Normal file
60
swagger/paths/application/portal/index.yml
Normal file
@@ -0,0 +1,60 @@
|
||||
tags:
|
||||
- Help Center
|
||||
operationId: get-portal
|
||||
summary: List all portals in an account
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/account_id'
|
||||
description: Get details of portals in an Account
|
||||
security:
|
||||
- userApiKey: []
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/portal'
|
||||
example:
|
||||
payload:
|
||||
- id: 4
|
||||
color: "#1F93FF"
|
||||
custom_domain: "chatwoot.help"
|
||||
header_text: "Handbook"
|
||||
homepage_link: "https://www.chatwoot.com"
|
||||
name: "Handbook"
|
||||
page_title: "Handbook"
|
||||
slug: "handbook"
|
||||
archived: false
|
||||
account_id: 1
|
||||
config:
|
||||
allowed_locales:
|
||||
- code: "en"
|
||||
articles_count: 32
|
||||
categories_count: 9
|
||||
inbox:
|
||||
id: 37
|
||||
avatar_url: "https://example.com/avatar.png"
|
||||
channel_id: 1
|
||||
name: "Chatwoot"
|
||||
channel_type: "Channel::WebWidget"
|
||||
greeting_enabled: true
|
||||
widget_color: "#1F93FF"
|
||||
website_url: "chatwoot.com"
|
||||
logo:
|
||||
id: 19399916
|
||||
portal_id: 4
|
||||
file_type: "image/png"
|
||||
account_id: 1
|
||||
file_url: "https://example.com/logo.png"
|
||||
blob_id: 21239614
|
||||
filename: "square.png"
|
||||
meta:
|
||||
all_articles_count: 0
|
||||
categories_count: 9
|
||||
default_locale: "en"
|
||||
'403':
|
||||
description: Access denied
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
79
swagger/paths/application/portal/show.yml
Normal file
79
swagger/paths/application/portal/show.yml
Normal file
@@ -0,0 +1,79 @@
|
||||
tags:
|
||||
- Help Center
|
||||
operationId: get-details-of-a-single-portal
|
||||
summary: Get a portal details
|
||||
description: Get the details of a portal in the account
|
||||
security:
|
||||
- userApiKey: []
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/account_id'
|
||||
- $ref: '#/components/parameters/portal_id'
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/portal_single'
|
||||
example:
|
||||
payload:
|
||||
id: 123
|
||||
archived: false
|
||||
color: "#1F93FF"
|
||||
config:
|
||||
allowed_locales:
|
||||
- code: "en"
|
||||
articles_count: 32
|
||||
categories_count: 9
|
||||
custom_domain: "chatwoot.help"
|
||||
header_text: "Handbook"
|
||||
homepage_link: "https://www.chatwoot.com"
|
||||
name: "Handbook"
|
||||
slug: "handbook"
|
||||
page_title: "Handbook"
|
||||
account_id: 123
|
||||
inbox:
|
||||
id: 123
|
||||
name: "Chatwoot"
|
||||
website_url: "chatwoot.com"
|
||||
channel_type: "Channel::WebWidget"
|
||||
avatar_url: "https://example.com/avatar.png"
|
||||
widget_color: "#1F93FF"
|
||||
website_token: "4cWzuf9i9jxN9tbnv8K9STKU"
|
||||
enable_auto_assignment: true
|
||||
web_widget_script: "<script>...</script>"
|
||||
welcome_title: "Hi there ! 🙌🏼"
|
||||
welcome_tagline: "We make it simple to connect with us."
|
||||
greeting_enabled: true
|
||||
greeting_message: "Hey there 👋, Thank you for reaching out to us."
|
||||
channel_id: 123
|
||||
working_hours_enabled: true
|
||||
enable_email_collect: true
|
||||
csat_survey_enabled: true
|
||||
timezone: "America/Los_Angeles"
|
||||
business_name: "Chatwoot"
|
||||
hmac_mandatory: true
|
||||
logo:
|
||||
id: 123
|
||||
portal_id: 123
|
||||
file_type: "image/png"
|
||||
account_id: 123
|
||||
file_url: "https://example.com/logo.png"
|
||||
blob_id: 123
|
||||
filename: "square.png"
|
||||
meta:
|
||||
all_articles_count: 32
|
||||
categories_count: 9
|
||||
default_locale: "en"
|
||||
'401':
|
||||
description: Unauthorized
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
'404':
|
||||
description: The given portal ID does not exist in the account
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
85
swagger/paths/application/portal/update.yml
Normal file
85
swagger/paths/application/portal/update.yml
Normal file
@@ -0,0 +1,85 @@
|
||||
tags:
|
||||
- Help Center
|
||||
operationId: update-portal-to-account
|
||||
summary: Update a portal
|
||||
description: Update a portal to account
|
||||
security:
|
||||
- userApiKey: []
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/account_id'
|
||||
- $ref: '#/components/parameters/portal_id'
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/portal_create_update_payload'
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/portal_single'
|
||||
example:
|
||||
payload:
|
||||
id: 123
|
||||
archived: false
|
||||
color: "#1F93FF"
|
||||
config:
|
||||
allowed_locales:
|
||||
- code: "en"
|
||||
articles_count: 32
|
||||
categories_count: 9
|
||||
custom_domain: "chatwoot.help"
|
||||
header_text: "Handbook"
|
||||
homepage_link: "https://www.chatwoot.com"
|
||||
name: "Handbook"
|
||||
slug: "handbook"
|
||||
page_title: "Handbook"
|
||||
account_id: 123
|
||||
inbox:
|
||||
id: 123
|
||||
name: "Chatwoot"
|
||||
website_url: "chatwoot.com"
|
||||
channel_type: "Channel::WebWidget"
|
||||
avatar_url: "https://example.com/avatar.png"
|
||||
widget_color: "#1F93FF"
|
||||
website_token: "4cWzuf9i9jxN9tbnv8K9STKU"
|
||||
enable_auto_assignment: true
|
||||
web_widget_script: "<script>...</script>"
|
||||
welcome_title: "Hi there ! 🙌🏼"
|
||||
welcome_tagline: "We make it simple to connect with us."
|
||||
greeting_enabled: true
|
||||
greeting_message: "Hey there 👋, Thank you for reaching out to us."
|
||||
channel_id: 123
|
||||
working_hours_enabled: true
|
||||
enable_email_collect: true
|
||||
csat_survey_enabled: true
|
||||
timezone: "America/Los_Angeles"
|
||||
business_name: "Chatwoot"
|
||||
hmac_mandatory: true
|
||||
logo:
|
||||
id: 123
|
||||
portal_id: 123
|
||||
file_type: "image/png"
|
||||
account_id: 123
|
||||
file_url: "https://example.com/logo.png"
|
||||
blob_id: 123
|
||||
filename: "square.png"
|
||||
meta:
|
||||
all_articles_count: 32
|
||||
categories_count: 9
|
||||
default_locale: "en"
|
||||
'403':
|
||||
description: Access denied
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
'404':
|
||||
description: Portal not found
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
47
swagger/paths/application/reporting_events/index.yml
Normal file
47
swagger/paths/application/reporting_events/index.yml
Normal file
@@ -0,0 +1,47 @@
|
||||
tags:
|
||||
- Reports
|
||||
operationId: get-account-reporting-events
|
||||
summary: Account Reporting Events
|
||||
security:
|
||||
- userApiKey: []
|
||||
description: Get paginated reporting events for the account. This endpoint returns reporting events such as first response time, resolution time, and other metrics. Only administrators can access this endpoint. Results are paginated with 25 items per page.
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/page'
|
||||
- in: query
|
||||
name: since
|
||||
schema:
|
||||
type: string
|
||||
description: The timestamp from where events should start (Unix timestamp in seconds)
|
||||
- in: query
|
||||
name: until
|
||||
schema:
|
||||
type: string
|
||||
description: The timestamp from where events should stop (Unix timestamp in seconds)
|
||||
- in: query
|
||||
name: inbox_id
|
||||
schema:
|
||||
type: number
|
||||
description: Filter events by inbox ID
|
||||
- in: query
|
||||
name: user_id
|
||||
schema:
|
||||
type: number
|
||||
description: Filter events by user/agent ID
|
||||
- in: query
|
||||
name: name
|
||||
schema:
|
||||
type: string
|
||||
description: Filter events by event name (e.g., first_response, resolution, reply_time)
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/reporting_events_list_response'
|
||||
'403':
|
||||
description: Access denied - Only administrators can access this endpoint
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
30
swagger/paths/application/reports/channel_summary.yml
Normal file
30
swagger/paths/application/reports/channel_summary.yml
Normal file
@@ -0,0 +1,30 @@
|
||||
tags:
|
||||
- Reports
|
||||
operationId: get-channel-summary-report
|
||||
summary: Get conversation statistics grouped by channel type
|
||||
security:
|
||||
- userApiKey: []
|
||||
description: |
|
||||
Get conversation counts grouped by channel type and status for a given date range.
|
||||
Returns statistics for each channel type including open, resolved, pending, snoozed, and total conversation counts.
|
||||
|
||||
**Note:** This API endpoint is available only in Chatwoot version 4.10.0 and above. The date range is limited to a maximum of 6 months.
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/channel_summary'
|
||||
'400':
|
||||
description: Date range exceeds 6 months limit
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
'403':
|
||||
description: Access denied
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
34
swagger/paths/application/reports/conversation/account.yml
Normal file
34
swagger/paths/application/reports/conversation/account.yml
Normal file
@@ -0,0 +1,34 @@
|
||||
tags:
|
||||
- Reports
|
||||
operationId: get-account-conversation-metrics
|
||||
summary: Account Conversation Metrics
|
||||
security:
|
||||
- userApiKey: []
|
||||
description: Get conversation metrics for Account
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
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
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
'403':
|
||||
description: Access denied
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
29
swagger/paths/application/reports/conversation/agent.yml
Normal file
29
swagger/paths/application/reports/conversation/agent.yml
Normal file
@@ -0,0 +1,29 @@
|
||||
tags:
|
||||
- Reports
|
||||
operationId: get-agent-conversation-metrics
|
||||
summary: Agent Conversation Metrics
|
||||
security:
|
||||
- userApiKey: []
|
||||
description: Get conversation metrics for Agent
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
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
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
'403':
|
||||
description: Access denied
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
34
swagger/paths/application/reports/index.yml
Normal file
34
swagger/paths/application/reports/index.yml
Normal file
@@ -0,0 +1,34 @@
|
||||
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':
|
||||
description: Success
|
||||
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
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
'403':
|
||||
description: Access denied
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
27
swagger/paths/application/reports/summary.yml
Normal file
27
swagger/paths/application/reports/summary.yml
Normal file
@@ -0,0 +1,27 @@
|
||||
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':
|
||||
description: Success
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
description: 'Object of summary metrics'
|
||||
$ref: '#/components/schemas/account_summary'
|
||||
'404':
|
||||
description: reports 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'
|
||||
50
swagger/paths/application/team_members/create.yml
Normal file
50
swagger/paths/application/team_members/create.yml
Normal file
@@ -0,0 +1,50 @@
|
||||
tags:
|
||||
- Teams
|
||||
operationId: add-new-agent-to-team
|
||||
summary: Add a New Agent
|
||||
description: Add a new Agent to Team
|
||||
security:
|
||||
- userApiKey: []
|
||||
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
|
||||
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
|
||||
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'
|
||||
42
swagger/paths/application/team_members/delete.yml
Normal file
42
swagger/paths/application/team_members/delete.yml
Normal file
@@ -0,0 +1,42 @@
|
||||
tags:
|
||||
- Teams
|
||||
operationId: delete-agent-in-team
|
||||
summary: Remove an Agent from Team
|
||||
description: Remove an Agent from Team
|
||||
security:
|
||||
- userApiKey: []
|
||||
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
|
||||
'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'
|
||||
'422':
|
||||
description: User must exist
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
32
swagger/paths/application/team_members/index.yml
Normal file
32
swagger/paths/application/team_members/index.yml
Normal file
@@ -0,0 +1,32 @@
|
||||
tags:
|
||||
- Teams
|
||||
operationId: get-team-members
|
||||
summary: List Agents in Team
|
||||
description: Get Details of Agents in an Team
|
||||
security:
|
||||
- userApiKey: []
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/account_id'
|
||||
- $ref: '#/components/parameters/team_id'
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
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'
|
||||
50
swagger/paths/application/team_members/update.yml
Normal file
50
swagger/paths/application/team_members/update.yml
Normal file
@@ -0,0 +1,50 @@
|
||||
tags:
|
||||
- Teams
|
||||
operationId: update-agents-in-team
|
||||
summary: Update Agents in Team
|
||||
description: All agents except the one passed in params will be removed
|
||||
security:
|
||||
- userApiKey: []
|
||||
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
|
||||
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'
|
||||
'422':
|
||||
description: User must exist
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
28
swagger/paths/application/teams/create.yml
Normal file
28
swagger/paths/application/teams/create.yml
Normal file
@@ -0,0 +1,28 @@
|
||||
tags:
|
||||
- Teams
|
||||
operationId: create-a-team
|
||||
summary: Create a team
|
||||
security:
|
||||
- userApiKey: []
|
||||
description: Create a team in the account
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/account_id'
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/team_create_update_payload'
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/team'
|
||||
'401':
|
||||
description: Unauthorized
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
22
swagger/paths/application/teams/delete.yml
Normal file
22
swagger/paths/application/teams/delete.yml
Normal file
@@ -0,0 +1,22 @@
|
||||
tags:
|
||||
- Teams
|
||||
operationId: delete-a-team
|
||||
summary: Delete a team
|
||||
security:
|
||||
- userApiKey: []
|
||||
description: Delete a team from the account
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
'401':
|
||||
description: Unauthorized
|
||||
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'
|
||||
23
swagger/paths/application/teams/index.yml
Normal file
23
swagger/paths/application/teams/index.yml
Normal file
@@ -0,0 +1,23 @@
|
||||
tags:
|
||||
- Teams
|
||||
operationId: list-all-teams
|
||||
summary: List all teams
|
||||
security:
|
||||
- userApiKey: []
|
||||
description: List all teams available in the current account
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
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'
|
||||
26
swagger/paths/application/teams/show.yml
Normal file
26
swagger/paths/application/teams/show.yml
Normal file
@@ -0,0 +1,26 @@
|
||||
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':
|
||||
description: Success
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/team'
|
||||
'401':
|
||||
description: Unauthorized
|
||||
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'
|
||||
26
swagger/paths/application/teams/update.yml
Normal file
26
swagger/paths/application/teams/update.yml
Normal file
@@ -0,0 +1,26 @@
|
||||
tags:
|
||||
- Teams
|
||||
operationId: update-a-team
|
||||
summary: Update a team
|
||||
security:
|
||||
- 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
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/team'
|
||||
'401':
|
||||
description: Unauthorized
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
28
swagger/paths/application/webhooks/create.yml
Normal file
28
swagger/paths/application/webhooks/create.yml
Normal file
@@ -0,0 +1,28 @@
|
||||
tags:
|
||||
- Webhooks
|
||||
operationId: create-a-webhook
|
||||
summary: Add a webhook
|
||||
security:
|
||||
- userApiKey: []
|
||||
description: Add a webhook subscription to the account
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/account_id'
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/webhook_create_update_payload'
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/webhook'
|
||||
'401':
|
||||
description: Unauthorized
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
22
swagger/paths/application/webhooks/delete.yml
Normal file
22
swagger/paths/application/webhooks/delete.yml
Normal file
@@ -0,0 +1,22 @@
|
||||
tags:
|
||||
- Webhooks
|
||||
operationId: delete-a-webhook
|
||||
summary: Delete a webhook
|
||||
security:
|
||||
- userApiKey: []
|
||||
description: Delete a webhook from the account
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
'401':
|
||||
description: Unauthorized
|
||||
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'
|
||||
23
swagger/paths/application/webhooks/index.yml
Normal file
23
swagger/paths/application/webhooks/index.yml
Normal file
@@ -0,0 +1,23 @@
|
||||
tags:
|
||||
- Webhooks
|
||||
operationId: list-all-webhooks
|
||||
summary: List all webhooks
|
||||
security:
|
||||
- userApiKey: []
|
||||
description: List all webhooks in the account
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
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'
|
||||
28
swagger/paths/application/webhooks/update.yml
Normal file
28
swagger/paths/application/webhooks/update.yml
Normal file
@@ -0,0 +1,28 @@
|
||||
tags:
|
||||
- Webhooks
|
||||
operationId: update-a-webhook
|
||||
summary: Update a webhook object
|
||||
security:
|
||||
- userApiKey: []
|
||||
description: Update a webhook object in the account
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/account_id'
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/webhook_create_update_payload'
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/webhook'
|
||||
'401':
|
||||
description: Unauthorized
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
686
swagger/paths/index.yml
Normal file
686
swagger/paths/index.yml
Normal file
@@ -0,0 +1,686 @@
|
||||
# ------------ Platform API routes ------------#
|
||||
|
||||
# Accounts
|
||||
|
||||
/platform/api/v1/accounts:
|
||||
post:
|
||||
$ref: ./platform/accounts/create.yml
|
||||
/platform/api/v1/accounts/{account_id}:
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/account_id'
|
||||
get:
|
||||
$ref: './platform/accounts/show.yml'
|
||||
patch:
|
||||
$ref: ./platform/accounts/update.yml
|
||||
delete:
|
||||
$ref: ./platform/accounts/delete.yml
|
||||
|
||||
# Account Users
|
||||
|
||||
/platform/api/v1/accounts/{account_id}/account_users:
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/account_id'
|
||||
get:
|
||||
$ref: './platform/account_users/index.yml'
|
||||
post:
|
||||
$ref: ./platform/account_users/create.yml
|
||||
delete:
|
||||
$ref: ./platform/account_users/delete.yml
|
||||
|
||||
# AgentBots
|
||||
|
||||
/platform/api/v1/agent_bots:
|
||||
get:
|
||||
$ref: ./platform/agent_bots/index.yml
|
||||
post:
|
||||
$ref: ./platform/agent_bots/create.yml
|
||||
/platform/api/v1/agent_bots/{id}:
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/agent_bot_id'
|
||||
get:
|
||||
$ref: './platform/agent_bots/show.yml'
|
||||
patch:
|
||||
$ref: ./platform/agent_bots/update.yml
|
||||
delete:
|
||||
$ref: ./platform/agent_bots/delete.yml
|
||||
|
||||
# Users
|
||||
|
||||
/platform/api/v1/users:
|
||||
post:
|
||||
$ref: ./platform/users/create.yml
|
||||
/platform/api/v1/users/{id}:
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/platform_user_id'
|
||||
get:
|
||||
$ref: './platform/users/show.yml'
|
||||
patch:
|
||||
$ref: ./platform/users/update.yml
|
||||
delete:
|
||||
$ref: ./platform/users/delete.yml
|
||||
/platform/api/v1/users/{id}/login:
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/platform_user_id'
|
||||
get:
|
||||
$ref: './platform/users/login.yml'
|
||||
|
||||
# ---------------- end of platform path -----------#
|
||||
|
||||
# ------------ Public API routes ------------#
|
||||
|
||||
# Inbox
|
||||
|
||||
/public/api/v1/inboxes/{inbox_identifier}:
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/public_inbox_identifier'
|
||||
get:
|
||||
$ref: './public/inboxes/show.yml'
|
||||
|
||||
# Contacts
|
||||
|
||||
/public/api/v1/inboxes/{inbox_identifier}/contacts:
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/public_inbox_identifier'
|
||||
post:
|
||||
$ref: ./public/inboxes/contacts/create.yml
|
||||
/public/api/v1/inboxes/{inbox_identifier}/contacts/{contact_identifier}:
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/public_inbox_identifier'
|
||||
- $ref: '#/components/parameters/public_contact_identifier'
|
||||
get:
|
||||
$ref: './public/inboxes/contacts/show.yml'
|
||||
patch:
|
||||
$ref: ./public/inboxes/contacts/update.yml
|
||||
|
||||
/public/api/v1/inboxes/{inbox_identifier}/contacts/{contact_identifier}/conversations:
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/public_inbox_identifier'
|
||||
- $ref: '#/components/parameters/public_contact_identifier'
|
||||
post:
|
||||
$ref: ./public/inboxes/conversations/create.yml
|
||||
get:
|
||||
$ref: ./public/inboxes/conversations/index.yml
|
||||
|
||||
/public/api/v1/inboxes/{inbox_identifier}/contacts/{contact_identifier}/conversations/{conversation_id}:
|
||||
parameters:
|
||||
- $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: '#/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: '#/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: '#/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: '#/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: '#/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
|
||||
|
||||
# ---------------- end of public api routes-----------#
|
||||
|
||||
# ------------ Other routes ------------#
|
||||
|
||||
/survey/responses/{conversation_uuid}:
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/conversation_uuid'
|
||||
get:
|
||||
$ref: ./survey/show.yml
|
||||
|
||||
# ----------- end of other routes -----------#
|
||||
|
||||
# ------------ Application API routes ------------#
|
||||
|
||||
# Accounts
|
||||
/api/v1/accounts/{id}:
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/account_id'
|
||||
get:
|
||||
$ref: ./application/accounts/show.yml
|
||||
patch:
|
||||
$ref: ./application/accounts/update.yml
|
||||
|
||||
# Audit Logs
|
||||
/api/v1/accounts/{account_id}/audit_logs:
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/account_id'
|
||||
get:
|
||||
$ref: ./application/audit_logs/index.yml
|
||||
|
||||
# AgentBots
|
||||
/api/v1/accounts/{account_id}/agent_bots:
|
||||
parameters:
|
||||
- $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: '#/components/parameters/account_id'
|
||||
- $ref: '#/components/parameters/agent_bot_id'
|
||||
get:
|
||||
$ref: './application/agent_bots/show.yml'
|
||||
patch:
|
||||
$ref: ./application/agent_bots/update.yml
|
||||
delete:
|
||||
$ref: ./application/agent_bots/delete.yml
|
||||
|
||||
# Agents
|
||||
/api/v1/accounts/{account_id}/agents:
|
||||
parameters:
|
||||
- $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: '#/components/parameters/account_id'
|
||||
patch:
|
||||
$ref: ./application/agents/update.yml
|
||||
delete:
|
||||
$ref: ./application/agents/delete.yml
|
||||
|
||||
# Canned Responses
|
||||
/api/v1/accounts/{account_id}/canned_responses:
|
||||
parameters:
|
||||
- $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: '#/components/parameters/account_id'
|
||||
patch:
|
||||
$ref: ./application/canned_responses/update.yml
|
||||
delete:
|
||||
$ref: ./application/canned_responses/delete.yml
|
||||
|
||||
# Custom Attributes
|
||||
/api/v1/accounts/{account_id}/custom_attribute_definitions:
|
||||
parameters:
|
||||
- $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: '#/components/parameters/account_id'
|
||||
- name: id
|
||||
in: path
|
||||
schema:
|
||||
type: number
|
||||
description: ID of the custom attribute
|
||||
required: true
|
||||
get:
|
||||
$ref: './application/custom_attributes/show.yml'
|
||||
patch:
|
||||
$ref: ./application/custom_attributes/update.yml
|
||||
delete:
|
||||
$ref: ./application/custom_attributes/delete.yml
|
||||
|
||||
# Contacts
|
||||
/api/v1/accounts/{account_id}/contacts:
|
||||
$ref: ./application/contacts/list_create.yml
|
||||
/api/v1/accounts/{account_id}/contacts/{id}:
|
||||
$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:
|
||||
$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:
|
||||
$ref: ./application/contactable_inboxes/get.yml
|
||||
|
||||
# Contact Merge
|
||||
/api/v1/accounts/{account_id}/actions/contact_merge:
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/account_id'
|
||||
post:
|
||||
$ref: ./application/contacts/merge.yml
|
||||
|
||||
# Automation Rule
|
||||
/api/v1/accounts/{account_id}/automation_rules:
|
||||
parameters:
|
||||
- $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: '#/components/parameters/account_id'
|
||||
- name: id
|
||||
in: path
|
||||
schema:
|
||||
type: number
|
||||
description: ID of the Automation Rule
|
||||
required: true
|
||||
get:
|
||||
$ref: ./application/automation_rule/show.yml
|
||||
patch:
|
||||
$ref: ./application/automation_rule/update.yml
|
||||
delete:
|
||||
$ref: ./application/automation_rule/delete.yml
|
||||
|
||||
# Help Center
|
||||
/api/v1/accounts/{account_id}/portals:
|
||||
parameters:
|
||||
- $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/{id}/categories:
|
||||
parameters:
|
||||
- $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/{id}/articles:
|
||||
parameters:
|
||||
- $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
|
||||
/api/v1/accounts/{account_id}/conversations:
|
||||
$ref: ./application/conversation/index.yml
|
||||
/api/v1/accounts/{account_id}/conversations/filter:
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/account_id'
|
||||
post:
|
||||
$ref: ./application/conversation/filter.yml
|
||||
/api/v1/accounts/{account_id}/conversations/{conversation_id}:
|
||||
parameters:
|
||||
- $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: '#/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: '#/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: '#/components/parameters/account_id'
|
||||
- $ref: '#/components/parameters/conversation_id'
|
||||
post:
|
||||
$ref: ./application/conversation/custom_attributes.yml
|
||||
|
||||
# Conversations Assignments
|
||||
|
||||
/api/v1/accounts/{account_id}/conversations/{conversation_id}/assignments:
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/account_id'
|
||||
- $ref: '#/components/parameters/conversation_id'
|
||||
post:
|
||||
$ref: ./application/conversation/assignments.yml
|
||||
|
||||
# Conversation Labels
|
||||
|
||||
/api/v1/accounts/{account_id}/conversations/{conversation_id}/labels:
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/account_id'
|
||||
- $ref: '#/components/parameters/conversation_id'
|
||||
get:
|
||||
$ref: ./application/conversation/labels/index.yml
|
||||
post:
|
||||
$ref: ./application/conversation/labels/create.yml
|
||||
|
||||
# Conversation Reporting Events
|
||||
|
||||
/api/v1/accounts/{account_id}/conversations/{conversation_id}/reporting_events:
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/account_id'
|
||||
- $ref: '#/components/parameters/conversation_id'
|
||||
get:
|
||||
$ref: ./application/conversation/reporting_events.yml
|
||||
|
||||
# Inboxes
|
||||
/api/v1/accounts/{account_id}/inboxes:
|
||||
$ref: ./application/inboxes/index.yml
|
||||
/api/v1/accounts/{account_id}/inboxes/{id}/:
|
||||
$ref: ./application/inboxes/show.yml
|
||||
/api/v1/accounts/{account_id}/inboxes/:
|
||||
$ref: ./application/inboxes/create.yml
|
||||
/api/v1/accounts/{account_id}/inboxes/{id}:
|
||||
$ref: ./application/inboxes/update.yml
|
||||
/api/v1/accounts/{account_id}/inboxes/{id}/agent_bot:
|
||||
$ref: ./application/inboxes/get_agent_bot.yml
|
||||
/api/v1/accounts/{account_id}/inboxes/{id}/set_agent_bot:
|
||||
$ref: ./application/inboxes/set_agent_bot.yml
|
||||
|
||||
# Inbox Members
|
||||
/api/v1/accounts/{account_id}/inbox_members/{inbox_id}:
|
||||
parameters:
|
||||
- $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: '#/components/parameters/account_id'
|
||||
post:
|
||||
$ref: ./application/inboxes/inbox_members/create.yml
|
||||
patch:
|
||||
$ref: ./application/inboxes/inbox_members/update.yml
|
||||
delete:
|
||||
$ref: ./application/inboxes/inbox_members/delete.yml
|
||||
|
||||
# Messages
|
||||
/api/v1/accounts/{account_id}/conversations/{conversation_id}/messages:
|
||||
parameters:
|
||||
- $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: '#/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: '#/components/parameters/account_id'
|
||||
get:
|
||||
$ref: './application/integrations/apps/show.yml'
|
||||
/api/v1/accounts/{account_id}/integrations/hooks:
|
||||
post:
|
||||
$ref: './application/integrations/hooks/create.yml'
|
||||
/api/v1/accounts/{account_id}/integrations/hooks/{hook_id}:
|
||||
patch:
|
||||
$ref: ./application/integrations/hooks/update.yml
|
||||
delete:
|
||||
$ref: ./application/integrations/hooks/delete.yml
|
||||
|
||||
# Profile
|
||||
/api/v1/profile:
|
||||
$ref: ./profile/index.yml
|
||||
|
||||
# Teams
|
||||
/api/v1/accounts/{account_id}/teams:
|
||||
parameters:
|
||||
- $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: '#/components/parameters/account_id'
|
||||
- $ref: '#/components/parameters/team_id'
|
||||
get:
|
||||
$ref: './application/teams/show.yml'
|
||||
patch:
|
||||
$ref: ./application/teams/update.yml
|
||||
delete:
|
||||
$ref: ./application/teams/delete.yml
|
||||
/api/v1/accounts/{account_id}/teams/{team_id}/team_members:
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/account_id'
|
||||
- $ref: '#/components/parameters/team_id'
|
||||
get:
|
||||
$ref: ./application/team_members/index.yml
|
||||
post:
|
||||
$ref: ./application/team_members/create.yml
|
||||
patch:
|
||||
$ref: ./application/team_members/update.yml
|
||||
delete:
|
||||
$ref: ./application/team_members/delete.yml
|
||||
|
||||
### Custom Filters goes here
|
||||
|
||||
# Custom Filters
|
||||
/api/v1/accounts/{account_id}/custom_filters:
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/account_id'
|
||||
- in: query
|
||||
name: filter_type
|
||||
schema:
|
||||
type: string
|
||||
enum: ['conversation', 'contact', 'report']
|
||||
required: false
|
||||
description: The type of custom filter
|
||||
get:
|
||||
$ref: ./application/custom_filters/index.yml
|
||||
post:
|
||||
$ref: ./application/custom_filters/create.yml
|
||||
/api/v1/accounts/{account_id}/custom_filters/{custom_filter_id}:
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/account_id'
|
||||
- $ref: '#/components/parameters/custom_filter_id'
|
||||
get:
|
||||
$ref: './application/custom_filters/show.yml'
|
||||
patch:
|
||||
$ref: ./application/custom_filters/update.yml
|
||||
delete:
|
||||
$ref: ./application/custom_filters/delete.yml
|
||||
|
||||
# webhooks
|
||||
/api/v1/accounts/{account_id}/webhooks:
|
||||
parameters:
|
||||
- $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: '#/components/parameters/account_id'
|
||||
- $ref: '#/components/parameters/webhook_id'
|
||||
patch:
|
||||
$ref: ./application/webhooks/update.yml
|
||||
delete:
|
||||
$ref: ./application/webhooks/delete.yml
|
||||
|
||||
### Reports
|
||||
|
||||
# Account Reporting Events
|
||||
/api/v1/accounts/{account_id}/reporting_events:
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/account_id'
|
||||
get:
|
||||
$ref: ./application/reporting_events/index.yml
|
||||
|
||||
# List
|
||||
/api/v2/accounts/{account_id}/reports:
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/account_id'
|
||||
- $ref: '#/components/parameters/report_metric'
|
||||
- $ref: '#/components/parameters/report_type'
|
||||
- in: query
|
||||
name: id
|
||||
schema:
|
||||
type: string
|
||||
description: The Id of specific object in case of agent/inbox/label
|
||||
- in: query
|
||||
name: since
|
||||
schema:
|
||||
type: string
|
||||
description: The timestamp from where report should start.
|
||||
- in: query
|
||||
name: until
|
||||
schema:
|
||||
type: string
|
||||
description: The timestamp from where report should stop.
|
||||
get:
|
||||
$ref: './application/reports/index.yml'
|
||||
|
||||
# Summary
|
||||
/api/v2/accounts/{account_id}/reports/summary:
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/account_id'
|
||||
- $ref: '#/components/parameters/report_type'
|
||||
- in: query
|
||||
name: id
|
||||
schema:
|
||||
type: string
|
||||
description: The Id of specific object in case of agent/inbox/label
|
||||
- in: query
|
||||
name: since
|
||||
schema:
|
||||
type: string
|
||||
description: The timestamp from where report should start.
|
||||
- in: query
|
||||
name: until
|
||||
schema:
|
||||
type: string
|
||||
description: The timestamp from where report should stop.
|
||||
get:
|
||||
$ref: './application/reports/summary.yml'
|
||||
|
||||
# Conversation metrics for account
|
||||
/api/v2/accounts/{account_id}/reports/conversations:
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/account_id'
|
||||
- in: query
|
||||
name: type
|
||||
schema:
|
||||
type: string
|
||||
enum:
|
||||
- account
|
||||
required: true
|
||||
description: Type of report
|
||||
get:
|
||||
$ref: './application/reports/conversation/account.yml'
|
||||
|
||||
# Conversation metrics for agent
|
||||
/api/v2/accounts/{account_id}/reports/conversations/:
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/account_id'
|
||||
- in: query
|
||||
name: type
|
||||
schema:
|
||||
type: string
|
||||
enum:
|
||||
- agent
|
||||
required: true
|
||||
description: Type of report
|
||||
- in: query
|
||||
name: user_id
|
||||
schema:
|
||||
type: string
|
||||
description: The numeric ID of the user
|
||||
get:
|
||||
$ref: './application/reports/conversation/agent.yml'
|
||||
|
||||
# Channel summary report (Available in 4.10.0+)
|
||||
/api/v2/accounts/{account_id}/summary_reports/channel:
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/account_id'
|
||||
- in: query
|
||||
name: since
|
||||
schema:
|
||||
type: string
|
||||
description: The timestamp from where report should start (Unix timestamp).
|
||||
- in: query
|
||||
name: until
|
||||
schema:
|
||||
type: string
|
||||
description: The timestamp from where report should stop (Unix timestamp).
|
||||
- in: query
|
||||
name: business_hours
|
||||
schema:
|
||||
type: boolean
|
||||
description: Whether to filter by business hours.
|
||||
get:
|
||||
$ref: './application/reports/channel_summary.yml'
|
||||
|
||||
# Conversations Messages
|
||||
/accounts/{account_id}/conversations/{conversation_id}/messages:
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/account_id'
|
||||
- name: conversation_id
|
||||
in: path
|
||||
description: ID of the conversation
|
||||
required: true
|
||||
schema:
|
||||
type: number
|
||||
get:
|
||||
tags:
|
||||
- Conversation
|
||||
summary: Get messages from a conversation
|
||||
description: Returns all messages from a specific conversation
|
||||
operationId: getConversationMessages
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/conversation_messages'
|
||||
37
swagger/paths/platform/account_users/create.yml
Normal file
37
swagger/paths/platform/account_users/create.yml
Normal file
@@ -0,0 +1,37 @@
|
||||
tags:
|
||||
- Account Users
|
||||
operationId: create-an-account-user
|
||||
summary: Create an Account User
|
||||
description: Create an Account User
|
||||
security:
|
||||
- platformAppApiKey: []
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/account_user_create_update_payload'
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
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'
|
||||
22
swagger/paths/platform/account_users/delete.yml
Normal file
22
swagger/paths/platform/account_users/delete.yml
Normal file
@@ -0,0 +1,22 @@
|
||||
tags:
|
||||
- Account Users
|
||||
operationId: delete-an-account-user
|
||||
summary: Delete an Account User
|
||||
description: Delete an Account User
|
||||
security:
|
||||
- platformAppApiKey: []
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
'401':
|
||||
description: Unauthorized
|
||||
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'
|
||||
20
swagger/paths/platform/account_users/index.yml
Normal file
20
swagger/paths/platform/account_users/index.yml
Normal file
@@ -0,0 +1,20 @@
|
||||
tags:
|
||||
- Account Users
|
||||
operationId: list-all-account-users
|
||||
summary: List all Account Users
|
||||
description: List all account users
|
||||
security:
|
||||
- platformAppApiKey: []
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/account_user'
|
||||
'401':
|
||||
description: Unauthorized
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user