Restructure omni services and add Chatwoot research snapshot

This commit is contained in:
Ruslan Bakiev
2026-02-21 11:11:27 +07:00
parent edea7a0034
commit b73babbbf6
7732 changed files with 978203 additions and 32 deletions

View 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'

View 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'

View 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'

View 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'

View 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'

View 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'

View 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'

View 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'

View 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'

View 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'

View 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'

View 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'

View 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'

View 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'

View 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'

View 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'

View 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'

View 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'

View 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'

View 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'

View 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'

View 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'

View 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'

View 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'

View 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'

View 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'

View 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'

View 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'

View 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'

View 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'

View 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'

View 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'

View 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'

View 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'

View 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'

View 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'

View 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'

View 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'

View 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'

View File

@@ -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'

View 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'

View 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'

View 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'

View 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'

View 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'

View 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'

View 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'

View 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'

View 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'

View 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'

View 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'

View 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'

View 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'

View 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'

View 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'

View 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'

View 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'

View 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'

View 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'

View 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'

View 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'

View 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'

View 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'

View 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'

View 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'

View 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'

View 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'

View 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'

View 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'

View 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'

View 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'

View 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'

View 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'

View 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'

View 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'

View 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'

View 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'

View 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'

View File

@@ -0,0 +1,23 @@
tags:
- Reports
operationId: get-agent-summary-report
summary: Get conversation statistics grouped by agent
security:
- userApiKey: []
description: |
Get conversation statistics grouped by agent for a given date range.
Returns metrics for each agent including conversation counts, resolution counts,
average first response time, average resolution time, and average reply time.
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/agent_summary'
'403':
description: Access denied
content:
application/json:
schema:
$ref: '#/components/schemas/bad_request_error'

View 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'

View 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'

View 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'

View File

@@ -0,0 +1,24 @@
tags:
- Reports
operationId: get-first-response-time-distribution
summary: Get first response time distribution by channel
security:
- userApiKey: []
description: |
Get the distribution of first response times grouped by channel type.
Returns conversation counts in different time buckets (0-1h, 1-4h, 4-8h, 8-24h, 24h+) for each channel type.
**Note:** This API endpoint is available only in Chatwoot version 4.11.0 and above.
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/first_response_time_distribution'
'403':
description: Access denied
content:
application/json:
schema:
$ref: '#/components/schemas/bad_request_error'

View File

@@ -0,0 +1,25 @@
tags:
- Reports
operationId: get-inbox-label-matrix
summary: Get inbox-label matrix report
security:
- userApiKey: []
description: |
Get a matrix showing the count of conversations for each inbox-label combination.
Returns a list of inboxes, labels, and a 2D matrix where each cell contains the count of conversations
in a specific inbox that have a specific label applied.
**Note:** This API endpoint is available only in Chatwoot version 4.11.0 and above.
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/inbox_label_matrix'
'403':
description: Access denied
content:
application/json:
schema:
$ref: '#/components/schemas/bad_request_error'

View File

@@ -0,0 +1,23 @@
tags:
- Reports
operationId: get-inbox-summary-report
summary: Get conversation statistics grouped by inbox
security:
- userApiKey: []
description: |
Get conversation statistics grouped by inbox for a given date range.
Returns metrics for each inbox including conversation counts, resolution counts,
average first response time, average resolution time, and average reply time.
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/inbox_summary'
'403':
description: Access denied
content:
application/json:
schema:
$ref: '#/components/schemas/bad_request_error'

View 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'

View File

@@ -0,0 +1,36 @@
tags:
- Reports
operationId: get-outgoing-messages-count
summary: Get outgoing messages count grouped by entity
security:
- userApiKey: []
description: |
Get the count of outgoing messages grouped by a specified entity (agent, team, inbox, or label).
When grouped by agent, messages sent by bots (AgentBot, Captain::Assistant) are excluded.
**Note:** This API endpoint is available only in Chatwoot version 4.11.0 and above.
parameters:
- in: query
name: group_by
required: true
schema:
type: string
enum:
- agent
- team
- inbox
- label
description: The entity to group outgoing message counts by.
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/outgoing_messages_count'
'403':
description: Access denied
content:
application/json:
schema:
$ref: '#/components/schemas/bad_request_error'

View 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'

View File

@@ -0,0 +1,23 @@
tags:
- Reports
operationId: get-team-summary-report
summary: Get conversation statistics grouped by team
security:
- userApiKey: []
description: |
Get conversation statistics grouped by team for a given date range.
Returns metrics for each team including conversation counts, resolution counts,
average first response time, average resolution time, and average reply time.
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/team_summary'
'403':
description: Access denied
content:
application/json:
schema:
$ref: '#/components/schemas/bad_request_error'

View 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'

View 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'

View 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'

View 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'

View 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'

View 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'

View 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'

View 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'

View 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'

View 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'

View 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'

Some files were not shown because too many files have changed in this diff Show More