This repository has been archived by the owner on May 3, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 44
/
api.yaml
1152 lines (1151 loc) · 42.1 KB
/
api.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:
description: "Clubhouse API"
title: "Clubhouse API"
version: "1"
servers:
- url: "https://www.clubhouseapi.com/api"
# User-Agent: clubhouse/269 (iPhone; iOS 14.1; Scale/3.00)
# Content-Type: application/json; charset=utf-8
# CH-Languages: en-US
# CH-Locale: en_US
# CH-AppVersion: 0.1.15
# CH-AppBuild: 269
# CH-DeviceId: <uuid>
# Needed for authenticated APIs:
# CH-UserID: 1234
# Authorization: Token <auth_token>
# (or Authorization: Bearer <access_token> if you want to use the JWT auth)
# Clubhouse aggressively bans new user signups based partially on headers: see
# https://github.com/zhuowei/ClubhouseAPI/issues/2
# curl -H "User-Agent: Clubhouse/269" -H "Content-Type: application/json" -D - -H "CH-Locale: en_US" -H "CH-AppVersion: 0.2.15" -H "CH-AppBuild: 269"
# The paginated GET apis are also accessible via POST
paths:
/start_phone_number_auth:
post:
operationId: start_phone_number_auth
summary: Starts phone number auth.
requestBody:
content:
application/json:
schema:
type: object
examples:
jsonObject:
value: {"phone_number": "+11234567890"}
responses:
200:
description: success
content:
application/json:
examples:
success:
value: {"success":true,"is_blocked":false,"error_message":null}
failure:
value: {"success":false,"is_blocked":false,"error_message":""}
phoneBlocked:
# Could be caused if app version header not present
# or if account banned
# I've had an account auto-banned after the first login ever
# I'm not sure why
# This happened to an actual Clubhouse user from the app as well:
# https://www.reddit.com/r/ClubhouseApp/comments/lc2d89/got_invited_but_cannot_sign_in/
value: {"success":true,"is_blocked":true}
beingThrottled:
# You'll get `number_of_attempts_remaining` before you being throttled
value: {"success":true,"is_blocked":false,"number_of_attempts_remaining":3}
throttled:
value: {"success": false, "error_message": "Our systems have detected high usage of this feature from your account. Please try again later."}
/call_phone_number_auth:
post:
operationId: call_phone_number_auth
summary: Call phone number auth.
requestBody:
content:
application/json:
schema:
type: object
examples:
jsonObject:
value: {}
responses:
200:
description: success
content:
application/json:
examples:
jsonObject: {}
/resend_phone_number_auth:
post:
operationId: resend_phone_number_auth
summary: Resend phone number auth.
requestBody:
content:
application/json:
schema:
type: object
examples:
jsonObject:
value: {}
responses:
200:
description: success
content:
application/json:
examples:
jsonObject: {}
/complete_phone_number_auth:
post:
operationId: complete_phone_number_auth
summary: Call phone number auth.
requestBody:
content:
application/json:
schema:
type: object
examples:
jsonObject:
value: {"verification_code": "1234", "phone_number": "+1234567890"}
responses:
200:
description: success
content:
application/json:
examples:
success:
value: {"success":true,"is_verified":true,"user_profile":{"user_id":1234,"name":null,"photo_url":null,"username":null},"auth_token":"<auth_token>","refresh_token":"<jwt>","access_token":"<jwt>","is_waitlisted":true,"is_onboarding":true}
/check_waitlist_status:
post:
operationId: check_waitlist_status
summary: checks waitlist status.
responses:
200:
description: got waitlist status
content:
application/json:
examples:
waitlisted:
value: {"is_waitlisted":true,"is_onboarding":true,"success":true}
401:
description: authorization not provided
content:
application/json:
examples:
error:
value: {"detail":"Authentication credentials were not provided."}
/me:
post:
operationId: me
summary: gets user
requestBody:
content:
application/json:
schema:
type: object
examples:
clubhouseApp:
value: {"return_blocked_ids":true,"timezone_identifier":"America/Los_Angeles","return_following_ids":true}
emptyAlsoWorks:
value: {}
responses:
200:
description: the response
content:
application/json:
examples:
examples:
value: {"has_unread_notifications":false,"actionable_notifications_count":0,"num_invites":0,"auth_token":"<auth_token>","refresh_token":"<jwt>","access_token":"<jwt>","notifications_enabled":false,"user_profile":{"user_id":1234,"name":null,"photo_url":null,"username":null},"following_ids":null,"blocked_ids":null,"is_admin":false,"email":null,"feature_flags":[""],"success":true}
403:
description: error response - happens if account is banned (is_blocked)
content:
application/json:
examples:
examples:
value: {"detail": "You do not have permission to perform this action."}
/get_release_notes:
post:
operationId: get_release_notes
summary: gets release notes.
responses:
200:
description: the response
content:
application/json:
examples:
latest:
value: {"should_display":true,"title":"🕹 You are now using the latest update of Clubhouse!","action":"See What's New","url":"https://whatsnew.joinclubhouse.com"}
/get_all_topics:
get:
operationId: get_all_topics
summary: gets all topics.
responses:
200:
description: a list of topics
content:
application/json:
examples:
latest:
value: {
"topics": [{
"title": "Example",
"id": 1,
"abbreviated_title": "Example",
"topics": [{
"title": "⏳ The Future",
"id": 140,
"abbreviated_title": "The Future"
}]
}]
}
/get_topic:
post:
operationId: get_topic
summary: looks up topic by ID.
requestBody:
content:
application/json:
schema:
type: object
examples:
jsonObject:
value: {"topic_id": 140}
# this also can take a club_id but I can't get it to work
responses:
200:
description: returns topic info
content:
application/json:
examples:
topic:
value: {"topic":{"title":"⏳ The Future","id":140,"abbreviated_title":"The Future"},"success":true}
/get_clubs_for_topic:
post:
operationId: get_clubs_for_topic
summary: looks up clubs by topic.
requestBody:
content:
application/json:
schema:
type: object
examples:
jsonObject:
value: {"topic_id": 140}
responses:
200:
description: returns list of clubs with pagination
content:
application/json:
examples:
clubs:
value: {"clubs":[{"club_id":123,"name":"Example Club","description":"Example","photo_url":"https://clubhouseprod.s3.amazonaws.com:443/club_<club_id>_<guid>_thumbnail_250x250","num_members":123,"num_followers":456,"is_member":false,"is_follower":false}],"count":1,"next":null,"previous":null,"success":true}
/get_profile:
post:
operationId: get_profile
summary: looks up user profile by ID.
requestBody:
content:
application/json:
schema:
type: object
examples:
jsonObject:
value: {"user_id": 4075733}
responses:
200:
description: returns user profile info
content:
application/json:
examples:
user_profile:
# invited_by_user_profile can be null if the queried user is not norminated by someone
value: {
"user_profile": {
"user_id": 4075733,
"name": "Junho Yeo",
"displayname": null,
"photo_url": "https://clubhouseprod.s3.amazonaws.com:443/<user_id>_<guid>",
"username": "junhoyeo",
"bio": "🌸 Creating INEVITABLE™ Services",
"twitter": null,
"instagram": "_junhoyeo",
"num_followers": 103,
"num_following": 98,
"time_created": "2021-01-28T12:30:25.625451+00:00",
"follows_me": false,
"is_blocked_by_network": false,
"mutual_follows_count": 0,
"mutual_follows": [],
"notification_type": null,
"invited_by_user_profile": {
"user_id": 1234,
"name": "Example Norminator",
"photo_url": "https://clubhouseprod.s3.amazonaws.com:443/<user_id>_<guid>_thumbnail_250x250",
"username": "myexamplenorminator"
},
"clubs": [
{
"club_id": 12345,
"name": "Club name",
"description": "Club description",
"photo_url": "https://clubhouseprod.s3.amazonaws.com:443/club_<club_id>_<guid>_thumbnail_250x250",
"num_members": 123,
"num_followers": 456,
"enable_private": true,
"is_follow_allowed": true,
"is_membership_private": false,
"is_community": false,
"rules": [{
"desc": "Description",
"title": "Rule"
}],
"num_online": 0
},
],
"has_verified_email": true,
"can_edit_username": true,
"can_edit_name": true,
"can_edit_displayname": true,
"topics": [
{
"title": "🦄 Startups",
"id": 107,
"abbreviated_title": "Startups"
}
]
},
"success": true
}
/get_users_for_topic:
get:
operationId: get_users_for_topic
summary: looks up users by topic.
parameters:
- in: query
name: topic_id
schema:
type: integer
example: 140
- in: query
name: page_size
schema:
type: integer
example: 25
- in: query
name: page
schema:
type: integer
example: 1
responses:
200:
description: returns list of users with pagination. Bios truncated to 80 chars.
content:
application/json:
examples:
users:
value: {"users":[{"user_id":1234,"name":"John Example","photo_url":"https://clubhouseprod.s3.amazonaws.com:443/<user_id>_<guid>_thumbnail_250x250","username":"john_example","bio":"John Example is an exemplary user object","twitter":"john_example"}],"count":1,"next":null,"previous":null,"success":true}
/get_channels:
get:
operationId: get_channels
summary: get all channels
# also works with POST on an empty {} request body?
responses:
200:
description: list of channels
content:
application/json:
examples:
channels:
value: {
"channels": [{
"creator_user_profile_id": 1234,
"channel_id": 123456,
"channel": "abcdefgh",
"topic": "Example Topic",
"is_private": false,
"is_social_mode": false,
"url": "https://www.joinclubhouse.com/room/abcdefgh",
"club": {
"club_id": 12345,
"name": "Club name",
"description": "Club description",
"photo_url": "https://clubhouseprod.s3.amazonaws.com:443/club_<club_id>_<guid>_thumbnail_250x250",
"num_members": 123,
"num_followers": 456,
"enable_private": true,
"is_follow_allowed": true,
"is_membership_private": false,
"is_community": false,
"rules": [{
"desc": "Description",
"title": "Rule"
}],
"num_online": 0
},
"club_name": "Club name",
"club_id": 12345,
"welcome_for_user_profile": null,
"num_other": 0,
"has_blocked_speakers": false,
"is_explore_channel": false,
"num_speakers": 123,
"num_all": 1234,
"users": [{
"user_id": 1234,
"name": "John Example",
"photo_url": "https://clubhouseprod.s3.amazonaws.com:443/<user_id>_<guid>_thumbnail_250x250",
"is_speaker": true,
"is_moderator": true,
"time_joined_as_speaker": "2021-01-20T00:00:00.000000+00:00",
"is_followed_by_speaker": true,
"is_invited_as_speaker": false
}]
}],
"events": [],
"success": true
}
/join_channel:
post:
operationId: join_channel
summary: join a channel.
requestBody:
content:
application/json:
schema:
type: object
examples:
joinFromAppHomeScreen:
# just channel is enough
# attribution_details is base64-encoded JSON:
# {"is_explore":false,"rank":1}
value: {"channel":"abcdefgh","attribution_source":"feed","attribution_details":"eyJpc19leHBsb3JlIjpmYWxzZSwicmFuayI6MX0="}
justChannelIsEnough:
value: {"channel":"abcdefgh"}
responses:
200:
description: stuff needed to actually join a channel
content:
application/json:
examples:
channel:
value: {
"creator_user_profile_id": 1234,
"channel_id": 123456,
"channel": "abcdefgh",
"topic": "Channel topic",
"is_private": false,
"is_social_mode": false,
"url": "https://www.joinclubhouse.com/room/abcdefgh",
"club": {
"club_id": 1234,
"name": "Club name",
"description": "Club description",
"photo_url": "https://clubhouseprod.s3.amazonaws.com:443/club_<club_id>_<guid>_thumbnail_250x250",
"num_members": 123,
"num_followers": 567,
"enable_private": true,
"is_follow_allowed": true,
"is_membership_private": false,
"is_community": false,
"rules": [],
"num_online": 0
},
"club_name": "Startup Club",
"club_id": 45,
"welcome_for_user_profile": null,
"is_handraise_enabled": true,
"handraise_permission": 1,
"is_club_member": false,
"is_club_admin": false,
"users": [{
"user_id": 123456,
"name": "John Example",
"photo_url": "https://clubhouseprod.s3.amazonaws.com:443/<user_id>_<guid>_thumbnail_250x250",
"username": "john_example",
"first_name": "John",
"skintone": 3,
"is_new": true,
"is_speaker": true,
"is_moderator": true,
"time_joined_as_speaker": "2021-01-31T00:00:00.000000+00:00",
"is_followed_by_speaker": true,
"is_invited_as_speaker": true
}, {
"user_id": 1234,
"name": "The currently joining user",
"photo_url": "https://clubhouseprod.s3.amazonaws.com:443/<user_id>_<guid>_thumbnail_250x250",
"username": "currentuser",
"first_name": "Current",
"skintone": 3,
"is_new": false,
"is_speaker": false,
"is_moderator": false,
"time_joined_as_speaker": null,
"is_followed_by_speaker": false,
"is_invited_as_speaker": false
}],
"success": true,
"is_empty": false,
"token": "<token>",
"rtm_token": "<rtm_token>",
"pubnub_token": "<pubnub_token>",
"pubnub_origin": null,
"pubnub_heartbeat_value": 60,
"pubnub_heartbeat_interval": 29,
"pubnub_enable": true,
"agora_native_mute": true
}
400:
description: cannot join
content:
application/json:
examples:
appTooOld:
value: {"error_message":"Please upgrade the app to join rooms!","success":false}
roomNotAvailable:
# Also sent when channel ID is invalid?
value: {"success":false,"error_message":"That room is no longer available 👋🏼\nTry starting a new one instead?"}
/leave_channel:
post:
operationId: leave_channel
summary: leave a channel.
requestBody:
content:
application/json:
schema:
type: object
examples:
jsonObject:
# just channel is enough
value: {"channel": "abcdefgh"}
responses:
200:
description: left the channel
content:
application/json:
examples:
channel:
value: {"success":true}
/update_username:
post:
operationId: update_username
summary: edits username.
requestBody:
content:
application/json:
schema:
type: object
examples:
jsonObject:
value: {"username": "hipsterhouse"}
responses:
200:
description: username successfully set
content:
application/json:
examples:
success:
value: {"success":true,"error_message":null}
400:
description: invalid/taken username (eg empty string)
content:
application/json:
examples:
emptyString:
value: {"success":false,"error_message":"This username is not allowed. Please try another one."}
taken:
value: {"success":false,"error_message":"This username has already been taken by a different user."}
/follow:
post:
operationId: follow
summary: follows a user
requestBody:
content:
application/json:
schema:
type: object
examples:
jsonObject:
# There's also supposed to be source_topic_id, source, user_ids; not sure what they're for
value: {"user_id": 1234}
responses:
401:
description: waitlisted
content:
application/json:
examples:
waitlisted:
value: {"success":false,"error_message":"Your account is waitlisted. Please contact us if this is in error."}
/refresh_token:
post:
operationId: refresh_token
summary: gets an access_token from a refresh_token.
requestBody:
content:
application/json:
schema:
type: object
examples:
jsonObject:
value: {"refresh": "<refresh_token>"}
responses:
200:
description: returns new access and refresh token
content:
application/json:
examples:
validToken:
value: {"access":"<access_token>","refresh":"<refresh_token>"}
401:
description: invalid refresh token
content:
application/json:
examples:
invalidToken:
# seems it's using https://github.com/SimpleJWT/django-rest-framework-simplejwt
value: {"detail":"Token is invalid or expired","code":"token_not_valid"}
/get_suggested_invites:
post:
operationId: get_suggested_invites
summary: find users to invite based on phone number.
description:
(also see https://zerforschung.org/posts/clubhouse-telefonnummern-en/ for @zerforschung's analysis of the privacy implications of this API)
requestBody:
content:
application/json:
schema:
type: object
examples:
hasContact:
value: {"club_id":null,"upload_contacts":false,"contacts":[{"phone_number": "+11234567890"}]}
responses:
200:
description: returns list of users that can be invited.
content:
application/json:
examples:
validUsers:
value: {"num_invites":0,"suggested_invites":[{"phone_number":"+11234567890","in_app":false,"is_invited":false,"num_friends":0}],"success":true}
/get_suggested_club_invites:
post:
operationId: get_suggested_club_invites
summary: find users to invite to clubs based on phone number
requestBody:
content:
application/json:
schema:
type: object
examples:
jsonObject:
# might also take club_id (number) and upload_contacts (bool)?
value: { "upload_contacts": true, "contacts": [{"name": "aaa", "phone_number": "+11234567890"}]}
responses:
200:
# I couldn't get this to return anything else.
description: returns list of suggested invites.
content:
application/json:
examples:
empty:
value: {"suggested_invites":[],"success":true}
/get_club:
post:
operationId: get_club
summary: gets club by id
requestBody:
content:
application/json:
schema:
type: object
examples:
jsonObject:
value: {"club_id": 1234}
responses:
200:
description: returns club object
content:
application/json:
examples:
club:
value: {"club":{"club_id":123,"name":"Example Club","description":"Example","photo_url":"https://clubhouseprod.s3.amazonaws.com:443/club_<club_id>_<guid>_thumbnail_250x250","num_members":123,"num_followers":456,"is_member":false,"is_follower":false},"is_admin":false,"is_member":false,"is_follower":false,"is_pending_accept":false,"is_pending_approval":false,"added_by_user_profile":null,"member_user_ids":[],"num_invites":0,"invite_link":null,"topics":[{"title":"Topic Example","id":140,"abbreviated_title":"Topic Example"}],"success":true}
/check_for_update:
get:
operationId: check_for_update
summary: Clubhouse uses this to check for updates when app is not installed from App Store (eg TestFlight)
parameters:
- in: query
name: is_testflight
schema:
type: integer
example: 1
responses:
200:
description: successful response
content:
application/json:
examples:
noUpdate:
value: {"has_update":false,"success":true}
hasUpdate:
value: {"has_update":true,"is_mandatory":true,"app_url":"https://apps.apple.com/us/app/id1503133294","app_version":"0.1.24","app_build":262,"success":true}
/invite_to_app:
post:
operationId: invite_to_app
summary: invite a user to the app, using one of your invites
requestBody:
content:
application/json:
schema:
type: object
examples:
jsonObject:
value: {"name":"John Smith","message":null,"phone_number":"+11234567890"}
responses:
400:
description: your own account doesn't have an invite either
content:
application/json:
examples:
waitlisted:
value: {"success":false,"error_message":"Your account is waitlisted. Please contact us if this is in error."}
/invite_from_waitlist:
post:
operationId: invite_from_waitlist
summary: wave to another user on the waitlist to give them access
requestBody:
content:
application/json:
schema:
type: object
examples:
jsonObject:
value: {"user_id": 1234}
responses:
400:
description: your own account is waitlisted, or some other error occurred
content:
application/json:
examples:
waitlisted:
value: {"success":false,"error_message":"Your account is waitlisted. Please contact us if this is in error."}
someOtherError:
# https://github.com/zhuowei/ClubhouseAPI/issues/3#issuecomment-776295696
value: {"success": false,"error_message":""}
/get_following:
post:
operationId: get_following
summary: get a list of the users and clubs that this user is following. Returned users have bios truncated to ~80 characters.
requestBody:
content:
application/json:
schema:
type: object
examples:
jsonObject:
value: {"user_id": 1234}
responses:
200:
description: returns list of users and clubs
content:
application/json:
examples:
success:
value: {"users":[{"user_id":12345,"name":"John Smith","photo_url":"https://clubhouseprod.s3.amazonaws.com:443/<user_id>_<uuid>_thumbnail_250x250","username":"johnsmith","bio":"Bio","twitter":null}],"clubs":[{"club_id":123,"name":"Example Club","description":"Example","photo_url":"https://clubhouseprod.s3.amazonaws.com:443/club_<club_id>_<guid>_thumbnail_250x250","num_members":123,"num_followers":456,"is_member":false,"is_follower":false}],"count":2,"next":null,"previous":null,"success":true}
/get_suggested_follows_friends_only:
post:
operationId: get_suggested_follows_friends_only
summary: find people to follow by uploading contacts during signup
requestBody:
content:
application/json:
schema:
type: object
examples:
noContacts:
value: {"club_id":null,"upload_contacts":true,"contacts":[]}
responses:
200:
description: returns list of users and clubs
content:
application/json:
examples:
noContacts:
value: {"users":[],"success":true}
/get_suggested_follows_all:
get:
operationId: get_suggested_follows_all
summary: gets suggested follows during signup
# ?in_onboarding=true&page_size=50&page=1
# ?in_onboarding=false&page_size=25&page=1
parameters:
- in: query
name: in_onboarding
schema:
type: boolean
example: true
- in: query
name: page_size
schema:
type: integer
example: 50
- in: query
name: page
schema:
type: integer
example: 1
responses:
200:
description: a list of users to follow. bios truncated to 80 chars.
content:
application/json:
examples:
usersFromOnboard:
value: {
"users": [
{
"user_id": 1234,
"name": "John Smith",
"photo_url": "https://clubhouseprod.s3.amazonaws.com:443/<user_id>_<guid>_thumbnail_250x250",
"username": "rohan",
"bio": "Example bio",
"twitter": "johnsmith"
}
],
"count": 59,
"next": 2,
"previous": null,
"success": true
}
/update_notifications:
post:
operationId: update_notifications
summary: updates notification during signup.
requestBody:
content:
application/json:
schema:
type: object
examples:
onboardingSetting:
value: {"enable_trending":-1,"pause_till":-1,"is_sandbox":false,"apn_token":null,"system_enabled":2,"frequency":-1}
responses:
400:
description: waitlisted
content:
application/json:
examples:
waitlisted:
value: {"success":false,"error_message":"Your account is waitlisted. Please contact us if this is in error."}
/get_online_friends:
post:
operationId: get_online_friends
summary: gets online friends on the app homepage.
requestBody:
content:
application/json:
schema:
type: object
examples:
emptyRequest:
value: {}
responses:
200:
description: a list of online clubs and users.
content:
application/json:
examples:
emptyOnlineFriends:
value: {
"clubs": [],
"users": []
}
/get_events:
get:
operationId: get_events
summary: the Upcoming for You page
parameters:
- in: query
name: is_filtered
schema:
type: boolean
example: true
- in: query
name: page_size
schema:
type: integer
example: 25
- in: query
name: page
schema:
type: integer
example: 1
responses:
200:
description: a list of events
content:
application/json:
examples:
emptyEventsList:
value: {
"events": [],
"count": 0,
"next": null,
"previous": null,
"success": true
}
/get_settings:
get:
operationId: get_settings
summary: get notification settings
responses:
200:
description: notification settings
content:
application/json:
examples:
defaultSettings:
value: {
"notifications_enable_trending": true,
"notifications_frequency": 3,
"notifications_is_paused": false,
"success": true
}
/get_welcome_channel:
get:
operationId: get_welcome_channel
summary: called during signup
responses:
200:
description: empty???
content:
application/json:
examples:
defaultSettings:
value: {
"is_empty": true,
"success": true
}
/record_action_trails:
post:
operationId: record_action_trails
summary: analytics
requestBody:
content:
application/json:
schema:
type: object
examples:
appOpened:
value: {"action_trails":[{"blob_data":{},"trail_type":"app_opened","client_time_created":1612971962}]}
responses:
200:
description: always empty
content:
application/json:
examples:
success:
value: {"success": true}
/get_notifications:
get:
operationId: get_notifications
summary: get notifications (the bell icon)
parameters:
- in: query
name: page_size
schema:
type: integer
example: 20
- in: query
name: page
schema:
type: integer
example: 1
responses:
200:
description: Returns a list of notifications.
content:
application/json:
examples:
empty:
value: {"notifications":[],"disabled":false,"count":0,"next":null,"previous":null,"success":true}
/get_actionable_notifications:
get:
operationId: get_actionable_notifications
summary: get actionable notifications (the bell again)
responses:
200:
description: Returns a list of actionable notifications.
content:
application/json:
examples:
empty:
value: {"notifications":[],"count":0,"next":null,"previous":null,"success":true}
/get_create_channel_targets:
post:
operationId: get_create_channel_targets
summary: is fetched when you tap Create Room
requestBody:
content:
application/json:
schema:
type: object
example: {}
responses:
400:
description: waitlisted
content:
application/json:
examples:
waitlisted:
value: {"success":false,"error_message":"Your account is waitlisted. Please contact us if this is in error."}