e500d1216b
This fixes issues in the swagger.json file. The motivation to do so is to be able to generate API clients using https://openapi-generator.tech Doing so will require further changes to the api spec, but this seems like a good first step since it is now "valid" according to editor.swagger.io and openapi-generator validate. Fixes #2806
99 lines
2.7 KiB
YAML
99 lines
2.7 KiB
YAML
parameters:
|
|
- $ref: '#/parameters/account_id'
|
|
|
|
get:
|
|
tags:
|
|
- Conversation
|
|
operationId: conversationList
|
|
description: List all the conversations with pagination
|
|
summary: Conversations List
|
|
parameters:
|
|
- name: assignee_type
|
|
in: query
|
|
type: string
|
|
enum: ['me', 'unassigned', 'all', 'assigned']
|
|
required: true
|
|
- name: status
|
|
in: query
|
|
type: string
|
|
enum: ['open', 'resolved', 'pending']
|
|
required: true
|
|
- name: page
|
|
in: query
|
|
type: integer
|
|
required: true
|
|
- name: inbox_id
|
|
in: query
|
|
type: integer
|
|
- name: labels
|
|
in: query
|
|
type: array
|
|
items:
|
|
type: string
|
|
|
|
responses:
|
|
200:
|
|
description: Success
|
|
schema:
|
|
$ref: '#/definitions/conversation_list'
|
|
400:
|
|
description: Bad Request Error
|
|
schema:
|
|
$ref: '#/definitions/bad_request_error'
|
|
|
|
post:
|
|
tags:
|
|
- Conversation
|
|
operationId: newConversation
|
|
summary: Create New Conversation
|
|
description: "Creating a conversation in chatwoot requires a source id. \n\n Learn more about source_id: https://github.com/chatwoot/chatwoot/wiki/Building-on-Top-of-Chatwoot:-Importing-Existing-Contacts-and-Creating-Conversations"
|
|
security:
|
|
- userApiKey: []
|
|
- agentBotApiKey: []
|
|
parameters:
|
|
- name: data
|
|
in: body
|
|
required: true
|
|
schema:
|
|
type: object
|
|
properties:
|
|
source_id:
|
|
type: string
|
|
description: Conversation source id
|
|
inbox_id:
|
|
type: string
|
|
description: "Id of inbox in which the conversation is created <br/> Allowed Inbox Types: Website, Phone, Api, Email "
|
|
contact_id:
|
|
type: string
|
|
description: Contact Id for which conversation is created
|
|
additional_attributes:
|
|
type: object
|
|
description: Lets you specify attributes like browser information
|
|
status:
|
|
type: string
|
|
enum: ['open', 'resolved', 'pending']
|
|
description: Specify the conversation whether it's pending, open, closed
|
|
assignee_id:
|
|
type: string
|
|
description: Agent Id for assigning a conversation to an agent
|
|
team_id:
|
|
type: string
|
|
description: Team Id for assigning a conversation to a team
|
|
|
|
responses:
|
|
200:
|
|
description: Success
|
|
schema:
|
|
type: object
|
|
properties:
|
|
id:
|
|
type: number
|
|
description: ID of the conversation
|
|
account_id:
|
|
type: number
|
|
description: Account Id
|
|
inbox_id:
|
|
type: number
|
|
description: ID of the inbox
|
|
403:
|
|
description: Access denied
|