-
Notifications
You must be signed in to change notification settings - Fork 5
/
openapi.yaml
275 lines (273 loc) · 8.66 KB
/
openapi.yaml
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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
openapi: 3.0.0
info:
title: Channel API
description: >-
Front is a customer operations platform that enables support, sales, and
account management teams to deliver exceptional service at scale. Front
streamlines customer communication by combining the efficiency of a help
desk and the familiarity of email, with automated workflows and real-time
collaboration behind the scenes.
With Front, teams can centralize messages across channels, route them to the
right person, and unlock visibility and insights across all of their
customer operations. More than 8000 businesses use Front to drive
operational efficiency that prevents churn, improves retention, and propels
customer growth.
version: 1.0.0
contact:
name: Front Platform
url: https://community.front.com
servers:
- url: https://api2.frontapp.com
tags:
- name: Messages
- name: Channels
paths:
/channels/{channel_id}:
patch:
tags:
- Channels
summary: Update Channel
operationId: Channels_updateChannel
description: Update a channel.
parameters:
- description: >-
The Channel ID. Alternatively, you can supply the channel address as
a [resource
alias](https://dev.frontapp.com/docs/resource-aliases-1).
in: path
name: channel_id
required: true
schema:
type: string
default: cha_123
requestBody:
description: Channel details
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateChannel'
responses:
'204':
description: No content
/channels/{channel_id}/inbound_messages:
post:
tags:
- Messages
summary: Sync inbound message
operationId: Messages_importReceivedMessage
description: Import a message that was received by the channel.
parameters:
- description: >-
The channel ID. Alternatively, you can supply the channel address as
a [resource
alias](https://dev.frontapp.com/docs/resource-aliases-1).
in: path
name: channel_id
required: true
schema:
type: string
default: cha_123
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/InboundMessage'
responses:
'202':
$ref: '#/components/responses/acceptedMessage'
/channels/{channel_id}/outbound_messages:
post:
tags:
- Messages
summary: Sync outbound message
operationId: Messages_importSyncedMessage
description: Import a message that was sent from the channel.
parameters:
- description: >-
The channel ID. Alternatively, you can supply the channel address as
a [resource
alias](https://dev.frontapp.com/docs/resource-aliases-1).
in: path
name: channel_id
required: true
schema:
type: string
default: cha_123
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/OutboundMessage'
responses:
'202':
$ref: '#/components/responses/acceptedMessage'
components:
responses:
acceptedMessage:
description: An accepted message
content:
application/json:
schema:
$ref: '#/components/schemas/MessagesImportReceivedMessageResponse'
securitySchemes:
http:
type: http
scheme: bearer
bearerFormat: JWT
schemas:
InboundMessage:
required:
- sender
- body
- metadata
properties:
sender:
description: Data of the sender
type: object
required:
- handle
properties:
name:
description: Name of the sender
type: string
handle:
description: >-
Handle of the sender. It can be any string used to uniquely
identify the sender. **Important:** When sending a phone number,
include a country code preceded by a plus (+) sign. For example,
+33 for France. If you do not send a country code or include a
plus sign, Front will normalize your phone number to the USA
(+1).
type: string
subject:
description: Subject of the message
type: string
body:
description: Body of the message
type: string
metadata:
type: object
required:
- external_id
- external_conversation_id
properties:
external_id:
description: External identifier of the message
type: string
maxLength: 200
external_conversation_id:
description: >-
External identifier of the conversation. Will be used to thread
messages.
type: string
maxLength: 200
delivered_at:
description: Time in seconds at which message was created in external system
type: integer
attachments:
description: >-
Binary data of attached files. Must use `Content-Type:
multipart/form-data` if specified. See
[example](https://gist.github.com/hdornier/e04d04921032e98271f46ff8a539a4cb)
or read more about
[Attachments](https://dev.frontapp.com/docs/attachments-1). Max 25
MB.
type: array
items:
type: string
format: binary
OutboundMessage:
description: >-
Payload to receive an outbound message from an external system into
Front.
required:
- to
- body
- metadata
properties:
sender_name:
description: Name of the sender
type: string
to:
description: Data of the message recipient
type: array
items:
type: object
required:
- handle
properties:
name:
description: Name of the recipient
type: string
handle:
description: >-
Handle of the recipient. It can be any string used to uniquely
identify the sender. **Important:** When sending a phone
number, include a country code preceded by a plus (+) sign.
For example, +33 for France. If you do not send a country code
or include a plus sign, Front will normalize your phone number
to the USA (+1).
type: string
subject:
description: Subject of the message
type: string
author_id:
description: ID of the teammate on behalf of whom the message is sent
type: string
body:
description: Body of the message
type: string
metadata:
type: object
required:
- external_id
- external_conversation_id
properties:
external_id:
description: External identifier of the message
type: string
maxLength: 200
external_conversation_id:
description: >-
External identifier of the conversation. Will be used to thread
messages.
type: string
maxLength: 200
delivered_at:
description: Time in seconds at which message was created in external system
type: integer
attachments:
description: >-
Binary data of attached files. Must use `Content-Type:
multipart/form-data` if specified. See
[example](https://gist.github.com/hdornier/e04d04921032e98271f46ff8a539a4cb)
or read more about
[Attachments](https://dev.frontapp.com/docs/attachments-1). Max 25
MB.
type: array
items:
type: string
format: binary
UpdateChannel:
properties:
status:
description: Status of the channel
type: string
enum:
- offline
- ok
MessagesImportReceivedMessageResponse:
type: object
properties:
status:
type: string
default: accepted
message_uid:
description: Message unique identifier
type: string
security:
- http: []
x-api-id: front
x-explorer-enabled: false
x-proxy-enabled: true
x-samples-enabled: true