generated from peter-evans/swagger-github-pages
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathswagger.yaml
14595 lines (14536 loc) · 452 KB
/
swagger.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
openapi: "3.0.0"
info:
title: "Amity Social Cloud SDK"
description: |
<h2>Using Amity APIs</h2>
<p>
Our API documentation explains all API endpoints used in Amity Social Cloud. All APIs, with the exception of some authentication APIs, require an access token for authentication and authorization. APIs can be used either in Admin or User context. When used in user context, you will only be able to fetch data related to that user only.
For Administrators who are using our API documentation in making server-to-server API calls, you need an Admin Access token to connect to the Amity server. Refer to
<a href="https://docs.amity.co/console/settings#admin-api-access-token" target="_blank">this documentation</a>
for the instructions on how to generate an admin access token.
</p>
<p>
All backend endpoints that support Amity SDK are included here. To easily differentiate the type of each endpoint, we added a prefix in each endpoint's path.
</p>
<ul>
<li>REST API Endpoint: /v1/, /v2/, /v3/, or /v4/...</li>
<li>Webhook Event: /webhook/...</li>
</ul>
<hr>
<h2><strong>Schema Definitions</strong></h2>
<p>
This section provides detailed descriptions of the key schemas used in Amity Social Cloud. Understanding these schemas is essential for effectively integrating our features into your applications. Each schema entry includes a concise description and highlights its core functionality and relationships within the platform. These definitions will help you grasp the structure and purpose of various components, ensuring a seamless and efficient development experience.
</p>
<h3><strong>User</strong></h3>
<p>A User represents an individual who interacts with the Amity Social Cloud. Users can create profiles, join communities, post content, comment, react, and engage with other users.</p>
<h3>Role</strong></h3>
<p>A Role defines the permissions and access levels for Users within the Amity Social Cloud. Roles can be assigned to manage and moderate content, ensuring a controlled and safe environment for all users.</p>
<h3><strong>Channel</strong></h3>
<p>A Channel is a primary structure used to implement various chat messaging capabilities within an application. Channels serve as containers for Subchannels, enabling a hierarchical organization of conversations. This structure allows developers to manage and navigate different chat threads efficiently.</p>
<h3><strong>Subchannel</strong></h3>
<p>A Subchannel is a subdivision within a Channel for specific conversation threads. Subchannels host all messages and interactions, providing organized discussions within a larger channel. Users can individually create, update, delete, and manage subchannels. Moderation actions, such as banning and muting, are applied at the channel level, affecting all subchannels.</p>
<h3><strong>ChannelUser</strong></h3>
<p>A ChannelUser represents an individual user within a specific Channel. This schema tracks user participation, roles, and permissions within the channel. Each ChannelUser can interact in subchannels, participate in discussions, and engage with other members. Users can be assigned roles with varying permissions, such as admin, moderator, or member, allowing for tailored access and control. Moderation actions like banning or muting a ChannelUser affect their participation across all subchannels within the channel.</p>
<h3>Message</strong></h3>
<p>A Message facilitates real-time communication among channel users. Messages can contain up to 20,000 characters or weigh up to 100KB for custom content. For larger binary data, such as files, it's recommended to upload the data to a cloud storage service like AWS S3 and include the URL in the message. The SDK supports various message types, including text and image, built on a standard message layer.</p>
<h3>Community</strong></h3>
<p>A Community is a feature that allows users to share their posts and comments and engage with each other within the app. Communities provide a dedicated space for discussing specific topics or interests.</p>
<h3>CommunityUser</strong></h3>
<p>A CommunityUser represents an individual user within a specific Community. This schema tracks user participation, roles, and interactions within the community. CommunityUsers can join public or private communities, participate in discussions, and engage with other members. Each user can have different roles with varying permissions, such as admin, moderator, or member, which control their access and actions within the community. Moderation actions, like banning or muting, can be applied to CommunityUsers to maintain a safe and respectful environment.</p>
<h3>CommunityCategory</strong></h3>
<p>A CommunityCategory helps organize and manage communities by categorizing them into specific groups. This categorization allows users to easily sort and filter communities based on their interests or needs.</p>
<h3>Post</strong></h3>
<p>A Post is a piece of content created and shared by a user within a network or community. Posts can include text, images, videos, or other elements. Users can create, view, and interact with posts in a social feed, which can be displayed in chronological order and customized using various settings. Post types supported by Amity include text, image, video, file, live stream, poll, and custom posts. The parent post serves as a container for text data, while each multimedia element (e.g., image, video) is treated as a separate child post. Both parent and child posts support reactions and comments, allowing users to engage comprehensively with content.</p>
<h3>Comment</strong></h3>
<p>A Comment in Amity Social Cloud is a user-generated response to specific content, such as a post or story. Comments enable users to engage in conversations, express thoughts, opinions, and emotions, fostering a sense of community around the content.</p>
<p><strong>Comment Reference Types:</strong></p>
<ul>
<li><strong>Post Type Comment:</strong> Designed for regular posts like text updates, photos, or videos. These comments are associated with the post and displayed beneath it, promoting conversation and interaction.</li>
<li><strong>Story Type Comment:</strong> Similar to post type comments but associated with stories, driving user engagement and discussion around short-lived content.</li>
<li><strong>Content Type Comment:</strong> Intended for content-specific such as articles or specialized content, providing a more organized and contextual commenting experience.</li>
</ul>
<h3><strong>Reaction</strong></h3>
<p>A Reaction is a user interaction on messages, posts, or comments, such as like, dislike, or love. The type of reactions is customizable. Currently, reactions are supported for Posts, Messages, and Comments.</p>
<p><strong>Reaction Reference Types:</strong></p>
<ul>
<li><strong>Comment Reference Type:</strong> Allows users to query reactions on a specific comment, showing how others have responded to it.</li>
<li><strong>Post Reference Type:</strong> Allows users to query reactions on a specific post, highlighting user engagement with the post.</li>
<li><strong>Story Reference Type:</strong> Allows users to query reactions on a specific story, showing user reactions to the story.</li>
</ul>
<h3><strong>File</strong></h3>
<p>A File in Amity Social Cloud supports file upload and download, enabling file-sharing within applications. It handles various file types, including images, videos, audio, and documents, with a maximum size of 1 GB. This functionality allows users to share files directly in chats or social feeds, enhancing engagement and interaction.</p>
<h3><strong>Follow</strong></h3>
<p>A Follow schema in Amity Social Cloud defines one-directional relationships between users, essential for social networking features. When user A follows user B, user A can see user B's updates in their feed, but user B does not need to reciprocate. This schema helps manage visibility and accessibility of user-generated content in user feeds.</p>
<hr>
<h2>Select Region Endpoint</h2>
<p>
Before making server-to-server API calls, be sure to select the correct API endpoint for your region in the <strong>Servers</strong> dropdown below.
</p>
version: "4.92.0"
servers:
- url: "https://apix.us.amity.co"
description: "API Endpoint for US Region"
- url: "https://apix.eu.amity.co"
description: "API Endpoint for EU Region"
- url: "https://apix.sg.amity.co"
description: "API Endpoint for SG Region"
paths:
/api/v1/ads/me:
get:
summary: Query all network ads and settings
tags:
- Ads
responses:
"200":
description: All ads information and ads settings
content:
application/json:
schema:
$ref: "./v1/ads/response.yaml#/QueryAllAdsResponsePayload"
/api/v1/analytics/activities:
post:
summary: send analytic activities
description:
"Send a batch of analytic activities to the server, currently only support viewing post/story and story link clicked activities.
\n - For viewing post/story activity, the `impression` and `reach` of the post/story will be updated list
of users from `/api/v1/analytics/views/posts/{postId}/users` will be updated too. (but not immediately)"
tags:
- Analytic
security:
- BearerAuth: []
requestBody:
description: ""
required: true
content:
application/json:
schema:
type: object
properties:
activities:
type: array
minItems: 1
maxItems: 1000
items:
type: object
properties:
contentId:
type: string
pattern: '^[a-f\d]{24}$'
example: 60e4b1b4b3b2b5c4c4b3b2b5
contentType:
type: string
enum: [post, story]
activityType:
type: string
enum: [view, linkClicked]
timestamp:
type: string
format: date-time
example: 2017-07-21T17:32:28Z
responses:
202:
description: ok, not returning any data
400:
$ref: "./global/error.yaml#/BadRequestError"
422:
$ref: "./global/error.yaml#/UnProcessableError"
500:
$ref: "./global/error.yaml#/UnexpectedError"
/api/v1/analytics/views/posts/{postId}/users:
get:
summary: query post reach
description:
"Query a list of users who have viewed certain post, the user who have been global banned,
community banned, or soft deleted will be excluded from the list of users. And if the post is soft deleted,
post owner will be able to view this list, but others can not."
tags:
- Analytic
security:
- BearerAuth: []
parameters:
- name: postId
in: path
required: true
schema:
type: string
pattern: '^[a-f\d]{24}$'
example: 60e4b1b4b3b2b5c4c4b3b2b5
- name: token
in: query
schema:
type: string
maxLength: 1000
example: "eyJhZnRlciI6eyJfaWQiOnsicG9zdElkIjoiNjUxNjZlZTNlOTVlZTQ4YjkzZWVkMjQ1IiwidXNlcklkIjoiNjUxNjZlZTRlOTVlZTQzZjgzZWVkMjViIn0sIm5ldHdvcmtJZCI6IjYwNmYzN2EzYWU2MDFlZjM3NGViYWEwMSIsInJlYWNoZWRBdCI6IjIwMjMtMDktMjlUMDY6Mjk6NTQuOTQ4WiJ9fQ=="
description: token of the page that you need from either `next` or `prev` of `paging`
- name: limit
in: query
schema:
type: number
default: 10
description: number of user in a page
responses:
200:
description: List of users who have viewed this posts
content:
application/json:
schema:
type: object
properties:
users:
type: array
items:
$ref: "./schema/user.yaml#/UserV3"
files:
type: array
items:
$ref: "./schema/file.yaml#/File"
paging:
type: object
properties:
next:
type: string
example: "eyJhZnRlciI6eyJfaWQiOnsicG9zdElkIjoiNjUxNjZlZTNlOTVlZTQ4YjkzZWVkMjQ1IiwidXNlcklkIjoiNjUxNjZlZTRlOTVlZTQzZjgzZWVkMjViIn0sIm5ldHdvcmtJZCI6IjYwNmYzN2EzYWU2MDFlZjM3NGViYWEwMSIsInJlYWNoZWRBdCI6IjIwMjMtMDktMjlUMDY6Mjk6NTQuOTQ4WiJ9fQ=="
previous:
type: string
example: "eyJhZnRlciI6eyJfaWQiOnsicG9zdElkIjoiNjUxNjZlZTNlOTVlZTQ4YjkzZWVkMjQ1IiwidXNlcklkIjoiNjUxNjZlZTRlOTVlZTQzZjgzZWVkMjViIn0sIm5ldHdvcmtJZCI6IjYwNmYzN2EzYWU2MDFlZjM3NGViYWEwMSIsInJlYWNoZWRBdCI6IjIwMjMtMDktMjlUMDY6Mjk6NTQuOTQ4WiJ9fQ=="
403:
$ref: "./global/error.yaml#/ForbiddenError"
404:
$ref: "./global/error.yaml#/NotFoundError"
422:
$ref: "./global/error.yaml#/UnProcessableError"
500:
$ref: "./global/error.yaml#/UnexpectedError"
/api/v1/analytics/views/stories/{storyId}/users:
get:
summary: query story reach
description:
"Query a list of users who have viewed certain story, the user who have been global banned,
community banned, or soft deleted will be excluded from the list of users. And if the post is soft deleted,
post owner will be able to view this list, but others can not."
tags:
- Analytic
security:
- BearerAuth: []
parameters:
- name: storyId
in: path
required: true
schema:
type: string
pattern: '^[a-f\d]{24}$'
example: 60e4b1b4b3b2b5c4c4b3b2b5
- name: token
in: query
schema:
type: string
maxLength: 1000
example: "eyJhZnRlciI6eyJfaWQiOnsicG9zdElkIjoiNjUxNjZlZTNlOTVlZTQ4YjkzZWVkMjQ1IiwidXNlcklkIjoiNjUxNjZlZTRlOTVlZTQzZjgzZWVkMjViIn0sIm5ldHdvcmtJZCI6IjYwNmYzN2EzYWU2MDFlZjM3NGViYWEwMSIsInJlYWNoZWRBdCI6IjIwMjMtMDktMjlUMDY6Mjk6NTQuOTQ4WiJ9fQ=="
description: token of the page that you need from either `next` or `prev` of `paging`
- name: limit
in: query
schema:
type: number
default: 10
description: number of user in a page
responses:
200:
description: List of users who have viewed this story
content:
application/json:
schema:
type: object
properties:
users:
type: array
items:
$ref: "./schema/user.yaml#/UserV3"
files:
type: array
items:
$ref: "./schema/file.yaml#/File"
paging:
type: object
properties:
next:
type: string
example: "eyJhZnRlciI6eyJfaWQiOnsicG9zdElkIjoiNjUxNjZlZTNlOTVlZTQ4YjkzZWVkMjQ1IiwidXNlcklkIjoiNjUxNjZlZTRlOTVlZTQzZjgzZWVkMjViIn0sIm5ldHdvcmtJZCI6IjYwNmYzN2EzYWU2MDFlZjM3NGViYWEwMSIsInJlYWNoZWRBdCI6IjIwMjMtMDktMjlUMDY6Mjk6NTQuOTQ4WiJ9fQ=="
previous:
type: string
example: "eyJhZnRlciI6eyJfaWQiOnsicG9zdElkIjoiNjUxNjZlZTNlOTVlZTQ4YjkzZWVkMjQ1IiwidXNlcklkIjoiNjUxNjZlZTRlOTVlZTQzZjgzZWVkMjViIn0sIm5ldHdvcmtJZCI6IjYwNmYzN2EzYWU2MDFlZjM3NGViYWEwMSIsInJlYWNoZWRBdCI6IjIwMjMtMDktMjlUMDY6Mjk6NTQuOTQ4WiJ9fQ=="
403:
$ref: "./global/error.yaml#/ForbiddenError"
404:
$ref: "./global/error.yaml#/NotFoundError"
422:
$ref: "./global/error.yaml#/UnProcessableError"
500:
$ref: "./global/error.yaml#/UnexpectedError"
/api/v3/authentication/token:
get:
summary: Get authentication token
deprecated: true
tags:
- Authentication
parameters:
- name: x-server-key
in: header
required: true
schema:
type: string
maxLength: 150
- in: query
name: userId
schema:
type: string
maxLength: 100
description: User id to get token for
responses:
"500":
description: Put a wrong request parameters.
content:
application/json:
schema:
type: object
properties:
status:
type: string
code:
type: string
message:
type: string
data:
type: object
properties:
detail:
type: array
items:
type: string
example:
status: error
code: 500000
message: Parameters error.
data:
detail:
- >-
The 'data.text' field length must be less than or equal to
20000 characters long.
"200":
description: Return string
content:
application/json:
schema:
type: string
example: s9qne0wEqVb2e05271177748659f574a4e8ab85e08
"403":
description: No permission to access this resource.
content:
application/json:
schema:
type: object
properties:
status:
type: string
code:
type: string
message:
type: string
data:
type: object
properties:
detail:
type: array
items:
type: string
example:
status: error
code: 400300
message: Forbidden error.
/api/v4/authentication/token:
post:
summary: "Create authentication token for session creation API"
tags:
- "Authentication"
parameters:
- name: "x-server-key"
in: "header"
required: true
schema:
type: "string"
description: "Create authentication token for session creation API. Token userId need to match userId when using it\n"
requestBody:
content:
application/json:
schema:
type: "object"
properties:
userId:
type: "string"
description: "User id to assign this token"
responses:
"200":
description: "Response payload"
content:
text/plain:
schema:
type: "string"
example: "s9qne0wEqVb2e05271177748659f574a4e8ab85e08"
description: "Use this token when create sessions"
"401":
description: "Unauthorized. Server key is invalid."
content:
text/plain:
schema:
type: "string"
example: "Unauthorized"
description: "Server key is invalid"
"403":
description: "Forbidden. Possibly that secure mode is disabled"
content:
application/json:
schema:
type: "object"
properties:
status:
type: "string"
message:
type: "string"
code:
type: "number"
data:
type: "object"
description: "error detail"
"422":
description: "Parameters validation error"
content:
application/json:
schema:
type: "object"
properties:
status:
type: "string"
message:
type: "string"
code:
type: "number"
data:
type: "object"
description: "error detail"
/api/v2/channels/{channelId}/close:
post:
summary: "close channel"
tags:
- "Channel"
security:
- BearerAuth: []
description: "Close channel\n"
parameters:
- name: "channelId"
in: "path"
required: true
schema:
type: "string"
responses:
"200":
description: "OK"
"403":
$ref: "./global/error.yaml#/PermissionDenidedError"
"429":
$ref: "./global/error.yaml#/RateLimitError"
"500":
$ref: "./global/error.yaml#/UnexpectedError"
/api/v2/channel/{channelId}/mute:
put:
summary: "Mute channel"
tags:
- "Channel"
security:
- BearerAuth: []
description: "Mute all users in channel for a specific period of time.\n"
parameters:
- name: "channelId"
in: "path"
required: true
schema:
type: "string"
requestBody:
description: "Information of channel to be muted and period\n"
required: true
content:
application/json:
schema:
type: "object"
properties:
mutePeriod:
type: "number"
description: "mute period (milliseconds)"
required:
- "mutePeriod"
responses:
"200":
$ref: "./v2/channel/response.yaml#/MuteApiResponse"
"429":
$ref: "./global/error.yaml#/RateLimitError"
"404":
$ref: "./global/error.yaml#/NotFoundError"
"500":
$ref: "./global/error.yaml#/UnexpectedError"
/api/v2/channel/{channelId}/users/mute:
put:
summary: "Mute user in channel"
tags:
- "Channel"
security:
- BearerAuth: []
description: "Mute a user in channel for a specific period of time.\n"
parameters:
- name: "channelId"
in: "path"
required: true
schema:
type: "string"
requestBody:
description: "Information of channel to be muted and period\n"
required: true
content:
application/json:
schema:
type: "object"
properties:
userIds:
type: "array"
items:
type: "string"
maxLength: 50
maxItems: 100
mutePeriod:
type: "number"
description: "mute period (milliseconds)"
required:
- "userIds"
- "mutePeriod"
responses:
"200":
$ref: "./v2/channel/response.yaml#/MuteApiResponse"
"429":
$ref: "./global/error.yaml#/RateLimitError"
"404":
$ref: "./global/error.yaml#/NotFoundError"
"500":
$ref: "./global/error.yaml#/UnexpectedError"
/api/v2/search/channels:
get:
tags:
- "Channel"
summary: "Search channels"
description: "Retrieve channels based on search criteria"
security:
- BearerAuth: []
parameters:
- $ref: "./v2/search-channel/parameter.yaml#/Query"
- $ref: "./v2/search-channel/parameter.yaml#/ExactMatch"
- $ref: "./v2/search-channel/parameter.yaml#/IsMemberOnly"
- $ref: "./v2/search-channel/parameter.yaml#/Types"
- $ref: "./v2/search-channel/parameter.yaml#/Tags"
- $ref: "./v2/search-channel/parameter.yaml#/Options"
responses:
"200":
$ref: "./v2/search-channel/response.yaml#/SearchChannelResponse"
"422":
description: "Parameters validation error"
/api/v3/channels:
get:
summary: "Query channel"
tags:
- "Channel"
security:
- BearerAuth: []
parameters:
- name: "keyword"
in: "query"
schema:
type: "string"
maxLength: 100
- name: "isDeleted"
in: "query"
schema:
type: "boolean"
default: null
description: "isDeleted:\n * `null(default)` - Show both channel is actived and channel is inactived.\n * `true` - Show channel is inactived only.\n * `false` - Show channel is actived only.\n"
- name: "tags"
in: "query"
schema:
type: "array"
maxItems: 10
items:
type: "string"
maxLength: 100
description: "Used for querying channels by matching all specified tags. When a query includes multiple tags (e.g., `tags=['tag1', 'tag2', 'tag3']`), the system will return all channels that have all the specified tags."
- name: "excludeTags"
in: "query"
schema:
type: "array"
maxItems: 10
items:
type: "string"
maxLength: 100
description: "Used for querying channels by excluding all specified tags. When a query includes multiple tags (e.g., `excludeTags=['tag1', 'tag2', 'tag3']`), the system will return all channels that do not have any of the specified tags."
- name: "filter"
in: "query"
schema:
type: "string"
enum:
- "all"
- "member"
- "notMember"
- "flagged"
default: "all"
- name: "types"
in: "query"
schema:
type: "array"
maxItems: 10
items:
type: "string"
enum:
- "standard"
- "private"
- "conversation"
- "broadcast"
- "live"
- "community"
- name: "userId"
in: "query"
schema:
type: "string"
maxLength: 100
- name: "sortBy"
in: "query"
schema:
type: "string"
enum:
- "lastActivity"
- "lastCreated"
- "firstCreated"
- "displayName"
default: "lastActivity"
- name: "options"
in: "query"
style: "deepObject"
schema:
type: "object"
properties:
limit:
type: "integer"
minimum: 1
maximum: 100
default: 10
token:
type: "string"
maxLength: 100
responses:
"200":
$ref: "./v3/channel/response.yaml#/ChannelPaginationApiResponse"
"403":
$ref: "./global/error.yaml#/PermissionDenidedError"
"429":
$ref: "./global/error.yaml#/RateLimitError"
"404":
$ref: "./global/error.yaml#/NotFoundError"
"500":
$ref: "./global/error.yaml#/UnexpectedError"
post:
summary: "Create channel"
tags:
- "Channel"
security:
- BearerAuth: []
requestBody:
description: "Information of channel to be created\n"
required: true
content:
application/json:
schema:
type: "object"
properties:
channelId:
type: "string"
maxLength: 100
description: "A unique identifier for the channel. Maximum length is 100 characters."
type:
type: "string"
enum:
- "community"
- "live"
- "broadcast"
default: "community"
description: "Type of the channel. Options are 'community', 'live', or 'broadcast'. Default is 'community'."
displayName:
type: "string"
maxLength: 100
description: "The display name for the channel. Maximum length is 100 characters."
avatarFileId:
type: "string"
maxLength: 50
description: "The ID of the file to be used as the channel's avatar. Maximum length is 50 characters."
metadata:
type: "object"
description: "Additional metadata associated with the channel. Can include custom properties."
tags:
type: "array"
maxItems: 10
items:
type: "string"
maxLength: 100
description: "List of tags associated with the channel. Maximum of 10 tags, each up to 100 characters long."
userIds:
type: "array"
maxItems: 1000
items:
type: "string"
maxLength: 50
description: "List of user IDs to be added to the channel. Maximum of 1000 user IDs, each up to 50 characters long."
isMuted:
type: "boolean"
description: "Indicates whether the channel is muted by default for all users."
messageAutoDeleteEnabled:
type: "boolean"
description: "Indicates whether automatic deletion of messages is enabled for the channel."
autoDeleteMessageByFlagLimit:
type: "number"
minimum: 1
maximum: 1000
description: "The number of flags required to automatically delete a message. Must be between 1 and 1000."
isPublic:
type: "boolean"
description: "Indicates whether the channel is public and visible to all users."
notificationMode:
type: "string"
enum:
- default
- silent
- subscribe
description: >
The notification mode for the channel:
* `default` - Automatically register push notifications.
* `silent` - Do not send notifications.
* `subscribe` - Send notifications only to subscribed users.
responses:
"200":
$ref: "./v3/channel/response.yaml#/ChannelsApiResponse"
"403":
description: Error Response
content:
application/json:
examples:
ForbiddenAvatarError:
$ref: "./global/error-example.yaml#/ForbiddenAvatarError"
PermissionDenidedError:
$ref: "./global/error-example.yaml#/PermissionDenidedError"
"429":
$ref: "./global/error.yaml#/RateLimitError"
"404":
$ref: "./global/error.yaml#/NotFoundError"
"500":
$ref: "./global/error.yaml#/UnexpectedError"
/api/v3/channels/{channelId}:
get:
summary: "get a channel by ID."
tags:
- "Channel"
security:
- BearerAuth: []
parameters:
- name: "channelId"
in: "path"
required: true
schema:
type: "string"
responses:
"200":
$ref: "./v3/channel/response.yaml#/ChannelsApiResponse"
"429":
$ref: "./global/error.yaml#/RateLimitError"
"404":
$ref: "./global/error.yaml#/NotFoundError"
"500":
$ref: "./global/error.yaml#/UnexpectedError"
put:
summary: "update a channel"
tags:
- "Channel"
security:
- BearerAuth: []
parameters:
- name: "channelId"
in: "path"
required: true
schema:
type: "string"
requestBody:
description: "Information of channel to be updated\n"
required: true
content:
application/json:
schema:
type: "object"
properties:
displayName:
type: "string"
maxLength: 100
avatarFileId:
type: "string"
maxLength: 50
metadata:
type: "object"
tags:
type: "array"
maxItems: 10
items:
type: "string"
maxLength: 100
messageAutoDeleteEnabled:
type: "boolean"
autoDeleteMessageByFlagLimit:
type: "number"
minimum: 1
maximum: 1000
notificationMode:
type: string
enum:
- default
- silent
- subscribe
description: >
Notification Mode:
* `default` - Auto register push notification.
* `silent` - Do not send notification.
* `subscribe` - Send notification to subscribed users only.
responses:
"200":
$ref: "./v3/channel/response.yaml#/ChannelsApiResponse"
"403":
description: Error Response
content:
application/json:
examples:
ForbiddenAvatarError:
$ref: "./global/error-example.yaml#/ForbiddenAvatarError"
PermissionDenidedError:
$ref: "./global/error-example.yaml#/PermissionDenidedError"
"429":
$ref: "./global/error.yaml#/RateLimitError"
"404":
$ref: "./global/error.yaml#/NotFoundError"
"500":
$ref: "./global/error.yaml#/UnexpectedError"
delete:
summary: "delete a channel"
tags:
- "Channel"
security:
- BearerAuth: []
parameters:
- name: "channelId"
in: "path"
required: true
schema:
type: "string"
responses:
"200":
description: OK
content:
application/json:
schema:
type: "object"
properties:
status:
type: "string"
data:
type: "object"
properties:
success:
type: "boolean"
"403":
$ref: "./global/error.yaml#/PermissionDenidedError"
"429":
$ref: "./global/error.yaml#/RateLimitError"
"404":
$ref: "./global/error.yaml#/NotFoundError"
"500":
$ref: "./global/error.yaml#/UnexpectedError"
/api/v3/channels/{channelId}/join:
post:
summary: "join a channel"
tags:
- "Channel"
security:
- BearerAuth: []
parameters:
- name: "channelId"
in: "path"
required: true
schema:
type: "string"
responses:
"200":
$ref: "./v3/channel/response.yaml#/ChannelsApiResponse"
"403":
description: Error Response
content:
application/json:
examples:
ForbiddenError:
$ref: "./global/error-example.yaml#/ForbiddenError"
PermissionDenidedError:
$ref: "./global/error-example.yaml#/PermissionDenidedError"
UserIsBannedError:
$ref: "./global/error-example.yaml#/UserIsBannedError"
"429":
$ref: "./global/error.yaml#/RateLimitError"
"404":
$ref: "./global/error.yaml#/NotFoundError"
"500":
$ref: "./global/error.yaml#/UnexpectedError"
/api/v3/channels/{channelId}/leave:
delete:
summary: "leave a channel"
tags:
- "Channel"
security:
- BearerAuth: []
parameters:
- name: "channelId"
in: "path"
required: true
schema:
type: "string"
responses:
"200":
$ref: "./v3/channel/response.yaml#/ChannelsApiResponse"
"403":
description: Error Response
content:
application/json:
examples:
PermissionDenidedError:
$ref: "./global/error-example.yaml#/PermissionDenidedError"
UserIsBannedError:
$ref: "./global/error-example.yaml#/UserIsBannedError"
ForbiddenError:
$ref: "./global/error-example.yaml#/ForbiddenError"
"429":
$ref: "./global/error.yaml#/RateLimitError"
"404":
$ref: "./global/error.yaml#/NotFoundError"
"500":
$ref: "./global/error.yaml#/UnexpectedError"
/api/v3/channels/{channelId}/users:
get:
summary: "query channel users"
tags:
- "Channel"
security:
- BearerAuth: []
parameters:
- name: "channelId"
in: "path"
required: true
schema:
type: "string"
- name: "roles"
in: "query"
schema:
type: "array"
minItems: 1
maxItems: 20
items:
type: "string"
minLength: 1
maxLength: 900
description: "Role to filter"
- name: "filter"
in: "query"
schema:
type: "string"
enum:
- "all"
- "muted"
- "banned"
- "member&banned"
default: "all"
- name: "sortBy"
in: "query"
schema:
type: "string"
enum:
- "lastCreated"
- "firstCreated"
default: "lastCreated"
- name: "options"
in: "query"
style: "deepObject"
schema:
type: "object"
properties:
limit:
type: "integer"