/
index.yml
144 lines (141 loc) 路 4.51 KB
/
index.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
parameters:
- $ref: '#/parameters/account_id'
get:
tags:
- Conversations
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']
default: 'all'
description: Filter conversations by assignee type.
- name: status
in: query
type: string
enum: ['open', 'resolved', 'pending', 'snoozed']
default: 'open'
description: Filter by conversation status.
- name: q
in: query
type: string
description: Filters conversations with messages containing the search term
- name: inbox_id
in: query
type: integer
- name: team_id
in: query
type: integer
- name: labels
in: query
type: array
items:
type: string
- name: page
in: query
type: integer
default: 1
description: paginate through conversations
responses:
200:
description: Success
schema:
$ref: '#/definitions/conversation_list'
400:
description: Bad Request Error
schema:
$ref: '#/definitions/bad_request_error'
post:
tags:
- Conversations
operationId: newConversation
summary: Create New Conversation
description: "Creating a conversation in chatwoot requires a source id. \n\n Learn more about source_id: https://github.com/chatwoot/chatwoot/wiki/Building-on-Top-of-Chatwoot:-Importing-Existing-Contacts-and-Creating-Conversations"
security:
- userApiKey: []
- agentBotApiKey: []
parameters:
- name: data
in: body
required: true
schema:
type: object
required:
- source_id
- inbox_id
properties:
source_id:
type: string
description: Conversation source id
inbox_id:
type: string
description: "Id of inbox in which the conversation is created <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
custom_attributes:
type: object
description: The object to save custom attributes for conversation, accepts custom attributes key and value
example: { attribute_key: attribute_value, priority_conversation_number: 3 }
status:
type: string
enum: ['open', 'resolved', 'pending']
description: Specify the conversation whether it's pending, open, closed
assignee_id:
type: string
description: Agent Id for assigning a conversation to an agent
team_id:
type: string
description: Team Id for assigning a conversation to a team
message:
type: object
description: The initial message to be sent to the conversation
required: ['content']
properties:
content:
type: string
description: The content of the message
template_params:
type: object
description: The template params for the message in case of whatsapp Channel
properties:
name:
type: string
description: Name of the template
example: 'sample_issue_resolution'
category:
type: string
description: Category of the template
example: UTILITY
language:
type: string
description: Language of the template
example: en_US
processed_params:
type: object
description: The processed param values for template variables in template
example:
1: "Chatwoot"
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