NIP-86 ====== Relay Management API -------------------- `draft` `optional` Relays may provide an API for performing management tasks. This is made available as a JSON-RPC-like request-response protocol over HTTP, on the same URI as the relay's websocket. When a relay receives an HTTP(s) request with an `Authorization` header and a `Content-Type` header of `application/nostr+json+rpc` to a URI supporting WebSocket upgrades, it should parse the request as a JSON document with the following fields: ```json { "method": "", "params": ["", "", ""] } ``` Then it should return a response in the format ```json { "result": {"": ""}, "error": "" } ``` This is the list of **methods** that may be supported: * `supportedmethods`: - params: `[]` - result: `["", "", ...]` (an array with the names of all the other supported methods) * `banpubkey`: - params: `["", ""]` - result: `true` (a boolean always set to `true`) * `listbannedpubkeys`: - params: `[]` - result: `[{"pubkey": "<32-byte hex>", "reason": ""}, ...]`, an array of objects * `allowpubkey`: - params: `["", ""]` - result: `true` (a boolean always set to `true`) * `listallowedpubkeys`: - params: `[]` - result: `[{"pubkey": "<32-byte hex>", "reason": ""}, ...]`, an array of objects * `banevent`: - params: `["", ""]` - result: `true` (a boolean always set to `true`) * `listbannedevents`: - params: `[]` - result: `[{"id": "<32-byte hex>", "reason": ""}, ...]`, an array of objects