{
"id": "social.colibri.beta.community.applyLabel",
"defs": {
"main": {
"type": "procedure",
"input": {
"schema": {
"type": "object",
"required": [
"space",
"subject",
"val"
],
"properties": {
"val": {
"type": "string",
"maxLength": 128,
"description": "The label value. `hidden` withholds the record from reads. `spoiler` and `embeds-suppressed` are display hints.",
"knownValues": [
"hidden",
"spoiler",
"embeds-suppressed"
]
},
"scope": {
"type": "array",
"items": {
"type": "string",
"format": "uri",
"description": "A URI within the subject record."
},
"description": "Narrows the label to specific URIs inside the subject record. Absent means the whole record."
},
"space": {
"type": "string",
"format": "space-ref",
"description": "The space the labelled record lives in."
},
"reason": {
"type": "string",
"maxLength": 512,
"description": "Human-readable reason for the label."
},
"subject": {
"ref": "social.colibri.beta.label#subject",
"type": "ref",
"description": "The record to label."
}
}
},
"encoding": "application/json"
},
"errors": [
{
"name": "AuthRequired",
"description": "The request is missing, malformed, or unverifiable service auth."
},
{
"name": "Forbidden",
"description": "The caller lacks the label.apply permission."
},
{
"name": "CommunityNotFound",
"description": "No community exists at the given DID."
},
{
"name": "SpaceNotFound",
"description": "No space exists at the given reference."
},
{
"name": "InvalidRequest",
"description": "The scope or val is not valid for the subject record."
},
{
"name": "CredentialsUnavailable",
"description": "The AppView cannot act as the community because its stored credentials are missing or unusable."
}
],
"output": {
"schema": {
"type": "object",
"required": [
"label"
],
"properties": {
"label": {
"ref": "social.colibri.beta.community.defs#labelView",
"type": "ref",
"description": "The applied label."
}
}
},
"encoding": "application/json"
},
"description": "Applies a label to a record in one of the community's spaces. This is how content is hidden, marked as a spoiler, or has its link previews suppressed. The record itself is untouched, since it lives in its author's own repo, but a `hidden` label stops this AppView serving the record: it is withheld from reads and from the events socket, and replies to it see a deletedMessageView in its place. Moderators holding `label.apply` and the record's own author still see it."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}