···11+{
22+ "lexicon": 1,
33+ "id": "app.bsky.graph.listitem",
44+ "defs": {
55+ "main": {
66+ "type": "record",
77+ "description": "Record representing an account's inclusion on a specific list. The AppView will ignore duplicate listitem records.",
88+ "key": "tid",
99+ "record": {
1010+ "type": "object",
1111+ "required": ["subject", "list", "createdAt"],
1212+ "properties": {
1313+ "subject": {
1414+ "type": "string",
1515+ "format": "did",
1616+ "description": "The account which is included on the list."
1717+ },
1818+ "list": {
1919+ "type": "string",
2020+ "format": "at-uri",
2121+ "description": "Reference (AT-URI) to the list record (app.bsky.graph.list)."
2222+ },
2323+ "createdAt": { "type": "string", "format": "datetime" }
2424+ }
2525+ }
2626+ }
2727+ }
2828+}
+91
resources/lexicons/app/bsky/labeler/defs.json
···11+{
22+ "lexicon": 1,
33+ "id": "app.bsky.labeler.defs",
44+ "defs": {
55+ "labelerView": {
66+ "type": "object",
77+ "required": ["uri", "cid", "creator", "indexedAt"],
88+ "properties": {
99+ "uri": { "type": "string", "format": "at-uri" },
1010+ "cid": { "type": "string", "format": "cid" },
1111+ "creator": { "type": "ref", "ref": "app.bsky.actor.defs#profileView" },
1212+ "likeCount": { "type": "integer", "minimum": 0 },
1313+ "viewer": { "type": "ref", "ref": "#labelerViewerState" },
1414+ "indexedAt": { "type": "string", "format": "datetime" },
1515+ "labels": {
1616+ "type": "array",
1717+ "items": { "type": "ref", "ref": "com.atproto.label.defs#label" }
1818+ }
1919+ }
2020+ },
2121+ "labelerViewDetailed": {
2222+ "type": "object",
2323+ "required": ["uri", "cid", "creator", "policies", "indexedAt"],
2424+ "properties": {
2525+ "uri": { "type": "string", "format": "at-uri" },
2626+ "cid": { "type": "string", "format": "cid" },
2727+ "creator": { "type": "ref", "ref": "app.bsky.actor.defs#profileView" },
2828+ "policies": {
2929+ "type": "ref",
3030+ "ref": "app.bsky.labeler.defs#labelerPolicies"
3131+ },
3232+ "likeCount": { "type": "integer", "minimum": 0 },
3333+ "viewer": { "type": "ref", "ref": "#labelerViewerState" },
3434+ "indexedAt": { "type": "string", "format": "datetime" },
3535+ "labels": {
3636+ "type": "array",
3737+ "items": { "type": "ref", "ref": "com.atproto.label.defs#label" }
3838+ },
3939+ "reasonTypes": {
4040+ "description": "The set of report reason 'codes' which are in-scope for this service to review and action. These usually align to policy categories. If not defined (distinct from empty array), all reason types are allowed.",
4141+ "type": "array",
4242+ "items": {
4343+ "type": "ref",
4444+ "ref": "com.atproto.moderation.defs#reasonType"
4545+ }
4646+ },
4747+ "subjectTypes": {
4848+ "description": "The set of subject types (account, record, etc) this service accepts reports on.",
4949+ "type": "array",
5050+ "items": {
5151+ "type": "ref",
5252+ "ref": "com.atproto.moderation.defs#subjectType"
5353+ }
5454+ },
5555+ "subjectCollections": {
5656+ "type": "array",
5757+ "description": "Set of record types (collection NSIDs) which can be reported to this service. If not defined (distinct from empty array), default is any record type.",
5858+ "items": { "type": "string", "format": "nsid" }
5959+ }
6060+ }
6161+ },
6262+ "labelerViewerState": {
6363+ "type": "object",
6464+ "properties": {
6565+ "like": { "type": "string", "format": "at-uri" }
6666+ }
6767+ },
6868+ "labelerPolicies": {
6969+ "type": "object",
7070+ "required": ["labelValues"],
7171+ "properties": {
7272+ "labelValues": {
7373+ "type": "array",
7474+ "description": "The label values which this labeler publishes. May include global or custom labels.",
7575+ "items": {
7676+ "type": "ref",
7777+ "ref": "com.atproto.label.defs#labelValue"
7878+ }
7979+ },
8080+ "labelValueDefinitions": {
8181+ "type": "array",
8282+ "description": "Label values created by this labeler and scoped exclusively to it. Labels defined here will override global label definitions for this labeler.",
8383+ "items": {
8484+ "type": "ref",
8585+ "ref": "com.atproto.label.defs#labelValueDefinition"
8686+ }
8787+ }
8888+ }
8989+ }
9090+ }
9191+}
+47
resources/lexicons/app/bsky/labeler/service.json
···11+{
22+ "lexicon": 1,
33+ "id": "app.bsky.labeler.service",
44+ "defs": {
55+ "main": {
66+ "type": "record",
77+ "description": "A declaration of the existence of labeler service.",
88+ "key": "literal:self",
99+ "record": {
1010+ "type": "object",
1111+ "required": ["policies", "createdAt"],
1212+ "properties": {
1313+ "policies": {
1414+ "type": "ref",
1515+ "ref": "app.bsky.labeler.defs#labelerPolicies"
1616+ },
1717+ "labels": {
1818+ "type": "union",
1919+ "refs": ["com.atproto.label.defs#selfLabels"]
2020+ },
2121+ "createdAt": { "type": "string", "format": "datetime" },
2222+ "reasonTypes": {
2323+ "description": "The set of report reason 'codes' which are in-scope for this service to review and action. These usually align to policy categories. If not defined (distinct from empty array), all reason types are allowed.",
2424+ "type": "array",
2525+ "items": {
2626+ "type": "ref",
2727+ "ref": "com.atproto.moderation.defs#reasonType"
2828+ }
2929+ },
3030+ "subjectTypes": {
3131+ "description": "The set of subject types (account, record, etc) this service accepts reports on.",
3232+ "type": "array",
3333+ "items": {
3434+ "type": "ref",
3535+ "ref": "com.atproto.moderation.defs#subjectType"
3636+ }
3737+ },
3838+ "subjectCollections": {
3939+ "type": "array",
4040+ "description": "Set of record types (collection NSIDs) which can be reported to this service. If not defined (distinct from empty array), default is any record type.",
4141+ "items": { "type": "string", "format": "nsid" }
4242+ }
4343+ }
4444+ }
4545+ }
4646+ }
4747+}
···11+{
22+ "lexicon": 1,
33+ "id": "app.bsky.richtext.facet",
44+ "defs": {
55+ "main": {
66+ "type": "object",
77+ "description": "Annotation of a sub-string within rich text.",
88+ "required": ["index", "features"],
99+ "properties": {
1010+ "index": { "type": "ref", "ref": "#byteSlice" },
1111+ "features": {
1212+ "type": "array",
1313+ "items": { "type": "union", "refs": ["#mention", "#link", "#tag"] }
1414+ }
1515+ }
1616+ },
1717+ "mention": {
1818+ "type": "object",
1919+ "description": "Facet feature for mention of another account. The text is usually a handle, including a '@' prefix, but the facet reference is a DID.",
2020+ "required": ["did"],
2121+ "properties": {
2222+ "did": { "type": "string", "format": "did" }
2323+ }
2424+ },
2525+ "link": {
2626+ "type": "object",
2727+ "description": "Facet feature for a URL. The text URL may have been simplified or truncated, but the facet reference should be a complete URL.",
2828+ "required": ["uri"],
2929+ "properties": {
3030+ "uri": { "type": "string", "format": "uri" }
3131+ }
3232+ },
3333+ "tag": {
3434+ "type": "object",
3535+ "description": "Facet feature for a hashtag. The text usually includes a '#' prefix, but the facet reference should not (except in the case of 'double hash tags').",
3636+ "required": ["tag"],
3737+ "properties": {
3838+ "tag": { "type": "string", "maxLength": 640, "maxGraphemes": 64 }
3939+ }
4040+ },
4141+ "byteSlice": {
4242+ "type": "object",
4343+ "description": "Specifies the sub-string range a facet feature applies to. Start index is inclusive, end index is exclusive. Indices are zero-indexed, counting bytes of the UTF-8 encoded text. NOTE: some languages, like Javascript, use UTF-16 or Unicode codepoints for string slice indexing; in these languages, convert to byte arrays before working with facets.",
4444+ "required": ["byteStart", "byteEnd"],
4545+ "properties": {
4646+ "byteStart": { "type": "integer", "minimum": 0 },
4747+ "byteEnd": { "type": "integer", "minimum": 0 }
4848+ }
4949+ }
5050+ }
5151+}
+198
resources/lexicons/app/bsky/unspecced/defs.json
···11+{
22+ "lexicon": 1,
33+ "id": "app.bsky.unspecced.defs",
44+ "defs": {
55+ "skeletonSearchPost": {
66+ "type": "object",
77+ "required": ["uri"],
88+ "properties": {
99+ "uri": { "type": "string", "format": "at-uri" }
1010+ }
1111+ },
1212+ "skeletonSearchActor": {
1313+ "type": "object",
1414+ "required": ["did"],
1515+ "properties": {
1616+ "did": { "type": "string", "format": "did" }
1717+ }
1818+ },
1919+ "skeletonSearchStarterPack": {
2020+ "type": "object",
2121+ "required": ["uri"],
2222+ "properties": {
2323+ "uri": { "type": "string", "format": "at-uri" }
2424+ }
2525+ },
2626+ "trendingTopic": {
2727+ "type": "object",
2828+ "required": ["topic", "link"],
2929+ "properties": {
3030+ "topic": { "type": "string" },
3131+ "displayName": { "type": "string" },
3232+ "description": { "type": "string" },
3333+ "link": { "type": "string" }
3434+ }
3535+ },
3636+ "skeletonTrend": {
3737+ "type": "object",
3838+ "required": [
3939+ "topic",
4040+ "displayName",
4141+ "link",
4242+ "startedAt",
4343+ "postCount",
4444+ "dids"
4545+ ],
4646+ "properties": {
4747+ "topic": { "type": "string" },
4848+ "displayName": { "type": "string" },
4949+ "link": { "type": "string" },
5050+ "startedAt": { "type": "string", "format": "datetime" },
5151+ "postCount": { "type": "integer" },
5252+ "status": { "type": "string", "knownValues": ["hot"] },
5353+ "category": { "type": "string" },
5454+ "dids": {
5555+ "type": "array",
5656+ "items": {
5757+ "type": "string",
5858+ "format": "did"
5959+ }
6060+ }
6161+ }
6262+ },
6363+ "trendView": {
6464+ "type": "object",
6565+ "required": [
6666+ "topic",
6767+ "displayName",
6868+ "link",
6969+ "startedAt",
7070+ "postCount",
7171+ "actors"
7272+ ],
7373+ "properties": {
7474+ "topic": { "type": "string" },
7575+ "displayName": { "type": "string" },
7676+ "link": { "type": "string" },
7777+ "startedAt": { "type": "string", "format": "datetime" },
7878+ "postCount": { "type": "integer" },
7979+ "status": { "type": "string", "knownValues": ["hot"] },
8080+ "category": { "type": "string" },
8181+ "actors": {
8282+ "type": "array",
8383+ "items": {
8484+ "type": "ref",
8585+ "ref": "app.bsky.actor.defs#profileViewBasic"
8686+ }
8787+ }
8888+ }
8989+ },
9090+ "threadItemPost": {
9191+ "type": "object",
9292+ "required": [
9393+ "post",
9494+ "moreParents",
9595+ "moreReplies",
9696+ "opThread",
9797+ "hiddenByThreadgate",
9898+ "mutedByViewer"
9999+ ],
100100+ "properties": {
101101+ "post": { "type": "ref", "ref": "app.bsky.feed.defs#postView" },
102102+ "moreParents": {
103103+ "type": "boolean",
104104+ "description": "This post has more parents that were not present in the response. This is just a boolean, without the number of parents."
105105+ },
106106+ "moreReplies": {
107107+ "type": "integer",
108108+ "description": "This post has more replies that were not present in the response. This is a numeric value, which is best-effort and might not be accurate."
109109+ },
110110+ "opThread": {
111111+ "type": "boolean",
112112+ "description": "This post is part of a contiguous thread by the OP from the thread root. Many different OP threads can happen in the same thread."
113113+ },
114114+ "hiddenByThreadgate": {
115115+ "type": "boolean",
116116+ "description": "The threadgate created by the author indicates this post as a reply to be hidden for everyone consuming the thread."
117117+ },
118118+ "mutedByViewer": {
119119+ "type": "boolean",
120120+ "description": "This is by an account muted by the viewer requesting it."
121121+ }
122122+ }
123123+ },
124124+ "threadItemNoUnauthenticated": {
125125+ "type": "object",
126126+ "properties": {}
127127+ },
128128+ "threadItemNotFound": {
129129+ "type": "object",
130130+ "properties": {}
131131+ },
132132+ "threadItemBlocked": {
133133+ "type": "object",
134134+ "required": ["author"],
135135+ "properties": {
136136+ "author": { "type": "ref", "ref": "app.bsky.feed.defs#blockedAuthor" }
137137+ }
138138+ },
139139+ "ageAssuranceState": {
140140+ "type": "object",
141141+ "description": "The computed state of the age assurance process, returned to the user in question on certain authenticated requests.",
142142+ "required": ["status"],
143143+ "properties": {
144144+ "lastInitiatedAt": {
145145+ "type": "string",
146146+ "format": "datetime",
147147+ "description": "The timestamp when this state was last updated."
148148+ },
149149+ "status": {
150150+ "type": "string",
151151+ "description": "The status of the age assurance process.",
152152+ "knownValues": ["unknown", "pending", "assured", "blocked"]
153153+ }
154154+ }
155155+ },
156156+ "ageAssuranceEvent": {
157157+ "type": "object",
158158+ "description": "Object used to store age assurance data in stash.",
159159+ "required": ["createdAt", "status", "attemptId"],
160160+ "properties": {
161161+ "createdAt": {
162162+ "type": "string",
163163+ "format": "datetime",
164164+ "description": "The date and time of this write operation."
165165+ },
166166+ "status": {
167167+ "type": "string",
168168+ "description": "The status of the age assurance process.",
169169+ "knownValues": ["unknown", "pending", "assured"]
170170+ },
171171+ "attemptId": {
172172+ "type": "string",
173173+ "description": "The unique identifier for this instance of the age assurance flow, in UUID format."
174174+ },
175175+ "email": {
176176+ "type": "string",
177177+ "description": "The email used for AA."
178178+ },
179179+ "initIp": {
180180+ "type": "string",
181181+ "description": "The IP address used when initiating the AA flow."
182182+ },
183183+ "initUa": {
184184+ "type": "string",
185185+ "description": "The user agent used when initiating the AA flow."
186186+ },
187187+ "completeIp": {
188188+ "type": "string",
189189+ "description": "The IP address used when completing the AA flow."
190190+ },
191191+ "completeUa": {
192192+ "type": "string",
193193+ "description": "The user agent used when completing the AA flow."
194194+ }
195195+ }
196196+ }
197197+ }
198198+}
+28
resources/lexicons/app/bsky/video/defs.json
···11+{
22+ "lexicon": 1,
33+ "id": "app.bsky.video.defs",
44+ "defs": {
55+ "jobStatus": {
66+ "type": "object",
77+ "required": ["jobId", "did", "state"],
88+ "properties": {
99+ "jobId": { "type": "string" },
1010+ "did": { "type": "string", "format": "did" },
1111+ "state": {
1212+ "type": "string",
1313+ "description": "The state of the video processing job. All values not listed as a known value indicate that the job is in process.",
1414+ "knownValues": ["JOB_STATE_COMPLETED", "JOB_STATE_FAILED"]
1515+ },
1616+ "progress": {
1717+ "type": "integer",
1818+ "minimum": 0,
1919+ "maximum": 100,
2020+ "description": "Progress within the current processing state."
2121+ },
2222+ "blob": { "type": "blob" },
2323+ "error": { "type": "string" },
2424+ "message": { "type": "string" }
2525+ }
2626+ }
2727+ }
2828+}
···11+{
22+ "lexicon": 1,
33+ "id": "com.atproto.identity.refreshIdentity",
44+ "defs": {
55+ "main": {
66+ "type": "procedure",
77+ "description": "Request that the server re-resolve an identity (DID and handle). The server may ignore this request, or require authentication, depending on the role, implementation, and policy of the server.",
88+ "input": {
99+ "encoding": "application/json",
1010+ "schema": {
1111+ "type": "object",
1212+ "required": ["identifier"],
1313+ "properties": {
1414+ "identifier": {
1515+ "type": "string",
1616+ "format": "at-identifier"
1717+ }
1818+ }
1919+ }
2020+ },
2121+ "output": {
2222+ "encoding": "application/json",
2323+ "schema": {
2424+ "type": "ref",
2525+ "ref": "com.atproto.identity.defs#identityInfo"
2626+ }
2727+ },
2828+ "errors": [
2929+ {
3030+ "name": "HandleNotFound",
3131+ "description": "The resolution process confirmed that the handle does not resolve to any DID."
3232+ },
3333+ {
3434+ "name": "DidNotFound",
3535+ "description": "The DID resolution process confirmed that there is no current DID."
3636+ },
3737+ {
3838+ "name": "DidDeactivated",
3939+ "description": "The DID previously existed, but has been deactivated."
4040+ }
4141+ ]
4242+ }
4343+ }
4444+}
···11+{
22+ "lexicon": 1,
33+ "id": "com.atproto.identity.requestPlcOperationSignature",
44+ "defs": {
55+ "main": {
66+ "type": "procedure",
77+ "description": "Request an email with a code to in order to request a signed PLC operation. Requires Auth."
88+ }
99+ }
1010+}
···11+{
22+ "lexicon": 1,
33+ "id": "com.atproto.label.defs",
44+ "defs": {
55+ "label": {
66+ "type": "object",
77+ "description": "Metadata tag on an atproto resource (eg, repo or record).",
88+ "required": ["src", "uri", "val", "cts"],
99+ "properties": {
1010+ "ver": {
1111+ "type": "integer",
1212+ "description": "The AT Protocol version of the label object."
1313+ },
1414+ "src": {
1515+ "type": "string",
1616+ "format": "did",
1717+ "description": "DID of the actor who created this label."
1818+ },
1919+ "uri": {
2020+ "type": "string",
2121+ "format": "uri",
2222+ "description": "AT URI of the record, repository (account), or other resource that this label applies to."
2323+ },
2424+ "cid": {
2525+ "type": "string",
2626+ "format": "cid",
2727+ "description": "Optionally, CID specifying the specific version of 'uri' resource this label applies to."
2828+ },
2929+ "val": {
3030+ "type": "string",
3131+ "maxLength": 128,
3232+ "description": "The short string name of the value or type of this label."
3333+ },
3434+ "neg": {
3535+ "type": "boolean",
3636+ "description": "If true, this is a negation label, overwriting a previous label."
3737+ },
3838+ "cts": {
3939+ "type": "string",
4040+ "format": "datetime",
4141+ "description": "Timestamp when this label was created."
4242+ },
4343+ "exp": {
4444+ "type": "string",
4545+ "format": "datetime",
4646+ "description": "Timestamp at which this label expires (no longer applies)."
4747+ },
4848+ "sig": {
4949+ "type": "bytes",
5050+ "description": "Signature of dag-cbor encoded label."
5151+ }
5252+ }
5353+ },
5454+ "selfLabels": {
5555+ "type": "object",
5656+ "description": "Metadata tags on an atproto record, published by the author within the record.",
5757+ "required": ["values"],
5858+ "properties": {
5959+ "values": {
6060+ "type": "array",
6161+ "items": { "type": "ref", "ref": "#selfLabel" },
6262+ "maxLength": 10
6363+ }
6464+ }
6565+ },
6666+ "selfLabel": {
6767+ "type": "object",
6868+ "description": "Metadata tag on an atproto record, published by the author within the record. Note that schemas should use #selfLabels, not #selfLabel.",
6969+ "required": ["val"],
7070+ "properties": {
7171+ "val": {
7272+ "type": "string",
7373+ "maxLength": 128,
7474+ "description": "The short string name of the value or type of this label."
7575+ }
7676+ }
7777+ },
7878+ "labelValueDefinition": {
7979+ "type": "object",
8080+ "description": "Declares a label value and its expected interpretations and behaviors.",
8181+ "required": ["identifier", "severity", "blurs", "locales"],
8282+ "properties": {
8383+ "identifier": {
8484+ "type": "string",
8585+ "description": "The value of the label being defined. Must only include lowercase ascii and the '-' character ([a-z-]+).",
8686+ "maxLength": 100,
8787+ "maxGraphemes": 100
8888+ },
8989+ "severity": {
9090+ "type": "string",
9191+ "description": "How should a client visually convey this label? 'inform' means neutral and informational; 'alert' means negative and warning; 'none' means show nothing.",
9292+ "knownValues": ["inform", "alert", "none"]
9393+ },
9494+ "blurs": {
9595+ "type": "string",
9696+ "description": "What should this label hide in the UI, if applied? 'content' hides all of the target; 'media' hides the images/video/audio; 'none' hides nothing.",
9797+ "knownValues": ["content", "media", "none"]
9898+ },
9999+ "defaultSetting": {
100100+ "type": "string",
101101+ "description": "The default setting for this label.",
102102+ "knownValues": ["ignore", "warn", "hide"],
103103+ "default": "warn"
104104+ },
105105+ "adultOnly": {
106106+ "type": "boolean",
107107+ "description": "Does the user need to have adult content enabled in order to configure this label?"
108108+ },
109109+ "locales": {
110110+ "type": "array",
111111+ "items": { "type": "ref", "ref": "#labelValueDefinitionStrings" }
112112+ }
113113+ }
114114+ },
115115+ "labelValueDefinitionStrings": {
116116+ "type": "object",
117117+ "description": "Strings which describe the label in the UI, localized into a specific language.",
118118+ "required": ["lang", "name", "description"],
119119+ "properties": {
120120+ "lang": {
121121+ "type": "string",
122122+ "description": "The code of the language these strings are written in.",
123123+ "format": "language"
124124+ },
125125+ "name": {
126126+ "type": "string",
127127+ "description": "A short human-readable name for the label.",
128128+ "maxGraphemes": 64,
129129+ "maxLength": 640
130130+ },
131131+ "description": {
132132+ "type": "string",
133133+ "description": "A longer description of what the label means and why it might be applied.",
134134+ "maxGraphemes": 10000,
135135+ "maxLength": 100000
136136+ }
137137+ }
138138+ },
139139+ "labelValue": {
140140+ "type": "string",
141141+ "knownValues": [
142142+ "!hide",
143143+ "!no-promote",
144144+ "!warn",
145145+ "!no-unauthenticated",
146146+ "dmca-violation",
147147+ "doxxing",
148148+ "porn",
149149+ "sexual",
150150+ "nudity",
151151+ "nsfl",
152152+ "gore"
153153+ ]
154154+ }
155155+ }
156156+}
···11+{
22+ "lexicon": 1,
33+ "id": "com.atproto.repo.uploadBlob",
44+ "defs": {
55+ "main": {
66+ "type": "procedure",
77+ "description": "Upload a new blob, to be referenced from a repository record. The blob will be deleted if it is not referenced within a time window (eg, minutes). Blob restrictions (mimetype, size, etc) are enforced when the reference is created. Requires auth, implemented by PDS.",
88+ "input": {
99+ "encoding": "*/*"
1010+ },
1111+ "output": {
1212+ "encoding": "application/json",
1313+ "schema": {
1414+ "type": "object",
1515+ "required": ["blob"],
1616+ "properties": {
1717+ "blob": { "type": "blob" }
1818+ }
1919+ }
2020+ }
2121+ }
2222+ }
2323+}
···11+{
22+ "lexicon": 1,
33+ "id": "com.atproto.server.activateAccount",
44+ "defs": {
55+ "main": {
66+ "type": "procedure",
77+ "description": "Activates a currently deactivated account. Used to finalize account migration after the account's repo is imported and identity is setup."
88+ }
99+ }
1010+}
···11+{
22+ "lexicon": 1,
33+ "id": "com.atproto.server.deactivateAccount",
44+ "defs": {
55+ "main": {
66+ "type": "procedure",
77+ "description": "Deactivates a currently active account. Stops serving of repo, and future writes to repo until reactivated. Used to finalize account migration with the old host after the account has been activated on the new host.",
88+ "input": {
99+ "encoding": "application/json",
1010+ "schema": {
1111+ "type": "object",
1212+ "properties": {
1313+ "deleteAfter": {
1414+ "type": "string",
1515+ "format": "datetime",
1616+ "description": "A recommendation to server as to how long they should hold onto the deactivated account before deleting."
1717+ }
1818+ }
1919+ }
2020+ }
2121+ }
2222+ }
2323+}
···11+{
22+ "lexicon": 1,
33+ "id": "com.atproto.server.getServiceAuth",
44+ "defs": {
55+ "main": {
66+ "type": "query",
77+ "description": "Get a signed token on behalf of the requesting DID for the requested service.",
88+ "parameters": {
99+ "type": "params",
1010+ "required": ["aud"],
1111+ "properties": {
1212+ "aud": {
1313+ "type": "string",
1414+ "format": "did",
1515+ "description": "The DID of the service that the token will be used to authenticate with"
1616+ },
1717+ "exp": {
1818+ "type": "integer",
1919+ "description": "The time in Unix Epoch seconds that the JWT expires. Defaults to 60 seconds in the future. The service may enforce certain time bounds on tokens depending on the requested scope."
2020+ },
2121+ "lxm": {
2222+ "type": "string",
2323+ "format": "nsid",
2424+ "description": "Lexicon (XRPC) method to bind the requested token to"
2525+ }
2626+ }
2727+ },
2828+ "output": {
2929+ "encoding": "application/json",
3030+ "schema": {
3131+ "type": "object",
3232+ "required": ["token"],
3333+ "properties": {
3434+ "token": {
3535+ "type": "string"
3636+ }
3737+ }
3838+ }
3939+ },
4040+ "errors": [
4141+ {
4242+ "name": "BadExpiration",
4343+ "description": "Indicates that the requested expiration date is not a valid. May be in the past or may be reliant on the requested scopes."
4444+ }
4545+ ]
4646+ }
4747+ }
4848+}
···11+{
22+ "lexicon": 1,
33+ "id": "com.atproto.server.reserveSigningKey",
44+ "defs": {
55+ "main": {
66+ "type": "procedure",
77+ "description": "Reserve a repo signing key, for use with account creation. Necessary so that a DID PLC update operation can be constructed during an account migraiton. Public and does not require auth; implemented by PDS. NOTE: this endpoint may change when full account migration is implemented.",
88+ "input": {
99+ "encoding": "application/json",
1010+ "schema": {
1111+ "type": "object",
1212+ "properties": {
1313+ "did": {
1414+ "type": "string",
1515+ "format": "did",
1616+ "description": "The DID to reserve a key for."
1717+ }
1818+ }
1919+ }
2020+ },
2121+ "output": {
2222+ "encoding": "application/json",
2323+ "schema": {
2424+ "type": "object",
2525+ "required": ["signingKey"],
2626+ "properties": {
2727+ "signingKey": {
2828+ "type": "string",
2929+ "description": "The public key for the reserved signing key, in did:key serialization."
3030+ }
3131+ }
3232+ }
3333+ }
3434+ }
3535+ }
3636+}
···11+{
22+ "lexicon": 1,
33+ "id": "com.atproto.sync.notifyOfUpdate",
44+ "defs": {
55+ "main": {
66+ "type": "procedure",
77+ "description": "Notify a crawling service of a recent update, and that crawling should resume. Intended use is after a gap between repo stream events caused the crawling service to disconnect. Does not require auth; implemented by Relay. DEPRECATED: just use com.atproto.sync.requestCrawl",
88+ "input": {
99+ "encoding": "application/json",
1010+ "schema": {
1111+ "type": "object",
1212+ "required": ["hostname"],
1313+ "properties": {
1414+ "hostname": {
1515+ "type": "string",
1616+ "description": "Hostname of the current service (usually a PDS) that is notifying of update."
1717+ }
1818+ }
1919+ }
2020+ }
2121+ }
2222+ }
2323+}
···11+{
22+ "lexicon": 1,
33+ "id": "com.atproto.sync.subscribeRepos",
44+ "defs": {
55+ "main": {
66+ "type": "subscription",
77+ "description": "Repository event stream, aka Firehose endpoint. Outputs repo commits with diff data, and identity update events, for all repositories on the current server. See the atproto specifications for details around stream sequencing, repo versioning, CAR diff format, and more. Public and does not require auth; implemented by PDS and Relay.",
88+ "parameters": {
99+ "type": "params",
1010+ "properties": {
1111+ "cursor": {
1212+ "type": "integer",
1313+ "description": "The last known event seq number to backfill from."
1414+ }
1515+ }
1616+ },
1717+ "message": {
1818+ "schema": {
1919+ "type": "union",
2020+ "refs": ["#commit", "#sync", "#identity", "#account", "#info"]
2121+ }
2222+ },
2323+ "errors": [
2424+ { "name": "FutureCursor" },
2525+ {
2626+ "name": "ConsumerTooSlow",
2727+ "description": "If the consumer of the stream can not keep up with events, and a backlog gets too large, the server will drop the connection."
2828+ }
2929+ ]
3030+ },
3131+ "commit": {
3232+ "type": "object",
3333+ "description": "Represents an update of repository state. Note that empty commits are allowed, which include no repo data changes, but an update to rev and signature.",
3434+ "required": [
3535+ "seq",
3636+ "rebase",
3737+ "tooBig",
3838+ "repo",
3939+ "commit",
4040+ "rev",
4141+ "since",
4242+ "blocks",
4343+ "ops",
4444+ "blobs",
4545+ "time"
4646+ ],
4747+ "nullable": ["since"],
4848+ "properties": {
4949+ "seq": {
5050+ "type": "integer",
5151+ "description": "The stream sequence number of this message."
5252+ },
5353+ "rebase": { "type": "boolean", "description": "DEPRECATED -- unused" },
5454+ "tooBig": {
5555+ "type": "boolean",
5656+ "description": "DEPRECATED -- replaced by #sync event and data limits. Indicates that this commit contained too many ops, or data size was too large. Consumers will need to make a separate request to get missing data."
5757+ },
5858+ "repo": {
5959+ "type": "string",
6060+ "format": "did",
6161+ "description": "The repo this event comes from. Note that all other message types name this field 'did'."
6262+ },
6363+ "commit": {
6464+ "type": "cid-link",
6565+ "description": "Repo commit object CID."
6666+ },
6767+ "rev": {
6868+ "type": "string",
6969+ "format": "tid",
7070+ "description": "The rev of the emitted commit. Note that this information is also in the commit object included in blocks, unless this is a tooBig event."
7171+ },
7272+ "since": {
7373+ "type": "string",
7474+ "format": "tid",
7575+ "description": "The rev of the last emitted commit from this repo (if any)."
7676+ },
7777+ "blocks": {
7878+ "type": "bytes",
7979+ "description": "CAR file containing relevant blocks, as a diff since the previous repo state. The commit must be included as a block, and the commit block CID must be the first entry in the CAR header 'roots' list.",
8080+ "maxLength": 2000000
8181+ },
8282+ "ops": {
8383+ "type": "array",
8484+ "items": {
8585+ "type": "ref",
8686+ "ref": "#repoOp",
8787+ "description": "List of repo mutation operations in this commit (eg, records created, updated, or deleted)."
8888+ },
8989+ "maxLength": 200
9090+ },
9191+ "blobs": {
9292+ "type": "array",
9393+ "items": {
9494+ "type": "cid-link",
9595+ "description": "DEPRECATED -- will soon always be empty. List of new blobs (by CID) referenced by records in this commit."
9696+ }
9797+ },
9898+ "prevData": {
9999+ "type": "cid-link",
100100+ "description": "The root CID of the MST tree for the previous commit from this repo (indicated by the 'since' revision field in this message). Corresponds to the 'data' field in the repo commit object. NOTE: this field is effectively required for the 'inductive' version of firehose."
101101+ },
102102+ "time": {
103103+ "type": "string",
104104+ "format": "datetime",
105105+ "description": "Timestamp of when this message was originally broadcast."
106106+ }
107107+ }
108108+ },
109109+ "sync": {
110110+ "type": "object",
111111+ "description": "Updates the repo to a new state, without necessarily including that state on the firehose. Used to recover from broken commit streams, data loss incidents, or in situations where upstream host does not know recent state of the repository.",
112112+ "required": ["seq", "did", "blocks", "rev", "time"],
113113+ "properties": {
114114+ "seq": {
115115+ "type": "integer",
116116+ "description": "The stream sequence number of this message."
117117+ },
118118+ "did": {
119119+ "type": "string",
120120+ "format": "did",
121121+ "description": "The account this repo event corresponds to. Must match that in the commit object."
122122+ },
123123+ "blocks": {
124124+ "type": "bytes",
125125+ "description": "CAR file containing the commit, as a block. The CAR header must include the commit block CID as the first 'root'.",
126126+ "maxLength": 10000
127127+ },
128128+ "rev": {
129129+ "type": "string",
130130+ "description": "The rev of the commit. This value must match that in the commit object."
131131+ },
132132+ "time": {
133133+ "type": "string",
134134+ "format": "datetime",
135135+ "description": "Timestamp of when this message was originally broadcast."
136136+ }
137137+ }
138138+ },
139139+ "identity": {
140140+ "type": "object",
141141+ "description": "Represents a change to an account's identity. Could be an updated handle, signing key, or pds hosting endpoint. Serves as a prod to all downstream services to refresh their identity cache.",
142142+ "required": ["seq", "did", "time"],
143143+ "properties": {
144144+ "seq": { "type": "integer" },
145145+ "did": { "type": "string", "format": "did" },
146146+ "time": { "type": "string", "format": "datetime" },
147147+ "handle": {
148148+ "type": "string",
149149+ "format": "handle",
150150+ "description": "The current handle for the account, or 'handle.invalid' if validation fails. This field is optional, might have been validated or passed-through from an upstream source. Semantics and behaviors for PDS vs Relay may evolve in the future; see atproto specs for more details."
151151+ }
152152+ }
153153+ },
154154+ "account": {
155155+ "type": "object",
156156+ "description": "Represents a change to an account's status on a host (eg, PDS or Relay). The semantics of this event are that the status is at the host which emitted the event, not necessarily that at the currently active PDS. Eg, a Relay takedown would emit a takedown with active=false, even if the PDS is still active.",
157157+ "required": ["seq", "did", "time", "active"],
158158+ "properties": {
159159+ "seq": { "type": "integer" },
160160+ "did": { "type": "string", "format": "did" },
161161+ "time": { "type": "string", "format": "datetime" },
162162+ "active": {
163163+ "type": "boolean",
164164+ "description": "Indicates that the account has a repository which can be fetched from the host that emitted this event."
165165+ },
166166+ "status": {
167167+ "type": "string",
168168+ "description": "If active=false, this optional field indicates a reason for why the account is not active.",
169169+ "knownValues": [
170170+ "takendown",
171171+ "suspended",
172172+ "deleted",
173173+ "deactivated",
174174+ "desynchronized",
175175+ "throttled"
176176+ ]
177177+ }
178178+ }
179179+ },
180180+ "info": {
181181+ "type": "object",
182182+ "required": ["name"],
183183+ "properties": {
184184+ "name": {
185185+ "type": "string",
186186+ "knownValues": ["OutdatedCursor"]
187187+ },
188188+ "message": {
189189+ "type": "string"
190190+ }
191191+ }
192192+ },
193193+ "repoOp": {
194194+ "type": "object",
195195+ "description": "A repo operation, ie a mutation of a single record.",
196196+ "required": ["action", "path", "cid"],
197197+ "nullable": ["cid"],
198198+ "properties": {
199199+ "action": {
200200+ "type": "string",
201201+ "knownValues": ["create", "update", "delete"]
202202+ },
203203+ "path": { "type": "string" },
204204+ "cid": {
205205+ "type": "cid-link",
206206+ "description": "For creates and updates, the new record CID. For deletions, null."
207207+ },
208208+ "prev": {
209209+ "type": "cid-link",
210210+ "description": "For updates and deletes, the previous record CID (required for inductive firehose). For creations, field should not be defined."
211211+ }
212212+ }
213213+ }
214214+ }
215215+}
···11+{
22+ "lexicon": 1,
33+ "id": "tools.ozone.moderation.queryEvents",
44+ "defs": {
55+ "main": {
66+ "type": "query",
77+ "description": "List moderation events related to a subject.",
88+ "parameters": {
99+ "type": "params",
1010+ "properties": {
1111+ "types": {
1212+ "type": "array",
1313+ "items": {
1414+ "type": "string"
1515+ },
1616+ "description": "The types of events (fully qualified string in the format of tools.ozone.moderation.defs#modEvent<name>) to filter by. If not specified, all events are returned."
1717+ },
1818+ "createdBy": {
1919+ "type": "string",
2020+ "format": "did"
2121+ },
2222+ "sortDirection": {
2323+ "type": "string",
2424+ "default": "desc",
2525+ "enum": ["asc", "desc"],
2626+ "description": "Sort direction for the events. Defaults to descending order of created at timestamp."
2727+ },
2828+ "createdAfter": {
2929+ "type": "string",
3030+ "format": "datetime",
3131+ "description": "Retrieve events created after a given timestamp"
3232+ },
3333+ "createdBefore": {
3434+ "type": "string",
3535+ "format": "datetime",
3636+ "description": "Retrieve events created before a given timestamp"
3737+ },
3838+ "subject": {
3939+ "type": "string",
4040+ "format": "uri"
4141+ },
4242+ "collections": {
4343+ "type": "array",
4444+ "maxLength": 20,
4545+ "description": "If specified, only events where the subject belongs to the given collections will be returned. When subjectType is set to 'account', this will be ignored.",
4646+ "items": {
4747+ "type": "string",
4848+ "format": "nsid"
4949+ }
5050+ },
5151+ "subjectType": {
5252+ "type": "string",
5353+ "description": "If specified, only events where the subject is of the given type (account or record) will be returned. When this is set to 'account' the 'collections' parameter will be ignored. When includeAllUserRecords or subject is set, this will be ignored.",
5454+ "knownValues": ["account", "record"]
5555+ },
5656+ "includeAllUserRecords": {
5757+ "type": "boolean",
5858+ "default": false,
5959+ "description": "If true, events on all record types (posts, lists, profile etc.) or records from given 'collections' param, owned by the did are returned."
6060+ },
6161+ "limit": {
6262+ "type": "integer",
6363+ "minimum": 1,
6464+ "maximum": 100,
6565+ "default": 50
6666+ },
6767+ "hasComment": {
6868+ "type": "boolean",
6969+ "description": "If true, only events with comments are returned"
7070+ },
7171+ "comment": {
7272+ "type": "string",
7373+ "description": "If specified, only events with comments containing the keyword are returned. Apply || separator to use multiple keywords and match using OR condition."
7474+ },
7575+ "addedLabels": {
7676+ "type": "array",
7777+ "items": {
7878+ "type": "string"
7979+ },
8080+ "description": "If specified, only events where all of these labels were added are returned"
8181+ },
8282+ "removedLabels": {
8383+ "type": "array",
8484+ "items": {
8585+ "type": "string"
8686+ },
8787+ "description": "If specified, only events where all of these labels were removed are returned"
8888+ },
8989+ "addedTags": {
9090+ "type": "array",
9191+ "items": {
9292+ "type": "string"
9393+ },
9494+ "description": "If specified, only events where all of these tags were added are returned"
9595+ },
9696+ "removedTags": {
9797+ "type": "array",
9898+ "items": {
9999+ "type": "string"
100100+ },
101101+ "description": "If specified, only events where all of these tags were removed are returned"
102102+ },
103103+ "reportTypes": {
104104+ "type": "array",
105105+ "items": {
106106+ "type": "string"
107107+ }
108108+ },
109109+ "policies": {
110110+ "type": "array",
111111+ "items": {
112112+ "type": "string",
113113+ "description": "If specified, only events where the action policies match any of the given policies are returned"
114114+ }
115115+ },
116116+ "modTool": {
117117+ "type": "array",
118118+ "items": {
119119+ "type": "string"
120120+ },
121121+ "description": "If specified, only events where the modTool name matches any of the given values are returned"
122122+ },
123123+ "batchId": {
124124+ "type": "string",
125125+ "description": "If specified, only events where the batchId matches the given value are returned"
126126+ },
127127+ "ageAssuranceState": {
128128+ "type": "string",
129129+ "description": "If specified, only events where the age assurance state matches the given value are returned",
130130+ "knownValues": ["pending", "assured", "unknown", "reset", "blocked"]
131131+ },
132132+ "withStrike": {
133133+ "type": "boolean",
134134+ "description": "If specified, only events where strikeCount value is set are returned."
135135+ },
136136+ "cursor": {
137137+ "type": "string"
138138+ }
139139+ }
140140+ },
141141+ "output": {
142142+ "encoding": "application/json",
143143+ "schema": {
144144+ "type": "object",
145145+ "required": ["events"],
146146+ "properties": {
147147+ "cursor": {
148148+ "type": "string"
149149+ },
150150+ "events": {
151151+ "type": "array",
152152+ "items": {
153153+ "type": "ref",
154154+ "ref": "tools.ozone.moderation.defs#modEventView"
155155+ }
156156+ }
157157+ }
158158+ }
159159+ }
160160+ }
161161+ }
162162+}
···11+{
22+ "lexicon": 1,
33+ "id": "tools.ozone.moderation.queryStatuses",
44+ "defs": {
55+ "main": {
66+ "type": "query",
77+ "description": "View moderation statuses of subjects (record or repo).",
88+ "parameters": {
99+ "type": "params",
1010+ "properties": {
1111+ "queueCount": {
1212+ "type": "integer",
1313+ "description": "Number of queues being used by moderators. Subjects will be split among all queues."
1414+ },
1515+ "queueIndex": {
1616+ "type": "integer",
1717+ "description": "Index of the queue to fetch subjects from. Works only when queueCount value is specified."
1818+ },
1919+ "queueSeed": {
2020+ "type": "string",
2121+ "description": "A seeder to shuffle/balance the queue items."
2222+ },
2323+ "includeAllUserRecords": {
2424+ "type": "boolean",
2525+ "description": "All subjects, or subjects from given 'collections' param, belonging to the account specified in the 'subject' param will be returned."
2626+ },
2727+ "subject": {
2828+ "type": "string",
2929+ "format": "uri",
3030+ "description": "The subject to get the status for."
3131+ },
3232+ "comment": {
3333+ "type": "string",
3434+ "description": "Search subjects by keyword from comments"
3535+ },
3636+ "reportedAfter": {
3737+ "type": "string",
3838+ "format": "datetime",
3939+ "description": "Search subjects reported after a given timestamp"
4040+ },
4141+ "reportedBefore": {
4242+ "type": "string",
4343+ "format": "datetime",
4444+ "description": "Search subjects reported before a given timestamp"
4545+ },
4646+ "reviewedAfter": {
4747+ "type": "string",
4848+ "format": "datetime",
4949+ "description": "Search subjects reviewed after a given timestamp"
5050+ },
5151+ "hostingDeletedAfter": {
5252+ "type": "string",
5353+ "format": "datetime",
5454+ "description": "Search subjects where the associated record/account was deleted after a given timestamp"
5555+ },
5656+ "hostingDeletedBefore": {
5757+ "type": "string",
5858+ "format": "datetime",
5959+ "description": "Search subjects where the associated record/account was deleted before a given timestamp"
6060+ },
6161+ "hostingUpdatedAfter": {
6262+ "type": "string",
6363+ "format": "datetime",
6464+ "description": "Search subjects where the associated record/account was updated after a given timestamp"
6565+ },
6666+ "hostingUpdatedBefore": {
6767+ "type": "string",
6868+ "format": "datetime",
6969+ "description": "Search subjects where the associated record/account was updated before a given timestamp"
7070+ },
7171+ "hostingStatuses": {
7272+ "type": "array",
7373+ "items": {
7474+ "type": "string"
7575+ },
7676+ "description": "Search subjects by the status of the associated record/account"
7777+ },
7878+ "reviewedBefore": {
7979+ "type": "string",
8080+ "format": "datetime",
8181+ "description": "Search subjects reviewed before a given timestamp"
8282+ },
8383+ "includeMuted": {
8484+ "type": "boolean",
8585+ "description": "By default, we don't include muted subjects in the results. Set this to true to include them."
8686+ },
8787+ "onlyMuted": {
8888+ "type": "boolean",
8989+ "description": "When set to true, only muted subjects and reporters will be returned."
9090+ },
9191+ "reviewState": {
9292+ "type": "string",
9393+ "description": "Specify when fetching subjects in a certain state",
9494+ "knownValues": [
9595+ "tools.ozone.moderation.defs#reviewOpen",
9696+ "tools.ozone.moderation.defs#reviewClosed",
9797+ "tools.ozone.moderation.defs#reviewEscalated",
9898+ "tools.ozone.moderation.defs#reviewNone"
9999+ ]
100100+ },
101101+ "ignoreSubjects": {
102102+ "type": "array",
103103+ "items": {
104104+ "type": "string",
105105+ "format": "uri"
106106+ }
107107+ },
108108+ "lastReviewedBy": {
109109+ "type": "string",
110110+ "format": "did",
111111+ "description": "Get all subject statuses that were reviewed by a specific moderator"
112112+ },
113113+ "sortField": {
114114+ "type": "string",
115115+ "default": "lastReportedAt",
116116+ "enum": [
117117+ "lastReviewedAt",
118118+ "lastReportedAt",
119119+ "reportedRecordsCount",
120120+ "takendownRecordsCount",
121121+ "priorityScore"
122122+ ]
123123+ },
124124+ "sortDirection": {
125125+ "type": "string",
126126+ "default": "desc",
127127+ "enum": ["asc", "desc"]
128128+ },
129129+ "takendown": {
130130+ "type": "boolean",
131131+ "description": "Get subjects that were taken down"
132132+ },
133133+ "appealed": {
134134+ "type": "boolean",
135135+ "description": "Get subjects in unresolved appealed status"
136136+ },
137137+ "limit": {
138138+ "type": "integer",
139139+ "minimum": 1,
140140+ "maximum": 100,
141141+ "default": 50
142142+ },
143143+ "tags": {
144144+ "type": "array",
145145+ "maxLength": 25,
146146+ "items": {
147147+ "type": "string",
148148+ "description": "Items in this array are applied with OR filters. To apply AND filter, put all tags in the same string and separate using && characters"
149149+ }
150150+ },
151151+ "excludeTags": {
152152+ "type": "array",
153153+ "items": {
154154+ "type": "string"
155155+ }
156156+ },
157157+ "cursor": {
158158+ "type": "string"
159159+ },
160160+ "collections": {
161161+ "type": "array",
162162+ "maxLength": 20,
163163+ "description": "If specified, subjects belonging to the given collections will be returned. When subjectType is set to 'account', this will be ignored.",
164164+ "items": {
165165+ "type": "string",
166166+ "format": "nsid"
167167+ }
168168+ },
169169+ "subjectType": {
170170+ "type": "string",
171171+ "description": "If specified, subjects of the given type (account or record) will be returned. When this is set to 'account' the 'collections' parameter will be ignored. When includeAllUserRecords or subject is set, this will be ignored.",
172172+ "knownValues": ["account", "record"]
173173+ },
174174+ "minAccountSuspendCount": {
175175+ "type": "integer",
176176+ "description": "If specified, only subjects that belong to an account that has at least this many suspensions will be returned."
177177+ },
178178+ "minReportedRecordsCount": {
179179+ "type": "integer",
180180+ "description": "If specified, only subjects that belong to an account that has at least this many reported records will be returned."
181181+ },
182182+ "minTakendownRecordsCount": {
183183+ "type": "integer",
184184+ "description": "If specified, only subjects that belong to an account that has at least this many taken down records will be returned."
185185+ },
186186+ "minPriorityScore": {
187187+ "minimum": 0,
188188+ "maximum": 100,
189189+ "type": "integer",
190190+ "description": "If specified, only subjects that have priority score value above the given value will be returned."
191191+ },
192192+ "minStrikeCount": {
193193+ "type": "integer",
194194+ "minimum": 1,
195195+ "description": "If specified, only subjects that belong to an account that has at least this many active strikes will be returned."
196196+ },
197197+ "ageAssuranceState": {
198198+ "type": "string",
199199+ "description": "If specified, only subjects with the given age assurance state will be returned.",
200200+ "knownValues": ["pending", "assured", "unknown", "reset", "blocked"]
201201+ }
202202+ }
203203+ },
204204+ "output": {
205205+ "encoding": "application/json",
206206+ "schema": {
207207+ "type": "object",
208208+ "required": ["subjectStatuses"],
209209+ "properties": {
210210+ "cursor": {
211211+ "type": "string"
212212+ },
213213+ "subjectStatuses": {
214214+ "type": "array",
215215+ "items": {
216216+ "type": "ref",
217217+ "ref": "tools.ozone.moderation.defs#subjectStatusView"
218218+ }
219219+ }
220220+ }
221221+ }
222222+ }
223223+ }
224224+ }
225225+}