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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
|
basePath: /
definitions:
FileHeader:
properties:
Filename:
type: string
Header:
$ref: '#/definitions/MIMEHeader'
Size:
format: int64
type: integer
title: A FileHeader describes a file part of a multipart request.
type: object
x-go-package: mime/multipart
MIMEHeader:
additionalProperties:
items:
type: string
type: array
description: |-
A MIMEHeader represents a MIME-style header mapping
keys to sets of values.
type: object
x-go-package: net/textproto
Mention:
properties:
acct:
description: |-
The account URI as discovered via webfinger.
Equal to username for local users, or username@domain for remote users.
example: some_user@example.org
type: string
x-go-name: Acct
id:
description: The ID of the mentioned account.
example: 01FBYJHQWQZAVWFRK9PDYTKGMB
type: string
x-go-name: ID
url:
description: The web URL of the mentioned account's profile.
example: https://example.org/@some_user
type: string
x-go-name: URL
username:
description: The username of the mentioned account.
example: some_user
type: string
x-go-name: Username
title: Mention represents a mention of another account.
type: object
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
Source:
description: |-
Returned as an additional entity when verifying and updated credentials, as an attribute of Account.
See https://docs.joinmastodon.org/entities/source/
properties:
fields:
description: Metadata about the account.
items:
$ref: '#/definitions/field'
type: array
x-go-name: Fields
follow_requests_count:
description: The number of pending follow requests.
format: int64
type: integer
x-go-name: FollowRequestsCount
language:
description: The default posting language for new statuses.
type: string
x-go-name: Language
note:
description: Profile bio.
type: string
x-go-name: Note
privacy:
$ref: '#/definitions/statusVisibility'
sensitive:
description: Whether new statuses should be marked sensitive by default.
type: boolean
x-go-name: Sensitive
title: Source represents display or publishing preferences of user's own account.
type: object
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
account:
properties:
acct:
description: |-
The account URI as discovered via webfinger.
Equal to username for local users, or username@domain for remote users.
example: some_user@example.org
type: string
x-go-name: Acct
avatar:
description: Web location of the account's avatar.
example: https://example.org/media/some_user/avatar/original/avatar.jpeg
type: string
x-go-name: Avatar
avatar_static:
description: |-
Web location of a static version of the account's avatar.
Only relevant when the account's main avatar is a video or a gif.
example: https://example.org/media/some_user/avatar/static/avatar.png
type: string
x-go-name: AvatarStatic
bot:
description: Account identifies as a bot.
type: boolean
x-go-name: Bot
created_at:
description: When the account was created (ISO 8601 Datetime).
example: "2021-07-30T09:20:25+00:00"
type: string
x-go-name: CreatedAt
discoverable:
description: Account has opted into discovery features such as the profile
directory.
type: boolean
x-go-name: Discoverable
display_name:
description: The account's display name.
example: big jeff (he/him)
type: string
x-go-name: DisplayName
emojis:
description: Array of custom emojis used in this account's note or display
name.
items:
$ref: '#/definitions/emoji'
type: array
x-go-name: Emojis
fields:
description: Additional metadata attached to this account's profile.
items:
$ref: '#/definitions/field'
type: array
x-go-name: Fields
followers_count:
description: Number of accounts following this account, according to our instance.
format: int64
type: integer
x-go-name: FollowersCount
following_count:
description: Number of account's followed by this account, according to our
instance.
format: int64
type: integer
x-go-name: FollowingCount
header:
description: Web location of the account's header image.
example: https://example.org/media/some_user/header/original/header.jpeg
type: string
x-go-name: Header
header_static:
description: |-
Web location of a static version of the account's header.
Only relevant when the account's main header is a video or a gif.
example: https://example.org/media/some_user/header/static/header.png
type: string
x-go-name: HeaderStatic
id:
description: The account id.
example: 01FBVD42CQ3ZEEVMW180SBX03B
type: string
x-go-name: ID
last_status_at:
description: When the account's most recent status was posted (ISO 8601 Datetime).
example: "2021-07-30T09:20:25+00:00"
type: string
x-go-name: LastStatusAt
locked:
description: Account manually approves follow requests.
type: boolean
x-go-name: Locked
mute_expires_at:
description: If this account has been muted, when will the mute expire (ISO
8601 Datetime).
example: "2021-07-30T09:20:25+00:00"
type: string
x-go-name: MuteExpiresAt
note:
description: Bio/description of this account.
type: string
x-go-name: Note
source:
$ref: '#/definitions/Source'
statuses_count:
description: Number of statuses posted by this account, according to our instance.
format: int64
type: integer
x-go-name: StatusesCount
suspended:
description: Account has been suspended by our instance.
type: boolean
x-go-name: Suspended
url:
description: Web location of the account's profile page.
example: https://example.org/@some_user
type: string
x-go-name: URL
username:
description: The username of the account, not including domain.
example: some_user
type: string
x-go-name: Username
title: Account represents a fediverse account of some kind, either a remote one
or one on this instance.
type: object
x-go-name: Account
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
accountCreateRequest:
properties:
agreement:
description: The user agrees to the terms, conditions, and policies of the
instance.
type: boolean
x-go-name: Agreement
email:
description: The email address to be used for login.
type: string
x-go-name: Email
locale:
description: The language of the confirmation email that will be sent.
type: string
x-go-name: Locale
password:
description: The password to be used for login. This will be hashed before
storage.
type: string
x-go-name: Password
reason:
description: Text that will be reviewed by moderators if registrations require
manual approval.
type: string
x-go-name: Reason
username:
description: The desired username for the account.
type: string
x-go-name: Username
title: AccountCreateRequest represents the form submitted during a POST request
to /api/v1/accounts.
type: object
x-go-name: AccountCreateRequest
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
accountFollowRequest:
description: AccountFollowRequest is for parsing requests at /api/v1/accounts/:id/follow
properties:
TargetAccountID:
description: |-
ID of the account to follow request
This should be a URL parameter not a form field
type: string
notify:
description: Notify when this account posts?
type: boolean
x-go-name: Notify
reblogs:
description: Show reblogs for this account?
type: boolean
x-go-name: Reblogs
type: object
x-go-name: AccountFollowRequest
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
accountRelationship:
properties:
blocked_by:
description: This account is blocking you.
type: boolean
x-go-name: BlockedBy
blocking:
description: You are blocking this account.
type: boolean
x-go-name: Blocking
domain_blocking:
description: You are blocking this account's domain.
type: boolean
x-go-name: DomainBlocking
endorsed:
description: You are featuring this account on your profile.
type: boolean
x-go-name: Endorsed
followed_by:
description: This account follows you.
type: boolean
x-go-name: FollowedBy
following:
description: You are following this account.
type: boolean
x-go-name: Following
id:
description: The account id.
example: 01FBW9XGEP7G6K88VY4S9MPE1R
type: string
x-go-name: ID
muting:
description: You are muting this account.
type: boolean
x-go-name: Muting
muting_notifications:
description: You are muting notifications from this account.
type: boolean
x-go-name: MutingNotifications
note:
description: Your note on this account.
type: string
x-go-name: Note
notifying:
description: You are seeing notifications when this account posts.
type: boolean
x-go-name: Notifying
requested:
description: You have requested to follow this account, and the request is
pending.
type: boolean
x-go-name: Requested
showing_reblogs:
description: You are seeing reblogs/boosts from this account in your home
timeline.
type: boolean
x-go-name: ShowingReblogs
title: Relationship represents a relationship between accounts.
type: object
x-go-name: Relationship
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
application:
description: Primarily, application is used for allowing apps like Tusky etc to
connect to Mastodon on behalf of a user.
properties:
client_id:
description: Client ID associated with this application.
type: string
x-go-name: ClientID
client_secret:
description: Client secret associated with this application.
type: string
x-go-name: ClientSecret
id:
description: The ID of the application.
example: 01FBVD42CQ3ZEEVMW180SBX03B
type: string
x-go-name: ID
name:
description: The name of the application.
example: Tusky
type: string
x-go-name: Name
redirect_uri:
description: Post-authorization redirect URI for the application (OAuth2).
example: https://example.org/callback?some=query
type: string
x-go-name: RedirectURI
vapid_key:
description: Push API key for this application.
type: string
x-go-name: VapidKey
website:
description: The website associated with the application (url)
example: https://tusky.app
type: string
x-go-name: Website
title: Application represents an api Application, as defined here.
type: object
x-go-name: Application
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
attachment:
properties:
blurhash:
description: |-
A hash computed by the BlurHash algorithm, for generating colorful preview thumbnails when media has not been downloaded yet.
See https://github.com/woltapp/blurhash
type: string
x-go-name: Blurhash
description:
description: Alt text that describes what is in the media attachment.
example: This is a picture of a kitten.
type: string
x-go-name: Description
id:
description: The ID of the attachment.
type: string
x-go-name: ID
meta:
$ref: '#/definitions/mediaMeta'
preview_remote_url:
description: |-
The location of a scaled-down preview of the attachment on the remote server.
Only defined for instances other than our own.
example: https://some-other-server.org/attachments/small/ahhhhh.jpeg
type: string
x-go-name: PreviewRemoteURL
preview_url:
description: The location of a scaled-down preview of the attachment.
example: https://example.org/fileserver/some_id/attachments/some_id/small/attachment.jpeg
type: string
x-go-name: PreviewURL
remote_url:
description: |-
The location of the full-size original attachment on the remote server.
Only defined for instances other than our own.
example: https://some-other-server.org/attachments/original/ahhhhh.jpeg
type: string
x-go-name: RemoteURL
text_url:
description: A shorter URL for the attachment.
type: string
x-go-name: TextURL
type:
description: |-
The type of the attachment.
unknown = unsupported or unrecognized file type.
image = Static image.
gifv = Looping, soundless animation.
video = Video clip.
audio = Audio track.
example: image
type: string
x-go-name: Type
url:
description: The location of the original full-size attachment.
example: https://example.org/fileserver/some_id/attachments/some_id/original/attachment.jpeg
type: string
x-go-name: URL
title: Attachment represents the object returned to a client after a successful
media upload request.
type: object
x-go-name: Attachment
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
card:
properties:
author_name:
description: The author of the original resource.
example: weewee@buzzfeed.com
type: string
x-go-name: AuthorName
author_url:
description: A link to the author of the original resource.
example: https://buzzfeed.com/authors/weewee
type: string
x-go-name: AuthorURL
blurhash:
description: A hash computed by the BlurHash algorithm, for generating colorful
preview thumbnails when media has not been downloaded yet.
type: string
x-go-name: Blurhash
description:
description: Description of preview.
example: Is water wet? We're not sure. In this article, we ask an expert...
type: string
x-go-name: Description
embed_url:
description: Used for photo embeds, instead of custom html.
type: string
x-go-name: EmbedURL
height:
description: Height of preview, in pixels.
format: int64
type: integer
x-go-name: Height
html:
description: HTML to be used for generating the preview card.
type: string
x-go-name: HTML
image:
description: Preview thumbnail.
example: https://example.org/fileserver/preview/thumb.jpg
type: string
x-go-name: Image
provider_name:
description: The provider of the original resource.
example: Buzzfeed
type: string
x-go-name: ProviderName
provider_url:
description: A link to the provider of the original resource.
example: https://buzzfeed.com
type: string
x-go-name: ProviderURL
title:
description: Title of linked resource.
example: Buzzfeed - Is Water Wet?
type: string
x-go-name: Title
type:
description: |-
The type of the preview card.
String (Enumerable, oneOf)
link = Link OEmbed
photo = Photo OEmbed
video = Video OEmbed
rich = iframe OEmbed. Not currently accepted, so won't show up in practice.
example: link
type: string
x-go-name: Type
url:
description: Location of linked resource.
example: https://buzzfeed.com/some/fuckin/buzzfeed/article
type: string
x-go-name: URL
width:
description: Width of preview, in pixels.
format: int64
type: integer
x-go-name: Width
title: Card represents a rich preview card that is generated using OpenGraph tags
from a URL.
type: object
x-go-name: Card
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
domainBlock:
description: DomainBlock represents a block on one domain
properties:
created_at:
description: Time at which this block was created (ISO 8601 Datetime).
example: "2021-07-30T09:20:25+00:00"
type: string
x-go-name: CreatedAt
created_by:
description: ID of the account that created this domain block.
example: 01FBW2758ZB6PBR200YPDDJK4C
type: string
x-go-name: CreatedBy
domain:
description: The hostname of the blocked domain.
example: example.org
type: string
x-go-name: Domain
id:
description: The ID of the domain block.
example: 01FBW21XJA09XYX51KV5JVBW0F
readOnly: true
type: string
x-go-name: ID
obfuscate:
description: |-
Obfuscate the domain name when serving this domain block publicly.
A useful anti-harassment tool.
example: false
type: boolean
x-go-name: Obfuscate
private_comment:
description: Private comment for this block, visible to our instance admins
only.
example: they are poopoo
type: string
x-go-name: PrivateComment
public_comment:
description: Public comment for this block, visible if domain blocks are served
publicly.
example: they smell
type: string
x-go-name: PublicComment
subscription_id:
description: The ID of the subscription that created/caused this domain block.
example: 01FBW25TF5J67JW3HFHZCSD23K
type: string
x-go-name: SubscriptionID
type: object
x-go-name: DomainBlock
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
domainBlockCreateRequest:
properties:
domain:
description: hostname/domain to block
type: string
x-go-name: Domain
domains:
$ref: '#/definitions/FileHeader'
obfuscate:
description: whether the domain should be obfuscated when being displayed
publicly
type: boolean
x-go-name: Obfuscate
private_comment:
description: private comment for other admins on why the domain was blocked
type: string
x-go-name: PrivateComment
public_comment:
description: public comment on the reason for the domain block
type: string
x-go-name: PublicComment
title: DomainBlockCreateRequest is the form submitted as a POST to /api/v1/admin/domain_blocks
to create a new block.
type: object
x-go-name: DomainBlockCreateRequest
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
emoji:
properties:
category:
description: Used for sorting custom emoji in the picker.
example: blobcats
type: string
x-go-name: Category
shortcode:
description: The name of the custom emoji.
example: blobcat_uwu
type: string
x-go-name: Shortcode
static_url:
description: A link to a static copy of the custom emoji.
example: https://example.org/fileserver/emojis/blogcat_uwu.png
type: string
x-go-name: StaticURL
url:
description: Web URL of the custom emoji.
example: https://example.org/fileserver/emojis/blogcat_uwu.gif
type: string
x-go-name: URL
visible_in_picker:
description: Emoji is visible in the emoji picker of the instance.
example: true
type: boolean
x-go-name: VisibleInPicker
title: Emoji represents a custom emoji.
type: object
x-go-name: Emoji
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
emojiCreateRequest:
properties:
Image:
$ref: '#/definitions/FileHeader'
Shortcode:
description: Desired shortcode for the emoji, without surrounding colons.
This must be unique for the domain.
example: blobcat_uwu
type: string
title: EmojiCreateRequest represents a request to create a custom emoji made through
the admin API.
type: object
x-go-name: EmojiCreateRequest
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
field:
properties:
name:
description: The key/name of this field.
example: pronouns
type: string
x-go-name: Name
value:
description: The value of this field.
example: they/them
type: string
x-go-name: Value
verified_at:
description: If this field has been verified, when did this occur? (ISO 8601
Datetime).
example: "2021-07-30T09:20:25+00:00"
type: string
x-go-name: VerifiedAt
title: Field represents a name/value pair to display on an account's profile.
type: object
x-go-name: Field
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
mediaDimensions:
properties:
aspect:
format: float
type: number
x-go-name: Aspect
bitrate:
format: int64
type: integer
x-go-name: Bitrate
duration:
format: float
type: number
x-go-name: Duration
frame_rate:
type: string
x-go-name: FrameRate
height:
format: int64
type: integer
x-go-name: Height
size:
type: string
x-go-name: Size
width:
format: int64
type: integer
x-go-name: Width
title: MediaDimensions describes the physical properties of a piece of media.
It should be returned to the caller as part of MediaMeta.
type: object
x-go-name: MediaDimensions
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
mediaFocus:
properties:
x:
format: float
type: number
x-go-name: X
"y":
format: float
type: number
x-go-name: "Y"
title: MediaFocus describes the focal point of a piece of media. It should be
returned to the caller as part of MediaMeta.
type: object
x-go-name: MediaFocus
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
mediaMeta:
description: MediaMeta describes the returned media
properties:
aspect:
format: float
type: number
x-go-name: Aspect
audio_bitrate:
type: string
x-go-name: AudioBitrate
audio_channels:
type: string
x-go-name: AudioChannels
audio_encode:
type: string
x-go-name: AudioEncode
duration:
format: float
type: number
x-go-name: Duration
focus:
$ref: '#/definitions/mediaFocus'
fps:
format: uint16
type: integer
x-go-name: FPS
height:
format: int64
type: integer
x-go-name: Height
length:
type: string
x-go-name: Length
original:
$ref: '#/definitions/mediaDimensions'
size:
type: string
x-go-name: Size
small:
$ref: '#/definitions/mediaDimensions'
width:
format: int64
type: integer
x-go-name: Width
type: object
x-go-name: MediaMeta
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
oauthToken:
properties:
access_token:
description: Access token used for authorization.
type: string
x-go-name: AccessToken
created_at:
description: When the OAuth token was generated (UNIX timestamp seconds).
example: 1627644520
format: int64
type: integer
x-go-name: CreatedAt
scope:
description: OAuth scopes granted by this token, space-separated.
example: read write admin
type: string
x-go-name: Scope
token_type:
description: OAuth token type. Will always be 'Bearer'.
example: bearer
type: string
x-go-name: TokenType
title: Token represents an OAuth token used for authenticating with the GoToSocial
API and performing actions.
type: object
x-go-name: Token
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
poll:
properties:
emojis:
description: Custom emoji to be used for rendering poll options.
items:
$ref: '#/definitions/emoji'
type: array
x-go-name: Emojis
expired:
description: Is the poll currently expired?
type: boolean
x-go-name: Expired
expires_at:
description: When the poll ends. (ISO 8601 Datetime), or null if the poll
does not end
type: string
x-go-name: ExpiresAt
id:
description: The ID of the poll in the database.
example: 01FBYKMD1KBMJ0W6JF1YZ3VY5D
type: string
x-go-name: ID
multiple:
description: Does the poll allow multiple-choice answers?
type: boolean
x-go-name: Multiple
options:
description: Possible answers for the poll.
items:
$ref: '#/definitions/pollOptions'
type: array
x-go-name: Options
own_votes:
description: When called with a user token, which options has the authorized
user chosen? Contains an array of index values for options.
items:
format: int64
type: integer
type: array
x-go-name: OwnVotes
voted:
description: When called with a user token, has the authorized user voted?
type: boolean
x-go-name: Voted
voters_count:
description: How many unique accounts have voted on a multiple-choice poll.
Null if multiple is false.
format: int64
type: integer
x-go-name: VotersCount
votes_count:
description: How many votes have been received.
format: int64
type: integer
x-go-name: VotesCount
title: Poll represents a poll attached to a status.
type: object
x-go-name: Poll
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
pollOptions:
properties:
title:
description: The text value of the poll option. String.
type: string
x-go-name: Title
votes_count:
description: The number of received votes for this option. Number, or null
if results are not published yet.
format: int64
type: integer
x-go-name: VotesCount
title: PollOptions represents the current vote counts for different poll options.
type: object
x-go-name: PollOptions
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
status:
properties:
account:
$ref: '#/definitions/account'
application:
$ref: '#/definitions/application'
bookmarked:
description: This status has been bookmarked by the account viewing it.
type: boolean
x-go-name: Bookmarked
card:
$ref: '#/definitions/card'
content:
description: The content of this status. Should be HTML, but might also be
plaintext in some cases.
example: <p>Hey this is a status!</p>
type: string
x-go-name: Content
created_at:
description: The date when this status was created (ISO 8601 Datetime).
example: "2021-07-30T09:20:25+00:00"
type: string
x-go-name: CreatedAt
emojis:
description: Custom emoji to be used when rendering status content.
items:
$ref: '#/definitions/emoji'
type: array
x-go-name: Emojis
favourited:
description: This status has been favourited by the account viewing it.
type: boolean
x-go-name: Favourited
favourites_count:
description: Number of favourites/likes this status has received, according
to our instance.
format: int64
type: integer
x-go-name: FavouritesCount
id:
description: ID of the status.
example: 01FBVD42CQ3ZEEVMW180SBX03B
type: string
x-go-name: ID
in_reply_to_account_id:
description: ID of the account being replied to.
example: 01FBVD42CQ3ZEEVMW180SBX03B
type: string
x-go-name: InReplyToAccountID
in_reply_to_id:
description: ID of the status being replied to.
example: 01FBVD42CQ3ZEEVMW180SBX03B
type: string
x-go-name: InReplyToID
language:
description: Primary language of this status (ISO 639 Part 1 two-letter language
code).
example: en
type: string
x-go-name: Language
media_attachments:
description: Media that is attached to this status.
items:
$ref: '#/definitions/attachment'
type: array
x-go-name: MediaAttachments
mentions:
description: Mentions of users within the status content.
items:
$ref: '#/definitions/Mention'
type: array
x-go-name: Mentions
muted:
description: Replies to this status have been muted by the account viewing
it.
type: boolean
x-go-name: Muted
pinned:
description: This status has been pinned by the account viewing it (only relevant
for your own statuses).
type: boolean
x-go-name: Pinned
poll:
$ref: '#/definitions/poll'
reblog:
$ref: '#/definitions/status'
reblogged:
description: This status has been boosted/reblogged by the account viewing
it.
type: boolean
x-go-name: Reblogged
reblogs_count:
description: Number of times this status has been boosted/reblogged, according
to our instance.
format: int64
type: integer
x-go-name: ReblogsCount
replies_count:
description: Number of replies to this status, according to our instance.
format: int64
type: integer
x-go-name: RepliesCount
sensitive:
description: Status contains sensitive content.
example: false
type: boolean
x-go-name: Sensitive
spoiler_text:
description: Subject, summary, or content warning for the status.
example: warning nsfw
type: string
x-go-name: SpoilerText
tags:
description: Hashtags used within the status content.
items:
$ref: '#/definitions/tag'
type: array
x-go-name: Tags
text:
description: |-
Plain-text source of a status. Returned instead of content when status is deleted,
so the user may redraft from the source text without the client having to reverse-engineer
the original text from the HTML content.
type: string
x-go-name: Text
uri:
description: ActivityPub URI of the status. Equivalent to the status's activitypub
ID.
example: https://example.org/users/some_user/statuses/01FBVD42CQ3ZEEVMW180SBX03B
type: string
x-go-name: URI
url:
description: The status's publicly available web URL. This link will only
work if the visibility of the status is 'public'.
example: https://example.org/@some_user/statuses/01FBVD42CQ3ZEEVMW180SBX03B
type: string
x-go-name: URL
visibility:
$ref: '#/definitions/statusVisibility'
title: Status represents a status or post.
type: object
x-go-name: Status
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
statusVisibility:
title: Visibility denotes the visibility of a status to other users.
type: string
x-go-name: Visibility
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
tag:
properties:
name:
description: 'The value of the hashtag after the # sign.'
example: helloworld
type: string
x-go-name: Name
url:
description: Web link to the hashtag.
example: https://example.org/tags/helloworld
type: string
x-go-name: URL
title: Tag represents a hashtag used within the content of a status.
type: object
x-go-name: Tag
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
updateField:
description: By default, max 4 fields and 255 characters per property/value.
properties:
name:
description: Name of the field
type: string
x-go-name: Name
value:
description: Value of the field
type: string
x-go-name: Value
title: UpdateField is to be used specifically in an UpdateCredentialsRequest.
type: object
x-go-name: UpdateField
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
host: example.org
info:
contact:
email: admin@gotosocial.org
name: GoToSocial Authors
description: GoToSocial Swagger documentation.
license:
name: AGPL3
url: https://www.gnu.org/licenses/agpl-3.0.en.html
title: GoToSocial
version: 0.1.0-SNAPSHOT
paths:
/api/v1/accounts:
post:
consumes:
- application/json
- application/xml
- application/x-www-form-urlencoded
- multipart/form-data
operationId: accountCreate
parameters:
- in: body
name: Account Create Request
schema:
$ref: '#/definitions/accountCreateRequest'
produces:
- application/json
responses:
"200":
description: An OAuth2 access token for the newly-created account.
schema:
$ref: '#/definitions/oauthToken'
"400":
description: bad request
"401":
description: unauthorized
"404":
description: not found
"500":
description: internal error
security:
- OAuth2 Application:
- write:accounts
summary: Create a new account using an application token.
tags:
- accounts
/api/v1/accounts/{id}:
get:
operationId: accountGet
parameters:
- description: The id of the requested account.
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: ""
schema:
$ref: '#/definitions/account'
"400":
description: bad request
"401":
description: unauthorized
"404":
description: not found
security:
- OAuth2 Bearer:
- read:accounts
summary: Get information about an account with the given ID.
tags:
- accounts
/api/v1/accounts/{id}/block:
post:
operationId: accountBlock
parameters:
- description: The id of the account to block.
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: Your relationship to this account.
schema:
$ref: '#/definitions/accountRelationship'
"400":
description: bad request
"401":
description: unauthorized
"404":
description: not found
security:
- OAuth2 Bearer:
- write:blocks
summary: Block account with id.
tags:
- accounts
/api/v1/accounts/{id}/follow:
post:
operationId: accountFollow
parameters:
- description: The id of the account to follow.
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: Your relationship to this account.
schema:
$ref: '#/definitions/accountRelationship'
"400":
description: bad request
"401":
description: unauthorized
"404":
description: not found
security:
- OAuth2 Bearer:
- write:follows
summary: Follow account with id.
tags:
- accounts
/api/v1/accounts/{id}/followers:
get:
operationId: accountFollowers
parameters:
- description: Account ID.
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: Array of accounts that follow this account.
schema:
items:
$ref: '#/definitions/account'
type: array
"400":
description: bad request
"401":
description: unauthorized
"404":
description: not found
security:
- OAuth2 Bearer:
- read:accounts
summary: See followers of account with given id.
tags:
- accounts
/api/v1/accounts/{id}/following:
get:
operationId: accountFollowing
parameters:
- description: Account ID.
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: Array of accounts that are followed by this account.
schema:
items:
$ref: '#/definitions/account'
type: array
"400":
description: bad request
"401":
description: unauthorized
"404":
description: not found
security:
- OAuth2 Bearer:
- read:accounts
summary: See accounts followed by given account id.
tags:
- accounts
/api/v1/accounts/{id}/statuses:
get:
description: The statuses will be returned in descending chronological order
(newest first), with sequential IDs (bigger = newer).
operationId: accountStatuses
parameters:
- description: Account ID.
in: path
name: id
required: true
type: string
- default: 30
description: Number of statuses to return.
in: query
name: limit
type: integer
- default: false
description: Exclude statuses that are a reply to another status.
in: query
name: exclude_replies
type: boolean
- description: |-
Return only statuses *OLDER* than the given max status ID.
The status with the specified ID will not be included in the response.
in: query
name: max_id
type: string
- default: false
description: Show only pinned statuses. In other words,e xclude statuses that
are not pinned to the given account ID.
in: query
name: pinned_only
type: boolean
- default: false
description: Show only statuses with media attachments.
in: query
name: media_only
type: boolean
produces:
- application/json
responses:
"200":
description: Array of statuses..
schema:
items:
$ref: '#/definitions/status'
type: array
"400":
description: bad request
"401":
description: unauthorized
"404":
description: not found
security:
- OAuth2 Bearer:
- read:accounts
summary: See statuses posted by the requested account.
tags:
- accounts
/api/v1/accounts/{id}/unblock:
post:
operationId: accountUnblock
parameters:
- description: The id of the account to unblock.
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: Your relationship to this account.
schema:
$ref: '#/definitions/accountRelationship'
"400":
description: bad request
"401":
description: unauthorized
"404":
description: not found
security:
- OAuth2 Bearer:
- write:blocks
summary: Unblock account with ID.
tags:
- accounts
/api/v1/accounts/{id}/unfollow:
post:
operationId: accountUnfollow
parameters:
- description: The id of the account to unfollow.
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: Your relationship to this account.
schema:
$ref: '#/definitions/accountRelationship'
"400":
description: bad request
"401":
description: unauthorized
"404":
description: not found
security:
- OAuth2 Bearer:
- write:follows
summary: Unfollow account with id.
tags:
- accounts
/api/v1/accounts/relationships:
get:
operationId: accountRelationships
parameters:
- description: Account IDs.
in: query
items:
type: string
name: id
required: true
type: array
produces:
- application/json
responses:
"200":
description: Array of account relationships.
schema:
items:
$ref: '#/definitions/accountRelationship'
type: array
"400":
description: bad request
"401":
description: unauthorized
"404":
description: not found
security:
- OAuth2 Bearer:
- read:accounts
summary: See your account's relationships with the given account IDs.
tags:
- accounts
/api/v1/accounts/update_credentials:
patch:
consumes:
- multipart/form-data
operationId: accountUpdate
parameters:
- description: Account should be made discoverable and shown in the profile
directory (if enabled).
in: formData
name: discoverable
type: boolean
- description: Account is flagged as a bot.
in: formData
name: bot
type: boolean
- description: The display name to use for the account.
in: formData
name: display_name
type: string
- description: Bio/description of this account.
in: formData
name: note
type: string
- description: Avatar of the user.
in: formData
name: avatar
type: file
- description: Header of the user.
in: formData
name: header
type: file
- description: Require manual approval of follow requests.
in: formData
name: locked
type: boolean
- description: Default post privacy for authored statuses.
in: formData
name: source.privacy
type: string
- description: Mark authored statuses as sensitive by default.
in: formData
name: source.sensitive
type: boolean
- description: Default language to use for authored statuses (ISO 6391).
in: formData
name: source.language
type: string
produces:
- application/json
responses:
"200":
description: The newly updated account.
schema:
$ref: '#/definitions/account'
"400":
description: bad request
"401":
description: unauthorized
security:
- OAuth2 Bearer:
- write:accounts
summary: Update your account.
tags:
- accounts
/api/v1/accounts/verify_credentials:
get:
operationId: accountVerify
produces:
- application/json
responses:
"200":
description: ""
schema:
$ref: '#/definitions/account'
"400":
description: bad request
"401":
description: unauthorized
"404":
description: not found
security:
- OAuth2 Bearer:
- read:accounts
summary: Verify a token by returning account details pertaining to it.
tags:
- accounts
schemes:
- https
- http
securityDefinitions:
OAuth2 Application:
flow: application
scopes:
write:accounts: grants write access to accounts
tokenUrl: https://example.org/oauth/token
type: oauth2
OAuth2 Bearer:
authorizationUrl: https://example.org/oauth/authorize
flow: accessCode
scopes:
admin: grants admin access to everything
admin:accounts: grants admin access to accounts
read: grants read access to everything
read:accounts: grants read access to accounts
write: grants write access to everything
write:accounts: grants write access to accounts
write:blocks: grants write access to blocks
write:follows: grants write access to follows
tokenUrl: https://example.org/oauth/token
type: oauth2
swagger: "2.0"
|