Live video on the AT Protocol
at eli/optional-convergence 101 lines 3.1 kB view raw
1{ 2 "lexicon": 1, 3 "id": "place.stream.server.createWebhook", 4 "defs": { 5 "main": { 6 "type": "procedure", 7 "description": "Create a new webhook for receiving Streamplace events.", 8 "input": { 9 "encoding": "application/json", 10 "schema": { 11 "type": "object", 12 "required": ["url", "events"], 13 "properties": { 14 "url": { 15 "type": "string", 16 "format": "uri", 17 "description": "The webhook URL where events will be sent." 18 }, 19 20 "events": { 21 "type": "array", 22 "items": { 23 "type": "string", 24 "enum": ["chat", "livestream", "follow", "mention"] 25 }, 26 "description": "The types of events this webhook should receive." 27 }, 28 "active": { 29 "type": "boolean", 30 "default": false, 31 "description": "Whether this webhook should be active upon creation." 32 }, 33 "prefix": { 34 "type": "string", 35 "maxLength": 100, 36 "description": "Text to prepend to webhook messages." 37 }, 38 "suffix": { 39 "type": "string", 40 "maxLength": 100, 41 "description": "Text to append to webhook messages." 42 }, 43 "rewrite": { 44 "type": "array", 45 "items": { 46 "type": "ref", 47 "ref": "place.stream.server.defs#rewriteRule" 48 }, 49 "description": "Text replacement rules for webhook messages." 50 }, 51 "name": { 52 "type": "string", 53 "maxLength": 100, 54 "description": "A user-friendly name for this webhook." 55 }, 56 "description": { 57 "type": "string", 58 "maxLength": 500, 59 "description": "A description of what this webhook is used for." 60 }, 61 "muteWords": { 62 "type": "array", 63 "items": { 64 "type": "string", 65 "maxLength": 100 66 }, 67 "description": "Words to filter out from chat messages. Messages containing any of these words will not be forwarded." 68 } 69 } 70 } 71 }, 72 "output": { 73 "encoding": "application/json", 74 "schema": { 75 "type": "object", 76 "required": ["webhook"], 77 "properties": { 78 "webhook": { 79 "type": "ref", 80 "ref": "place.stream.server.defs#webhook" 81 } 82 } 83 } 84 }, 85 "errors": [ 86 { 87 "name": "InvalidUrl", 88 "description": "The provided webhook URL is invalid or unreachable." 89 }, 90 { 91 "name": "DuplicateWebhook", 92 "description": "A webhook with this URL already exists for this user." 93 }, 94 { 95 "name": "TooManyWebhooks", 96 "description": "The user has reached their maximum number of webhooks." 97 } 98 ] 99 } 100 } 101}