chatgenius-mcp 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +86 -0
- package/bin/chatgenius-mcp.js +17 -0
- package/package.json +43 -0
- package/src/client.js +71 -0
- package/src/server.js +76 -0
- package/src/tools.js +80 -0
- package/tools.json +3157 -0
package/tools.json
ADDED
|
@@ -0,0 +1,3157 @@
|
|
|
1
|
+
{
|
|
2
|
+
"spec_version": "1.15.1",
|
|
3
|
+
"tools": [
|
|
4
|
+
{
|
|
5
|
+
"name": "get_account",
|
|
6
|
+
"description": "Get the account. Identity, plan, the calling key and its scope, and the configured webhook endpoints. The cheapest call to prove a key works.",
|
|
7
|
+
"method": "GET",
|
|
8
|
+
"path": "/account",
|
|
9
|
+
"scope": "read",
|
|
10
|
+
"kind": "read",
|
|
11
|
+
"hasBody": false,
|
|
12
|
+
"where": {
|
|
13
|
+
"path": [],
|
|
14
|
+
"query": [],
|
|
15
|
+
"body": []
|
|
16
|
+
},
|
|
17
|
+
"inputSchema": {
|
|
18
|
+
"type": "object",
|
|
19
|
+
"properties": {},
|
|
20
|
+
"additionalProperties": false
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"name": "get_overview",
|
|
25
|
+
"description": "Get the account overview. The numbers behind the portal's Overview page, computed by the same data layer: a rolling 30-day window against the 30 days before it (current/previous pairs). Messages per channel, AI vs automation replies, flow entries (with an attached comment trigger's fires on the flow's own row so a comment is never counted twice), standalone comment trigger fires, contacts, appointments with the next few, knowledge gaps by status, what needs a human, API sends, and plan usage for the billing cycle. No parameters; the window is fixed like the page.",
|
|
26
|
+
"method": "GET",
|
|
27
|
+
"path": "/analytics/overview",
|
|
28
|
+
"scope": "read",
|
|
29
|
+
"kind": "read",
|
|
30
|
+
"hasBody": false,
|
|
31
|
+
"where": {
|
|
32
|
+
"path": [],
|
|
33
|
+
"query": [],
|
|
34
|
+
"body": []
|
|
35
|
+
},
|
|
36
|
+
"inputSchema": {
|
|
37
|
+
"type": "object",
|
|
38
|
+
"properties": {},
|
|
39
|
+
"additionalProperties": false
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"name": "list_contacts",
|
|
44
|
+
"description": "List contacts. Cursor-paginated, newest first. Filters combine with AND.",
|
|
45
|
+
"method": "GET",
|
|
46
|
+
"path": "/contacts",
|
|
47
|
+
"scope": "read",
|
|
48
|
+
"kind": "read",
|
|
49
|
+
"hasBody": false,
|
|
50
|
+
"where": {
|
|
51
|
+
"path": [],
|
|
52
|
+
"query": [
|
|
53
|
+
"channel",
|
|
54
|
+
"stage",
|
|
55
|
+
"tag",
|
|
56
|
+
"email",
|
|
57
|
+
"phone",
|
|
58
|
+
"name",
|
|
59
|
+
"updated_since",
|
|
60
|
+
"limit",
|
|
61
|
+
"starting_after"
|
|
62
|
+
],
|
|
63
|
+
"body": []
|
|
64
|
+
},
|
|
65
|
+
"inputSchema": {
|
|
66
|
+
"type": "object",
|
|
67
|
+
"properties": {
|
|
68
|
+
"channel": {
|
|
69
|
+
"type": "string",
|
|
70
|
+
"enum": [
|
|
71
|
+
"facebook",
|
|
72
|
+
"instagram",
|
|
73
|
+
"sms",
|
|
74
|
+
"telegram",
|
|
75
|
+
"whatsapp"
|
|
76
|
+
],
|
|
77
|
+
"description": "Channel the contact was seen on."
|
|
78
|
+
},
|
|
79
|
+
"stage": {
|
|
80
|
+
"type": "string",
|
|
81
|
+
"enum": [
|
|
82
|
+
"new",
|
|
83
|
+
"contacted",
|
|
84
|
+
"qualified",
|
|
85
|
+
"customer",
|
|
86
|
+
"lost"
|
|
87
|
+
],
|
|
88
|
+
"description": "Pipeline stage."
|
|
89
|
+
},
|
|
90
|
+
"tag": {
|
|
91
|
+
"type": "string",
|
|
92
|
+
"description": "Exact tag name the contact carries."
|
|
93
|
+
},
|
|
94
|
+
"email": {
|
|
95
|
+
"type": "string",
|
|
96
|
+
"description": "Exact email match."
|
|
97
|
+
},
|
|
98
|
+
"phone": {
|
|
99
|
+
"type": "string",
|
|
100
|
+
"description": "Exact phone match."
|
|
101
|
+
},
|
|
102
|
+
"name": {
|
|
103
|
+
"type": "string",
|
|
104
|
+
"description": "Substring match on the display name."
|
|
105
|
+
},
|
|
106
|
+
"updated_since": {
|
|
107
|
+
"type": "string",
|
|
108
|
+
"format": "date-time",
|
|
109
|
+
"description": "ISO-8601 UTC. Contacts updated at or after this time."
|
|
110
|
+
},
|
|
111
|
+
"limit": {
|
|
112
|
+
"type": "integer",
|
|
113
|
+
"minimum": 1,
|
|
114
|
+
"maximum": 100,
|
|
115
|
+
"default": 25,
|
|
116
|
+
"description": "Page size, 1 to 100. Default 25."
|
|
117
|
+
},
|
|
118
|
+
"starting_after": {
|
|
119
|
+
"type": "string",
|
|
120
|
+
"description": "The next_cursor from the previous page."
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
"additionalProperties": false
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"name": "get_contact",
|
|
128
|
+
"description": "Get a contact. One contact by id.",
|
|
129
|
+
"method": "GET",
|
|
130
|
+
"path": "/contacts/{id}",
|
|
131
|
+
"scope": "read",
|
|
132
|
+
"kind": "read",
|
|
133
|
+
"hasBody": false,
|
|
134
|
+
"where": {
|
|
135
|
+
"path": [
|
|
136
|
+
"id"
|
|
137
|
+
],
|
|
138
|
+
"query": [],
|
|
139
|
+
"body": []
|
|
140
|
+
},
|
|
141
|
+
"inputSchema": {
|
|
142
|
+
"type": "object",
|
|
143
|
+
"properties": {
|
|
144
|
+
"id": {
|
|
145
|
+
"type": "integer",
|
|
146
|
+
"description": "Numeric id."
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
"required": [
|
|
150
|
+
"id"
|
|
151
|
+
],
|
|
152
|
+
"additionalProperties": false
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"name": "upsert_contact",
|
|
157
|
+
"description": "Create or update a contact. Upsert keyed by (channel, platform_user_id). 201 when created, 200 when an existing contact was updated. Fields you omit on an existing contact are left untouched, tags included.",
|
|
158
|
+
"method": "POST",
|
|
159
|
+
"path": "/contacts",
|
|
160
|
+
"scope": "write",
|
|
161
|
+
"kind": "write",
|
|
162
|
+
"hasBody": true,
|
|
163
|
+
"where": {
|
|
164
|
+
"path": [],
|
|
165
|
+
"query": [],
|
|
166
|
+
"body": [
|
|
167
|
+
"channel",
|
|
168
|
+
"platform_user_id",
|
|
169
|
+
"name",
|
|
170
|
+
"email",
|
|
171
|
+
"phone",
|
|
172
|
+
"stage",
|
|
173
|
+
"notes",
|
|
174
|
+
"tags",
|
|
175
|
+
"custom_fields"
|
|
176
|
+
]
|
|
177
|
+
},
|
|
178
|
+
"inputSchema": {
|
|
179
|
+
"type": "object",
|
|
180
|
+
"properties": {
|
|
181
|
+
"channel": {
|
|
182
|
+
"type": "string",
|
|
183
|
+
"enum": [
|
|
184
|
+
"facebook",
|
|
185
|
+
"instagram",
|
|
186
|
+
"sms",
|
|
187
|
+
"telegram",
|
|
188
|
+
"whatsapp"
|
|
189
|
+
]
|
|
190
|
+
},
|
|
191
|
+
"platform_user_id": {
|
|
192
|
+
"type": "string",
|
|
193
|
+
"minLength": 1,
|
|
194
|
+
"maxLength": 255
|
|
195
|
+
},
|
|
196
|
+
"name": {
|
|
197
|
+
"type": "string",
|
|
198
|
+
"maxLength": 255
|
|
199
|
+
},
|
|
200
|
+
"email": {
|
|
201
|
+
"type": "string",
|
|
202
|
+
"format": "email"
|
|
203
|
+
},
|
|
204
|
+
"phone": {
|
|
205
|
+
"type": "string"
|
|
206
|
+
},
|
|
207
|
+
"stage": {
|
|
208
|
+
"type": "string",
|
|
209
|
+
"enum": [
|
|
210
|
+
"new",
|
|
211
|
+
"contacted",
|
|
212
|
+
"qualified",
|
|
213
|
+
"customer",
|
|
214
|
+
"lost"
|
|
215
|
+
]
|
|
216
|
+
},
|
|
217
|
+
"notes": {
|
|
218
|
+
"type": "string",
|
|
219
|
+
"maxLength": 5000
|
|
220
|
+
},
|
|
221
|
+
"tags": {
|
|
222
|
+
"type": "array",
|
|
223
|
+
"items": {
|
|
224
|
+
"type": "string"
|
|
225
|
+
},
|
|
226
|
+
"description": "Tag names, created if missing."
|
|
227
|
+
},
|
|
228
|
+
"custom_fields": {
|
|
229
|
+
"type": "object",
|
|
230
|
+
"additionalProperties": true
|
|
231
|
+
}
|
|
232
|
+
},
|
|
233
|
+
"required": [
|
|
234
|
+
"channel",
|
|
235
|
+
"platform_user_id"
|
|
236
|
+
],
|
|
237
|
+
"additionalProperties": false
|
|
238
|
+
}
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
"name": "update_contact",
|
|
242
|
+
"description": "Update a contact. Partial update. Only the fields you send change. An empty string clears name, email, phone or notes. custom_fields merges per key; null clears one value.",
|
|
243
|
+
"method": "PATCH",
|
|
244
|
+
"path": "/contacts/{id}",
|
|
245
|
+
"scope": "write",
|
|
246
|
+
"kind": "write",
|
|
247
|
+
"hasBody": true,
|
|
248
|
+
"where": {
|
|
249
|
+
"path": [
|
|
250
|
+
"id"
|
|
251
|
+
],
|
|
252
|
+
"query": [],
|
|
253
|
+
"body": [
|
|
254
|
+
"name",
|
|
255
|
+
"email",
|
|
256
|
+
"phone",
|
|
257
|
+
"stage",
|
|
258
|
+
"notes",
|
|
259
|
+
"custom_fields"
|
|
260
|
+
]
|
|
261
|
+
},
|
|
262
|
+
"inputSchema": {
|
|
263
|
+
"type": "object",
|
|
264
|
+
"properties": {
|
|
265
|
+
"id": {
|
|
266
|
+
"type": "integer",
|
|
267
|
+
"description": "Numeric id."
|
|
268
|
+
},
|
|
269
|
+
"name": {
|
|
270
|
+
"type": "string",
|
|
271
|
+
"maxLength": 255,
|
|
272
|
+
"description": "Empty string clears."
|
|
273
|
+
},
|
|
274
|
+
"email": {
|
|
275
|
+
"type": "string",
|
|
276
|
+
"description": "Valid email, or empty string to clear."
|
|
277
|
+
},
|
|
278
|
+
"phone": {
|
|
279
|
+
"type": "string",
|
|
280
|
+
"description": "Digits, +, spaces, dashes, brackets. Empty string clears."
|
|
281
|
+
},
|
|
282
|
+
"stage": {
|
|
283
|
+
"type": "string",
|
|
284
|
+
"enum": [
|
|
285
|
+
"new",
|
|
286
|
+
"contacted",
|
|
287
|
+
"qualified",
|
|
288
|
+
"customer",
|
|
289
|
+
"lost"
|
|
290
|
+
]
|
|
291
|
+
},
|
|
292
|
+
"notes": {
|
|
293
|
+
"type": "string",
|
|
294
|
+
"maxLength": 5000
|
|
295
|
+
},
|
|
296
|
+
"custom_fields": {
|
|
297
|
+
"type": "object",
|
|
298
|
+
"additionalProperties": true,
|
|
299
|
+
"description": "Merged per key. Null clears one value."
|
|
300
|
+
}
|
|
301
|
+
},
|
|
302
|
+
"required": [
|
|
303
|
+
"id"
|
|
304
|
+
],
|
|
305
|
+
"additionalProperties": false
|
|
306
|
+
}
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
"name": "list_tags",
|
|
310
|
+
"description": "List tags. Every tag definition, ordered by name. Not paginated.",
|
|
311
|
+
"method": "GET",
|
|
312
|
+
"path": "/tags",
|
|
313
|
+
"scope": "read",
|
|
314
|
+
"kind": "read",
|
|
315
|
+
"hasBody": false,
|
|
316
|
+
"where": {
|
|
317
|
+
"path": [],
|
|
318
|
+
"query": [],
|
|
319
|
+
"body": []
|
|
320
|
+
},
|
|
321
|
+
"inputSchema": {
|
|
322
|
+
"type": "object",
|
|
323
|
+
"properties": {},
|
|
324
|
+
"additionalProperties": false
|
|
325
|
+
}
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
"name": "create_tag",
|
|
329
|
+
"description": "Create a tag. Idempotent on name: 201 when created, 200 when it already existed (colour unchanged).",
|
|
330
|
+
"method": "POST",
|
|
331
|
+
"path": "/tags",
|
|
332
|
+
"scope": "write",
|
|
333
|
+
"kind": "write",
|
|
334
|
+
"hasBody": true,
|
|
335
|
+
"where": {
|
|
336
|
+
"path": [],
|
|
337
|
+
"query": [],
|
|
338
|
+
"body": [
|
|
339
|
+
"name",
|
|
340
|
+
"color"
|
|
341
|
+
]
|
|
342
|
+
},
|
|
343
|
+
"inputSchema": {
|
|
344
|
+
"type": "object",
|
|
345
|
+
"properties": {
|
|
346
|
+
"name": {
|
|
347
|
+
"type": "string",
|
|
348
|
+
"minLength": 1,
|
|
349
|
+
"maxLength": 50
|
|
350
|
+
},
|
|
351
|
+
"color": {
|
|
352
|
+
"type": "string",
|
|
353
|
+
"pattern": "^#[0-9A-Fa-f]{6}$",
|
|
354
|
+
"default": "#5046E5"
|
|
355
|
+
}
|
|
356
|
+
},
|
|
357
|
+
"required": [
|
|
358
|
+
"name"
|
|
359
|
+
],
|
|
360
|
+
"additionalProperties": false
|
|
361
|
+
}
|
|
362
|
+
},
|
|
363
|
+
{
|
|
364
|
+
"name": "tag_contact",
|
|
365
|
+
"description": "Attach a tag. Attach by name. The tag is created if it does not exist. Re-attaching is a no-op.",
|
|
366
|
+
"method": "POST",
|
|
367
|
+
"path": "/contacts/{id}/tags",
|
|
368
|
+
"scope": "write",
|
|
369
|
+
"kind": "write",
|
|
370
|
+
"hasBody": true,
|
|
371
|
+
"where": {
|
|
372
|
+
"path": [
|
|
373
|
+
"id"
|
|
374
|
+
],
|
|
375
|
+
"query": [],
|
|
376
|
+
"body": [
|
|
377
|
+
"name"
|
|
378
|
+
]
|
|
379
|
+
},
|
|
380
|
+
"inputSchema": {
|
|
381
|
+
"type": "object",
|
|
382
|
+
"properties": {
|
|
383
|
+
"id": {
|
|
384
|
+
"type": "integer",
|
|
385
|
+
"description": "Numeric id."
|
|
386
|
+
},
|
|
387
|
+
"name": {
|
|
388
|
+
"type": "string",
|
|
389
|
+
"minLength": 1,
|
|
390
|
+
"maxLength": 50
|
|
391
|
+
}
|
|
392
|
+
},
|
|
393
|
+
"required": [
|
|
394
|
+
"id",
|
|
395
|
+
"name"
|
|
396
|
+
],
|
|
397
|
+
"additionalProperties": false
|
|
398
|
+
}
|
|
399
|
+
},
|
|
400
|
+
{
|
|
401
|
+
"name": "untag_contact",
|
|
402
|
+
"description": "Detach a tag. Detach by tag id or URL-encoded name. Detaching a tag the contact does not have is a 200.",
|
|
403
|
+
"method": "DELETE",
|
|
404
|
+
"path": "/contacts/{id}/tags/{tag}",
|
|
405
|
+
"scope": "write",
|
|
406
|
+
"kind": "write",
|
|
407
|
+
"hasBody": false,
|
|
408
|
+
"where": {
|
|
409
|
+
"path": [
|
|
410
|
+
"id",
|
|
411
|
+
"tag"
|
|
412
|
+
],
|
|
413
|
+
"query": [],
|
|
414
|
+
"body": []
|
|
415
|
+
},
|
|
416
|
+
"inputSchema": {
|
|
417
|
+
"type": "object",
|
|
418
|
+
"properties": {
|
|
419
|
+
"id": {
|
|
420
|
+
"type": "integer",
|
|
421
|
+
"description": "Numeric id."
|
|
422
|
+
},
|
|
423
|
+
"tag": {
|
|
424
|
+
"type": "string",
|
|
425
|
+
"description": "Tag id or name."
|
|
426
|
+
}
|
|
427
|
+
},
|
|
428
|
+
"required": [
|
|
429
|
+
"id",
|
|
430
|
+
"tag"
|
|
431
|
+
],
|
|
432
|
+
"additionalProperties": false
|
|
433
|
+
}
|
|
434
|
+
},
|
|
435
|
+
{
|
|
436
|
+
"name": "list_conversations",
|
|
437
|
+
"description": "List conversations. Cursor-paginated, newest first. Deleted conversations are never returned.",
|
|
438
|
+
"method": "GET",
|
|
439
|
+
"path": "/conversations",
|
|
440
|
+
"scope": "read",
|
|
441
|
+
"kind": "read",
|
|
442
|
+
"hasBody": false,
|
|
443
|
+
"where": {
|
|
444
|
+
"path": [],
|
|
445
|
+
"query": [
|
|
446
|
+
"channel",
|
|
447
|
+
"status",
|
|
448
|
+
"assigned_to",
|
|
449
|
+
"updated_since",
|
|
450
|
+
"limit",
|
|
451
|
+
"starting_after"
|
|
452
|
+
],
|
|
453
|
+
"body": []
|
|
454
|
+
},
|
|
455
|
+
"inputSchema": {
|
|
456
|
+
"type": "object",
|
|
457
|
+
"properties": {
|
|
458
|
+
"channel": {
|
|
459
|
+
"type": "string",
|
|
460
|
+
"enum": [
|
|
461
|
+
"facebook",
|
|
462
|
+
"instagram",
|
|
463
|
+
"sms",
|
|
464
|
+
"telegram",
|
|
465
|
+
"whatsapp"
|
|
466
|
+
],
|
|
467
|
+
"description": "Channel."
|
|
468
|
+
},
|
|
469
|
+
"status": {
|
|
470
|
+
"type": "string",
|
|
471
|
+
"enum": [
|
|
472
|
+
"active",
|
|
473
|
+
"resolved",
|
|
474
|
+
"pending",
|
|
475
|
+
"archived",
|
|
476
|
+
"escalated"
|
|
477
|
+
],
|
|
478
|
+
"description": "Conversation status."
|
|
479
|
+
},
|
|
480
|
+
"assigned_to": {
|
|
481
|
+
"type": "integer",
|
|
482
|
+
"description": "Team member id. Negative values are owner-level assignments."
|
|
483
|
+
},
|
|
484
|
+
"updated_since": {
|
|
485
|
+
"type": "string",
|
|
486
|
+
"format": "date-time",
|
|
487
|
+
"description": "ISO-8601 UTC."
|
|
488
|
+
},
|
|
489
|
+
"limit": {
|
|
490
|
+
"type": "integer",
|
|
491
|
+
"minimum": 1,
|
|
492
|
+
"maximum": 100,
|
|
493
|
+
"default": 25,
|
|
494
|
+
"description": "Page size, 1 to 100. Default 25."
|
|
495
|
+
},
|
|
496
|
+
"starting_after": {
|
|
497
|
+
"type": "string",
|
|
498
|
+
"description": "The next_cursor from the previous page."
|
|
499
|
+
}
|
|
500
|
+
},
|
|
501
|
+
"additionalProperties": false
|
|
502
|
+
}
|
|
503
|
+
},
|
|
504
|
+
{
|
|
505
|
+
"name": "get_conversation",
|
|
506
|
+
"description": "Get a conversation. One conversation by id.",
|
|
507
|
+
"method": "GET",
|
|
508
|
+
"path": "/conversations/{id}",
|
|
509
|
+
"scope": "read",
|
|
510
|
+
"kind": "read",
|
|
511
|
+
"hasBody": false,
|
|
512
|
+
"where": {
|
|
513
|
+
"path": [
|
|
514
|
+
"id"
|
|
515
|
+
],
|
|
516
|
+
"query": [],
|
|
517
|
+
"body": []
|
|
518
|
+
},
|
|
519
|
+
"inputSchema": {
|
|
520
|
+
"type": "object",
|
|
521
|
+
"properties": {
|
|
522
|
+
"id": {
|
|
523
|
+
"type": "integer",
|
|
524
|
+
"description": "Numeric id."
|
|
525
|
+
}
|
|
526
|
+
},
|
|
527
|
+
"required": [
|
|
528
|
+
"id"
|
|
529
|
+
],
|
|
530
|
+
"additionalProperties": false
|
|
531
|
+
}
|
|
532
|
+
},
|
|
533
|
+
{
|
|
534
|
+
"name": "list_messages",
|
|
535
|
+
"description": "List messages in a conversation. The transcript, newest first. Purged bodies appear with text null and body_purged true.",
|
|
536
|
+
"method": "GET",
|
|
537
|
+
"path": "/conversations/{id}/messages",
|
|
538
|
+
"scope": "read",
|
|
539
|
+
"kind": "read",
|
|
540
|
+
"hasBody": false,
|
|
541
|
+
"where": {
|
|
542
|
+
"path": [
|
|
543
|
+
"id"
|
|
544
|
+
],
|
|
545
|
+
"query": [
|
|
546
|
+
"limit",
|
|
547
|
+
"starting_after"
|
|
548
|
+
],
|
|
549
|
+
"body": []
|
|
550
|
+
},
|
|
551
|
+
"inputSchema": {
|
|
552
|
+
"type": "object",
|
|
553
|
+
"properties": {
|
|
554
|
+
"id": {
|
|
555
|
+
"type": "integer",
|
|
556
|
+
"description": "Numeric id."
|
|
557
|
+
},
|
|
558
|
+
"limit": {
|
|
559
|
+
"type": "integer",
|
|
560
|
+
"minimum": 1,
|
|
561
|
+
"maximum": 100,
|
|
562
|
+
"default": 50,
|
|
563
|
+
"description": "1 to 100, default 50."
|
|
564
|
+
},
|
|
565
|
+
"starting_after": {
|
|
566
|
+
"type": "string",
|
|
567
|
+
"description": "The next_cursor from the previous page."
|
|
568
|
+
}
|
|
569
|
+
},
|
|
570
|
+
"required": [
|
|
571
|
+
"id"
|
|
572
|
+
],
|
|
573
|
+
"additionalProperties": false
|
|
574
|
+
}
|
|
575
|
+
},
|
|
576
|
+
{
|
|
577
|
+
"name": "update_conversation",
|
|
578
|
+
"description": "Update a conversation. Two optional fields. status: active, resolved or archived; resolving or archiving hands the thread back to the AI, like the inbox. ai_paused: true takes the thread away from the AI as the account owner (the inbox Claim button, reopens a resolved thread); false hands it back (the inbox Transfer to AI). Resume is refused with 409 when the pause came from a solicitation pause, a fraud flag or a connected-account pause; those are lifted in the portal. status is applied first, then ai_paused.",
|
|
579
|
+
"method": "PATCH",
|
|
580
|
+
"path": "/conversations/{id}",
|
|
581
|
+
"scope": "write",
|
|
582
|
+
"kind": "write",
|
|
583
|
+
"hasBody": true,
|
|
584
|
+
"where": {
|
|
585
|
+
"path": [
|
|
586
|
+
"id"
|
|
587
|
+
],
|
|
588
|
+
"query": [],
|
|
589
|
+
"body": [
|
|
590
|
+
"status",
|
|
591
|
+
"ai_paused"
|
|
592
|
+
]
|
|
593
|
+
},
|
|
594
|
+
"inputSchema": {
|
|
595
|
+
"type": "object",
|
|
596
|
+
"properties": {
|
|
597
|
+
"id": {
|
|
598
|
+
"type": "integer",
|
|
599
|
+
"description": "Numeric id."
|
|
600
|
+
},
|
|
601
|
+
"status": {
|
|
602
|
+
"type": "string",
|
|
603
|
+
"enum": [
|
|
604
|
+
"active",
|
|
605
|
+
"resolved",
|
|
606
|
+
"archived"
|
|
607
|
+
],
|
|
608
|
+
"description": "resolved or archived clears the assignment. pending and escalated are set by the system only."
|
|
609
|
+
},
|
|
610
|
+
"ai_paused": {
|
|
611
|
+
"type": "boolean",
|
|
612
|
+
"description": "true pauses the AI on this thread as the owner; false hands it back to the AI."
|
|
613
|
+
}
|
|
614
|
+
},
|
|
615
|
+
"required": [
|
|
616
|
+
"id"
|
|
617
|
+
],
|
|
618
|
+
"additionalProperties": false
|
|
619
|
+
}
|
|
620
|
+
},
|
|
621
|
+
{
|
|
622
|
+
"name": "send_message",
|
|
623
|
+
"description": "Send a message. Send text, a WhatsApp template, a reaction, or a typing indicator on any channel. Route by conversation_id, by platform plus platform_user_id, or by to_phone for SMS and WhatsApp. SMS, WhatsApp and Telegram can start a conversation cold; Facebook and Instagram need an inbound message first. idempotency_key is required in the body, or send the Idempotency-Key header. This reaches a real person on their phone. Confirm the recipient and the text with the user before calling.",
|
|
624
|
+
"method": "POST",
|
|
625
|
+
"path": "/messages",
|
|
626
|
+
"scope": "write",
|
|
627
|
+
"kind": "destructive",
|
|
628
|
+
"hasBody": true,
|
|
629
|
+
"where": {
|
|
630
|
+
"path": [],
|
|
631
|
+
"query": [],
|
|
632
|
+
"body": [
|
|
633
|
+
"idempotency_key",
|
|
634
|
+
"action",
|
|
635
|
+
"conversation_id",
|
|
636
|
+
"platform",
|
|
637
|
+
"platform_user_id",
|
|
638
|
+
"to_phone",
|
|
639
|
+
"message_text",
|
|
640
|
+
"template_name",
|
|
641
|
+
"template_language",
|
|
642
|
+
"template_components",
|
|
643
|
+
"target_message_id",
|
|
644
|
+
"reaction"
|
|
645
|
+
]
|
|
646
|
+
},
|
|
647
|
+
"inputSchema": {
|
|
648
|
+
"type": "object",
|
|
649
|
+
"properties": {
|
|
650
|
+
"idempotency_key": {
|
|
651
|
+
"type": "string",
|
|
652
|
+
"maxLength": 128,
|
|
653
|
+
"description": "Required unless the Idempotency-Key header is sent. A replay returns the original result with status duplicate."
|
|
654
|
+
},
|
|
655
|
+
"action": {
|
|
656
|
+
"type": "string",
|
|
657
|
+
"enum": [
|
|
658
|
+
"send_message",
|
|
659
|
+
"react",
|
|
660
|
+
"unreact",
|
|
661
|
+
"typing_on"
|
|
662
|
+
],
|
|
663
|
+
"default": "send_message"
|
|
664
|
+
},
|
|
665
|
+
"conversation_id": {
|
|
666
|
+
"type": "integer",
|
|
667
|
+
"description": "Route by conversation."
|
|
668
|
+
},
|
|
669
|
+
"platform": {
|
|
670
|
+
"type": "string",
|
|
671
|
+
"enum": [
|
|
672
|
+
"facebook",
|
|
673
|
+
"instagram",
|
|
674
|
+
"sms",
|
|
675
|
+
"telegram",
|
|
676
|
+
"whatsapp"
|
|
677
|
+
],
|
|
678
|
+
"description": "With platform_user_id, route by the channel identity."
|
|
679
|
+
},
|
|
680
|
+
"platform_user_id": {
|
|
681
|
+
"type": "string"
|
|
682
|
+
},
|
|
683
|
+
"to_phone": {
|
|
684
|
+
"type": "string",
|
|
685
|
+
"description": "E.164. SMS and WhatsApp only. Starts a conversation if none exists."
|
|
686
|
+
},
|
|
687
|
+
"message_text": {
|
|
688
|
+
"type": "string",
|
|
689
|
+
"description": "For send_message."
|
|
690
|
+
},
|
|
691
|
+
"template_name": {
|
|
692
|
+
"type": "string",
|
|
693
|
+
"description": "WhatsApp template, outside the 24-hour window."
|
|
694
|
+
},
|
|
695
|
+
"template_language": {
|
|
696
|
+
"type": "string"
|
|
697
|
+
},
|
|
698
|
+
"template_components": {
|
|
699
|
+
"type": "array",
|
|
700
|
+
"items": {
|
|
701
|
+
"type": "object",
|
|
702
|
+
"additionalProperties": true
|
|
703
|
+
}
|
|
704
|
+
},
|
|
705
|
+
"target_message_id": {
|
|
706
|
+
"type": "string",
|
|
707
|
+
"description": "For react and unreact."
|
|
708
|
+
},
|
|
709
|
+
"reaction": {
|
|
710
|
+
"type": "string",
|
|
711
|
+
"description": "For react, for example love."
|
|
712
|
+
}
|
|
713
|
+
},
|
|
714
|
+
"additionalProperties": false
|
|
715
|
+
}
|
|
716
|
+
},
|
|
717
|
+
{
|
|
718
|
+
"name": "list_appointments",
|
|
719
|
+
"description": "List appointments. In-chat bookings, newest first.",
|
|
720
|
+
"method": "GET",
|
|
721
|
+
"path": "/appointments",
|
|
722
|
+
"scope": "read",
|
|
723
|
+
"kind": "read",
|
|
724
|
+
"hasBody": false,
|
|
725
|
+
"where": {
|
|
726
|
+
"path": [],
|
|
727
|
+
"query": [
|
|
728
|
+
"status",
|
|
729
|
+
"conversation_id",
|
|
730
|
+
"limit",
|
|
731
|
+
"starting_after"
|
|
732
|
+
],
|
|
733
|
+
"body": []
|
|
734
|
+
},
|
|
735
|
+
"inputSchema": {
|
|
736
|
+
"type": "object",
|
|
737
|
+
"properties": {
|
|
738
|
+
"status": {
|
|
739
|
+
"type": "string",
|
|
740
|
+
"description": "Exact match on the stored status, for example confirmed or cancelled. Not validated."
|
|
741
|
+
},
|
|
742
|
+
"conversation_id": {
|
|
743
|
+
"type": "integer",
|
|
744
|
+
"description": "Appointments booked in one conversation."
|
|
745
|
+
},
|
|
746
|
+
"limit": {
|
|
747
|
+
"type": "integer",
|
|
748
|
+
"minimum": 1,
|
|
749
|
+
"maximum": 100,
|
|
750
|
+
"default": 25,
|
|
751
|
+
"description": "Page size, 1 to 100. Default 25."
|
|
752
|
+
},
|
|
753
|
+
"starting_after": {
|
|
754
|
+
"type": "string",
|
|
755
|
+
"description": "The next_cursor from the previous page."
|
|
756
|
+
}
|
|
757
|
+
},
|
|
758
|
+
"additionalProperties": false
|
|
759
|
+
}
|
|
760
|
+
},
|
|
761
|
+
{
|
|
762
|
+
"name": "get_availability",
|
|
763
|
+
"description": "Get availability. The open slots for one day, from business hours, the service duration, the buffer, the minimum notice and existing bookings. What the bot and the portal picker offer. Empty on a closed day.",
|
|
764
|
+
"method": "GET",
|
|
765
|
+
"path": "/appointments/availability",
|
|
766
|
+
"scope": "read",
|
|
767
|
+
"kind": "read",
|
|
768
|
+
"hasBody": false,
|
|
769
|
+
"where": {
|
|
770
|
+
"path": [],
|
|
771
|
+
"query": [
|
|
772
|
+
"date",
|
|
773
|
+
"service_type",
|
|
774
|
+
"city",
|
|
775
|
+
"state"
|
|
776
|
+
],
|
|
777
|
+
"body": []
|
|
778
|
+
},
|
|
779
|
+
"inputSchema": {
|
|
780
|
+
"type": "object",
|
|
781
|
+
"properties": {
|
|
782
|
+
"date": {
|
|
783
|
+
"type": "string",
|
|
784
|
+
"description": "YYYY-MM-DD in the account timezone."
|
|
785
|
+
},
|
|
786
|
+
"service_type": {
|
|
787
|
+
"type": "string",
|
|
788
|
+
"description": "A bookable service name; sets the slot length. Default 30 minutes."
|
|
789
|
+
},
|
|
790
|
+
"city": {
|
|
791
|
+
"type": "string",
|
|
792
|
+
"description": "Location-specific availability."
|
|
793
|
+
},
|
|
794
|
+
"state": {
|
|
795
|
+
"type": "string",
|
|
796
|
+
"description": "Location-specific availability."
|
|
797
|
+
}
|
|
798
|
+
},
|
|
799
|
+
"required": [
|
|
800
|
+
"date"
|
|
801
|
+
],
|
|
802
|
+
"additionalProperties": false
|
|
803
|
+
}
|
|
804
|
+
},
|
|
805
|
+
{
|
|
806
|
+
"name": "book_appointment",
|
|
807
|
+
"description": "Book an appointment. Books a slot the way the portal calendar does: the account's required customer fields are enforced (422 missing_fields), the time must be in the future and free (409 slot_unavailable), the appointment is confirmed at once, synced to Google Calendar and GoHighLevel when connected, and appointment.booked fires. Attach conversation_id to book for a person you are chatting with; they get the confirmation DM unless send_confirmation is false. date and time are the customer's wall-clock time in timezone (the account timezone when omitted).",
|
|
808
|
+
"method": "POST",
|
|
809
|
+
"path": "/appointments",
|
|
810
|
+
"scope": "write",
|
|
811
|
+
"kind": "destructive",
|
|
812
|
+
"hasBody": true,
|
|
813
|
+
"where": {
|
|
814
|
+
"path": [],
|
|
815
|
+
"query": [],
|
|
816
|
+
"body": [
|
|
817
|
+
"date",
|
|
818
|
+
"time",
|
|
819
|
+
"customer",
|
|
820
|
+
"service_type",
|
|
821
|
+
"duration_minutes",
|
|
822
|
+
"conversation_id",
|
|
823
|
+
"send_confirmation",
|
|
824
|
+
"location",
|
|
825
|
+
"timezone",
|
|
826
|
+
"vehicle_info",
|
|
827
|
+
"cost",
|
|
828
|
+
"notes"
|
|
829
|
+
]
|
|
830
|
+
},
|
|
831
|
+
"inputSchema": {
|
|
832
|
+
"type": "object",
|
|
833
|
+
"properties": {
|
|
834
|
+
"date": {
|
|
835
|
+
"type": "string",
|
|
836
|
+
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
|
|
837
|
+
"description": "YYYY-MM-DD."
|
|
838
|
+
},
|
|
839
|
+
"time": {
|
|
840
|
+
"type": "string",
|
|
841
|
+
"pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
|
|
842
|
+
"description": "HH:MM, 24-hour, in timezone."
|
|
843
|
+
},
|
|
844
|
+
"customer": {
|
|
845
|
+
"type": "object",
|
|
846
|
+
"properties": {
|
|
847
|
+
"name": {
|
|
848
|
+
"type": "string"
|
|
849
|
+
},
|
|
850
|
+
"email": {
|
|
851
|
+
"type": [
|
|
852
|
+
"string",
|
|
853
|
+
"null"
|
|
854
|
+
]
|
|
855
|
+
},
|
|
856
|
+
"phone": {
|
|
857
|
+
"type": [
|
|
858
|
+
"string",
|
|
859
|
+
"null"
|
|
860
|
+
]
|
|
861
|
+
},
|
|
862
|
+
"address": {
|
|
863
|
+
"type": [
|
|
864
|
+
"string",
|
|
865
|
+
"null"
|
|
866
|
+
]
|
|
867
|
+
}
|
|
868
|
+
}
|
|
869
|
+
},
|
|
870
|
+
"service_type": {
|
|
871
|
+
"type": "string",
|
|
872
|
+
"default": "consultation",
|
|
873
|
+
"description": "A bookable service name from ai/config booking.bookable_services, or free text."
|
|
874
|
+
},
|
|
875
|
+
"duration_minutes": {
|
|
876
|
+
"type": "integer",
|
|
877
|
+
"minimum": 5,
|
|
878
|
+
"maximum": 1440,
|
|
879
|
+
"description": "Defaults to the service's duration, else 30."
|
|
880
|
+
},
|
|
881
|
+
"conversation_id": {
|
|
882
|
+
"type": [
|
|
883
|
+
"integer",
|
|
884
|
+
"null"
|
|
885
|
+
],
|
|
886
|
+
"description": "Book for the person in this conversation; sets the channel and enables the confirmation DM."
|
|
887
|
+
},
|
|
888
|
+
"send_confirmation": {
|
|
889
|
+
"type": "boolean",
|
|
890
|
+
"default": true,
|
|
891
|
+
"description": "With conversation_id: DM the customer the confirmation."
|
|
892
|
+
},
|
|
893
|
+
"location": {
|
|
894
|
+
"type": "object",
|
|
895
|
+
"properties": {
|
|
896
|
+
"city": {
|
|
897
|
+
"type": [
|
|
898
|
+
"string",
|
|
899
|
+
"null"
|
|
900
|
+
]
|
|
901
|
+
},
|
|
902
|
+
"state": {
|
|
903
|
+
"type": [
|
|
904
|
+
"string",
|
|
905
|
+
"null"
|
|
906
|
+
]
|
|
907
|
+
}
|
|
908
|
+
}
|
|
909
|
+
},
|
|
910
|
+
"timezone": {
|
|
911
|
+
"type": [
|
|
912
|
+
"string",
|
|
913
|
+
"null"
|
|
914
|
+
],
|
|
915
|
+
"description": "IANA name. Default: the account timezone."
|
|
916
|
+
},
|
|
917
|
+
"vehicle_info": {
|
|
918
|
+
"type": [
|
|
919
|
+
"string",
|
|
920
|
+
"null"
|
|
921
|
+
]
|
|
922
|
+
},
|
|
923
|
+
"cost": {
|
|
924
|
+
"type": [
|
|
925
|
+
"number",
|
|
926
|
+
"null"
|
|
927
|
+
]
|
|
928
|
+
},
|
|
929
|
+
"notes": {
|
|
930
|
+
"type": [
|
|
931
|
+
"string",
|
|
932
|
+
"null"
|
|
933
|
+
]
|
|
934
|
+
}
|
|
935
|
+
},
|
|
936
|
+
"required": [
|
|
937
|
+
"date",
|
|
938
|
+
"time",
|
|
939
|
+
"customer"
|
|
940
|
+
],
|
|
941
|
+
"additionalProperties": false
|
|
942
|
+
}
|
|
943
|
+
},
|
|
944
|
+
{
|
|
945
|
+
"name": "reschedule_appointment",
|
|
946
|
+
"description": "Reschedule an appointment. Moves a pending or confirmed appointment to a new date and time after checking the slot is free, updates the connected calendars, fires appointment.rescheduled, and DMs the customer when the booking came from a conversation. 409 slot_unavailable when the slot is taken, 409 not_active when the appointment is not pending or confirmed.",
|
|
947
|
+
"method": "POST",
|
|
948
|
+
"path": "/appointments/{id}/reschedule",
|
|
949
|
+
"scope": "write",
|
|
950
|
+
"kind": "destructive",
|
|
951
|
+
"hasBody": true,
|
|
952
|
+
"where": {
|
|
953
|
+
"path": [
|
|
954
|
+
"id"
|
|
955
|
+
],
|
|
956
|
+
"query": [],
|
|
957
|
+
"body": [
|
|
958
|
+
"date",
|
|
959
|
+
"time"
|
|
960
|
+
]
|
|
961
|
+
},
|
|
962
|
+
"inputSchema": {
|
|
963
|
+
"type": "object",
|
|
964
|
+
"properties": {
|
|
965
|
+
"id": {
|
|
966
|
+
"type": "integer",
|
|
967
|
+
"description": "Numeric id."
|
|
968
|
+
},
|
|
969
|
+
"date": {
|
|
970
|
+
"type": "string",
|
|
971
|
+
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
|
|
972
|
+
},
|
|
973
|
+
"time": {
|
|
974
|
+
"type": "string",
|
|
975
|
+
"pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
|
|
976
|
+
"description": "HH:MM, 24-hour, in the appointment timezone."
|
|
977
|
+
}
|
|
978
|
+
},
|
|
979
|
+
"required": [
|
|
980
|
+
"id",
|
|
981
|
+
"date",
|
|
982
|
+
"time"
|
|
983
|
+
],
|
|
984
|
+
"additionalProperties": false
|
|
985
|
+
}
|
|
986
|
+
},
|
|
987
|
+
{
|
|
988
|
+
"name": "cancel_appointment",
|
|
989
|
+
"description": "Cancel an appointment. Sets status cancelled, removes the Google Calendar and GoHighLevel events, fires appointment.cancelled. 409 already_cancelled if it already is. Send {} as the body.",
|
|
990
|
+
"method": "POST",
|
|
991
|
+
"path": "/appointments/{id}/cancel",
|
|
992
|
+
"scope": "write",
|
|
993
|
+
"kind": "destructive",
|
|
994
|
+
"hasBody": false,
|
|
995
|
+
"where": {
|
|
996
|
+
"path": [
|
|
997
|
+
"id"
|
|
998
|
+
],
|
|
999
|
+
"query": [],
|
|
1000
|
+
"body": []
|
|
1001
|
+
},
|
|
1002
|
+
"inputSchema": {
|
|
1003
|
+
"type": "object",
|
|
1004
|
+
"properties": {
|
|
1005
|
+
"id": {
|
|
1006
|
+
"type": "integer",
|
|
1007
|
+
"description": "Numeric id."
|
|
1008
|
+
}
|
|
1009
|
+
},
|
|
1010
|
+
"required": [
|
|
1011
|
+
"id"
|
|
1012
|
+
],
|
|
1013
|
+
"additionalProperties": false
|
|
1014
|
+
}
|
|
1015
|
+
},
|
|
1016
|
+
{
|
|
1017
|
+
"name": "list_flows",
|
|
1018
|
+
"description": "List flows. Automation flows with lifetime stats. The canvas definition is not exposed.",
|
|
1019
|
+
"method": "GET",
|
|
1020
|
+
"path": "/flows",
|
|
1021
|
+
"scope": "read",
|
|
1022
|
+
"kind": "read",
|
|
1023
|
+
"hasBody": false,
|
|
1024
|
+
"where": {
|
|
1025
|
+
"path": [],
|
|
1026
|
+
"query": [
|
|
1027
|
+
"status",
|
|
1028
|
+
"trigger_type",
|
|
1029
|
+
"limit",
|
|
1030
|
+
"starting_after"
|
|
1031
|
+
],
|
|
1032
|
+
"body": []
|
|
1033
|
+
},
|
|
1034
|
+
"inputSchema": {
|
|
1035
|
+
"type": "object",
|
|
1036
|
+
"properties": {
|
|
1037
|
+
"status": {
|
|
1038
|
+
"type": "string",
|
|
1039
|
+
"enum": [
|
|
1040
|
+
"draft",
|
|
1041
|
+
"active",
|
|
1042
|
+
"paused"
|
|
1043
|
+
],
|
|
1044
|
+
"description": "Flow status."
|
|
1045
|
+
},
|
|
1046
|
+
"trigger_type": {
|
|
1047
|
+
"type": "string",
|
|
1048
|
+
"enum": [
|
|
1049
|
+
"keyword",
|
|
1050
|
+
"first_message",
|
|
1051
|
+
"comment_trigger",
|
|
1052
|
+
"button_tap"
|
|
1053
|
+
],
|
|
1054
|
+
"description": "What starts the flow."
|
|
1055
|
+
},
|
|
1056
|
+
"limit": {
|
|
1057
|
+
"type": "integer",
|
|
1058
|
+
"minimum": 1,
|
|
1059
|
+
"maximum": 100,
|
|
1060
|
+
"default": 25,
|
|
1061
|
+
"description": "Page size, 1 to 100. Default 25."
|
|
1062
|
+
},
|
|
1063
|
+
"starting_after": {
|
|
1064
|
+
"type": "string",
|
|
1065
|
+
"description": "The next_cursor from the previous page."
|
|
1066
|
+
}
|
|
1067
|
+
},
|
|
1068
|
+
"additionalProperties": false
|
|
1069
|
+
}
|
|
1070
|
+
},
|
|
1071
|
+
{
|
|
1072
|
+
"name": "get_flow",
|
|
1073
|
+
"description": "Get a flow. One flow by id.",
|
|
1074
|
+
"method": "GET",
|
|
1075
|
+
"path": "/flows/{id}",
|
|
1076
|
+
"scope": "read",
|
|
1077
|
+
"kind": "read",
|
|
1078
|
+
"hasBody": false,
|
|
1079
|
+
"where": {
|
|
1080
|
+
"path": [
|
|
1081
|
+
"id"
|
|
1082
|
+
],
|
|
1083
|
+
"query": [],
|
|
1084
|
+
"body": []
|
|
1085
|
+
},
|
|
1086
|
+
"inputSchema": {
|
|
1087
|
+
"type": "object",
|
|
1088
|
+
"properties": {
|
|
1089
|
+
"id": {
|
|
1090
|
+
"type": "integer",
|
|
1091
|
+
"description": "Numeric id."
|
|
1092
|
+
}
|
|
1093
|
+
},
|
|
1094
|
+
"required": [
|
|
1095
|
+
"id"
|
|
1096
|
+
],
|
|
1097
|
+
"additionalProperties": false
|
|
1098
|
+
}
|
|
1099
|
+
},
|
|
1100
|
+
{
|
|
1101
|
+
"name": "get_flow_definition",
|
|
1102
|
+
"description": "Get a flow definition. The definition alone: the draft when one exists, else the published version.",
|
|
1103
|
+
"method": "GET",
|
|
1104
|
+
"path": "/flows/{id}/definition",
|
|
1105
|
+
"scope": "read",
|
|
1106
|
+
"kind": "read",
|
|
1107
|
+
"hasBody": false,
|
|
1108
|
+
"where": {
|
|
1109
|
+
"path": [
|
|
1110
|
+
"id"
|
|
1111
|
+
],
|
|
1112
|
+
"query": [],
|
|
1113
|
+
"body": []
|
|
1114
|
+
},
|
|
1115
|
+
"inputSchema": {
|
|
1116
|
+
"type": "object",
|
|
1117
|
+
"properties": {
|
|
1118
|
+
"id": {
|
|
1119
|
+
"type": "integer",
|
|
1120
|
+
"description": "Numeric id."
|
|
1121
|
+
}
|
|
1122
|
+
},
|
|
1123
|
+
"required": [
|
|
1124
|
+
"id"
|
|
1125
|
+
],
|
|
1126
|
+
"additionalProperties": false
|
|
1127
|
+
}
|
|
1128
|
+
},
|
|
1129
|
+
{
|
|
1130
|
+
"name": "get_flow_node_catalogue",
|
|
1131
|
+
"description": "Get the node catalogue. Everything needed to build a flow: every trigger source (channels it can fire on, whether it needs keywords, its config), every node type (input and output ports, config fields and allowed values, which are terminal), the enums, the placeholders, the structural rules, and this account's live options: custom fields, tags, bookable services, flows (for goto_flow), comment triggers (for linked comment flows), the plan's node and flow caps. Read it before composing a definition. Read this before writing a flow definition. It lists every node type, its config fields and output ports.",
|
|
1132
|
+
"method": "GET",
|
|
1133
|
+
"path": "/flows/nodes",
|
|
1134
|
+
"scope": "read",
|
|
1135
|
+
"kind": "read",
|
|
1136
|
+
"hasBody": false,
|
|
1137
|
+
"where": {
|
|
1138
|
+
"path": [],
|
|
1139
|
+
"query": [],
|
|
1140
|
+
"body": []
|
|
1141
|
+
},
|
|
1142
|
+
"inputSchema": {
|
|
1143
|
+
"type": "object",
|
|
1144
|
+
"properties": {},
|
|
1145
|
+
"additionalProperties": false
|
|
1146
|
+
}
|
|
1147
|
+
},
|
|
1148
|
+
{
|
|
1149
|
+
"name": "validate_flow",
|
|
1150
|
+
"description": "Validate a flow definition. Dry run of the same validation create and update apply. Nothing is saved. Validate a definition without saving it. Loop on errors[] until it is clean, then call create_flow.",
|
|
1151
|
+
"method": "POST",
|
|
1152
|
+
"path": "/flows/validate",
|
|
1153
|
+
"scope": "write",
|
|
1154
|
+
"kind": "read",
|
|
1155
|
+
"hasBody": true,
|
|
1156
|
+
"where": {
|
|
1157
|
+
"path": [],
|
|
1158
|
+
"query": [],
|
|
1159
|
+
"body": [
|
|
1160
|
+
"definition",
|
|
1161
|
+
"channels"
|
|
1162
|
+
]
|
|
1163
|
+
},
|
|
1164
|
+
"inputSchema": {
|
|
1165
|
+
"type": "object",
|
|
1166
|
+
"properties": {
|
|
1167
|
+
"definition": {
|
|
1168
|
+
"type": "object",
|
|
1169
|
+
"properties": {
|
|
1170
|
+
"trigger": {
|
|
1171
|
+
"type": "object",
|
|
1172
|
+
"properties": {
|
|
1173
|
+
"source": {
|
|
1174
|
+
"type": "string",
|
|
1175
|
+
"enum": [
|
|
1176
|
+
"dm",
|
|
1177
|
+
"comment",
|
|
1178
|
+
"ad_referral",
|
|
1179
|
+
"story_mention",
|
|
1180
|
+
"story_reply",
|
|
1181
|
+
"ig_reel_share",
|
|
1182
|
+
"ig_post_share",
|
|
1183
|
+
"ig_unsupported_attachment",
|
|
1184
|
+
"image_received",
|
|
1185
|
+
"audio_received",
|
|
1186
|
+
"video_received",
|
|
1187
|
+
"file_received",
|
|
1188
|
+
"ai_intent"
|
|
1189
|
+
],
|
|
1190
|
+
"default": "dm"
|
|
1191
|
+
},
|
|
1192
|
+
"keywords": {
|
|
1193
|
+
"type": "array",
|
|
1194
|
+
"items": {
|
|
1195
|
+
"type": "string"
|
|
1196
|
+
},
|
|
1197
|
+
"description": "dm source: any of these starts the flow."
|
|
1198
|
+
},
|
|
1199
|
+
"match_type": {
|
|
1200
|
+
"type": "string",
|
|
1201
|
+
"enum": [
|
|
1202
|
+
"contains",
|
|
1203
|
+
"exact"
|
|
1204
|
+
],
|
|
1205
|
+
"default": "contains"
|
|
1206
|
+
},
|
|
1207
|
+
"comment_trigger_id": {
|
|
1208
|
+
"type": [
|
|
1209
|
+
"integer",
|
|
1210
|
+
"null"
|
|
1211
|
+
],
|
|
1212
|
+
"description": "comment source, linked mode: a standalone comment trigger id."
|
|
1213
|
+
},
|
|
1214
|
+
"comment_keywords": {
|
|
1215
|
+
"type": "array",
|
|
1216
|
+
"items": {
|
|
1217
|
+
"type": "string"
|
|
1218
|
+
},
|
|
1219
|
+
"description": "comment source, native mode."
|
|
1220
|
+
},
|
|
1221
|
+
"comment_match_type": {
|
|
1222
|
+
"type": "string",
|
|
1223
|
+
"enum": [
|
|
1224
|
+
"contains",
|
|
1225
|
+
"exact"
|
|
1226
|
+
]
|
|
1227
|
+
},
|
|
1228
|
+
"comment_post_id": {
|
|
1229
|
+
"type": [
|
|
1230
|
+
"string",
|
|
1231
|
+
"null"
|
|
1232
|
+
]
|
|
1233
|
+
},
|
|
1234
|
+
"ad_ref": {
|
|
1235
|
+
"type": [
|
|
1236
|
+
"string",
|
|
1237
|
+
"null"
|
|
1238
|
+
]
|
|
1239
|
+
},
|
|
1240
|
+
"intent_description": {
|
|
1241
|
+
"type": [
|
|
1242
|
+
"string",
|
|
1243
|
+
"null"
|
|
1244
|
+
]
|
|
1245
|
+
}
|
|
1246
|
+
},
|
|
1247
|
+
"required": [
|
|
1248
|
+
"source"
|
|
1249
|
+
],
|
|
1250
|
+
"description": "What starts the flow. Also the config of node \"1\". Per-source fields are in GET /flows/nodes sources.*.config."
|
|
1251
|
+
},
|
|
1252
|
+
"nodes": {
|
|
1253
|
+
"type": "array",
|
|
1254
|
+
"items": {
|
|
1255
|
+
"type": "object",
|
|
1256
|
+
"properties": {
|
|
1257
|
+
"id": {
|
|
1258
|
+
"type": "string",
|
|
1259
|
+
"description": "String id; \"1\" is the trigger."
|
|
1260
|
+
},
|
|
1261
|
+
"type": {
|
|
1262
|
+
"type": "string",
|
|
1263
|
+
"enum": [
|
|
1264
|
+
"trigger",
|
|
1265
|
+
"message",
|
|
1266
|
+
"collect_input",
|
|
1267
|
+
"condition",
|
|
1268
|
+
"action",
|
|
1269
|
+
"delay",
|
|
1270
|
+
"ai_step",
|
|
1271
|
+
"ai_handoff",
|
|
1272
|
+
"randomizer",
|
|
1273
|
+
"book_appointment",
|
|
1274
|
+
"http_request",
|
|
1275
|
+
"goto_flow"
|
|
1276
|
+
]
|
|
1277
|
+
},
|
|
1278
|
+
"config": {
|
|
1279
|
+
"type": "object",
|
|
1280
|
+
"description": "Per type; see GET /flows/nodes nodes.<type>.config."
|
|
1281
|
+
}
|
|
1282
|
+
},
|
|
1283
|
+
"required": [
|
|
1284
|
+
"id",
|
|
1285
|
+
"type"
|
|
1286
|
+
]
|
|
1287
|
+
},
|
|
1288
|
+
"minItems": 2
|
|
1289
|
+
},
|
|
1290
|
+
"edges": {
|
|
1291
|
+
"type": "array",
|
|
1292
|
+
"items": {
|
|
1293
|
+
"type": "object",
|
|
1294
|
+
"properties": {
|
|
1295
|
+
"from": {
|
|
1296
|
+
"type": "string"
|
|
1297
|
+
},
|
|
1298
|
+
"from_port": {
|
|
1299
|
+
"type": "string",
|
|
1300
|
+
"description": "One of the source node's output ports, for example output_1, output_2, output_timeout.",
|
|
1301
|
+
"default": "output_1"
|
|
1302
|
+
},
|
|
1303
|
+
"to": {
|
|
1304
|
+
"type": "string"
|
|
1305
|
+
},
|
|
1306
|
+
"to_port": {
|
|
1307
|
+
"type": "string",
|
|
1308
|
+
"enum": [
|
|
1309
|
+
"input_1"
|
|
1310
|
+
],
|
|
1311
|
+
"default": "input_1"
|
|
1312
|
+
}
|
|
1313
|
+
},
|
|
1314
|
+
"required": [
|
|
1315
|
+
"from",
|
|
1316
|
+
"to"
|
|
1317
|
+
]
|
|
1318
|
+
}
|
|
1319
|
+
}
|
|
1320
|
+
},
|
|
1321
|
+
"required": [
|
|
1322
|
+
"trigger",
|
|
1323
|
+
"nodes",
|
|
1324
|
+
"edges"
|
|
1325
|
+
],
|
|
1326
|
+
"description": "A flow as a graph. Read GET /flows/nodes for every node type, port and config field."
|
|
1327
|
+
},
|
|
1328
|
+
"channels": {
|
|
1329
|
+
"type": "array",
|
|
1330
|
+
"items": {
|
|
1331
|
+
"type": "string",
|
|
1332
|
+
"enum": [
|
|
1333
|
+
"facebook",
|
|
1334
|
+
"instagram",
|
|
1335
|
+
"whatsapp"
|
|
1336
|
+
]
|
|
1337
|
+
},
|
|
1338
|
+
"default": [
|
|
1339
|
+
"facebook",
|
|
1340
|
+
"instagram"
|
|
1341
|
+
]
|
|
1342
|
+
}
|
|
1343
|
+
},
|
|
1344
|
+
"required": [
|
|
1345
|
+
"definition"
|
|
1346
|
+
],
|
|
1347
|
+
"additionalProperties": false
|
|
1348
|
+
}
|
|
1349
|
+
},
|
|
1350
|
+
{
|
|
1351
|
+
"name": "create_flow",
|
|
1352
|
+
"description": "Create a flow. Creates a DRAFT from a definition (see GET /flows/nodes for the catalogue). The definition is validated first: structure, per-node config, the plan's node cap, channel compatibility with the trigger source, keyword collisions with active flows, and references to custom fields, comment triggers and other flows (422 invalid_definition with errors[] and warnings[]). Nothing runs until you publish and activate. The visual builder lays the nodes out the first time the flow is opened.",
|
|
1353
|
+
"method": "POST",
|
|
1354
|
+
"path": "/flows",
|
|
1355
|
+
"scope": "write",
|
|
1356
|
+
"kind": "write",
|
|
1357
|
+
"hasBody": true,
|
|
1358
|
+
"where": {
|
|
1359
|
+
"path": [],
|
|
1360
|
+
"query": [],
|
|
1361
|
+
"body": [
|
|
1362
|
+
"name",
|
|
1363
|
+
"definition",
|
|
1364
|
+
"channels",
|
|
1365
|
+
"tag_id"
|
|
1366
|
+
]
|
|
1367
|
+
},
|
|
1368
|
+
"inputSchema": {
|
|
1369
|
+
"type": "object",
|
|
1370
|
+
"properties": {
|
|
1371
|
+
"name": {
|
|
1372
|
+
"type": "string",
|
|
1373
|
+
"maxLength": 100
|
|
1374
|
+
},
|
|
1375
|
+
"definition": {
|
|
1376
|
+
"type": "object",
|
|
1377
|
+
"properties": {
|
|
1378
|
+
"trigger": {
|
|
1379
|
+
"type": "object",
|
|
1380
|
+
"properties": {
|
|
1381
|
+
"source": {
|
|
1382
|
+
"type": "string",
|
|
1383
|
+
"enum": [
|
|
1384
|
+
"dm",
|
|
1385
|
+
"comment",
|
|
1386
|
+
"ad_referral",
|
|
1387
|
+
"story_mention",
|
|
1388
|
+
"story_reply",
|
|
1389
|
+
"ig_reel_share",
|
|
1390
|
+
"ig_post_share",
|
|
1391
|
+
"ig_unsupported_attachment",
|
|
1392
|
+
"image_received",
|
|
1393
|
+
"audio_received",
|
|
1394
|
+
"video_received",
|
|
1395
|
+
"file_received",
|
|
1396
|
+
"ai_intent"
|
|
1397
|
+
],
|
|
1398
|
+
"default": "dm"
|
|
1399
|
+
},
|
|
1400
|
+
"keywords": {
|
|
1401
|
+
"type": "array",
|
|
1402
|
+
"items": {
|
|
1403
|
+
"type": "string"
|
|
1404
|
+
},
|
|
1405
|
+
"description": "dm source: any of these starts the flow."
|
|
1406
|
+
},
|
|
1407
|
+
"match_type": {
|
|
1408
|
+
"type": "string",
|
|
1409
|
+
"enum": [
|
|
1410
|
+
"contains",
|
|
1411
|
+
"exact"
|
|
1412
|
+
],
|
|
1413
|
+
"default": "contains"
|
|
1414
|
+
},
|
|
1415
|
+
"comment_trigger_id": {
|
|
1416
|
+
"type": [
|
|
1417
|
+
"integer",
|
|
1418
|
+
"null"
|
|
1419
|
+
],
|
|
1420
|
+
"description": "comment source, linked mode: a standalone comment trigger id."
|
|
1421
|
+
},
|
|
1422
|
+
"comment_keywords": {
|
|
1423
|
+
"type": "array",
|
|
1424
|
+
"items": {
|
|
1425
|
+
"type": "string"
|
|
1426
|
+
},
|
|
1427
|
+
"description": "comment source, native mode."
|
|
1428
|
+
},
|
|
1429
|
+
"comment_match_type": {
|
|
1430
|
+
"type": "string",
|
|
1431
|
+
"enum": [
|
|
1432
|
+
"contains",
|
|
1433
|
+
"exact"
|
|
1434
|
+
]
|
|
1435
|
+
},
|
|
1436
|
+
"comment_post_id": {
|
|
1437
|
+
"type": [
|
|
1438
|
+
"string",
|
|
1439
|
+
"null"
|
|
1440
|
+
]
|
|
1441
|
+
},
|
|
1442
|
+
"ad_ref": {
|
|
1443
|
+
"type": [
|
|
1444
|
+
"string",
|
|
1445
|
+
"null"
|
|
1446
|
+
]
|
|
1447
|
+
},
|
|
1448
|
+
"intent_description": {
|
|
1449
|
+
"type": [
|
|
1450
|
+
"string",
|
|
1451
|
+
"null"
|
|
1452
|
+
]
|
|
1453
|
+
}
|
|
1454
|
+
},
|
|
1455
|
+
"required": [
|
|
1456
|
+
"source"
|
|
1457
|
+
],
|
|
1458
|
+
"description": "What starts the flow. Also the config of node \"1\". Per-source fields are in GET /flows/nodes sources.*.config."
|
|
1459
|
+
},
|
|
1460
|
+
"nodes": {
|
|
1461
|
+
"type": "array",
|
|
1462
|
+
"items": {
|
|
1463
|
+
"type": "object",
|
|
1464
|
+
"properties": {
|
|
1465
|
+
"id": {
|
|
1466
|
+
"type": "string",
|
|
1467
|
+
"description": "String id; \"1\" is the trigger."
|
|
1468
|
+
},
|
|
1469
|
+
"type": {
|
|
1470
|
+
"type": "string",
|
|
1471
|
+
"enum": [
|
|
1472
|
+
"trigger",
|
|
1473
|
+
"message",
|
|
1474
|
+
"collect_input",
|
|
1475
|
+
"condition",
|
|
1476
|
+
"action",
|
|
1477
|
+
"delay",
|
|
1478
|
+
"ai_step",
|
|
1479
|
+
"ai_handoff",
|
|
1480
|
+
"randomizer",
|
|
1481
|
+
"book_appointment",
|
|
1482
|
+
"http_request",
|
|
1483
|
+
"goto_flow"
|
|
1484
|
+
]
|
|
1485
|
+
},
|
|
1486
|
+
"config": {
|
|
1487
|
+
"type": "object",
|
|
1488
|
+
"description": "Per type; see GET /flows/nodes nodes.<type>.config."
|
|
1489
|
+
}
|
|
1490
|
+
},
|
|
1491
|
+
"required": [
|
|
1492
|
+
"id",
|
|
1493
|
+
"type"
|
|
1494
|
+
]
|
|
1495
|
+
},
|
|
1496
|
+
"minItems": 2
|
|
1497
|
+
},
|
|
1498
|
+
"edges": {
|
|
1499
|
+
"type": "array",
|
|
1500
|
+
"items": {
|
|
1501
|
+
"type": "object",
|
|
1502
|
+
"properties": {
|
|
1503
|
+
"from": {
|
|
1504
|
+
"type": "string"
|
|
1505
|
+
},
|
|
1506
|
+
"from_port": {
|
|
1507
|
+
"type": "string",
|
|
1508
|
+
"description": "One of the source node's output ports, for example output_1, output_2, output_timeout.",
|
|
1509
|
+
"default": "output_1"
|
|
1510
|
+
},
|
|
1511
|
+
"to": {
|
|
1512
|
+
"type": "string"
|
|
1513
|
+
},
|
|
1514
|
+
"to_port": {
|
|
1515
|
+
"type": "string",
|
|
1516
|
+
"enum": [
|
|
1517
|
+
"input_1"
|
|
1518
|
+
],
|
|
1519
|
+
"default": "input_1"
|
|
1520
|
+
}
|
|
1521
|
+
},
|
|
1522
|
+
"required": [
|
|
1523
|
+
"from",
|
|
1524
|
+
"to"
|
|
1525
|
+
]
|
|
1526
|
+
}
|
|
1527
|
+
}
|
|
1528
|
+
},
|
|
1529
|
+
"required": [
|
|
1530
|
+
"trigger",
|
|
1531
|
+
"nodes",
|
|
1532
|
+
"edges"
|
|
1533
|
+
],
|
|
1534
|
+
"description": "A flow as a graph. Read GET /flows/nodes for every node type, port and config field."
|
|
1535
|
+
},
|
|
1536
|
+
"channels": {
|
|
1537
|
+
"type": "array",
|
|
1538
|
+
"items": {
|
|
1539
|
+
"type": "string",
|
|
1540
|
+
"enum": [
|
|
1541
|
+
"facebook",
|
|
1542
|
+
"instagram",
|
|
1543
|
+
"whatsapp"
|
|
1544
|
+
]
|
|
1545
|
+
},
|
|
1546
|
+
"default": [
|
|
1547
|
+
"facebook",
|
|
1548
|
+
"instagram"
|
|
1549
|
+
],
|
|
1550
|
+
"description": "Must be channels the trigger source can fire on."
|
|
1551
|
+
},
|
|
1552
|
+
"tag_id": {
|
|
1553
|
+
"type": [
|
|
1554
|
+
"integer",
|
|
1555
|
+
"null"
|
|
1556
|
+
],
|
|
1557
|
+
"description": "Tag applied to people who enter the flow. Pro plans and above; ignored otherwise."
|
|
1558
|
+
}
|
|
1559
|
+
},
|
|
1560
|
+
"required": [
|
|
1561
|
+
"name",
|
|
1562
|
+
"definition"
|
|
1563
|
+
],
|
|
1564
|
+
"additionalProperties": false
|
|
1565
|
+
}
|
|
1566
|
+
},
|
|
1567
|
+
{
|
|
1568
|
+
"name": "update_flow",
|
|
1569
|
+
"description": "Update a flow. Rename, retarget channels, set the tag, and/or replace the definition. A new definition is saved as the DRAFT and validated the same way as on create; the live version keeps running until you publish. Positions are dropped when the definition changes (the builder re-lays it out).",
|
|
1570
|
+
"method": "PATCH",
|
|
1571
|
+
"path": "/flows/{id}",
|
|
1572
|
+
"scope": "write",
|
|
1573
|
+
"kind": "write",
|
|
1574
|
+
"hasBody": true,
|
|
1575
|
+
"where": {
|
|
1576
|
+
"path": [
|
|
1577
|
+
"id"
|
|
1578
|
+
],
|
|
1579
|
+
"query": [],
|
|
1580
|
+
"body": [
|
|
1581
|
+
"name",
|
|
1582
|
+
"definition",
|
|
1583
|
+
"channels",
|
|
1584
|
+
"tag_id"
|
|
1585
|
+
]
|
|
1586
|
+
},
|
|
1587
|
+
"inputSchema": {
|
|
1588
|
+
"type": "object",
|
|
1589
|
+
"properties": {
|
|
1590
|
+
"id": {
|
|
1591
|
+
"type": "integer",
|
|
1592
|
+
"description": "Numeric id."
|
|
1593
|
+
},
|
|
1594
|
+
"name": {
|
|
1595
|
+
"type": "string",
|
|
1596
|
+
"maxLength": 100
|
|
1597
|
+
},
|
|
1598
|
+
"definition": {
|
|
1599
|
+
"type": "object",
|
|
1600
|
+
"properties": {
|
|
1601
|
+
"trigger": {
|
|
1602
|
+
"type": "object",
|
|
1603
|
+
"properties": {
|
|
1604
|
+
"source": {
|
|
1605
|
+
"type": "string",
|
|
1606
|
+
"enum": [
|
|
1607
|
+
"dm",
|
|
1608
|
+
"comment",
|
|
1609
|
+
"ad_referral",
|
|
1610
|
+
"story_mention",
|
|
1611
|
+
"story_reply",
|
|
1612
|
+
"ig_reel_share",
|
|
1613
|
+
"ig_post_share",
|
|
1614
|
+
"ig_unsupported_attachment",
|
|
1615
|
+
"image_received",
|
|
1616
|
+
"audio_received",
|
|
1617
|
+
"video_received",
|
|
1618
|
+
"file_received",
|
|
1619
|
+
"ai_intent"
|
|
1620
|
+
],
|
|
1621
|
+
"default": "dm"
|
|
1622
|
+
},
|
|
1623
|
+
"keywords": {
|
|
1624
|
+
"type": "array",
|
|
1625
|
+
"items": {
|
|
1626
|
+
"type": "string"
|
|
1627
|
+
},
|
|
1628
|
+
"description": "dm source: any of these starts the flow."
|
|
1629
|
+
},
|
|
1630
|
+
"match_type": {
|
|
1631
|
+
"type": "string",
|
|
1632
|
+
"enum": [
|
|
1633
|
+
"contains",
|
|
1634
|
+
"exact"
|
|
1635
|
+
],
|
|
1636
|
+
"default": "contains"
|
|
1637
|
+
},
|
|
1638
|
+
"comment_trigger_id": {
|
|
1639
|
+
"type": [
|
|
1640
|
+
"integer",
|
|
1641
|
+
"null"
|
|
1642
|
+
],
|
|
1643
|
+
"description": "comment source, linked mode: a standalone comment trigger id."
|
|
1644
|
+
},
|
|
1645
|
+
"comment_keywords": {
|
|
1646
|
+
"type": "array",
|
|
1647
|
+
"items": {
|
|
1648
|
+
"type": "string"
|
|
1649
|
+
},
|
|
1650
|
+
"description": "comment source, native mode."
|
|
1651
|
+
},
|
|
1652
|
+
"comment_match_type": {
|
|
1653
|
+
"type": "string",
|
|
1654
|
+
"enum": [
|
|
1655
|
+
"contains",
|
|
1656
|
+
"exact"
|
|
1657
|
+
]
|
|
1658
|
+
},
|
|
1659
|
+
"comment_post_id": {
|
|
1660
|
+
"type": [
|
|
1661
|
+
"string",
|
|
1662
|
+
"null"
|
|
1663
|
+
]
|
|
1664
|
+
},
|
|
1665
|
+
"ad_ref": {
|
|
1666
|
+
"type": [
|
|
1667
|
+
"string",
|
|
1668
|
+
"null"
|
|
1669
|
+
]
|
|
1670
|
+
},
|
|
1671
|
+
"intent_description": {
|
|
1672
|
+
"type": [
|
|
1673
|
+
"string",
|
|
1674
|
+
"null"
|
|
1675
|
+
]
|
|
1676
|
+
}
|
|
1677
|
+
},
|
|
1678
|
+
"required": [
|
|
1679
|
+
"source"
|
|
1680
|
+
],
|
|
1681
|
+
"description": "What starts the flow. Also the config of node \"1\". Per-source fields are in GET /flows/nodes sources.*.config."
|
|
1682
|
+
},
|
|
1683
|
+
"nodes": {
|
|
1684
|
+
"type": "array",
|
|
1685
|
+
"items": {
|
|
1686
|
+
"type": "object",
|
|
1687
|
+
"properties": {
|
|
1688
|
+
"id": {
|
|
1689
|
+
"type": "string",
|
|
1690
|
+
"description": "String id; \"1\" is the trigger."
|
|
1691
|
+
},
|
|
1692
|
+
"type": {
|
|
1693
|
+
"type": "string",
|
|
1694
|
+
"enum": [
|
|
1695
|
+
"trigger",
|
|
1696
|
+
"message",
|
|
1697
|
+
"collect_input",
|
|
1698
|
+
"condition",
|
|
1699
|
+
"action",
|
|
1700
|
+
"delay",
|
|
1701
|
+
"ai_step",
|
|
1702
|
+
"ai_handoff",
|
|
1703
|
+
"randomizer",
|
|
1704
|
+
"book_appointment",
|
|
1705
|
+
"http_request",
|
|
1706
|
+
"goto_flow"
|
|
1707
|
+
]
|
|
1708
|
+
},
|
|
1709
|
+
"config": {
|
|
1710
|
+
"type": "object",
|
|
1711
|
+
"description": "Per type; see GET /flows/nodes nodes.<type>.config."
|
|
1712
|
+
}
|
|
1713
|
+
},
|
|
1714
|
+
"required": [
|
|
1715
|
+
"id",
|
|
1716
|
+
"type"
|
|
1717
|
+
]
|
|
1718
|
+
},
|
|
1719
|
+
"minItems": 2
|
|
1720
|
+
},
|
|
1721
|
+
"edges": {
|
|
1722
|
+
"type": "array",
|
|
1723
|
+
"items": {
|
|
1724
|
+
"type": "object",
|
|
1725
|
+
"properties": {
|
|
1726
|
+
"from": {
|
|
1727
|
+
"type": "string"
|
|
1728
|
+
},
|
|
1729
|
+
"from_port": {
|
|
1730
|
+
"type": "string",
|
|
1731
|
+
"description": "One of the source node's output ports, for example output_1, output_2, output_timeout.",
|
|
1732
|
+
"default": "output_1"
|
|
1733
|
+
},
|
|
1734
|
+
"to": {
|
|
1735
|
+
"type": "string"
|
|
1736
|
+
},
|
|
1737
|
+
"to_port": {
|
|
1738
|
+
"type": "string",
|
|
1739
|
+
"enum": [
|
|
1740
|
+
"input_1"
|
|
1741
|
+
],
|
|
1742
|
+
"default": "input_1"
|
|
1743
|
+
}
|
|
1744
|
+
},
|
|
1745
|
+
"required": [
|
|
1746
|
+
"from",
|
|
1747
|
+
"to"
|
|
1748
|
+
]
|
|
1749
|
+
}
|
|
1750
|
+
}
|
|
1751
|
+
},
|
|
1752
|
+
"required": [
|
|
1753
|
+
"trigger",
|
|
1754
|
+
"nodes",
|
|
1755
|
+
"edges"
|
|
1756
|
+
],
|
|
1757
|
+
"description": "A flow as a graph. Read GET /flows/nodes for every node type, port and config field."
|
|
1758
|
+
},
|
|
1759
|
+
"channels": {
|
|
1760
|
+
"type": "array",
|
|
1761
|
+
"items": {
|
|
1762
|
+
"type": "string",
|
|
1763
|
+
"enum": [
|
|
1764
|
+
"facebook",
|
|
1765
|
+
"instagram",
|
|
1766
|
+
"whatsapp"
|
|
1767
|
+
]
|
|
1768
|
+
}
|
|
1769
|
+
},
|
|
1770
|
+
"tag_id": {
|
|
1771
|
+
"type": [
|
|
1772
|
+
"integer",
|
|
1773
|
+
"null"
|
|
1774
|
+
]
|
|
1775
|
+
}
|
|
1776
|
+
},
|
|
1777
|
+
"required": [
|
|
1778
|
+
"id"
|
|
1779
|
+
],
|
|
1780
|
+
"additionalProperties": false
|
|
1781
|
+
}
|
|
1782
|
+
},
|
|
1783
|
+
{
|
|
1784
|
+
"name": "publish_flow",
|
|
1785
|
+
"description": "Publish a flow draft. Makes the draft the live definition (new version). Runs the full validation and keyword-conflict check (422 invalid_definition). Publishing a flow that was never live also activates it when the plan has a free live-flow slot (403 plan_limit_reached otherwise). Fires flow.published, and flow.activated when it went live. Send {} as the body.",
|
|
1786
|
+
"method": "POST",
|
|
1787
|
+
"path": "/flows/{id}/publish",
|
|
1788
|
+
"scope": "write",
|
|
1789
|
+
"kind": "destructive",
|
|
1790
|
+
"hasBody": false,
|
|
1791
|
+
"where": {
|
|
1792
|
+
"path": [
|
|
1793
|
+
"id"
|
|
1794
|
+
],
|
|
1795
|
+
"query": [],
|
|
1796
|
+
"body": []
|
|
1797
|
+
},
|
|
1798
|
+
"inputSchema": {
|
|
1799
|
+
"type": "object",
|
|
1800
|
+
"properties": {
|
|
1801
|
+
"id": {
|
|
1802
|
+
"type": "integer",
|
|
1803
|
+
"description": "Numeric id."
|
|
1804
|
+
}
|
|
1805
|
+
},
|
|
1806
|
+
"required": [
|
|
1807
|
+
"id"
|
|
1808
|
+
],
|
|
1809
|
+
"additionalProperties": false
|
|
1810
|
+
}
|
|
1811
|
+
},
|
|
1812
|
+
{
|
|
1813
|
+
"name": "activate_flow",
|
|
1814
|
+
"description": "Activate a flow. Sets the flow live. Publishes the draft first when there is one, exactly like the builder's toggle. Plans cap live flows (403 plan_limit_reached). Send {} as the body.",
|
|
1815
|
+
"method": "POST",
|
|
1816
|
+
"path": "/flows/{id}/activate",
|
|
1817
|
+
"scope": "write",
|
|
1818
|
+
"kind": "destructive",
|
|
1819
|
+
"hasBody": false,
|
|
1820
|
+
"where": {
|
|
1821
|
+
"path": [
|
|
1822
|
+
"id"
|
|
1823
|
+
],
|
|
1824
|
+
"query": [],
|
|
1825
|
+
"body": []
|
|
1826
|
+
},
|
|
1827
|
+
"inputSchema": {
|
|
1828
|
+
"type": "object",
|
|
1829
|
+
"properties": {
|
|
1830
|
+
"id": {
|
|
1831
|
+
"type": "integer",
|
|
1832
|
+
"description": "Numeric id."
|
|
1833
|
+
}
|
|
1834
|
+
},
|
|
1835
|
+
"required": [
|
|
1836
|
+
"id"
|
|
1837
|
+
],
|
|
1838
|
+
"additionalProperties": false
|
|
1839
|
+
}
|
|
1840
|
+
},
|
|
1841
|
+
{
|
|
1842
|
+
"name": "pause_flow",
|
|
1843
|
+
"description": "Pause a flow. Stops the flow and cancels its open sessions. A linked comment trigger is paused with it. Fires flow.paused. Send {} as the body.",
|
|
1844
|
+
"method": "POST",
|
|
1845
|
+
"path": "/flows/{id}/pause",
|
|
1846
|
+
"scope": "write",
|
|
1847
|
+
"kind": "write",
|
|
1848
|
+
"hasBody": false,
|
|
1849
|
+
"where": {
|
|
1850
|
+
"path": [
|
|
1851
|
+
"id"
|
|
1852
|
+
],
|
|
1853
|
+
"query": [],
|
|
1854
|
+
"body": []
|
|
1855
|
+
},
|
|
1856
|
+
"inputSchema": {
|
|
1857
|
+
"type": "object",
|
|
1858
|
+
"properties": {
|
|
1859
|
+
"id": {
|
|
1860
|
+
"type": "integer",
|
|
1861
|
+
"description": "Numeric id."
|
|
1862
|
+
}
|
|
1863
|
+
},
|
|
1864
|
+
"required": [
|
|
1865
|
+
"id"
|
|
1866
|
+
],
|
|
1867
|
+
"additionalProperties": false
|
|
1868
|
+
}
|
|
1869
|
+
},
|
|
1870
|
+
{
|
|
1871
|
+
"name": "get_flow_analytics",
|
|
1872
|
+
"description": "Get flow analytics. The builder's Analytics panel for one flow: runs, completions, completion rate and median time for the window, the same numbers for the preceding window (comparison), lifetime totals, outcomes (emails and phones collected, leads marked, bookings, link clicks, handoffs), per-node reach, continue, response and loss rates, and per-port branch splits. Analytics are per published version: version defaults to the current one; versions lists the others. Only sessions with tracking are counted; other_version_runs_excluded says how many ran under another version in the window.",
|
|
1873
|
+
"method": "GET",
|
|
1874
|
+
"path": "/flows/{id}/analytics",
|
|
1875
|
+
"scope": "read",
|
|
1876
|
+
"kind": "read",
|
|
1877
|
+
"hasBody": false,
|
|
1878
|
+
"where": {
|
|
1879
|
+
"path": [
|
|
1880
|
+
"id"
|
|
1881
|
+
],
|
|
1882
|
+
"query": [
|
|
1883
|
+
"range",
|
|
1884
|
+
"channel",
|
|
1885
|
+
"version"
|
|
1886
|
+
],
|
|
1887
|
+
"body": []
|
|
1888
|
+
},
|
|
1889
|
+
"inputSchema": {
|
|
1890
|
+
"type": "object",
|
|
1891
|
+
"properties": {
|
|
1892
|
+
"id": {
|
|
1893
|
+
"type": "integer",
|
|
1894
|
+
"description": "Numeric id."
|
|
1895
|
+
},
|
|
1896
|
+
"range": {
|
|
1897
|
+
"type": "string",
|
|
1898
|
+
"enum": [
|
|
1899
|
+
"7d",
|
|
1900
|
+
"30d",
|
|
1901
|
+
"90d",
|
|
1902
|
+
"all"
|
|
1903
|
+
],
|
|
1904
|
+
"default": "30d",
|
|
1905
|
+
"description": "Window: 7d, 30d, 90d or all. Default 30d. Comparison is null for all."
|
|
1906
|
+
},
|
|
1907
|
+
"channel": {
|
|
1908
|
+
"type": "string",
|
|
1909
|
+
"enum": [
|
|
1910
|
+
"facebook",
|
|
1911
|
+
"instagram",
|
|
1912
|
+
"whatsapp"
|
|
1913
|
+
],
|
|
1914
|
+
"description": "Only sessions on this channel."
|
|
1915
|
+
},
|
|
1916
|
+
"version": {
|
|
1917
|
+
"type": "integer",
|
|
1918
|
+
"minimum": 1,
|
|
1919
|
+
"description": "A published version number from versions[]. Default: the current version."
|
|
1920
|
+
}
|
|
1921
|
+
},
|
|
1922
|
+
"required": [
|
|
1923
|
+
"id"
|
|
1924
|
+
],
|
|
1925
|
+
"additionalProperties": false
|
|
1926
|
+
}
|
|
1927
|
+
},
|
|
1928
|
+
{
|
|
1929
|
+
"name": "list_flow_sessions",
|
|
1930
|
+
"description": "List flow sessions. One session per person per run of a flow. Attribution carries post_id, comment_id and matched_keyword only, never what anyone typed.",
|
|
1931
|
+
"method": "GET",
|
|
1932
|
+
"path": "/flow-sessions",
|
|
1933
|
+
"scope": "read",
|
|
1934
|
+
"kind": "read",
|
|
1935
|
+
"hasBody": false,
|
|
1936
|
+
"where": {
|
|
1937
|
+
"path": [],
|
|
1938
|
+
"query": [
|
|
1939
|
+
"flow_id",
|
|
1940
|
+
"status",
|
|
1941
|
+
"channel",
|
|
1942
|
+
"contact_id",
|
|
1943
|
+
"updated_since",
|
|
1944
|
+
"limit",
|
|
1945
|
+
"starting_after"
|
|
1946
|
+
],
|
|
1947
|
+
"body": []
|
|
1948
|
+
},
|
|
1949
|
+
"inputSchema": {
|
|
1950
|
+
"type": "object",
|
|
1951
|
+
"properties": {
|
|
1952
|
+
"flow_id": {
|
|
1953
|
+
"type": "integer",
|
|
1954
|
+
"description": "One flow."
|
|
1955
|
+
},
|
|
1956
|
+
"status": {
|
|
1957
|
+
"type": "string",
|
|
1958
|
+
"enum": [
|
|
1959
|
+
"waiting_input",
|
|
1960
|
+
"delayed",
|
|
1961
|
+
"completed",
|
|
1962
|
+
"expired",
|
|
1963
|
+
"cancelled"
|
|
1964
|
+
],
|
|
1965
|
+
"description": "Session status."
|
|
1966
|
+
},
|
|
1967
|
+
"channel": {
|
|
1968
|
+
"type": "string",
|
|
1969
|
+
"enum": [
|
|
1970
|
+
"facebook",
|
|
1971
|
+
"instagram",
|
|
1972
|
+
"whatsapp"
|
|
1973
|
+
],
|
|
1974
|
+
"description": "Session channel."
|
|
1975
|
+
},
|
|
1976
|
+
"contact_id": {
|
|
1977
|
+
"type": "integer",
|
|
1978
|
+
"description": "Sessions for one contact. Unknown contact is a 404."
|
|
1979
|
+
},
|
|
1980
|
+
"updated_since": {
|
|
1981
|
+
"type": "string",
|
|
1982
|
+
"format": "date-time",
|
|
1983
|
+
"description": "ISO-8601 UTC."
|
|
1984
|
+
},
|
|
1985
|
+
"limit": {
|
|
1986
|
+
"type": "integer",
|
|
1987
|
+
"minimum": 1,
|
|
1988
|
+
"maximum": 100,
|
|
1989
|
+
"default": 25,
|
|
1990
|
+
"description": "Page size, 1 to 100. Default 25."
|
|
1991
|
+
},
|
|
1992
|
+
"starting_after": {
|
|
1993
|
+
"type": "string",
|
|
1994
|
+
"description": "The next_cursor from the previous page."
|
|
1995
|
+
}
|
|
1996
|
+
},
|
|
1997
|
+
"additionalProperties": false
|
|
1998
|
+
}
|
|
1999
|
+
},
|
|
2000
|
+
{
|
|
2001
|
+
"name": "list_comment_triggers",
|
|
2002
|
+
"description": "List comment triggers. Standalone comment triggers, newest first, each with the flows linked to it. A flow whose own trigger node carries keywords (native) is not a trigger and appears only on /flows as a comment source with mode native.",
|
|
2003
|
+
"method": "GET",
|
|
2004
|
+
"path": "/comment-triggers",
|
|
2005
|
+
"scope": "read",
|
|
2006
|
+
"kind": "read",
|
|
2007
|
+
"hasBody": false,
|
|
2008
|
+
"where": {
|
|
2009
|
+
"path": [],
|
|
2010
|
+
"query": [
|
|
2011
|
+
"platform",
|
|
2012
|
+
"source_type",
|
|
2013
|
+
"active",
|
|
2014
|
+
"post_id",
|
|
2015
|
+
"limit",
|
|
2016
|
+
"starting_after"
|
|
2017
|
+
],
|
|
2018
|
+
"body": []
|
|
2019
|
+
},
|
|
2020
|
+
"inputSchema": {
|
|
2021
|
+
"type": "object",
|
|
2022
|
+
"properties": {
|
|
2023
|
+
"platform": {
|
|
2024
|
+
"type": "string",
|
|
2025
|
+
"enum": [
|
|
2026
|
+
"instagram",
|
|
2027
|
+
"facebook"
|
|
2028
|
+
],
|
|
2029
|
+
"description": "Triggers that fire on this channel (a both trigger matches either)."
|
|
2030
|
+
},
|
|
2031
|
+
"source_type": {
|
|
2032
|
+
"type": "string",
|
|
2033
|
+
"enum": [
|
|
2034
|
+
"comment",
|
|
2035
|
+
"story",
|
|
2036
|
+
"both",
|
|
2037
|
+
"live"
|
|
2038
|
+
],
|
|
2039
|
+
"description": "What the trigger listens to."
|
|
2040
|
+
},
|
|
2041
|
+
"active": {
|
|
2042
|
+
"type": "boolean",
|
|
2043
|
+
"description": "true for live triggers only, false for paused."
|
|
2044
|
+
},
|
|
2045
|
+
"post_id": {
|
|
2046
|
+
"type": "string",
|
|
2047
|
+
"description": "Triggers scoped to this post."
|
|
2048
|
+
},
|
|
2049
|
+
"limit": {
|
|
2050
|
+
"type": "integer",
|
|
2051
|
+
"minimum": 1,
|
|
2052
|
+
"maximum": 100,
|
|
2053
|
+
"default": 25,
|
|
2054
|
+
"description": "Page size, 1 to 100. Default 25."
|
|
2055
|
+
},
|
|
2056
|
+
"starting_after": {
|
|
2057
|
+
"type": "string",
|
|
2058
|
+
"description": "The next_cursor from the previous page."
|
|
2059
|
+
}
|
|
2060
|
+
},
|
|
2061
|
+
"additionalProperties": false
|
|
2062
|
+
}
|
|
2063
|
+
},
|
|
2064
|
+
{
|
|
2065
|
+
"name": "get_comment_trigger_stats",
|
|
2066
|
+
"description": "Get comment trigger stats. Lifetime counters for one trigger: fires, public replies, DMs (and how many were AI-written), link clicks, unique people, split by channel.",
|
|
2067
|
+
"method": "GET",
|
|
2068
|
+
"path": "/comment-triggers/{id}/stats",
|
|
2069
|
+
"scope": "read",
|
|
2070
|
+
"kind": "read",
|
|
2071
|
+
"hasBody": false,
|
|
2072
|
+
"where": {
|
|
2073
|
+
"path": [
|
|
2074
|
+
"id"
|
|
2075
|
+
],
|
|
2076
|
+
"query": [],
|
|
2077
|
+
"body": []
|
|
2078
|
+
},
|
|
2079
|
+
"inputSchema": {
|
|
2080
|
+
"type": "object",
|
|
2081
|
+
"properties": {
|
|
2082
|
+
"id": {
|
|
2083
|
+
"type": "integer",
|
|
2084
|
+
"description": "Numeric id."
|
|
2085
|
+
}
|
|
2086
|
+
},
|
|
2087
|
+
"required": [
|
|
2088
|
+
"id"
|
|
2089
|
+
],
|
|
2090
|
+
"additionalProperties": false
|
|
2091
|
+
}
|
|
2092
|
+
},
|
|
2093
|
+
{
|
|
2094
|
+
"name": "list_recent_posts",
|
|
2095
|
+
"description": "List recent posts. Recent posts and Reels on the connected Instagram or Facebook account, newest first, straight from Meta. Use an id as post_id when creating a trigger scoped to one post. 409 not_connected when that channel is not connected.",
|
|
2096
|
+
"method": "GET",
|
|
2097
|
+
"path": "/recent-posts",
|
|
2098
|
+
"scope": "read",
|
|
2099
|
+
"kind": "read",
|
|
2100
|
+
"hasBody": false,
|
|
2101
|
+
"where": {
|
|
2102
|
+
"path": [],
|
|
2103
|
+
"query": [
|
|
2104
|
+
"platform",
|
|
2105
|
+
"limit",
|
|
2106
|
+
"starting_after"
|
|
2107
|
+
],
|
|
2108
|
+
"body": []
|
|
2109
|
+
},
|
|
2110
|
+
"inputSchema": {
|
|
2111
|
+
"type": "object",
|
|
2112
|
+
"properties": {
|
|
2113
|
+
"platform": {
|
|
2114
|
+
"type": "string",
|
|
2115
|
+
"enum": [
|
|
2116
|
+
"instagram",
|
|
2117
|
+
"facebook"
|
|
2118
|
+
],
|
|
2119
|
+
"default": "instagram",
|
|
2120
|
+
"description": "Which account. Default instagram."
|
|
2121
|
+
},
|
|
2122
|
+
"limit": {
|
|
2123
|
+
"type": "integer",
|
|
2124
|
+
"minimum": 1,
|
|
2125
|
+
"maximum": 50,
|
|
2126
|
+
"default": 25,
|
|
2127
|
+
"description": "1 to 50. Default 25."
|
|
2128
|
+
},
|
|
2129
|
+
"starting_after": {
|
|
2130
|
+
"type": "string",
|
|
2131
|
+
"description": "The next_cursor from the previous page (a Meta cursor)."
|
|
2132
|
+
}
|
|
2133
|
+
},
|
|
2134
|
+
"additionalProperties": false
|
|
2135
|
+
}
|
|
2136
|
+
},
|
|
2137
|
+
{
|
|
2138
|
+
"name": "list_handled_comments",
|
|
2139
|
+
"description": "List handled comments. Comments the AI Comment Manager handled, newest first, kept 30 days. Each carries the comment, its sentiment, what moderation did, the AI draft, and what happened to the reply. status=pending is the approval queue.",
|
|
2140
|
+
"method": "GET",
|
|
2141
|
+
"path": "/comments",
|
|
2142
|
+
"scope": "read",
|
|
2143
|
+
"kind": "read",
|
|
2144
|
+
"hasBody": false,
|
|
2145
|
+
"where": {
|
|
2146
|
+
"path": [],
|
|
2147
|
+
"query": [
|
|
2148
|
+
"status",
|
|
2149
|
+
"channel",
|
|
2150
|
+
"post_id",
|
|
2151
|
+
"since",
|
|
2152
|
+
"limit",
|
|
2153
|
+
"starting_after"
|
|
2154
|
+
],
|
|
2155
|
+
"body": []
|
|
2156
|
+
},
|
|
2157
|
+
"inputSchema": {
|
|
2158
|
+
"type": "object",
|
|
2159
|
+
"properties": {
|
|
2160
|
+
"status": {
|
|
2161
|
+
"type": "string",
|
|
2162
|
+
"enum": [
|
|
2163
|
+
"pending",
|
|
2164
|
+
"approved",
|
|
2165
|
+
"rejected",
|
|
2166
|
+
"sent",
|
|
2167
|
+
"failed",
|
|
2168
|
+
"skipped",
|
|
2169
|
+
"moderated"
|
|
2170
|
+
],
|
|
2171
|
+
"description": "Where the comment is."
|
|
2172
|
+
},
|
|
2173
|
+
"channel": {
|
|
2174
|
+
"type": "string",
|
|
2175
|
+
"enum": [
|
|
2176
|
+
"instagram",
|
|
2177
|
+
"facebook"
|
|
2178
|
+
],
|
|
2179
|
+
"description": "instagram or facebook."
|
|
2180
|
+
},
|
|
2181
|
+
"post_id": {
|
|
2182
|
+
"type": "string",
|
|
2183
|
+
"description": "Comments on one post."
|
|
2184
|
+
},
|
|
2185
|
+
"since": {
|
|
2186
|
+
"type": "string",
|
|
2187
|
+
"format": "date-time",
|
|
2188
|
+
"description": "ISO-8601 UTC on created_at."
|
|
2189
|
+
},
|
|
2190
|
+
"limit": {
|
|
2191
|
+
"type": "integer",
|
|
2192
|
+
"minimum": 1,
|
|
2193
|
+
"maximum": 100,
|
|
2194
|
+
"default": 25,
|
|
2195
|
+
"description": "Page size, 1 to 100. Default 25."
|
|
2196
|
+
},
|
|
2197
|
+
"starting_after": {
|
|
2198
|
+
"type": "string",
|
|
2199
|
+
"description": "The next_cursor from the previous page."
|
|
2200
|
+
}
|
|
2201
|
+
},
|
|
2202
|
+
"additionalProperties": false
|
|
2203
|
+
}
|
|
2204
|
+
},
|
|
2205
|
+
{
|
|
2206
|
+
"name": "approve_comment_reply",
|
|
2207
|
+
"description": "Approve a reply. Posts the pending reply publicly under the comment, as the account. Send {\"text\": \"...\"} to post an edited reply instead of the AI draft; the draft is kept and edited becomes true. Only a pending comment can be approved (409 not_pending). A successful send counts against the plan's reply cap. Send Content-Type: application/json with an empty object when not editing; the server refuses a bodiless POST.",
|
|
2208
|
+
"method": "POST",
|
|
2209
|
+
"path": "/comments/{id}/approve",
|
|
2210
|
+
"scope": "write",
|
|
2211
|
+
"kind": "destructive",
|
|
2212
|
+
"hasBody": true,
|
|
2213
|
+
"where": {
|
|
2214
|
+
"path": [
|
|
2215
|
+
"id"
|
|
2216
|
+
],
|
|
2217
|
+
"query": [],
|
|
2218
|
+
"body": [
|
|
2219
|
+
"text"
|
|
2220
|
+
]
|
|
2221
|
+
},
|
|
2222
|
+
"inputSchema": {
|
|
2223
|
+
"type": "object",
|
|
2224
|
+
"properties": {
|
|
2225
|
+
"id": {
|
|
2226
|
+
"type": "integer",
|
|
2227
|
+
"description": "Numeric id."
|
|
2228
|
+
},
|
|
2229
|
+
"text": {
|
|
2230
|
+
"type": "string",
|
|
2231
|
+
"description": "Post this instead of the AI draft."
|
|
2232
|
+
}
|
|
2233
|
+
},
|
|
2234
|
+
"required": [
|
|
2235
|
+
"id"
|
|
2236
|
+
],
|
|
2237
|
+
"additionalProperties": false
|
|
2238
|
+
}
|
|
2239
|
+
},
|
|
2240
|
+
{
|
|
2241
|
+
"name": "reject_comment_reply",
|
|
2242
|
+
"description": "Reject a reply. Drops the pending draft. Nothing is posted. Only a pending comment can be rejected (409 not_pending). Send an empty JSON object as the body.",
|
|
2243
|
+
"method": "POST",
|
|
2244
|
+
"path": "/comments/{id}/reject",
|
|
2245
|
+
"scope": "write",
|
|
2246
|
+
"kind": "write",
|
|
2247
|
+
"hasBody": false,
|
|
2248
|
+
"where": {
|
|
2249
|
+
"path": [
|
|
2250
|
+
"id"
|
|
2251
|
+
],
|
|
2252
|
+
"query": [],
|
|
2253
|
+
"body": []
|
|
2254
|
+
},
|
|
2255
|
+
"inputSchema": {
|
|
2256
|
+
"type": "object",
|
|
2257
|
+
"properties": {
|
|
2258
|
+
"id": {
|
|
2259
|
+
"type": "integer",
|
|
2260
|
+
"description": "Numeric id."
|
|
2261
|
+
}
|
|
2262
|
+
},
|
|
2263
|
+
"required": [
|
|
2264
|
+
"id"
|
|
2265
|
+
],
|
|
2266
|
+
"additionalProperties": false
|
|
2267
|
+
}
|
|
2268
|
+
},
|
|
2269
|
+
{
|
|
2270
|
+
"name": "list_posts",
|
|
2271
|
+
"description": "List posts. Content Studio posts, newest first, each with its media. status=scheduled is the queue, status=failed needs attention.",
|
|
2272
|
+
"method": "GET",
|
|
2273
|
+
"path": "/posts",
|
|
2274
|
+
"scope": "read",
|
|
2275
|
+
"kind": "read",
|
|
2276
|
+
"hasBody": false,
|
|
2277
|
+
"where": {
|
|
2278
|
+
"path": [],
|
|
2279
|
+
"query": [
|
|
2280
|
+
"status",
|
|
2281
|
+
"platform",
|
|
2282
|
+
"post_type",
|
|
2283
|
+
"limit",
|
|
2284
|
+
"starting_after"
|
|
2285
|
+
],
|
|
2286
|
+
"body": []
|
|
2287
|
+
},
|
|
2288
|
+
"inputSchema": {
|
|
2289
|
+
"type": "object",
|
|
2290
|
+
"properties": {
|
|
2291
|
+
"status": {
|
|
2292
|
+
"type": "string",
|
|
2293
|
+
"enum": [
|
|
2294
|
+
"draft",
|
|
2295
|
+
"scheduled",
|
|
2296
|
+
"publishing",
|
|
2297
|
+
"published",
|
|
2298
|
+
"failed",
|
|
2299
|
+
"cancelled"
|
|
2300
|
+
],
|
|
2301
|
+
"description": "Where the post is."
|
|
2302
|
+
},
|
|
2303
|
+
"platform": {
|
|
2304
|
+
"type": "string",
|
|
2305
|
+
"enum": [
|
|
2306
|
+
"instagram",
|
|
2307
|
+
"facebook",
|
|
2308
|
+
"both",
|
|
2309
|
+
"tiktok",
|
|
2310
|
+
"instagram_tiktok",
|
|
2311
|
+
"facebook_tiktok",
|
|
2312
|
+
"all"
|
|
2313
|
+
],
|
|
2314
|
+
"description": "The stored platform value (a target set)."
|
|
2315
|
+
},
|
|
2316
|
+
"post_type": {
|
|
2317
|
+
"type": "string",
|
|
2318
|
+
"enum": [
|
|
2319
|
+
"feed_post",
|
|
2320
|
+
"carousel",
|
|
2321
|
+
"reels",
|
|
2322
|
+
"story"
|
|
2323
|
+
],
|
|
2324
|
+
"description": "Post type."
|
|
2325
|
+
},
|
|
2326
|
+
"limit": {
|
|
2327
|
+
"type": "integer",
|
|
2328
|
+
"minimum": 1,
|
|
2329
|
+
"maximum": 100,
|
|
2330
|
+
"default": 25,
|
|
2331
|
+
"description": "Page size, 1 to 100. Default 25."
|
|
2332
|
+
},
|
|
2333
|
+
"starting_after": {
|
|
2334
|
+
"type": "string",
|
|
2335
|
+
"description": "The next_cursor from the previous page."
|
|
2336
|
+
}
|
|
2337
|
+
},
|
|
2338
|
+
"additionalProperties": false
|
|
2339
|
+
}
|
|
2340
|
+
},
|
|
2341
|
+
{
|
|
2342
|
+
"name": "get_post",
|
|
2343
|
+
"description": "Get a post. One post with its media, published ids and any error.",
|
|
2344
|
+
"method": "GET",
|
|
2345
|
+
"path": "/posts/{id}",
|
|
2346
|
+
"scope": "read",
|
|
2347
|
+
"kind": "read",
|
|
2348
|
+
"hasBody": false,
|
|
2349
|
+
"where": {
|
|
2350
|
+
"path": [
|
|
2351
|
+
"id"
|
|
2352
|
+
],
|
|
2353
|
+
"query": [],
|
|
2354
|
+
"body": []
|
|
2355
|
+
},
|
|
2356
|
+
"inputSchema": {
|
|
2357
|
+
"type": "object",
|
|
2358
|
+
"properties": {
|
|
2359
|
+
"id": {
|
|
2360
|
+
"type": "integer",
|
|
2361
|
+
"description": "Numeric id."
|
|
2362
|
+
}
|
|
2363
|
+
},
|
|
2364
|
+
"required": [
|
|
2365
|
+
"id"
|
|
2366
|
+
],
|
|
2367
|
+
"additionalProperties": false
|
|
2368
|
+
}
|
|
2369
|
+
},
|
|
2370
|
+
{
|
|
2371
|
+
"name": "get_posting_capabilities",
|
|
2372
|
+
"description": "Get posting capabilities. What to read before building a post: which targets are connected, the TikTok creator's allowed privacy levels and video limit (live from TikTok, with a safe fallback), the post types, and the plan's monthly post cap and storage cap with current usage.",
|
|
2373
|
+
"method": "GET",
|
|
2374
|
+
"path": "/posts/capabilities",
|
|
2375
|
+
"scope": "read",
|
|
2376
|
+
"kind": "read",
|
|
2377
|
+
"hasBody": false,
|
|
2378
|
+
"where": {
|
|
2379
|
+
"path": [],
|
|
2380
|
+
"query": [],
|
|
2381
|
+
"body": []
|
|
2382
|
+
},
|
|
2383
|
+
"inputSchema": {
|
|
2384
|
+
"type": "object",
|
|
2385
|
+
"properties": {},
|
|
2386
|
+
"additionalProperties": false
|
|
2387
|
+
}
|
|
2388
|
+
},
|
|
2389
|
+
{
|
|
2390
|
+
"name": "create_post",
|
|
2391
|
+
"description": "Create a post. Creates a draft, or a scheduled post when scheduled_at is set (ISO-8601 with offset; a bare local time is read in the account timezone). Upload media afterwards with POST /posts/{id}/media, then publish or schedule. Rules: TikTok-only posts cannot be a carousel or story and carry no first comment or comment auto-reply; scheduling needs a caption (stories excepted) and a future time; the plan's monthly cap counts scheduled and published posts, a plain draft never holds a slot; a comment auto-reply on a scheduled post needs a free live comment-trigger slot (403 plan_limit_reached). tiktok.privacy_level must be one of the creator's options from GET /posts/capabilities.",
|
|
2392
|
+
"method": "POST",
|
|
2393
|
+
"path": "/posts",
|
|
2394
|
+
"scope": "write",
|
|
2395
|
+
"kind": "write",
|
|
2396
|
+
"hasBody": true,
|
|
2397
|
+
"where": {
|
|
2398
|
+
"path": [],
|
|
2399
|
+
"query": [],
|
|
2400
|
+
"body": [
|
|
2401
|
+
"platform",
|
|
2402
|
+
"post_type",
|
|
2403
|
+
"caption",
|
|
2404
|
+
"hashtags",
|
|
2405
|
+
"scheduled_at",
|
|
2406
|
+
"first_comment",
|
|
2407
|
+
"collaborators",
|
|
2408
|
+
"comment_auto_reply",
|
|
2409
|
+
"cover_offset_ms",
|
|
2410
|
+
"tiktok"
|
|
2411
|
+
]
|
|
2412
|
+
},
|
|
2413
|
+
"inputSchema": {
|
|
2414
|
+
"type": "object",
|
|
2415
|
+
"properties": {
|
|
2416
|
+
"platform": {
|
|
2417
|
+
"type": "string",
|
|
2418
|
+
"enum": [
|
|
2419
|
+
"instagram",
|
|
2420
|
+
"facebook",
|
|
2421
|
+
"both",
|
|
2422
|
+
"tiktok",
|
|
2423
|
+
"instagram_tiktok",
|
|
2424
|
+
"facebook_tiktok",
|
|
2425
|
+
"all"
|
|
2426
|
+
],
|
|
2427
|
+
"default": "instagram",
|
|
2428
|
+
"description": "A target set. both = Instagram + Facebook; all = all three."
|
|
2429
|
+
},
|
|
2430
|
+
"post_type": {
|
|
2431
|
+
"type": "string",
|
|
2432
|
+
"enum": [
|
|
2433
|
+
"feed_post",
|
|
2434
|
+
"carousel",
|
|
2435
|
+
"reels",
|
|
2436
|
+
"story"
|
|
2437
|
+
],
|
|
2438
|
+
"default": "feed_post"
|
|
2439
|
+
},
|
|
2440
|
+
"caption": {
|
|
2441
|
+
"type": "string",
|
|
2442
|
+
"maxLength": 2200
|
|
2443
|
+
},
|
|
2444
|
+
"hashtags": {
|
|
2445
|
+
"type": "array",
|
|
2446
|
+
"items": {
|
|
2447
|
+
"type": "string"
|
|
2448
|
+
},
|
|
2449
|
+
"description": "Without the #."
|
|
2450
|
+
},
|
|
2451
|
+
"scheduled_at": {
|
|
2452
|
+
"type": [
|
|
2453
|
+
"string",
|
|
2454
|
+
"null"
|
|
2455
|
+
],
|
|
2456
|
+
"format": "date-time",
|
|
2457
|
+
"description": "ISO-8601. Null on PATCH turns a scheduled post back into a draft."
|
|
2458
|
+
},
|
|
2459
|
+
"first_comment": {
|
|
2460
|
+
"type": [
|
|
2461
|
+
"string",
|
|
2462
|
+
"null"
|
|
2463
|
+
],
|
|
2464
|
+
"description": "Posted under the post right after publish. Instagram and Facebook only."
|
|
2465
|
+
},
|
|
2466
|
+
"collaborators": {
|
|
2467
|
+
"type": "array",
|
|
2468
|
+
"items": {
|
|
2469
|
+
"type": "string"
|
|
2470
|
+
},
|
|
2471
|
+
"maxItems": 3,
|
|
2472
|
+
"description": "Instagram usernames to invite as collaborators. Instagram only."
|
|
2473
|
+
},
|
|
2474
|
+
"comment_auto_reply": {
|
|
2475
|
+
"type": "object",
|
|
2476
|
+
"properties": {
|
|
2477
|
+
"keywords": {
|
|
2478
|
+
"type": "array",
|
|
2479
|
+
"items": {
|
|
2480
|
+
"type": "string"
|
|
2481
|
+
},
|
|
2482
|
+
"minItems": 1
|
|
2483
|
+
},
|
|
2484
|
+
"match_type": {
|
|
2485
|
+
"type": "string",
|
|
2486
|
+
"enum": [
|
|
2487
|
+
"exact",
|
|
2488
|
+
"contains",
|
|
2489
|
+
"fuzzy"
|
|
2490
|
+
],
|
|
2491
|
+
"default": "contains"
|
|
2492
|
+
},
|
|
2493
|
+
"response_mode": {
|
|
2494
|
+
"type": "string",
|
|
2495
|
+
"enum": [
|
|
2496
|
+
"both",
|
|
2497
|
+
"public_only",
|
|
2498
|
+
"dm_only"
|
|
2499
|
+
],
|
|
2500
|
+
"default": "both"
|
|
2501
|
+
},
|
|
2502
|
+
"public_replies": {
|
|
2503
|
+
"type": "array",
|
|
2504
|
+
"items": {
|
|
2505
|
+
"type": "string"
|
|
2506
|
+
}
|
|
2507
|
+
},
|
|
2508
|
+
"dm_templates": {
|
|
2509
|
+
"type": "array",
|
|
2510
|
+
"items": {
|
|
2511
|
+
"type": "string"
|
|
2512
|
+
}
|
|
2513
|
+
},
|
|
2514
|
+
"buttons": {
|
|
2515
|
+
"type": "array",
|
|
2516
|
+
"items": {
|
|
2517
|
+
"type": "object",
|
|
2518
|
+
"properties": {
|
|
2519
|
+
"title": {
|
|
2520
|
+
"type": "string",
|
|
2521
|
+
"maxLength": 20
|
|
2522
|
+
},
|
|
2523
|
+
"type": {
|
|
2524
|
+
"type": "string",
|
|
2525
|
+
"enum": [
|
|
2526
|
+
"text",
|
|
2527
|
+
"url"
|
|
2528
|
+
]
|
|
2529
|
+
},
|
|
2530
|
+
"response": {
|
|
2531
|
+
"type": "string"
|
|
2532
|
+
},
|
|
2533
|
+
"url": {
|
|
2534
|
+
"type": "string",
|
|
2535
|
+
"format": "uri"
|
|
2536
|
+
}
|
|
2537
|
+
},
|
|
2538
|
+
"required": [
|
|
2539
|
+
"title"
|
|
2540
|
+
]
|
|
2541
|
+
},
|
|
2542
|
+
"description": "At least two for any DM mode."
|
|
2543
|
+
}
|
|
2544
|
+
},
|
|
2545
|
+
"required": [
|
|
2546
|
+
"keywords"
|
|
2547
|
+
],
|
|
2548
|
+
"description": "Becomes a comment trigger scoped to this post when it publishes. Instagram and Facebook only."
|
|
2549
|
+
},
|
|
2550
|
+
"cover_offset_ms": {
|
|
2551
|
+
"type": [
|
|
2552
|
+
"integer",
|
|
2553
|
+
"null"
|
|
2554
|
+
],
|
|
2555
|
+
"description": "Reels: which frame is the cover."
|
|
2556
|
+
},
|
|
2557
|
+
"tiktok": {
|
|
2558
|
+
"type": "object",
|
|
2559
|
+
"properties": {
|
|
2560
|
+
"privacy_level": {
|
|
2561
|
+
"type": "string",
|
|
2562
|
+
"enum": [
|
|
2563
|
+
"PUBLIC_TO_EVERYONE",
|
|
2564
|
+
"MUTUAL_FOLLOW_FRIENDS",
|
|
2565
|
+
"FOLLOWER_OF_CREATOR",
|
|
2566
|
+
"SELF_ONLY"
|
|
2567
|
+
],
|
|
2568
|
+
"description": "Must be one of the creator's options from GET /posts/capabilities."
|
|
2569
|
+
},
|
|
2570
|
+
"title": {
|
|
2571
|
+
"type": "string",
|
|
2572
|
+
"maxLength": 150,
|
|
2573
|
+
"description": "Defaults to the first 150 characters of the caption."
|
|
2574
|
+
},
|
|
2575
|
+
"allow_comments": {
|
|
2576
|
+
"type": "boolean"
|
|
2577
|
+
},
|
|
2578
|
+
"allow_duet": {
|
|
2579
|
+
"type": "boolean"
|
|
2580
|
+
},
|
|
2581
|
+
"allow_stitch": {
|
|
2582
|
+
"type": "boolean"
|
|
2583
|
+
},
|
|
2584
|
+
"content_disclosure": {
|
|
2585
|
+
"type": "boolean",
|
|
2586
|
+
"description": "The \"promote yourself or a third party\" disclosure. When true, set promote_self and/or promote_third_party."
|
|
2587
|
+
},
|
|
2588
|
+
"promote_self": {
|
|
2589
|
+
"type": "boolean"
|
|
2590
|
+
},
|
|
2591
|
+
"promote_third_party": {
|
|
2592
|
+
"type": "boolean"
|
|
2593
|
+
}
|
|
2594
|
+
},
|
|
2595
|
+
"description": "TikTok settings. Ignored unless TikTok is a target."
|
|
2596
|
+
}
|
|
2597
|
+
},
|
|
2598
|
+
"additionalProperties": false
|
|
2599
|
+
}
|
|
2600
|
+
},
|
|
2601
|
+
{
|
|
2602
|
+
"name": "update_post",
|
|
2603
|
+
"description": "Update a post. Edit a draft, scheduled or failed post (409 not_editable otherwise). Send only what changes; tiktok merges field by field; other arrays and objects replace. scheduled_at set moves or schedules it (post.scheduled fires); scheduled_at null turns a scheduled post back into a draft.",
|
|
2604
|
+
"method": "PATCH",
|
|
2605
|
+
"path": "/posts/{id}",
|
|
2606
|
+
"scope": "write",
|
|
2607
|
+
"kind": "write",
|
|
2608
|
+
"hasBody": true,
|
|
2609
|
+
"where": {
|
|
2610
|
+
"path": [
|
|
2611
|
+
"id"
|
|
2612
|
+
],
|
|
2613
|
+
"query": [],
|
|
2614
|
+
"body": [
|
|
2615
|
+
"platform",
|
|
2616
|
+
"post_type",
|
|
2617
|
+
"caption",
|
|
2618
|
+
"hashtags",
|
|
2619
|
+
"scheduled_at",
|
|
2620
|
+
"first_comment",
|
|
2621
|
+
"collaborators",
|
|
2622
|
+
"comment_auto_reply",
|
|
2623
|
+
"cover_offset_ms",
|
|
2624
|
+
"tiktok"
|
|
2625
|
+
]
|
|
2626
|
+
},
|
|
2627
|
+
"inputSchema": {
|
|
2628
|
+
"type": "object",
|
|
2629
|
+
"properties": {
|
|
2630
|
+
"id": {
|
|
2631
|
+
"type": "integer",
|
|
2632
|
+
"description": "Numeric id."
|
|
2633
|
+
},
|
|
2634
|
+
"platform": {
|
|
2635
|
+
"type": "string",
|
|
2636
|
+
"enum": [
|
|
2637
|
+
"instagram",
|
|
2638
|
+
"facebook",
|
|
2639
|
+
"both",
|
|
2640
|
+
"tiktok",
|
|
2641
|
+
"instagram_tiktok",
|
|
2642
|
+
"facebook_tiktok",
|
|
2643
|
+
"all"
|
|
2644
|
+
],
|
|
2645
|
+
"default": "instagram",
|
|
2646
|
+
"description": "A target set. both = Instagram + Facebook; all = all three."
|
|
2647
|
+
},
|
|
2648
|
+
"post_type": {
|
|
2649
|
+
"type": "string",
|
|
2650
|
+
"enum": [
|
|
2651
|
+
"feed_post",
|
|
2652
|
+
"carousel",
|
|
2653
|
+
"reels",
|
|
2654
|
+
"story"
|
|
2655
|
+
],
|
|
2656
|
+
"default": "feed_post"
|
|
2657
|
+
},
|
|
2658
|
+
"caption": {
|
|
2659
|
+
"type": "string",
|
|
2660
|
+
"maxLength": 2200
|
|
2661
|
+
},
|
|
2662
|
+
"hashtags": {
|
|
2663
|
+
"type": "array",
|
|
2664
|
+
"items": {
|
|
2665
|
+
"type": "string"
|
|
2666
|
+
},
|
|
2667
|
+
"description": "Without the #."
|
|
2668
|
+
},
|
|
2669
|
+
"scheduled_at": {
|
|
2670
|
+
"type": [
|
|
2671
|
+
"string",
|
|
2672
|
+
"null"
|
|
2673
|
+
],
|
|
2674
|
+
"format": "date-time",
|
|
2675
|
+
"description": "ISO-8601. Null on PATCH turns a scheduled post back into a draft."
|
|
2676
|
+
},
|
|
2677
|
+
"first_comment": {
|
|
2678
|
+
"type": [
|
|
2679
|
+
"string",
|
|
2680
|
+
"null"
|
|
2681
|
+
],
|
|
2682
|
+
"description": "Posted under the post right after publish. Instagram and Facebook only."
|
|
2683
|
+
},
|
|
2684
|
+
"collaborators": {
|
|
2685
|
+
"type": "array",
|
|
2686
|
+
"items": {
|
|
2687
|
+
"type": "string"
|
|
2688
|
+
},
|
|
2689
|
+
"maxItems": 3,
|
|
2690
|
+
"description": "Instagram usernames to invite as collaborators. Instagram only."
|
|
2691
|
+
},
|
|
2692
|
+
"comment_auto_reply": {
|
|
2693
|
+
"type": "object",
|
|
2694
|
+
"properties": {
|
|
2695
|
+
"keywords": {
|
|
2696
|
+
"type": "array",
|
|
2697
|
+
"items": {
|
|
2698
|
+
"type": "string"
|
|
2699
|
+
},
|
|
2700
|
+
"minItems": 1
|
|
2701
|
+
},
|
|
2702
|
+
"match_type": {
|
|
2703
|
+
"type": "string",
|
|
2704
|
+
"enum": [
|
|
2705
|
+
"exact",
|
|
2706
|
+
"contains",
|
|
2707
|
+
"fuzzy"
|
|
2708
|
+
],
|
|
2709
|
+
"default": "contains"
|
|
2710
|
+
},
|
|
2711
|
+
"response_mode": {
|
|
2712
|
+
"type": "string",
|
|
2713
|
+
"enum": [
|
|
2714
|
+
"both",
|
|
2715
|
+
"public_only",
|
|
2716
|
+
"dm_only"
|
|
2717
|
+
],
|
|
2718
|
+
"default": "both"
|
|
2719
|
+
},
|
|
2720
|
+
"public_replies": {
|
|
2721
|
+
"type": "array",
|
|
2722
|
+
"items": {
|
|
2723
|
+
"type": "string"
|
|
2724
|
+
}
|
|
2725
|
+
},
|
|
2726
|
+
"dm_templates": {
|
|
2727
|
+
"type": "array",
|
|
2728
|
+
"items": {
|
|
2729
|
+
"type": "string"
|
|
2730
|
+
}
|
|
2731
|
+
},
|
|
2732
|
+
"buttons": {
|
|
2733
|
+
"type": "array",
|
|
2734
|
+
"items": {
|
|
2735
|
+
"type": "object",
|
|
2736
|
+
"properties": {
|
|
2737
|
+
"title": {
|
|
2738
|
+
"type": "string",
|
|
2739
|
+
"maxLength": 20
|
|
2740
|
+
},
|
|
2741
|
+
"type": {
|
|
2742
|
+
"type": "string",
|
|
2743
|
+
"enum": [
|
|
2744
|
+
"text",
|
|
2745
|
+
"url"
|
|
2746
|
+
]
|
|
2747
|
+
},
|
|
2748
|
+
"response": {
|
|
2749
|
+
"type": "string"
|
|
2750
|
+
},
|
|
2751
|
+
"url": {
|
|
2752
|
+
"type": "string",
|
|
2753
|
+
"format": "uri"
|
|
2754
|
+
}
|
|
2755
|
+
},
|
|
2756
|
+
"required": [
|
|
2757
|
+
"title"
|
|
2758
|
+
]
|
|
2759
|
+
},
|
|
2760
|
+
"description": "At least two for any DM mode."
|
|
2761
|
+
}
|
|
2762
|
+
},
|
|
2763
|
+
"required": [
|
|
2764
|
+
"keywords"
|
|
2765
|
+
],
|
|
2766
|
+
"description": "Becomes a comment trigger scoped to this post when it publishes. Instagram and Facebook only."
|
|
2767
|
+
},
|
|
2768
|
+
"cover_offset_ms": {
|
|
2769
|
+
"type": [
|
|
2770
|
+
"integer",
|
|
2771
|
+
"null"
|
|
2772
|
+
],
|
|
2773
|
+
"description": "Reels: which frame is the cover."
|
|
2774
|
+
},
|
|
2775
|
+
"tiktok": {
|
|
2776
|
+
"type": "object",
|
|
2777
|
+
"properties": {
|
|
2778
|
+
"privacy_level": {
|
|
2779
|
+
"type": "string",
|
|
2780
|
+
"enum": [
|
|
2781
|
+
"PUBLIC_TO_EVERYONE",
|
|
2782
|
+
"MUTUAL_FOLLOW_FRIENDS",
|
|
2783
|
+
"FOLLOWER_OF_CREATOR",
|
|
2784
|
+
"SELF_ONLY"
|
|
2785
|
+
],
|
|
2786
|
+
"description": "Must be one of the creator's options from GET /posts/capabilities."
|
|
2787
|
+
},
|
|
2788
|
+
"title": {
|
|
2789
|
+
"type": "string",
|
|
2790
|
+
"maxLength": 150,
|
|
2791
|
+
"description": "Defaults to the first 150 characters of the caption."
|
|
2792
|
+
},
|
|
2793
|
+
"allow_comments": {
|
|
2794
|
+
"type": "boolean"
|
|
2795
|
+
},
|
|
2796
|
+
"allow_duet": {
|
|
2797
|
+
"type": "boolean"
|
|
2798
|
+
},
|
|
2799
|
+
"allow_stitch": {
|
|
2800
|
+
"type": "boolean"
|
|
2801
|
+
},
|
|
2802
|
+
"content_disclosure": {
|
|
2803
|
+
"type": "boolean",
|
|
2804
|
+
"description": "The \"promote yourself or a third party\" disclosure. When true, set promote_self and/or promote_third_party."
|
|
2805
|
+
},
|
|
2806
|
+
"promote_self": {
|
|
2807
|
+
"type": "boolean"
|
|
2808
|
+
},
|
|
2809
|
+
"promote_third_party": {
|
|
2810
|
+
"type": "boolean"
|
|
2811
|
+
}
|
|
2812
|
+
},
|
|
2813
|
+
"description": "TikTok settings. Ignored unless TikTok is a target."
|
|
2814
|
+
}
|
|
2815
|
+
},
|
|
2816
|
+
"required": [
|
|
2817
|
+
"id"
|
|
2818
|
+
],
|
|
2819
|
+
"additionalProperties": false
|
|
2820
|
+
}
|
|
2821
|
+
},
|
|
2822
|
+
{
|
|
2823
|
+
"name": "schedule_post",
|
|
2824
|
+
"description": "Schedule a post. Sets or moves the publish time of a draft, failed or scheduled post. The scheduler publishes it within a minute of that time. Same rules as scheduling on create. post.scheduled fires.",
|
|
2825
|
+
"method": "POST",
|
|
2826
|
+
"path": "/posts/{id}/schedule",
|
|
2827
|
+
"scope": "write",
|
|
2828
|
+
"kind": "destructive",
|
|
2829
|
+
"hasBody": true,
|
|
2830
|
+
"where": {
|
|
2831
|
+
"path": [
|
|
2832
|
+
"id"
|
|
2833
|
+
],
|
|
2834
|
+
"query": [],
|
|
2835
|
+
"body": [
|
|
2836
|
+
"scheduled_at"
|
|
2837
|
+
]
|
|
2838
|
+
},
|
|
2839
|
+
"inputSchema": {
|
|
2840
|
+
"type": "object",
|
|
2841
|
+
"properties": {
|
|
2842
|
+
"id": {
|
|
2843
|
+
"type": "integer",
|
|
2844
|
+
"description": "Numeric id."
|
|
2845
|
+
},
|
|
2846
|
+
"scheduled_at": {
|
|
2847
|
+
"type": "string",
|
|
2848
|
+
"format": "date-time"
|
|
2849
|
+
}
|
|
2850
|
+
},
|
|
2851
|
+
"required": [
|
|
2852
|
+
"id",
|
|
2853
|
+
"scheduled_at"
|
|
2854
|
+
],
|
|
2855
|
+
"additionalProperties": false
|
|
2856
|
+
}
|
|
2857
|
+
},
|
|
2858
|
+
{
|
|
2859
|
+
"name": "publish_post",
|
|
2860
|
+
"description": "Publish a post now. Publishes to every target at once, the portal's Publish Now. Needs a caption (stories excepted), media for any Instagram target, and two or more items for a carousel (400). A draft, scheduled or failed post can be published (409 not_editable otherwise). When a platform rejects it the post becomes failed and the call is 422 publish_failed with the post and per-platform results. post.published or post.failed fires either way. Send {} as the body.",
|
|
2861
|
+
"method": "POST",
|
|
2862
|
+
"path": "/posts/{id}/publish",
|
|
2863
|
+
"scope": "write",
|
|
2864
|
+
"kind": "destructive",
|
|
2865
|
+
"hasBody": false,
|
|
2866
|
+
"where": {
|
|
2867
|
+
"path": [
|
|
2868
|
+
"id"
|
|
2869
|
+
],
|
|
2870
|
+
"query": [],
|
|
2871
|
+
"body": []
|
|
2872
|
+
},
|
|
2873
|
+
"inputSchema": {
|
|
2874
|
+
"type": "object",
|
|
2875
|
+
"properties": {
|
|
2876
|
+
"id": {
|
|
2877
|
+
"type": "integer",
|
|
2878
|
+
"description": "Numeric id."
|
|
2879
|
+
}
|
|
2880
|
+
},
|
|
2881
|
+
"required": [
|
|
2882
|
+
"id"
|
|
2883
|
+
],
|
|
2884
|
+
"additionalProperties": false
|
|
2885
|
+
}
|
|
2886
|
+
},
|
|
2887
|
+
{
|
|
2888
|
+
"name": "list_faqs",
|
|
2889
|
+
"description": "List FAQs. Question and answer pairs the AI answers from. Active only by default.",
|
|
2890
|
+
"method": "GET",
|
|
2891
|
+
"path": "/knowledge/faqs",
|
|
2892
|
+
"scope": "read",
|
|
2893
|
+
"kind": "read",
|
|
2894
|
+
"hasBody": false,
|
|
2895
|
+
"where": {
|
|
2896
|
+
"path": [],
|
|
2897
|
+
"query": [
|
|
2898
|
+
"include_inactive",
|
|
2899
|
+
"limit",
|
|
2900
|
+
"starting_after"
|
|
2901
|
+
],
|
|
2902
|
+
"body": []
|
|
2903
|
+
},
|
|
2904
|
+
"inputSchema": {
|
|
2905
|
+
"type": "object",
|
|
2906
|
+
"properties": {
|
|
2907
|
+
"include_inactive": {
|
|
2908
|
+
"type": "boolean",
|
|
2909
|
+
"description": "Include items switched off. Default false."
|
|
2910
|
+
},
|
|
2911
|
+
"limit": {
|
|
2912
|
+
"type": "integer",
|
|
2913
|
+
"minimum": 1,
|
|
2914
|
+
"maximum": 100,
|
|
2915
|
+
"default": 25,
|
|
2916
|
+
"description": "Page size, 1 to 100. Default 25."
|
|
2917
|
+
},
|
|
2918
|
+
"starting_after": {
|
|
2919
|
+
"type": "string",
|
|
2920
|
+
"description": "The next_cursor from the previous page."
|
|
2921
|
+
}
|
|
2922
|
+
},
|
|
2923
|
+
"additionalProperties": false
|
|
2924
|
+
}
|
|
2925
|
+
},
|
|
2926
|
+
{
|
|
2927
|
+
"name": "create_faq",
|
|
2928
|
+
"description": "Create an FAQ. Counts against the plan cap. The answer is embedded for retrieval right away; embedding_pending is true if indexing is still catching up.",
|
|
2929
|
+
"method": "POST",
|
|
2930
|
+
"path": "/knowledge/faqs",
|
|
2931
|
+
"scope": "write",
|
|
2932
|
+
"kind": "write",
|
|
2933
|
+
"hasBody": true,
|
|
2934
|
+
"where": {
|
|
2935
|
+
"path": [],
|
|
2936
|
+
"query": [],
|
|
2937
|
+
"body": [
|
|
2938
|
+
"question",
|
|
2939
|
+
"answer",
|
|
2940
|
+
"keywords",
|
|
2941
|
+
"category_id",
|
|
2942
|
+
"active"
|
|
2943
|
+
]
|
|
2944
|
+
},
|
|
2945
|
+
"inputSchema": {
|
|
2946
|
+
"type": "object",
|
|
2947
|
+
"properties": {
|
|
2948
|
+
"question": {
|
|
2949
|
+
"type": "string",
|
|
2950
|
+
"maxLength": 1000
|
|
2951
|
+
},
|
|
2952
|
+
"answer": {
|
|
2953
|
+
"type": "string",
|
|
2954
|
+
"maxLength": 10000
|
|
2955
|
+
},
|
|
2956
|
+
"keywords": {
|
|
2957
|
+
"type": [
|
|
2958
|
+
"string",
|
|
2959
|
+
"null"
|
|
2960
|
+
],
|
|
2961
|
+
"maxLength": 1000,
|
|
2962
|
+
"description": "Comma-separated hints for matching."
|
|
2963
|
+
},
|
|
2964
|
+
"category_id": {
|
|
2965
|
+
"type": [
|
|
2966
|
+
"integer",
|
|
2967
|
+
"null"
|
|
2968
|
+
]
|
|
2969
|
+
},
|
|
2970
|
+
"active": {
|
|
2971
|
+
"type": "boolean"
|
|
2972
|
+
}
|
|
2973
|
+
},
|
|
2974
|
+
"required": [
|
|
2975
|
+
"question",
|
|
2976
|
+
"answer"
|
|
2977
|
+
],
|
|
2978
|
+
"additionalProperties": false
|
|
2979
|
+
}
|
|
2980
|
+
},
|
|
2981
|
+
{
|
|
2982
|
+
"name": "update_faq",
|
|
2983
|
+
"description": "Update an FAQ. Partial update. Changing question, answer or keywords re-embeds it; changing only active does not.",
|
|
2984
|
+
"method": "PATCH",
|
|
2985
|
+
"path": "/knowledge/faqs/{id}",
|
|
2986
|
+
"scope": "write",
|
|
2987
|
+
"kind": "write",
|
|
2988
|
+
"hasBody": true,
|
|
2989
|
+
"where": {
|
|
2990
|
+
"path": [
|
|
2991
|
+
"id"
|
|
2992
|
+
],
|
|
2993
|
+
"query": [],
|
|
2994
|
+
"body": [
|
|
2995
|
+
"question",
|
|
2996
|
+
"answer",
|
|
2997
|
+
"keywords",
|
|
2998
|
+
"category_id",
|
|
2999
|
+
"active"
|
|
3000
|
+
]
|
|
3001
|
+
},
|
|
3002
|
+
"inputSchema": {
|
|
3003
|
+
"type": "object",
|
|
3004
|
+
"properties": {
|
|
3005
|
+
"id": {
|
|
3006
|
+
"type": "integer",
|
|
3007
|
+
"description": "Numeric id."
|
|
3008
|
+
},
|
|
3009
|
+
"question": {
|
|
3010
|
+
"type": "string",
|
|
3011
|
+
"maxLength": 1000
|
|
3012
|
+
},
|
|
3013
|
+
"answer": {
|
|
3014
|
+
"type": "string",
|
|
3015
|
+
"maxLength": 10000
|
|
3016
|
+
},
|
|
3017
|
+
"keywords": {
|
|
3018
|
+
"type": [
|
|
3019
|
+
"string",
|
|
3020
|
+
"null"
|
|
3021
|
+
],
|
|
3022
|
+
"maxLength": 1000,
|
|
3023
|
+
"description": "Comma-separated hints for matching."
|
|
3024
|
+
},
|
|
3025
|
+
"category_id": {
|
|
3026
|
+
"type": [
|
|
3027
|
+
"integer",
|
|
3028
|
+
"null"
|
|
3029
|
+
]
|
|
3030
|
+
},
|
|
3031
|
+
"active": {
|
|
3032
|
+
"type": "boolean"
|
|
3033
|
+
}
|
|
3034
|
+
},
|
|
3035
|
+
"required": [
|
|
3036
|
+
"id"
|
|
3037
|
+
],
|
|
3038
|
+
"additionalProperties": false
|
|
3039
|
+
}
|
|
3040
|
+
},
|
|
3041
|
+
{
|
|
3042
|
+
"name": "list_services",
|
|
3043
|
+
"description": "List services. Services and pricing the AI can quote and, with booking on, offer. Active only by default.",
|
|
3044
|
+
"method": "GET",
|
|
3045
|
+
"path": "/knowledge/services",
|
|
3046
|
+
"scope": "read",
|
|
3047
|
+
"kind": "read",
|
|
3048
|
+
"hasBody": false,
|
|
3049
|
+
"where": {
|
|
3050
|
+
"path": [],
|
|
3051
|
+
"query": [
|
|
3052
|
+
"include_inactive",
|
|
3053
|
+
"limit",
|
|
3054
|
+
"starting_after"
|
|
3055
|
+
],
|
|
3056
|
+
"body": []
|
|
3057
|
+
},
|
|
3058
|
+
"inputSchema": {
|
|
3059
|
+
"type": "object",
|
|
3060
|
+
"properties": {
|
|
3061
|
+
"include_inactive": {
|
|
3062
|
+
"type": "boolean",
|
|
3063
|
+
"description": "Include items switched off. Default false."
|
|
3064
|
+
},
|
|
3065
|
+
"limit": {
|
|
3066
|
+
"type": "integer",
|
|
3067
|
+
"minimum": 1,
|
|
3068
|
+
"maximum": 100,
|
|
3069
|
+
"default": 25,
|
|
3070
|
+
"description": "Page size, 1 to 100. Default 25."
|
|
3071
|
+
},
|
|
3072
|
+
"starting_after": {
|
|
3073
|
+
"type": "string",
|
|
3074
|
+
"description": "The next_cursor from the previous page."
|
|
3075
|
+
}
|
|
3076
|
+
},
|
|
3077
|
+
"additionalProperties": false
|
|
3078
|
+
}
|
|
3079
|
+
},
|
|
3080
|
+
{
|
|
3081
|
+
"name": "list_knowledge_gaps",
|
|
3082
|
+
"description": "List knowledge gaps. Questions the AI could not answer well, flagged by the gap detector with the customer message, the AI reply, a canonical form of the question, and a suggested answer and target. Open gaps by default; status=all for everything. Read-only: fix a gap with POST /knowledge/faqs or by editing identity.instructions, and dismiss it in the portal.",
|
|
3083
|
+
"method": "GET",
|
|
3084
|
+
"path": "/knowledge-gaps",
|
|
3085
|
+
"scope": "read",
|
|
3086
|
+
"kind": "read",
|
|
3087
|
+
"hasBody": false,
|
|
3088
|
+
"where": {
|
|
3089
|
+
"path": [],
|
|
3090
|
+
"query": [
|
|
3091
|
+
"status",
|
|
3092
|
+
"signal_type",
|
|
3093
|
+
"channel",
|
|
3094
|
+
"since",
|
|
3095
|
+
"limit",
|
|
3096
|
+
"starting_after"
|
|
3097
|
+
],
|
|
3098
|
+
"body": []
|
|
3099
|
+
},
|
|
3100
|
+
"inputSchema": {
|
|
3101
|
+
"type": "object",
|
|
3102
|
+
"properties": {
|
|
3103
|
+
"status": {
|
|
3104
|
+
"type": "string",
|
|
3105
|
+
"enum": [
|
|
3106
|
+
"pending",
|
|
3107
|
+
"open",
|
|
3108
|
+
"resolved",
|
|
3109
|
+
"dismissed",
|
|
3110
|
+
"all"
|
|
3111
|
+
],
|
|
3112
|
+
"default": "open",
|
|
3113
|
+
"description": "Default open. Use all for every status."
|
|
3114
|
+
},
|
|
3115
|
+
"signal_type": {
|
|
3116
|
+
"type": "string",
|
|
3117
|
+
"enum": [
|
|
3118
|
+
"no_knowledge",
|
|
3119
|
+
"weak_match",
|
|
3120
|
+
"negative_feedback",
|
|
3121
|
+
"escalation"
|
|
3122
|
+
],
|
|
3123
|
+
"description": "Why it was flagged."
|
|
3124
|
+
},
|
|
3125
|
+
"channel": {
|
|
3126
|
+
"type": "string",
|
|
3127
|
+
"enum": [
|
|
3128
|
+
"facebook",
|
|
3129
|
+
"instagram",
|
|
3130
|
+
"sms",
|
|
3131
|
+
"telegram",
|
|
3132
|
+
"whatsapp"
|
|
3133
|
+
],
|
|
3134
|
+
"description": "Channel the question came in on."
|
|
3135
|
+
},
|
|
3136
|
+
"since": {
|
|
3137
|
+
"type": "string",
|
|
3138
|
+
"format": "date-time",
|
|
3139
|
+
"description": "ISO-8601 UTC on last_seen_at."
|
|
3140
|
+
},
|
|
3141
|
+
"limit": {
|
|
3142
|
+
"type": "integer",
|
|
3143
|
+
"minimum": 1,
|
|
3144
|
+
"maximum": 100,
|
|
3145
|
+
"default": 25,
|
|
3146
|
+
"description": "Page size, 1 to 100. Default 25."
|
|
3147
|
+
},
|
|
3148
|
+
"starting_after": {
|
|
3149
|
+
"type": "string",
|
|
3150
|
+
"description": "The next_cursor from the previous page."
|
|
3151
|
+
}
|
|
3152
|
+
},
|
|
3153
|
+
"additionalProperties": false
|
|
3154
|
+
}
|
|
3155
|
+
}
|
|
3156
|
+
]
|
|
3157
|
+
}
|