{ "openapi": "3.1.0", "info": { "title": "Numeraire SwissKnife REST API", "description": "This API is available to anyone with a Numeraire account. The `Me` (`/me`) endpoints expose the authenticated account and its wallet-scoped operations.", "contact": { "name": "Dario Anongba Varela", "email": "dario.varela@numeraire.tech" }, "license": { "name": "MIT", "identifier": "MIT" }, "version": "0.2.0" }, "paths": { "/.well-known/lnurlp/{username}": { "get": { "tags": [ "LNURL" ], "summary": "Well-known endpoint", "description": "Returns the LNURL payRequest for this LN Address (username). The returned payload contains information allowing the payer to generate an invoice. See [LUDS-06](https://github.com/lnurl/luds/blob/luds/06.md)", "operationId": "well_known", "parameters": [ { "name": "username", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LnURLPayRequest" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"404 Not Found\",\n \"reason\": \"Resource not found\"\n}\n" } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"500 Internal Server Error\",\n \"reason\": \"Internal server error, Please contact your administrator or try later\"\n}\n" } } } } } }, "/.well-known/nostr.json": { "get": { "tags": [ "Nostr" ], "summary": "Well-known endpoint", "description": "Returns the names known by this service given username. The returned payload contains public keys in hex format. See [NIP-05](https://github.com/nostr-protocol/nips/blob/master/05.md)", "operationId": "well_known_nostr", "parameters": [ { "name": "name", "in": "query", "description": "Username to query", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NostrNIP05Response" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"404 Not Found\",\n \"reason\": \"Resource not found\"\n}\n" } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"500 Internal Server Error\",\n \"reason\": \"Internal server error, Please contact your administrator or try later\"\n}\n" } } } } } }, "/lnurlp/{username}/callback": { "get": { "tags": [ "LNURL" ], "summary": "LNURL callback endpoint", "description": "Returns the callback response for this LN Address (username). Containing an invoice and information on how to behave upon success. See [LUDS-06](https://github.com/lnurl/luds/blob/luds/06.md)", "operationId": "callback", "parameters": [ { "name": "amount", "in": "query", "description": "Amount in millisatoshis", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 0 } }, { "name": "comment", "in": "query", "description": "Optional comment for the recipient", "required": false, "schema": { "type": [ "string", "null" ] } }, { "name": "username", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LnUrlCallback" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"400 Bad Request\",\n \"reason\": \"Missing required parameter in request\"\n}\n" } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"404 Not Found\",\n \"reason\": \"Resource not found\"\n}\n" } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"422 Unprocessable Entity\",\n \"reason\": \"Validation failed: ...\"\n}\n" } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"500 Internal Server Error\",\n \"reason\": \"Internal server error, Please contact your administrator or try later\"\n}\n" } } } } } }, "/v1/accounts": { "get": { "tags": [ "Accounts" ], "summary": "List accounts.", "operationId": "list_accounts", "parameters": [ { "name": "limit", "in": "query", "description": "Total amount of results to return.", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "description": "Offset where to start returning results.", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "ids", "in": "query", "description": "Account IDs to include.", "required": false, "schema": { "type": [ "array", "null" ], "items": { "type": "string", "format": "uuid" } } }, { "name": "order_direction", "in": "query", "description": "Direction of the ordering by creation date.", "required": false, "schema": { "$ref": "#/components/schemas/OrderDirection" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Account" } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"400 Bad Request\",\n \"reason\": \"Missing required parameter in request\"\n}\n" } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"401 Unauthorized\",\n \"reason\": \"Invalid credentials\"\n}\n" } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"403 Forbidden\",\n \"reason\": \"Missing permissions\"\n}\n" } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"500 Internal Server Error\",\n \"reason\": \"Internal server error, Please contact your administrator or try later\"\n}\n" } } } } }, "post": { "tags": [ "Accounts" ], "summary": "Create an account.", "operationId": "create_account", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateAccountRequest" } } }, "required": true }, "responses": { "200": { "description": "Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Account" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"400 Bad Request\",\n \"reason\": \"Missing required parameter in request\"\n}\n" } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"401 Unauthorized\",\n \"reason\": \"Invalid credentials\"\n}\n" } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"403 Forbidden\",\n \"reason\": \"Missing permissions\"\n}\n" } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"500 Internal Server Error\",\n \"reason\": \"Internal server error, Please contact your administrator or try later\"\n}\n" } } } } }, "delete": { "tags": [ "Accounts" ], "summary": "Delete accounts.", "description": "Deletes the accounts selected by `ids` and returns the number deleted. The\nauthenticated account cannot be included.", "operationId": "delete_accounts", "parameters": [ { "name": "limit", "in": "query", "description": "Total amount of results to return.", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "description": "Offset where to start returning results.", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "ids", "in": "query", "description": "Account IDs to include.", "required": false, "schema": { "type": [ "array", "null" ], "items": { "type": "string", "format": "uuid" } } }, { "name": "order_direction", "in": "query", "description": "Direction of the ordering by creation date.", "required": false, "schema": { "$ref": "#/components/schemas/OrderDirection" } } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "type": "integer", "format": "int64", "minimum": 0 } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"400 Bad Request\",\n \"reason\": \"Missing required parameter in request\"\n}\n" } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"401 Unauthorized\",\n \"reason\": \"Invalid credentials\"\n}\n" } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"403 Forbidden\",\n \"reason\": \"Missing permissions\"\n}\n" } } }, "409": { "description": "Cannot delete the authenticated account", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"409 Conflict\",\n \"reason\": \"Admin account already created\"\n}\n" } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"500 Internal Server Error\",\n \"reason\": \"Internal server error, Please contact your administrator or try later\"\n}\n" } } } } } }, "/v1/accounts/{id}": { "get": { "tags": [ "Accounts" ], "summary": "Get an account.", "operationId": "get_account_by_id", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Account" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"400 Bad Request\",\n \"reason\": \"Missing required parameter in request\"\n}\n" } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"401 Unauthorized\",\n \"reason\": \"Invalid credentials\"\n}\n" } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"403 Forbidden\",\n \"reason\": \"Missing permissions\"\n}\n" } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"404 Not Found\",\n \"reason\": \"Resource not found\"\n}\n" } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"500 Internal Server Error\",\n \"reason\": \"Internal server error, Please contact your administrator or try later\"\n}\n" } } } } }, "put": { "tags": [ "Accounts" ], "summary": "Replace editable account profile fields.", "operationId": "update_account_by_id", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateAccountRequest" } } }, "required": true }, "responses": { "200": { "description": "Updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Account" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"400 Bad Request\",\n \"reason\": \"Missing required parameter in request\"\n}\n" } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"401 Unauthorized\",\n \"reason\": \"Invalid credentials\"\n}\n" } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"403 Forbidden\",\n \"reason\": \"Missing permissions\"\n}\n" } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"404 Not Found\",\n \"reason\": \"Resource not found\"\n}\n" } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"500 Internal Server Error\",\n \"reason\": \"Internal server error, Please contact your administrator or try later\"\n}\n" } } } } }, "delete": { "tags": [ "Accounts" ], "summary": "Delete an account and its owned resources.", "operationId": "delete_account_by_id", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Deleted" }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"400 Bad Request\",\n \"reason\": \"Missing required parameter in request\"\n}\n" } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"401 Unauthorized\",\n \"reason\": \"Invalid credentials\"\n}\n" } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"403 Forbidden\",\n \"reason\": \"Missing permissions\"\n}\n" } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"404 Not Found\",\n \"reason\": \"Resource not found\"\n}\n" } } }, "409": { "description": "Cannot delete the authenticated account", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"409 Conflict\",\n \"reason\": \"Admin account already created\"\n}\n" } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"500 Internal Server Error\",\n \"reason\": \"Internal server error, Please contact your administrator or try later\"\n}\n" } } } } } }, "/v1/accounts/{id}/permissions": { "put": { "tags": [ "Accounts" ], "summary": "Replace permissions stored for an account.", "operationId": "replace_account_permissions", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateAccountPermissionsRequest" } } }, "required": true }, "responses": { "200": { "description": "Updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Account" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"400 Bad Request\",\n \"reason\": \"Missing required parameter in request\"\n}\n" } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"401 Unauthorized\",\n \"reason\": \"Invalid credentials\"\n}\n" } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"403 Forbidden\",\n \"reason\": \"Missing permissions\"\n}\n" } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"404 Not Found\",\n \"reason\": \"Resource not found\"\n}\n" } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"500 Internal Server Error\",\n \"reason\": \"Internal server error, Please contact your administrator or try later\"\n}\n" } } } } } }, "/v1/api-keys": { "get": { "tags": [ "API Keys" ], "summary": "List API Keys", "description": "Returns all the API Keys given a filter", "operationId": "list_api_keys", "parameters": [ { "name": "limit", "in": "query", "description": "Total amount of results to return", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "description": "Offset where to start returning results", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "ids", "in": "query", "description": "List of IDs", "required": false, "schema": { "type": [ "array", "null" ], "items": { "type": "string", "format": "uuid" } } }, { "name": "account_id", "in": "query", "description": "Owning account ID.\n\nAccount-scoped endpoints populate this from the authenticated account.", "required": false, "schema": { "type": [ "string", "null" ], "format": "uuid" } }, { "name": "order_direction", "in": "query", "description": "Direction of the ordering of results", "required": false, "schema": { "$ref": "#/components/schemas/OrderDirection" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ApiKey" } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"400 Bad Request\",\n \"reason\": \"Missing required parameter in request\"\n}\n" } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"401 Unauthorized\",\n \"reason\": \"Invalid credentials\"\n}\n" } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"403 Forbidden\",\n \"reason\": \"Missing permissions\"\n}\n" } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"500 Internal Server Error\",\n \"reason\": \"Internal server error, Please contact your administrator or try later\"\n}\n" } } } } }, "post": { "tags": [ "API Keys" ], "summary": "Generate a new API Key", "description": "Returns the generated API Key for the requested account. Callers can create API keys with permissions\nas a subset of their current permissions.", "operationId": "create_api_key", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateApiKeyRequest" } } }, "required": true }, "responses": { "200": { "description": "API Key Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiKey" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"400 Bad Request\",\n \"reason\": \"Missing required parameter in request\"\n}\n" } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"401 Unauthorized\",\n \"reason\": \"Invalid credentials\"\n}\n" } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"403 Forbidden\",\n \"reason\": \"Missing permissions\"\n}\n" } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"422 Unprocessable Entity\",\n \"reason\": \"Validation failed: ...\"\n}\n" } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"500 Internal Server Error\",\n \"reason\": \"Internal server error, Please contact your administrator or try later\"\n}\n" } } } } }, "delete": { "tags": [ "API Keys" ], "summary": "Revoke API Keys", "description": "Revokes all the API Keys given a filter. Returns the number of revoked keys.", "operationId": "revoke_api_keys", "parameters": [ { "name": "limit", "in": "query", "description": "Total amount of results to return", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "description": "Offset where to start returning results", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "ids", "in": "query", "description": "List of IDs", "required": false, "schema": { "type": [ "array", "null" ], "items": { "type": "string", "format": "uuid" } } }, { "name": "account_id", "in": "query", "description": "Owning account ID.\n\nAccount-scoped endpoints populate this from the authenticated account.", "required": false, "schema": { "type": [ "string", "null" ], "format": "uuid" } }, { "name": "order_direction", "in": "query", "description": "Direction of the ordering of results", "required": false, "schema": { "$ref": "#/components/schemas/OrderDirection" } } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "type": "integer", "format": "int64", "minimum": 0 } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"400 Bad Request\",\n \"reason\": \"Missing required parameter in request\"\n}\n" } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"401 Unauthorized\",\n \"reason\": \"Invalid credentials\"\n}\n" } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"403 Forbidden\",\n \"reason\": \"Missing permissions\"\n}\n" } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"500 Internal Server Error\",\n \"reason\": \"Internal server error, Please contact your administrator or try later\"\n}\n" } } } } } }, "/v1/api-keys/{id}": { "get": { "tags": [ "API Keys" ], "summary": "Find an API Key", "description": "Returns the API Key by its ID.", "operationId": "get_api_key", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiKey" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"400 Bad Request\",\n \"reason\": \"Missing required parameter in request\"\n}\n" } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"401 Unauthorized\",\n \"reason\": \"Invalid credentials\"\n}\n" } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"403 Forbidden\",\n \"reason\": \"Missing permissions\"\n}\n" } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"404 Not Found\",\n \"reason\": \"Resource not found\"\n}\n" } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"500 Internal Server Error\",\n \"reason\": \"Internal server error, Please contact your administrator or try later\"\n}\n" } } } } }, "delete": { "tags": [ "API Keys" ], "summary": "Revoke an API Key", "description": "Revokes an API Key by ID. Returns an empty body.", "operationId": "revoke_api_key", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Revoked" }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"400 Bad Request\",\n \"reason\": \"Missing required parameter in request\"\n}\n" } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"401 Unauthorized\",\n \"reason\": \"Invalid credentials\"\n}\n" } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"403 Forbidden\",\n \"reason\": \"Missing permissions\"\n}\n" } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"404 Not Found\",\n \"reason\": \"Resource not found\"\n}\n" } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"500 Internal Server Error\",\n \"reason\": \"Internal server error, Please contact your administrator or try later\"\n}\n" } } } } } }, "/v1/auth/change-password": { "post": { "tags": [ "Authentication" ], "summary": "Change Password", "description": "Changes the local owner password for `JWT` auth provider deployments.", "operationId": "change_password", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChangePasswordRequest" } } }, "required": true }, "responses": { "204": { "description": "Password changed" }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"400 Bad Request\",\n \"reason\": \"Missing required parameter in request\"\n}\n" } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"401 Unauthorized\",\n \"reason\": \"Invalid credentials\"\n}\n" } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"404 Not Found\",\n \"reason\": \"Resource not found\"\n}\n" } } }, "405": { "description": "Unsupported", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"405 Method Not Allowed\",\n \"reason\": \"Sign in not allowed (not needed) for oauth2 provider\"\n}\n" } } }, "422": { "description": "Validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"422 Unprocessable Entity\",\n \"reason\": \"Validation failed: ...\"\n}\n" } } } }, "security": [ { "jwt": [] } ] } }, "/v1/auth/sign-in": { "post": { "tags": [ "Authentication" ], "summary": "Sign In", "description": "Returns a JWT token to be used for authentication. The JWT token contains authentication and permissions. Sign in is only available for `JWT` Auth provider.", "operationId": "sign_in", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SignInRequest" } } }, "required": true }, "responses": { "200": { "description": "Token Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SignInResponse" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"400 Bad Request\",\n \"reason\": \"Missing required parameter in request\"\n}\n" } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"401 Unauthorized\",\n \"reason\": \"Invalid credentials\"\n}\n" } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"404 Not Found\",\n \"reason\": \"Resource not found\"\n}\n" } } }, "405": { "description": "Unsupported", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"405 Method Not Allowed\",\n \"reason\": \"Sign in not allowed (not needed) for oauth2 provider\"\n}\n" } } } } } }, "/v1/auth/sign-up": { "post": { "tags": [ "Authentication" ], "summary": "Sign up", "description": "Creates the initial admin account. Returns a JWT token containing the account's effective permissions. Sign-up is only available for the `JWT` provider.", "operationId": "sign_up", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SignUpRequest" } } }, "required": true }, "responses": { "200": { "description": "Admin account created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SignInResponse" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"400 Bad Request\",\n \"reason\": \"Missing required parameter in request\"\n}\n" } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"401 Unauthorized\",\n \"reason\": \"Invalid credentials\"\n}\n" } } }, "405": { "description": "Unsupported", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"405 Method Not Allowed\",\n \"reason\": \"Sign in not allowed (not needed) for oauth2 provider\"\n}\n" } } }, "409": { "description": "Duplicate", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"409 Conflict\",\n \"reason\": \"Admin account already created\"\n}\n" } } } } } }, "/v1/bitcoin/addresses": { "get": { "tags": [ "Bitcoin Addresses" ], "summary": "List Bitcoin addresses", "description": "Returns all the Bitcoin addresses given a filter", "operationId": "list_btc_addresses", "parameters": [ { "name": "limit", "in": "query", "description": "Total amount of results to return", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "description": "Offset where to start returning results", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "ids", "in": "query", "description": "List of IDs", "required": false, "schema": { "type": [ "array", "null" ], "items": { "type": "string", "format": "uuid" } } }, { "name": "wallet_id", "in": "query", "description": "Wallet ID. Automatically populated with your ID", "required": false, "schema": { "type": [ "string", "null" ], "format": "uuid" } }, { "name": "address", "in": "query", "description": "Address", "required": false, "schema": { "type": [ "string", "null" ] } }, { "name": "address_type", "in": "query", "description": "Status", "required": false, "schema": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/BtcAddressType" } ] } }, { "name": "used", "in": "query", "description": "Whether the address has been used", "required": false, "schema": { "type": [ "boolean", "null" ] } }, { "name": "order_direction", "in": "query", "description": "Direction of the ordering of results", "required": false, "schema": { "$ref": "#/components/schemas/OrderDirection" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/BtcAddress" } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"400 Bad Request\",\n \"reason\": \"Missing required parameter in request\"\n}\n" } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"401 Unauthorized\",\n \"reason\": \"Invalid credentials\"\n}\n" } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"403 Forbidden\",\n \"reason\": \"Missing permissions\"\n}\n" } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"500 Internal Server Error\",\n \"reason\": \"Internal server error, Please contact your administrator or try later\"\n}\n" } } } } }, "post": { "tags": [ "Bitcoin Addresses" ], "summary": "Generate a new Bitcoin address", "description": "Returns the generated Bitcoin address for the selected wallet.", "operationId": "generate_btc_address", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NewBtcAddressRequest" } } }, "required": true }, "responses": { "200": { "description": "Bitcoin Address Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BtcAddress" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"400 Bad Request\",\n \"reason\": \"Missing required parameter in request\"\n}\n" } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"401 Unauthorized\",\n \"reason\": \"Invalid credentials\"\n}\n" } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"403 Forbidden\",\n \"reason\": \"Missing permissions\"\n}\n" } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"422 Unprocessable Entity\",\n \"reason\": \"Validation failed: ...\"\n}\n" } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"500 Internal Server Error\",\n \"reason\": \"Internal server error, Please contact your administrator or try later\"\n}\n" } } } } }, "delete": { "tags": [ "Bitcoin Addresses" ], "summary": "Delete Bitcoin addresses", "description": "Deletes all Bitcoin addresses matching a filter. Returns the number deleted.", "operationId": "delete_btc_addresses", "parameters": [ { "name": "limit", "in": "query", "description": "Total amount of results to return", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "description": "Offset where to start returning results", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "ids", "in": "query", "description": "List of IDs", "required": false, "schema": { "type": [ "array", "null" ], "items": { "type": "string", "format": "uuid" } } }, { "name": "wallet_id", "in": "query", "description": "Wallet ID. Automatically populated with your ID", "required": false, "schema": { "type": [ "string", "null" ], "format": "uuid" } }, { "name": "address", "in": "query", "description": "Address", "required": false, "schema": { "type": [ "string", "null" ] } }, { "name": "address_type", "in": "query", "description": "Status", "required": false, "schema": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/BtcAddressType" } ] } }, { "name": "used", "in": "query", "description": "Whether the address has been used", "required": false, "schema": { "type": [ "boolean", "null" ] } }, { "name": "order_direction", "in": "query", "description": "Direction of the ordering of results", "required": false, "schema": { "$ref": "#/components/schemas/OrderDirection" } } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "type": "integer", "format": "int64", "minimum": 0 } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"400 Bad Request\",\n \"reason\": \"Missing required parameter in request\"\n}\n" } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"401 Unauthorized\",\n \"reason\": \"Invalid credentials\"\n}\n" } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"403 Forbidden\",\n \"reason\": \"Missing permissions\"\n}\n" } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"500 Internal Server Error\",\n \"reason\": \"Internal server error, Please contact your administrator or try later\"\n}\n" } } } } } }, "/v1/bitcoin/addresses/{id}": { "get": { "tags": [ "Bitcoin Addresses" ], "summary": "Find a Bitcoin address", "description": "Returns the Bitcoin address by its ID.", "operationId": "get_btc_address", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BtcAddress" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"400 Bad Request\",\n \"reason\": \"Missing required parameter in request\"\n}\n" } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"401 Unauthorized\",\n \"reason\": \"Invalid credentials\"\n}\n" } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"403 Forbidden\",\n \"reason\": \"Missing permissions\"\n}\n" } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"404 Not Found\",\n \"reason\": \"Resource not found\"\n}\n" } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"500 Internal Server Error\",\n \"reason\": \"Internal server error, Please contact your administrator or try later\"\n}\n" } } } } }, "delete": { "tags": [ "Bitcoin Addresses" ], "summary": "Delete a Bitcoin address", "description": "Deletes a Bitcoin address by ID. Returns an empty body.", "operationId": "delete_btc_address", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Deleted" }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"400 Bad Request\",\n \"reason\": \"Missing required parameter in request\"\n}\n" } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"401 Unauthorized\",\n \"reason\": \"Invalid credentials\"\n}\n" } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"403 Forbidden\",\n \"reason\": \"Missing permissions\"\n}\n" } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"404 Not Found\",\n \"reason\": \"Resource not found\"\n}\n" } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"500 Internal Server Error\",\n \"reason\": \"Internal server error, Please contact your administrator or try later\"\n}\n" } } } } } }, "/v1/invoices": { "get": { "tags": [ "Invoices" ], "summary": "List invoices", "description": "Returns all the invoices given a filter", "operationId": "list_invoices", "parameters": [ { "name": "limit", "in": "query", "description": "Total amount of results to return", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "description": "Offset where to start returning results", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "ids", "in": "query", "description": "List of IDs", "required": false, "schema": { "type": [ "array", "null" ], "items": { "type": "string", "format": "uuid" } } }, { "name": "wallet_id", "in": "query", "description": "Wallet ID. Automatically populated with your ID", "required": false, "schema": { "type": [ "string", "null" ], "format": "uuid" } }, { "name": "status", "in": "query", "description": "Status", "required": false, "schema": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/InvoiceStatus" } ] } }, { "name": "ledger", "in": "query", "description": "Ledger", "required": false, "schema": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/Ledger" } ] } }, { "name": "order_by", "in": "query", "description": "Order by", "required": false, "schema": { "$ref": "#/components/schemas/InvoiceOrderBy" } }, { "name": "order_direction", "in": "query", "description": "Direction of the ordering of results", "required": false, "schema": { "$ref": "#/components/schemas/OrderDirection" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Invoice" } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"400 Bad Request\",\n \"reason\": \"Missing required parameter in request\"\n}\n" } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"401 Unauthorized\",\n \"reason\": \"Invalid credentials\"\n}\n" } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"403 Forbidden\",\n \"reason\": \"Missing permissions\"\n}\n" } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"500 Internal Server Error\",\n \"reason\": \"Internal server error, Please contact your administrator or try later\"\n}\n" } } } } }, "post": { "tags": [ "Invoices" ], "summary": "Generate a new invoice", "description": "Returns the generated invoice for the selected wallet.", "operationId": "generate_invoice", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NewInvoiceRequest" } } }, "required": true }, "responses": { "200": { "description": "Invoice Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Invoice" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"400 Bad Request\",\n \"reason\": \"Missing required parameter in request\"\n}\n" } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"401 Unauthorized\",\n \"reason\": \"Invalid credentials\"\n}\n" } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"403 Forbidden\",\n \"reason\": \"Missing permissions\"\n}\n" } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"422 Unprocessable Entity\",\n \"reason\": \"Validation failed: ...\"\n}\n" } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"500 Internal Server Error\",\n \"reason\": \"Internal server error, Please contact your administrator or try later\"\n}\n" } } } } }, "delete": { "tags": [ "Invoices" ], "summary": "Delete invoices", "description": "Deletes all invoices matching a filter. Returns the number deleted. Deleting an invoice can affect the wallet balance.", "operationId": "delete_invoices", "parameters": [ { "name": "limit", "in": "query", "description": "Total amount of results to return", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "description": "Offset where to start returning results", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "ids", "in": "query", "description": "List of IDs", "required": false, "schema": { "type": [ "array", "null" ], "items": { "type": "string", "format": "uuid" } } }, { "name": "wallet_id", "in": "query", "description": "Wallet ID. Automatically populated with your ID", "required": false, "schema": { "type": [ "string", "null" ], "format": "uuid" } }, { "name": "status", "in": "query", "description": "Status", "required": false, "schema": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/InvoiceStatus" } ] } }, { "name": "ledger", "in": "query", "description": "Ledger", "required": false, "schema": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/Ledger" } ] } }, { "name": "order_by", "in": "query", "description": "Order by", "required": false, "schema": { "$ref": "#/components/schemas/InvoiceOrderBy" } }, { "name": "order_direction", "in": "query", "description": "Direction of the ordering of results", "required": false, "schema": { "$ref": "#/components/schemas/OrderDirection" } } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "type": "integer", "format": "int64", "minimum": 0 } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"400 Bad Request\",\n \"reason\": \"Missing required parameter in request\"\n}\n" } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"401 Unauthorized\",\n \"reason\": \"Invalid credentials\"\n}\n" } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"403 Forbidden\",\n \"reason\": \"Missing permissions\"\n}\n" } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"500 Internal Server Error\",\n \"reason\": \"Internal server error, Please contact your administrator or try later\"\n}\n" } } } } } }, "/v1/invoices/{id}": { "get": { "tags": [ "Invoices" ], "summary": "Find an invoice", "description": "Returns the invoice by its ID.", "operationId": "get_invoice", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Invoice" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"400 Bad Request\",\n \"reason\": \"Missing required parameter in request\"\n}\n" } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"401 Unauthorized\",\n \"reason\": \"Invalid credentials\"\n}\n" } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"403 Forbidden\",\n \"reason\": \"Missing permissions\"\n}\n" } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"404 Not Found\",\n \"reason\": \"Resource not found\"\n}\n" } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"500 Internal Server Error\",\n \"reason\": \"Internal server error, Please contact your administrator or try later\"\n}\n" } } } } }, "delete": { "tags": [ "Invoices" ], "summary": "Delete an invoice", "description": "Deletes an invoice by ID. Returns an empty body. Deleting an invoice can affect the wallet balance.", "operationId": "delete_invoice", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Deleted" }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"400 Bad Request\",\n \"reason\": \"Missing required parameter in request\"\n}\n" } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"401 Unauthorized\",\n \"reason\": \"Invalid credentials\"\n}\n" } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"403 Forbidden\",\n \"reason\": \"Missing permissions\"\n}\n" } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"404 Not Found\",\n \"reason\": \"Resource not found\"\n}\n" } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"500 Internal Server Error\",\n \"reason\": \"Internal server error, Please contact your administrator or try later\"\n}\n" } } } } } }, "/v1/lightning-addresses": { "get": { "tags": [ "Lightning Addresses" ], "summary": "List LN Addresses", "description": "Returns all the addresses given a filter", "operationId": "list_addresses", "parameters": [ { "name": "limit", "in": "query", "description": "Total amount of results to return", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "description": "Offset where to start returning results", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "ids", "in": "query", "description": "List of IDs", "required": false, "schema": { "type": [ "array", "null" ], "items": { "type": "string", "format": "uuid" } } }, { "name": "account_id", "in": "query", "description": "Owning account ID", "required": false, "schema": { "type": [ "string", "null" ], "format": "uuid" } }, { "name": "wallet_id", "in": "query", "description": "Receiving wallet ID", "required": false, "schema": { "type": [ "string", "null" ], "format": "uuid" } }, { "name": "username", "in": "query", "description": "Username", "required": false, "schema": { "type": [ "string", "null" ] } }, { "name": "active", "in": "query", "description": "Active", "required": false, "schema": { "type": [ "boolean", "null" ] } }, { "name": "order_direction", "in": "query", "description": "Direction of the ordering of results", "required": false, "schema": { "$ref": "#/components/schemas/OrderDirection" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/LnAddress" } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"400 Bad Request\",\n \"reason\": \"Missing required parameter in request\"\n}\n" } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"401 Unauthorized\",\n \"reason\": \"Invalid credentials\"\n}\n" } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"403 Forbidden\",\n \"reason\": \"Missing permissions\"\n}\n" } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"500 Internal Server Error\",\n \"reason\": \"Internal server error, Please contact your administrator or try later\"\n}\n" } } } } }, "post": { "tags": [ "Lightning Addresses" ], "summary": "Register a new LN Address", "description": "Registers an address. Returns the address details. LN Addresses are ready to receive funds through the LNURL protocol upon registration.", "operationId": "register_address", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RegisterLnAddressRequest" } } }, "required": true }, "responses": { "200": { "description": "LN Address Registered", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LnAddress" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"400 Bad Request\",\n \"reason\": \"Missing required parameter in request\"\n}\n" } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"401 Unauthorized\",\n \"reason\": \"Invalid credentials\"\n}\n" } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"403 Forbidden\",\n \"reason\": \"Missing permissions\"\n}\n" } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"422 Unprocessable Entity\",\n \"reason\": \"Validation failed: ...\"\n}\n" } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"500 Internal Server Error\",\n \"reason\": \"Internal server error, Please contact your administrator or try later\"\n}\n" } } } } }, "delete": { "tags": [ "Lightning Addresses" ], "summary": "Delete LN Addresses", "description": "Deletes all the addresses given a filter. Returns the number of deleted addresses", "operationId": "delete_addresses", "parameters": [ { "name": "limit", "in": "query", "description": "Total amount of results to return", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "description": "Offset where to start returning results", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "ids", "in": "query", "description": "List of IDs", "required": false, "schema": { "type": [ "array", "null" ], "items": { "type": "string", "format": "uuid" } } }, { "name": "account_id", "in": "query", "description": "Owning account ID", "required": false, "schema": { "type": [ "string", "null" ], "format": "uuid" } }, { "name": "wallet_id", "in": "query", "description": "Receiving wallet ID", "required": false, "schema": { "type": [ "string", "null" ], "format": "uuid" } }, { "name": "username", "in": "query", "description": "Username", "required": false, "schema": { "type": [ "string", "null" ] } }, { "name": "active", "in": "query", "description": "Active", "required": false, "schema": { "type": [ "boolean", "null" ] } }, { "name": "order_direction", "in": "query", "description": "Direction of the ordering of results", "required": false, "schema": { "$ref": "#/components/schemas/OrderDirection" } } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "type": "integer", "format": "int64", "minimum": 0 } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"400 Bad Request\",\n \"reason\": \"Missing required parameter in request\"\n}\n" } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"401 Unauthorized\",\n \"reason\": \"Invalid credentials\"\n}\n" } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"403 Forbidden\",\n \"reason\": \"Missing permissions\"\n}\n" } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"500 Internal Server Error\",\n \"reason\": \"Internal server error, Please contact your administrator or try later\"\n}\n" } } } } } }, "/v1/lightning-addresses/{id}": { "get": { "tags": [ "Lightning Addresses" ], "summary": "Find a LN Address", "description": "Returns the address by its ID.", "operationId": "get_address", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LnAddress" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"400 Bad Request\",\n \"reason\": \"Missing required parameter in request\"\n}\n" } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"401 Unauthorized\",\n \"reason\": \"Invalid credentials\"\n}\n" } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"403 Forbidden\",\n \"reason\": \"Missing permissions\"\n}\n" } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"404 Not Found\",\n \"reason\": \"Resource not found\"\n}\n" } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"500 Internal Server Error\",\n \"reason\": \"Internal server error, Please contact your administrator or try later\"\n}\n" } } } } }, "put": { "tags": [ "Lightning Addresses" ], "summary": "Update a LN Address", "description": "Updates an address. Returns the address details.", "operationId": "update_address", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateLnAddressRequest" } } }, "required": true }, "responses": { "200": { "description": "LN Address Updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LnAddress" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"400 Bad Request\",\n \"reason\": \"Missing required parameter in request\"\n}\n" } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"401 Unauthorized\",\n \"reason\": \"Invalid credentials\"\n}\n" } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"403 Forbidden\",\n \"reason\": \"Missing permissions\"\n}\n" } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"404 Not Found\",\n \"reason\": \"Resource not found\"\n}\n" } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"422 Unprocessable Entity\",\n \"reason\": \"Validation failed: ...\"\n}\n" } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"500 Internal Server Error\",\n \"reason\": \"Internal server error, Please contact your administrator or try later\"\n}\n" } } } } }, "delete": { "tags": [ "Lightning Addresses" ], "summary": "Delete a LN Address", "description": "Deletes an address by ID. Returns an empty body", "operationId": "delete_address", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Deleted" }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"400 Bad Request\",\n \"reason\": \"Missing required parameter in request\"\n}\n" } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"401 Unauthorized\",\n \"reason\": \"Invalid credentials\"\n}\n" } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"403 Forbidden\",\n \"reason\": \"Missing permissions\"\n}\n" } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"404 Not Found\",\n \"reason\": \"Resource not found\"\n}\n" } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"500 Internal Server Error\",\n \"reason\": \"Internal server error, Please contact your administrator or try later\"\n}\n" } } } } } }, "/v1/me": { "get": { "tags": [ "Me" ], "summary": "Get account.", "operationId": "get_account", "responses": { "200": { "description": "Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Account" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"401 Unauthorized\",\n \"reason\": \"Invalid credentials\"\n}\n" } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"404 Not Found\",\n \"reason\": \"Resource not found\"\n}\n" } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"500 Internal Server Error\",\n \"reason\": \"Internal server error, Please contact your administrator or try later\"\n}\n" } } } } }, "put": { "tags": [ "Me" ], "summary": "Update your account profile.", "operationId": "update_current_account", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateAccountRequest" } } }, "required": true }, "responses": { "200": { "description": "Updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Account" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"400 Bad Request\",\n \"reason\": \"Missing required parameter in request\"\n}\n" } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"401 Unauthorized\",\n \"reason\": \"Invalid credentials\"\n}\n" } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"404 Not Found\",\n \"reason\": \"Resource not found\"\n}\n" } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"422 Unprocessable Entity\",\n \"reason\": \"Validation failed: ...\"\n}\n" } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"500 Internal Server Error\",\n \"reason\": \"Internal server error, Please contact your administrator or try later\"\n}\n" } } } } } }, "/v1/me/api-keys": { "get": { "tags": [ "Me" ], "summary": "List account API keys.", "operationId": "list_account_api_keys", "parameters": [ { "name": "limit", "in": "query", "description": "Total amount of results to return", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "description": "Offset where to start returning results", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "ids", "in": "query", "description": "List of IDs", "required": false, "schema": { "type": [ "array", "null" ], "items": { "type": "string", "format": "uuid" } } }, { "name": "account_id", "in": "query", "description": "Owning account ID.\n\nAccount-scoped endpoints populate this from the authenticated account.", "required": false, "schema": { "type": [ "string", "null" ], "format": "uuid" } }, { "name": "order_direction", "in": "query", "description": "Direction of the ordering of results", "required": false, "schema": { "$ref": "#/components/schemas/OrderDirection" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ApiKey" } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"400 Bad Request\",\n \"reason\": \"Missing required parameter in request\"\n}\n" } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"401 Unauthorized\",\n \"reason\": \"Invalid credentials\"\n}\n" } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"500 Internal Server Error\",\n \"reason\": \"Internal server error, Please contact your administrator or try later\"\n}\n" } } } } }, "post": { "tags": [ "Me" ], "summary": "Generate a new API Key", "description": "Returns the generated API Key for the account. Callers can create API keys with\npermissions as a subset of their current permissions.", "operationId": "create_account_api_key", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateApiKeyRequest" } } }, "required": true }, "responses": { "200": { "description": "API Key Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiKey" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"400 Bad Request\",\n \"reason\": \"Missing required parameter in request\"\n}\n" } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"401 Unauthorized\",\n \"reason\": \"Invalid credentials\"\n}\n" } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"422 Unprocessable Entity\",\n \"reason\": \"Validation failed: ...\"\n}\n" } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"500 Internal Server Error\",\n \"reason\": \"Internal server error, Please contact your administrator or try later\"\n}\n" } } } } }, "delete": { "tags": [ "Me" ], "summary": "Revoke account API keys.", "operationId": "revoke_account_api_keys", "parameters": [ { "name": "limit", "in": "query", "description": "Total amount of results to return", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "description": "Offset where to start returning results", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "ids", "in": "query", "description": "List of IDs", "required": false, "schema": { "type": [ "array", "null" ], "items": { "type": "string", "format": "uuid" } } }, { "name": "account_id", "in": "query", "description": "Owning account ID.\n\nAccount-scoped endpoints populate this from the authenticated account.", "required": false, "schema": { "type": [ "string", "null" ], "format": "uuid" } }, { "name": "order_direction", "in": "query", "description": "Direction of the ordering of results", "required": false, "schema": { "$ref": "#/components/schemas/OrderDirection" } } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "type": "integer", "format": "int64", "minimum": 0 } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"400 Bad Request\",\n \"reason\": \"Missing required parameter in request\"\n}\n" } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"401 Unauthorized\",\n \"reason\": \"Invalid credentials\"\n}\n" } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"500 Internal Server Error\",\n \"reason\": \"Internal server error, Please contact your administrator or try later\"\n}\n" } } } } } }, "/v1/me/api-keys/{id}": { "get": { "tags": [ "Me" ], "summary": "Get an account API key.", "operationId": "get_account_api_key", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiKey" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"400 Bad Request\",\n \"reason\": \"Missing required parameter in request\"\n}\n" } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"401 Unauthorized\",\n \"reason\": \"Invalid credentials\"\n}\n" } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"404 Not Found\",\n \"reason\": \"Resource not found\"\n}\n" } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"500 Internal Server Error\",\n \"reason\": \"Internal server error, Please contact your administrator or try later\"\n}\n" } } } } }, "delete": { "tags": [ "Me" ], "summary": "Revoke an account API key.", "operationId": "revoke_account_api_key", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Revoked" }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"400 Bad Request\",\n \"reason\": \"Missing required parameter in request\"\n}\n" } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"401 Unauthorized\",\n \"reason\": \"Invalid credentials\"\n}\n" } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"404 Not Found\",\n \"reason\": \"Resource not found\"\n}\n" } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"500 Internal Server Error\",\n \"reason\": \"Internal server error, Please contact your administrator or try later\"\n}\n" } } } } } }, "/v1/me/events": { "get": { "tags": [ "Me" ], "summary": "Stream durable events for every wallet owned by the authenticated account.", "description": "A fresh connection starts after the latest committed account event. Send\n`Last-Event-ID` on reconnect (or `after` for deliberate replay) to receive\nmissed events. If that cursor is older than the retained replay window,\nrefresh REST state and reconnect without a cursor.", "operationId": "stream_account_events", "parameters": [ { "name": "after", "in": "query", "description": "Replay events strictly after this event ID. `Last-Event-ID` takes precedence.", "required": false, "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "Server-sent event stream", "content": { "text/event-stream": { "schema": { "$ref": "#/components/schemas/ClientEvent" } } } }, "400": { "description": "Invalid replay cursor", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"400 Bad Request\",\n \"reason\": \"Missing required parameter in request\"\n}\n" } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"401 Unauthorized\",\n \"reason\": \"Invalid credentials\"\n}\n" } } }, "409": { "description": "Replay cursor has expired", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"409 Conflict\",\n \"reason\": \"Admin account already created\"\n}\n" } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"500 Internal Server Error\",\n \"reason\": \"Internal server error, Please contact your administrator or try later\"\n}\n" } } } } } }, "/v1/me/lightning-address": { "get": { "tags": [ "Me" ], "summary": "Get account Lightning Address.", "operationId": "get_account_address", "responses": { "200": { "description": "Found", "content": { "application/json": { "schema": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/LnAddress" } ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"401 Unauthorized\",\n \"reason\": \"Invalid credentials\"\n}\n" } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"404 Not Found\",\n \"reason\": \"Resource not found\"\n}\n" } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"500 Internal Server Error\",\n \"reason\": \"Internal server error, Please contact your administrator or try later\"\n}\n" } } } } }, "put": { "tags": [ "Me" ], "summary": "Update account Lightning Address.", "operationId": "update_account_address", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateLnAddressRequest" } } }, "required": true }, "responses": { "200": { "description": "LN Address Updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LnAddress" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"400 Bad Request\",\n \"reason\": \"Missing required parameter in request\"\n}\n" } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"401 Unauthorized\",\n \"reason\": \"Invalid credentials\"\n}\n" } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"404 Not Found\",\n \"reason\": \"Resource not found\"\n}\n" } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"422 Unprocessable Entity\",\n \"reason\": \"Validation failed: ...\"\n}\n" } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"500 Internal Server Error\",\n \"reason\": \"Internal server error, Please contact your administrator or try later\"\n}\n" } } } } }, "post": { "tags": [ "Me" ], "summary": "Register account Lightning Address.", "operationId": "register_account_address", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RegisterLnAddressRequest" } } }, "required": true }, "responses": { "200": { "description": "LN Address Registered", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LnAddress" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"400 Bad Request\",\n \"reason\": \"Missing required parameter in request\"\n}\n" } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"401 Unauthorized\",\n \"reason\": \"Invalid credentials\"\n}\n" } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"422 Unprocessable Entity\",\n \"reason\": \"Validation failed: ...\"\n}\n" } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"500 Internal Server Error\",\n \"reason\": \"Internal server error, Please contact your administrator or try later\"\n}\n" } } } } }, "delete": { "tags": [ "Me" ], "summary": "Delete account Lightning Address.", "operationId": "delete_account_address", "responses": { "200": { "description": "Deleted" }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"400 Bad Request\",\n \"reason\": \"Missing required parameter in request\"\n}\n" } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"401 Unauthorized\",\n \"reason\": \"Invalid credentials\"\n}\n" } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"404 Not Found\",\n \"reason\": \"Resource not found\"\n}\n" } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"500 Internal Server Error\",\n \"reason\": \"Internal server error, Please contact your administrator or try later\"\n}\n" } } } } } }, "/v1/me/preferences": { "get": { "tags": [ "Me" ], "summary": "Get account preferences.", "operationId": "get_account_preferences", "responses": { "200": { "description": "Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AccountPreferences" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"401 Unauthorized\",\n \"reason\": \"Invalid credentials\"\n}\n" } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"404 Not Found\",\n \"reason\": \"Resource not found\"\n}\n" } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"500 Internal Server Error\",\n \"reason\": \"Internal server error, Please contact your administrator or try later\"\n}\n" } } } } }, "put": { "tags": [ "Me" ], "summary": "Replace account preferences.", "operationId": "update_account_preferences", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateAccountPreferencesRequest" } } }, "required": true }, "responses": { "200": { "description": "Updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AccountPreferences" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"400 Bad Request\",\n \"reason\": \"Missing required parameter in request\"\n}\n" } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"401 Unauthorized\",\n \"reason\": \"Invalid credentials\"\n}\n" } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"422 Unprocessable Entity\",\n \"reason\": \"Validation failed: ...\"\n}\n" } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"500 Internal Server Error\",\n \"reason\": \"Internal server error, Please contact your administrator or try later\"\n}\n" } } } } } }, "/v1/me/wallets": { "get": { "tags": [ "Me" ], "summary": "List account wallets.", "operationId": "list_account_wallets", "parameters": [ { "name": "limit", "in": "query", "description": "Total amount of results to return", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "description": "Offset where to start returning results", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "ids", "in": "query", "description": "List of IDs", "required": false, "schema": { "type": [ "array", "null" ], "items": { "type": "string", "format": "uuid" } } }, { "name": "account_id", "in": "query", "description": "Owning account ID.\n\nAccount-scoped endpoints populate this from the authenticated account.", "required": false, "schema": { "type": [ "string", "null" ], "format": "uuid" } }, { "name": "asset_id", "in": "query", "description": "Asset ID", "required": false, "schema": { "type": [ "string", "null" ], "format": "uuid" } }, { "name": "order_direction", "in": "query", "description": "Direction of the ordering of results", "required": false, "schema": { "$ref": "#/components/schemas/OrderDirection" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Wallet" } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"400 Bad Request\",\n \"reason\": \"Missing required parameter in request\"\n}\n" } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"401 Unauthorized\",\n \"reason\": \"Invalid credentials\"\n}\n" } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"500 Internal Server Error\",\n \"reason\": \"Internal server error, Please contact your administrator or try later\"\n}\n" } } } } }, "post": { "tags": [ "Me" ], "summary": "Create or enable an asset wallet.", "operationId": "create_account_wallet", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateWalletRequest" } } }, "required": true }, "responses": { "200": { "description": "Wallet Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Wallet" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"400 Bad Request\",\n \"reason\": \"Missing required parameter in request\"\n}\n" } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"401 Unauthorized\",\n \"reason\": \"Invalid credentials\"\n}\n" } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"422 Unprocessable Entity\",\n \"reason\": \"Validation failed: ...\"\n}\n" } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"500 Internal Server Error\",\n \"reason\": \"Internal server error, Please contact your administrator or try later\"\n}\n" } } } } } }, "/v1/me/wallets/{wallet_id}": { "get": { "tags": [ "Me" ], "summary": "Get one account wallet.", "operationId": "get_account_wallet", "parameters": [ { "name": "wallet_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Wallet" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"401 Unauthorized\",\n \"reason\": \"Invalid credentials\"\n}\n" } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"404 Not Found\",\n \"reason\": \"Resource not found\"\n}\n" } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"500 Internal Server Error\",\n \"reason\": \"Internal server error, Please contact your administrator or try later\"\n}\n" } } } } } }, "/v1/me/wallets/{wallet_id}/balance": { "get": { "tags": [ "Me" ], "summary": "Get wallet balance.", "operationId": "get_wallet_balance", "parameters": [ { "name": "wallet_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Balance" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"401 Unauthorized\",\n \"reason\": \"Invalid credentials\"\n}\n" } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"404 Not Found\",\n \"reason\": \"Resource not found\"\n}\n" } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"500 Internal Server Error\",\n \"reason\": \"Internal server error, Please contact your administrator or try later\"\n}\n" } } } } } }, "/v1/me/wallets/{wallet_id}/bitcoin/addresses": { "get": { "tags": [ "Me" ], "summary": "List Bitcoin addresses for a wallet.", "operationId": "list_wallet_btc_addresses", "parameters": [ { "name": "limit", "in": "query", "description": "Total amount of results to return", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "description": "Offset where to start returning results", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "ids", "in": "query", "description": "List of IDs", "required": false, "schema": { "type": [ "array", "null" ], "items": { "type": "string", "format": "uuid" } } }, { "name": "wallet_id", "in": "query", "description": "Wallet ID. Automatically populated with your ID", "required": false, "schema": { "type": [ "string", "null" ], "format": "uuid" } }, { "name": "address", "in": "query", "description": "Address", "required": false, "schema": { "type": [ "string", "null" ] } }, { "name": "address_type", "in": "query", "description": "Status", "required": false, "schema": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/BtcAddressType" } ] } }, { "name": "used", "in": "query", "description": "Whether the address has been used", "required": false, "schema": { "type": [ "boolean", "null" ] } }, { "name": "order_direction", "in": "query", "description": "Direction of the ordering of results", "required": false, "schema": { "$ref": "#/components/schemas/OrderDirection" } }, { "name": "wallet_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/BtcAddress" } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"400 Bad Request\",\n \"reason\": \"Missing required parameter in request\"\n}\n" } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"401 Unauthorized\",\n \"reason\": \"Invalid credentials\"\n}\n" } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"404 Not Found\",\n \"reason\": \"Resource not found\"\n}\n" } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"500 Internal Server Error\",\n \"reason\": \"Internal server error, Please contact your administrator or try later\"\n}\n" } } } } }, "post": { "tags": [ "Me" ], "summary": "Generate a new Bitcoin address for a wallet.", "operationId": "new_wallet_btc_address", "parameters": [ { "name": "wallet_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NewBtcAddressRequest" } } }, "required": true }, "responses": { "200": { "description": "Bitcoin Address Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BtcAddress" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"400 Bad Request\",\n \"reason\": \"Missing required parameter in request\"\n}\n" } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"401 Unauthorized\",\n \"reason\": \"Invalid credentials\"\n}\n" } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"404 Not Found\",\n \"reason\": \"Resource not found\"\n}\n" } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"422 Unprocessable Entity\",\n \"reason\": \"Validation failed: ...\"\n}\n" } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"500 Internal Server Error\",\n \"reason\": \"Internal server error, Please contact your administrator or try later\"\n}\n" } } } } } }, "/v1/me/wallets/{wallet_id}/contacts": { "get": { "tags": [ "Me" ], "summary": "List contacts for a wallet.", "operationId": "list_contacts", "parameters": [ { "name": "wallet_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Contact" } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"400 Bad Request\",\n \"reason\": \"Missing required parameter in request\"\n}\n" } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"401 Unauthorized\",\n \"reason\": \"Invalid credentials\"\n}\n" } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"404 Not Found\",\n \"reason\": \"Resource not found\"\n}\n" } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"500 Internal Server Error\",\n \"reason\": \"Internal server error, Please contact your administrator or try later\"\n}\n" } } } } } }, "/v1/me/wallets/{wallet_id}/invoices": { "get": { "tags": [ "Me" ], "summary": "List invoices for a wallet.", "operationId": "list_wallet_invoices", "parameters": [ { "name": "limit", "in": "query", "description": "Total amount of results to return", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "description": "Offset where to start returning results", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "ids", "in": "query", "description": "List of IDs", "required": false, "schema": { "type": [ "array", "null" ], "items": { "type": "string", "format": "uuid" } } }, { "name": "wallet_id", "in": "query", "description": "Wallet ID. Automatically populated with your ID", "required": false, "schema": { "type": [ "string", "null" ], "format": "uuid" } }, { "name": "status", "in": "query", "description": "Status", "required": false, "schema": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/InvoiceStatus" } ] } }, { "name": "ledger", "in": "query", "description": "Ledger", "required": false, "schema": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/Ledger" } ] } }, { "name": "order_by", "in": "query", "description": "Order by", "required": false, "schema": { "$ref": "#/components/schemas/InvoiceOrderBy" } }, { "name": "order_direction", "in": "query", "description": "Direction of the ordering of results", "required": false, "schema": { "$ref": "#/components/schemas/OrderDirection" } }, { "name": "wallet_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Invoice" } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"400 Bad Request\",\n \"reason\": \"Missing required parameter in request\"\n}\n" } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"401 Unauthorized\",\n \"reason\": \"Invalid credentials\"\n}\n" } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"404 Not Found\",\n \"reason\": \"Resource not found\"\n}\n" } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"500 Internal Server Error\",\n \"reason\": \"Internal server error, Please contact your administrator or try later\"\n}\n" } } } } }, "post": { "tags": [ "Me" ], "summary": "Generate a new invoice for a wallet.", "operationId": "new_wallet_invoice", "parameters": [ { "name": "wallet_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NewInvoiceRequest" } } }, "required": true }, "responses": { "200": { "description": "Invoice Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Invoice" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"400 Bad Request\",\n \"reason\": \"Missing required parameter in request\"\n}\n" } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"401 Unauthorized\",\n \"reason\": \"Invalid credentials\"\n}\n" } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"404 Not Found\",\n \"reason\": \"Resource not found\"\n}\n" } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"422 Unprocessable Entity\",\n \"reason\": \"Validation failed: ...\"\n}\n" } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"500 Internal Server Error\",\n \"reason\": \"Internal server error, Please contact your administrator or try later\"\n}\n" } } } } }, "delete": { "tags": [ "Me" ], "summary": "Delete expired invoices for a wallet.", "operationId": "delete_expired_invoices", "parameters": [ { "name": "wallet_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "type": "integer", "format": "int64", "minimum": 0 } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"401 Unauthorized\",\n \"reason\": \"Invalid credentials\"\n}\n" } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"404 Not Found\",\n \"reason\": \"Resource not found\"\n}\n" } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"500 Internal Server Error\",\n \"reason\": \"Internal server error, Please contact your administrator or try later\"\n}\n" } } } } } }, "/v1/me/wallets/{wallet_id}/invoices/{id}": { "get": { "tags": [ "Me" ], "summary": "Get a wallet invoice.", "operationId": "get_wallet_invoice", "parameters": [ { "name": "wallet_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Invoice" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"400 Bad Request\",\n \"reason\": \"Missing required parameter in request\"\n}\n" } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"401 Unauthorized\",\n \"reason\": \"Invalid credentials\"\n}\n" } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"404 Not Found\",\n \"reason\": \"Resource not found\"\n}\n" } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"500 Internal Server Error\",\n \"reason\": \"Internal server error, Please contact your administrator or try later\"\n}\n" } } } } } }, "/v1/me/wallets/{wallet_id}/payments": { "get": { "tags": [ "Me" ], "summary": "List payments for a wallet.", "operationId": "list_wallet_payments", "parameters": [ { "name": "limit", "in": "query", "description": "Total amount of results to return", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "description": "Offset where to start returning results", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "ids", "in": "query", "description": "List of IDs", "required": false, "schema": { "type": [ "array", "null" ], "items": { "type": "string", "format": "uuid" } } }, { "name": "wallet_id", "in": "query", "description": "Wallet ID. Automatically populated with your ID", "required": false, "schema": { "type": [ "string", "null" ], "format": "uuid" } }, { "name": "status", "in": "query", "description": "Status", "required": false, "schema": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/PaymentStatus" } ] } }, { "name": "ledger", "in": "query", "description": "Ledger", "required": false, "schema": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/Ledger" } ] } }, { "name": "ln_addresses", "in": "query", "description": "Lightning addresses", "required": false, "schema": { "type": [ "array", "null" ], "items": { "type": "string" } } }, { "name": "btc_addresses", "in": "query", "description": "Bitcoin addresses", "required": false, "schema": { "type": [ "array", "null" ], "items": { "type": "string" } } }, { "name": "order_direction", "in": "query", "description": "Direction of the ordering of results", "required": false, "schema": { "$ref": "#/components/schemas/OrderDirection" } }, { "name": "wallet_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Payment" } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"400 Bad Request\",\n \"reason\": \"Missing required parameter in request\"\n}\n" } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"401 Unauthorized\",\n \"reason\": \"Invalid credentials\"\n}\n" } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"404 Not Found\",\n \"reason\": \"Resource not found\"\n}\n" } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"500 Internal Server Error\",\n \"reason\": \"Internal server error, Please contact your administrator or try later\"\n}\n" } } } } }, "post": { "tags": [ "Me" ], "summary": "Send a payment from a wallet.", "operationId": "wallet_pay", "parameters": [ { "name": "wallet_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SendPaymentRequest" } } }, "required": true }, "responses": { "200": { "description": "Payment Sent", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Payment" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"400 Bad Request\",\n \"reason\": \"Missing required parameter in request\"\n}\n" } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"401 Unauthorized\",\n \"reason\": \"Invalid credentials\"\n}\n" } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"404 Not Found\",\n \"reason\": \"Resource not found\"\n}\n" } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"422 Unprocessable Entity\",\n \"reason\": \"Validation failed: ...\"\n}\n" } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"500 Internal Server Error\",\n \"reason\": \"Internal server error, Please contact your administrator or try later\"\n}\n" } } } } }, "delete": { "tags": [ "Me" ], "summary": "Delete failed payments for a wallet.", "operationId": "delete_failed_payments", "parameters": [ { "name": "wallet_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "type": "integer", "format": "int64", "minimum": 0 } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"401 Unauthorized\",\n \"reason\": \"Invalid credentials\"\n}\n" } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"404 Not Found\",\n \"reason\": \"Resource not found\"\n}\n" } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"500 Internal Server Error\",\n \"reason\": \"Internal server error, Please contact your administrator or try later\"\n}\n" } } } } } }, "/v1/me/wallets/{wallet_id}/payments/fee-estimate": { "post": { "tags": [ "Me" ], "summary": "Estimate a payment fee for an account-owned wallet.", "operationId": "estimate_wallet_payment_fee", "parameters": [ { "name": "wallet_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SendPaymentRequest" } } }, "required": true }, "responses": { "200": { "description": "Fee estimated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaymentFeeEstimate" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"400 Bad Request\",\n \"reason\": \"Missing required parameter in request\"\n}\n" } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"401 Unauthorized\",\n \"reason\": \"Invalid credentials\"\n}\n" } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"404 Not Found\",\n \"reason\": \"Resource not found\"\n}\n" } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"422 Unprocessable Entity\",\n \"reason\": \"Validation failed: ...\"\n}\n" } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"500 Internal Server Error\",\n \"reason\": \"Internal server error, Please contact your administrator or try later\"\n}\n" } } } } } }, "/v1/me/wallets/{wallet_id}/payments/{id}": { "get": { "tags": [ "Me" ], "summary": "Get a wallet payment.", "operationId": "get_wallet_payment", "parameters": [ { "name": "wallet_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Payment" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"400 Bad Request\",\n \"reason\": \"Missing required parameter in request\"\n}\n" } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"401 Unauthorized\",\n \"reason\": \"Invalid credentials\"\n}\n" } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"404 Not Found\",\n \"reason\": \"Resource not found\"\n}\n" } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"500 Internal Server Error\",\n \"reason\": \"Internal server error, Please contact your administrator or try later\"\n}\n" } } } } } }, "/v1/payments": { "get": { "tags": [ "Payments" ], "summary": "List payments", "description": "Returns all the payments given a filter", "operationId": "list_payments", "parameters": [ { "name": "limit", "in": "query", "description": "Total amount of results to return", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "description": "Offset where to start returning results", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "ids", "in": "query", "description": "List of IDs", "required": false, "schema": { "type": [ "array", "null" ], "items": { "type": "string", "format": "uuid" } } }, { "name": "wallet_id", "in": "query", "description": "Wallet ID. Automatically populated with your ID", "required": false, "schema": { "type": [ "string", "null" ], "format": "uuid" } }, { "name": "status", "in": "query", "description": "Status", "required": false, "schema": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/PaymentStatus" } ] } }, { "name": "ledger", "in": "query", "description": "Ledger", "required": false, "schema": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/Ledger" } ] } }, { "name": "ln_addresses", "in": "query", "description": "Lightning addresses", "required": false, "schema": { "type": [ "array", "null" ], "items": { "type": "string" } } }, { "name": "btc_addresses", "in": "query", "description": "Bitcoin addresses", "required": false, "schema": { "type": [ "array", "null" ], "items": { "type": "string" } } }, { "name": "order_direction", "in": "query", "description": "Direction of the ordering of results", "required": false, "schema": { "$ref": "#/components/schemas/OrderDirection" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Payment" } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"400 Bad Request\",\n \"reason\": \"Missing required parameter in request\"\n}\n" } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"401 Unauthorized\",\n \"reason\": \"Invalid credentials\"\n}\n" } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"403 Forbidden\",\n \"reason\": \"Missing permissions\"\n}\n" } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"500 Internal Server Error\",\n \"reason\": \"Internal server error, Please contact your administrator or try later\"\n}\n" } } } } }, "post": { "tags": [ "Payments" ], "summary": "Send a payment", "description": "Pay a Lightning invoice, LNURL, Lightning Address, on-chain address, or another account on this instance.", "operationId": "pay", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SendPaymentRequest" } } }, "required": true }, "responses": { "200": { "description": "Payment Sent", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Payment" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"400 Bad Request\",\n \"reason\": \"Missing required parameter in request\"\n}\n" } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"401 Unauthorized\",\n \"reason\": \"Invalid credentials\"\n}\n" } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"403 Forbidden\",\n \"reason\": \"Missing permissions\"\n}\n" } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"422 Unprocessable Entity\",\n \"reason\": \"Validation failed: ...\"\n}\n" } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"500 Internal Server Error\",\n \"reason\": \"Internal server error, Please contact your administrator or try later\"\n}\n" } } } } }, "delete": { "tags": [ "Payments" ], "summary": "Delete payments", "description": "Deletes all payments matching a filter. Returns the number deleted. Deleting a payment can affect the wallet balance.", "operationId": "delete_payments", "parameters": [ { "name": "limit", "in": "query", "description": "Total amount of results to return", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "description": "Offset where to start returning results", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "ids", "in": "query", "description": "List of IDs", "required": false, "schema": { "type": [ "array", "null" ], "items": { "type": "string", "format": "uuid" } } }, { "name": "wallet_id", "in": "query", "description": "Wallet ID. Automatically populated with your ID", "required": false, "schema": { "type": [ "string", "null" ], "format": "uuid" } }, { "name": "status", "in": "query", "description": "Status", "required": false, "schema": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/PaymentStatus" } ] } }, { "name": "ledger", "in": "query", "description": "Ledger", "required": false, "schema": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/Ledger" } ] } }, { "name": "ln_addresses", "in": "query", "description": "Lightning addresses", "required": false, "schema": { "type": [ "array", "null" ], "items": { "type": "string" } } }, { "name": "btc_addresses", "in": "query", "description": "Bitcoin addresses", "required": false, "schema": { "type": [ "array", "null" ], "items": { "type": "string" } } }, { "name": "order_direction", "in": "query", "description": "Direction of the ordering of results", "required": false, "schema": { "$ref": "#/components/schemas/OrderDirection" } } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "type": "integer", "format": "int64", "minimum": 0 } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"400 Bad Request\",\n \"reason\": \"Missing required parameter in request\"\n}\n" } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"401 Unauthorized\",\n \"reason\": \"Invalid credentials\"\n}\n" } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"403 Forbidden\",\n \"reason\": \"Missing permissions\"\n}\n" } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"500 Internal Server Error\",\n \"reason\": \"Internal server error, Please contact your administrator or try later\"\n}\n" } } } } } }, "/v1/payments/fee-estimate": { "post": { "tags": [ "Payments" ], "summary": "Estimate an outgoing payment fee", "description": "Returns the provider-derived expected fee and the hard maximum used during payment execution.", "operationId": "estimate_payment_fee", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SendPaymentRequest" } } }, "required": true }, "responses": { "200": { "description": "Fee estimated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaymentFeeEstimate" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"400 Bad Request\",\n \"reason\": \"Missing required parameter in request\"\n}\n" } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"401 Unauthorized\",\n \"reason\": \"Invalid credentials\"\n}\n" } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"403 Forbidden\",\n \"reason\": \"Missing permissions\"\n}\n" } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"422 Unprocessable Entity\",\n \"reason\": \"Validation failed: ...\"\n}\n" } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"500 Internal Server Error\",\n \"reason\": \"Internal server error, Please contact your administrator or try later\"\n}\n" } } } } } }, "/v1/payments/{id}": { "get": { "tags": [ "Payments" ], "summary": "Find a payment", "description": "Returns the payment by its ID.", "operationId": "get_payment", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Payment" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"400 Bad Request\",\n \"reason\": \"Missing required parameter in request\"\n}\n" } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"401 Unauthorized\",\n \"reason\": \"Invalid credentials\"\n}\n" } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"403 Forbidden\",\n \"reason\": \"Missing permissions\"\n}\n" } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"404 Not Found\",\n \"reason\": \"Resource not found\"\n}\n" } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"500 Internal Server Error\",\n \"reason\": \"Internal server error, Please contact your administrator or try later\"\n}\n" } } } } }, "delete": { "tags": [ "Payments" ], "summary": "Delete a payment", "description": "Deletes a payment by ID. Returns an empty body. Deleting a payment can affect the wallet balance.", "operationId": "delete_payment", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Deleted" }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"400 Bad Request\",\n \"reason\": \"Missing required parameter in request\"\n}\n" } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"401 Unauthorized\",\n \"reason\": \"Invalid credentials\"\n}\n" } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"403 Forbidden\",\n \"reason\": \"Missing permissions\"\n}\n" } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"404 Not Found\",\n \"reason\": \"Resource not found\"\n}\n" } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"500 Internal Server Error\",\n \"reason\": \"Internal server error, Please contact your administrator or try later\"\n}\n" } } } } } }, "/v1/system/health": { "get": { "tags": [ "System" ], "summary": "Health Check", "description": "Returns the health of the system fine-grained by dependency.", "operationId": "health_check", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HealthCheck" } } } }, "503": { "description": "Service Unavailable", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HealthCheck" } } } } } } }, "/v1/system/mark-welcome-complete": { "post": { "tags": [ "System" ], "summary": "Marks the welcome flow as completed", "description": "Returns whether the application welcome flow is complete.", "operationId": "mark_welcome_complete", "responses": { "204": { "description": "No Content on success" }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"500 Internal Server Error\",\n \"reason\": \"Internal server error, Please contact your administrator or try later\"\n}\n" } } } } } }, "/v1/system/ready": { "get": { "tags": [ "System" ], "summary": "Readiness Check", "description": "Returns successfully if the server is reachable.", "operationId": "readiness_check", "responses": { "204": { "description": "No Content on success" } } } }, "/v1/system/setup": { "get": { "tags": [ "System" ], "summary": "Setup Status Check", "description": "Returns whether the application setup is complete.", "operationId": "setup_check", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SetupInfo" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"500 Internal Server Error\",\n \"reason\": \"Internal server error, Please contact your administrator or try later\"\n}\n" } } } } } }, "/v1/system/version": { "get": { "tags": [ "System" ], "summary": "Version Information", "description": "Returns the current version and build time of the system.", "operationId": "version_check", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VersionInfo" } } } } } } }, "/v1/wallets": { "get": { "tags": [ "Wallets" ], "summary": "List wallets", "description": "Returns all the wallets without any linked data. Use the wallet ID to get the full wallet details.", "operationId": "list_wallets", "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Wallet" } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"400 Bad Request\",\n \"reason\": \"Missing required parameter in request\"\n}\n" } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"401 Unauthorized\",\n \"reason\": \"Invalid credentials\"\n}\n" } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"403 Forbidden\",\n \"reason\": \"Missing permissions\"\n}\n" } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"500 Internal Server Error\",\n \"reason\": \"Internal server error, Please contact your administrator or try later\"\n}\n" } } } } }, "post": { "tags": [ "Wallets" ], "summary": "Register a new wallet", "description": "Returns the account asset wallet.", "operationId": "register_wallet", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateWalletRequest" } } }, "required": true }, "responses": { "200": { "description": "Wallet Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Wallet" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"400 Bad Request\",\n \"reason\": \"Missing required parameter in request\"\n}\n" } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"401 Unauthorized\",\n \"reason\": \"Invalid credentials\"\n}\n" } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"403 Forbidden\",\n \"reason\": \"Missing permissions\"\n}\n" } } }, "404": { "description": "Account or asset not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"404 Not Found\",\n \"reason\": \"Resource not found\"\n}\n" } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"422 Unprocessable Entity\",\n \"reason\": \"Validation failed: ...\"\n}\n" } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"500 Internal Server Error\",\n \"reason\": \"Internal server error, Please contact your administrator or try later\"\n}\n" } } } } }, "delete": { "tags": [ "Wallets" ], "summary": "Delete wallets", "description": "Deletes all the wallets given a filter. Returns the number of deleted wallets. Deleting a wallet removes all data related to that wallet.", "operationId": "delete_wallets", "parameters": [ { "name": "limit", "in": "query", "description": "Total amount of results to return", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "description": "Offset where to start returning results", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "ids", "in": "query", "description": "List of IDs", "required": false, "schema": { "type": [ "array", "null" ], "items": { "type": "string", "format": "uuid" } } }, { "name": "account_id", "in": "query", "description": "Owning account ID.\n\nAccount-scoped endpoints populate this from the authenticated account.", "required": false, "schema": { "type": [ "string", "null" ], "format": "uuid" } }, { "name": "asset_id", "in": "query", "description": "Asset ID", "required": false, "schema": { "type": [ "string", "null" ], "format": "uuid" } }, { "name": "order_direction", "in": "query", "description": "Direction of the ordering of results", "required": false, "schema": { "$ref": "#/components/schemas/OrderDirection" } } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "type": "integer", "format": "int64", "minimum": 0 } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"400 Bad Request\",\n \"reason\": \"Missing required parameter in request\"\n}\n" } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"401 Unauthorized\",\n \"reason\": \"Invalid credentials\"\n}\n" } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"403 Forbidden\",\n \"reason\": \"Missing permissions\"\n}\n" } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"500 Internal Server Error\",\n \"reason\": \"Internal server error, Please contact your administrator or try later\"\n}\n" } } } } } }, "/v1/wallets/overviews": { "get": { "tags": [ "Wallets" ], "summary": "List wallet overviews", "description": "Returns all the wallet overviews. A wallet overview is a summary of a wallet with the number of payments, invoices and contacts.", "operationId": "list_wallet_overviews", "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/WalletOverview" } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"400 Bad Request\",\n \"reason\": \"Missing required parameter in request\"\n}\n" } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"401 Unauthorized\",\n \"reason\": \"Invalid credentials\"\n}\n" } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"403 Forbidden\",\n \"reason\": \"Missing permissions\"\n}\n" } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"500 Internal Server Error\",\n \"reason\": \"Internal server error, Please contact your administrator or try later\"\n}\n" } } } } } }, "/v1/wallets/{id}": { "get": { "tags": [ "Wallets" ], "summary": "Find a wallet", "description": "Returns the wallet by its ID.", "operationId": "get_wallet", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Wallet" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"400 Bad Request\",\n \"reason\": \"Missing required parameter in request\"\n}\n" } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"401 Unauthorized\",\n \"reason\": \"Invalid credentials\"\n}\n" } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"403 Forbidden\",\n \"reason\": \"Missing permissions\"\n}\n" } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"404 Not Found\",\n \"reason\": \"Resource not found\"\n}\n" } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"500 Internal Server Error\",\n \"reason\": \"Internal server error, Please contact your administrator or try later\"\n}\n" } } } } }, "delete": { "tags": [ "Wallets" ], "summary": "Delete a wallet", "description": "Deletes an wallet by ID. Returns an empty body. Deleting a wallet removes all data related to that wallet.", "operationId": "delete_wallet", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Deleted" }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"400 Bad Request\",\n \"reason\": \"Missing required parameter in request\"\n}\n" } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"401 Unauthorized\",\n \"reason\": \"Invalid credentials\"\n}\n" } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"403 Forbidden\",\n \"reason\": \"Missing permissions\"\n}\n" } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"404 Not Found\",\n \"reason\": \"Resource not found\"\n}\n" } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": "\n{\n \"status\": \"500 Internal Server Error\",\n \"reason\": \"Internal server error, Please contact your administrator or try later\"\n}\n" } } } } } } }, "components": { "schemas": { "Account": { "type": "object", "description": "An account is the owner and authorization boundary for identities, wallets,\nAPI keys, permissions, and account-scoped preferences.", "required": [ "id", "wallets", "created_at" ], "properties": { "created_at": { "type": "string", "format": "date-time", "description": "Date of creation in database." }, "display_name": { "type": [ "string", "null" ], "description": "Optional human-readable name for the account.", "example": "Numeraire" }, "id": { "type": "string", "format": "uuid", "description": "Stable internal account ID." }, "identity": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/AuthIdentity", "description": "Login identity currently linked to this account, when one exists." } ] }, "permissions": { "type": [ "array", "null" ], "items": { "$ref": "#/components/schemas/Permission" }, "description": "Permissions stored for this account." }, "preferences": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/AccountPreferences", "description": "Account-scoped dashboard and UI preferences." } ] }, "updated_at": { "type": [ "string", "null" ], "format": "date-time", "description": "Date of update in database." }, "wallets": { "type": "array", "items": { "$ref": "#/components/schemas/Wallet" }, "description": "Wallets owned by this account.\n\nThese include asset metadata, balances, and the linked Lightning\nAddress, but not payments, invoices, Bitcoin addresses, or contacts.\nFetch a wallet by ID when those related resources are needed." } } }, "AccountPreferences": { "type": "object", "description": "Account-scoped dashboard and UI preferences.", "required": [ "dashboard_settings", "created_at" ], "properties": { "created_at": { "type": "string", "format": "date-time", "description": "Date of creation in database." }, "dashboard_settings": { "description": "Versioned dashboard settings document stored by the server." }, "updated_at": { "type": [ "string", "null" ], "format": "date-time", "description": "Date of update in database." } } }, "ApiKey": { "type": "object", "description": "API Key", "required": [ "id", "account_id", "name", "permissions", "created_at" ], "properties": { "account_id": { "type": "string", "format": "uuid", "description": "Owning account ID" }, "created_at": { "type": "string", "format": "date-time", "description": "Date of creation in database" }, "description": { "type": [ "string", "null" ], "description": "API key description" }, "expires_at": { "type": [ "string", "null" ], "format": "date-time", "description": "Date of expiration" }, "id": { "type": "string", "format": "uuid", "description": "Internal ID" }, "key": { "type": [ "string", "null" ], "description": "API key (only returned once on creation, save it securely as it cannot be retrieved)" }, "name": { "type": "string", "description": "API key name" }, "permissions": { "type": "array", "items": { "$ref": "#/components/schemas/Permission" }, "description": "List of permissions for this API key" } } }, "Asset": { "type": "object", "description": "A spendable asset on one protocol/network.", "required": [ "id", "code", "protocol", "network", "asset_ref", "display_ticker", "decimals", "created_at" ], "properties": { "asset_ref": { "type": "string", "description": "Protocol-specific asset reference; native for chain-native BTC", "example": "native" }, "code": { "type": "string", "description": "Stable server asset code, independent of network-specific UI ticker.", "example": "BTC" }, "created_at": { "type": "string", "format": "date-time", "description": "Date of creation in database" }, "decimals": { "type": "integer", "format": "int32", "description": "Integer storage scale for this asset", "example": 11 }, "display_ticker": { "type": "string", "description": "UI ticker for the specific network, such as BTC, tBTC, or rBTC.", "example": "BTC" }, "id": { "type": "string", "format": "uuid", "description": "Internal asset ID" }, "name": { "type": [ "string", "null" ], "description": "Optional human-readable asset name, independent of its settlement network.", "example": "Bitcoin" }, "network": { "$ref": "#/components/schemas/BtcNetwork", "description": "Settlement network." }, "protocol": { "$ref": "#/components/schemas/Protocol", "description": "Settlement protocol." }, "updated_at": { "type": [ "string", "null" ], "format": "date-time", "description": "Date of update in database" } } }, "AuthIdentity": { "type": "object", "description": "A login identity from an authentication provider linked to an account.", "required": [ "id", "provider", "subject", "created_at" ], "properties": { "created_at": { "type": "string", "format": "date-time", "description": "Date of creation in database." }, "id": { "type": "string", "format": "uuid", "description": "Stable internal identity ID." }, "provider": { "$ref": "#/components/schemas/AuthProvider", "description": "Authentication provider namespace, such as `jwt` or `oauth2`." }, "subject": { "type": "string", "description": "Provider subject, such as a JWT username or OAuth2 `sub`.", "example": "auth0|numeraire" } } }, "AuthProvider": { "type": "string", "description": "Authentication provider namespace.", "enum": [ "jwt", "oauth2" ] }, "Balance": { "type": "object", "description": "A wallet's balance, in millisatoshis.", "required": [ "received_msat", "sent_msat", "fees_paid_msat", "reserved_msat", "available_msat" ], "properties": { "available_msat": { "type": "integer", "format": "int64", "description": "Amount available to spend.", "example": 989999000 }, "fees_paid_msat": { "type": "integer", "format": "int64", "description": "Total fees paid", "example": 1000, "minimum": 0 }, "received_msat": { "type": "integer", "format": "int64", "description": "Total amount received", "example": 1000000000, "minimum": 0 }, "reserved_msat": { "type": "integer", "format": "int64", "description": "Amount reserved for pending outgoing payments", "example": 2000, "minimum": 0 }, "sent_msat": { "type": "integer", "format": "int64", "description": "Total amount sent (settled outgoing payments)", "example": 10000000, "minimum": 0 } } }, "BtcAddress": { "type": "object", "description": "Bitcoin Address", "required": [ "id", "wallet_id", "address", "used", "address_type", "created_at" ], "properties": { "address": { "type": "string", "description": "Current deposit address" }, "address_type": { "$ref": "#/components/schemas/BtcAddressType", "description": "Address type" }, "created_at": { "type": "string", "format": "date-time", "description": "Date of creation in database" }, "id": { "type": "string", "format": "uuid", "description": "Internal ID" }, "updated_at": { "type": [ "string", "null" ], "format": "date-time", "description": "Date of update in database" }, "used": { "type": "boolean", "description": "Whether the address has already been used on-chain" }, "wallet_id": { "type": "string", "format": "uuid", "description": "Wallet ID" } } }, "BtcAddressType": { "type": "string", "description": "Bitcoin address script type.", "enum": [ "p2pkh", "p2sh", "p2wpkh", "p2tr" ] }, "BtcNetwork": { "type": "string", "description": "A Bitcoin network.", "enum": [ "Bitcoin", "Testnet", "Testnet4", "Regtest", "Simnet", "Signet" ] }, "BtcOutput": { "type": "object", "description": "Bitcoin Output", "required": [ "id", "outpoint", "address", "amount_sat", "status", "created_at" ], "properties": { "address": { "type": "string", "description": "Address" }, "amount_sat": { "type": "integer", "format": "int64", "description": "Amount in satoshis", "minimum": 0 }, "block_height": { "type": [ "integer", "null" ], "format": "int32", "description": "Block height", "minimum": 0 }, "created_at": { "type": "string", "format": "date-time", "description": "Date of creation in database" }, "id": { "type": "string", "format": "uuid", "description": "Internal ID" }, "outpoint": { "type": "string", "description": "Outpoint" }, "status": { "$ref": "#/components/schemas/BtcOutputStatus", "description": "Status" }, "updated_at": { "type": [ "string", "null" ], "format": "date-time", "description": "Date of update in database" } } }, "BtcOutputStatus": { "type": "string", "description": "Confirmation status of an on-chain output.", "enum": [ "Unconfirmed", "Confirmed", "Spent", "Immature" ] }, "BtcPayment": { "type": "object", "description": "On-chain Bitcoin details of a payment.", "required": [ "address", "txid" ], "properties": { "address": { "type": "string", "description": "Destination Bitcoin address. Populated for Bitcoin onchain payments." }, "block_height": { "type": [ "integer", "null" ], "format": "int32", "description": "Bitcoin block height where the transaction was confirmed.", "minimum": 0 }, "txid": { "type": "string", "description": "Transaction ID for on-chain payments." } } }, "ChangePasswordRequest": { "type": "object", "description": "Change Password Request", "required": [ "current_password", "new_password" ], "properties": { "current_password": { "type": "string", "description": "Current user password", "example": "old-password" }, "new_password": { "type": "string", "description": "New user password", "example": "new-password" } } }, "ClientEvent": { "type": "object", "description": "A durable event emitted after an invoice or payment changes state.", "required": [ "id", "event_type", "wallet_id", "resource_id", "data", "created_at" ], "properties": { "created_at": { "type": "string", "format": "date-time", "description": "Time the event was committed to the event log." }, "data": { "type": "object", "description": "Full invoice or payment snapshot at the time the event was committed." }, "event_type": { "$ref": "#/components/schemas/ClientEventType", "description": "Stable event name. The SSE `event` field contains the same value." }, "id": { "type": "string", "description": "Monotonic cursor used by SSE `Last-Event-ID` replay." }, "resource_id": { "type": "string", "format": "uuid", "description": "Invoice or payment ID represented by `data`." }, "wallet_id": { "type": "string", "format": "uuid", "description": "Wallet whose state changed." } } }, "ClientEventStreamQuery": { "type": "object", "properties": { "after": { "type": [ "integer", "null" ], "format": "int32", "description": "Replay events strictly after this event ID. `Last-Event-ID` takes precedence." } } }, "ClientEventType": { "type": "string", "description": "Stable event names shared by SSE and webhook delivery.", "enum": [ "invoice.pending", "invoice.paid", "payment.settled", "payment.failed" ] }, "Contact": { "type": "object", "description": "A counterparty the wallet has paid, with the date of first contact.", "required": [ "ln_address", "contact_since" ], "properties": { "contact_since": { "type": "string", "format": "date-time", "description": "Date of first payment to this contact" }, "ln_address": { "type": "string", "description": "Lightning Address", "example": "dario_nakamoto@numeraire.tech" } } }, "CreateAccountRequest": { "type": "object", "description": "Create an account.", "properties": { "display_name": { "type": [ "string", "null" ], "description": "Optional human-readable name for the account.", "example": "Numeraire" }, "permissions": { "type": "array", "items": { "$ref": "#/components/schemas/Permission" }, "description": "Initial permissions stored for the account." } } }, "CreateApiKeyRequest": { "type": "object", "description": "Create API Key Request", "required": [ "name", "permissions" ], "properties": { "account_id": { "type": [ "string", "null" ], "format": "uuid", "description": "Owning account ID.\n\nAccount-scoped endpoints populate this with the authenticated account." }, "description": { "type": [ "string", "null" ], "description": "API key description" }, "expiry": { "type": [ "integer", "null" ], "format": "int32", "description": "Expiration time in seconds", "minimum": 0 }, "name": { "type": "string", "description": "API key name" }, "permissions": { "type": "array", "items": { "$ref": "#/components/schemas/Permission" }, "description": "List of permissions for this API key" } } }, "CreateWalletRequest": { "type": "object", "description": "Create Wallet Request", "required": [ "asset_id" ], "properties": { "account_id": { "type": [ "string", "null" ], "format": "uuid", "description": "Owning account ID. Required by admin endpoints; derived from the authenticated account on account-scoped endpoints." }, "asset_id": { "type": "string", "format": "uuid", "description": "Asset ID to enable for the account" } } }, "ErrorResponse": { "type": "object", "description": "Application error response", "required": [ "status", "reason" ], "properties": { "reason": { "type": "string", "description": "Error reason", "example": "error message" }, "status": { "type": "string", "description": "Error status", "example": "401 Unauthorized" } } }, "HealthCheck": { "type": "object", "description": "App health information, fine-grained by dependency.", "required": [ "database", "ln_provider", "is_healthy" ], "properties": { "database": { "$ref": "#/components/schemas/HealthStatus", "description": "Health of the database" }, "is_healthy": { "type": "boolean", "description": "Whether the system is healthy and can be used" }, "ln_provider": { "$ref": "#/components/schemas/HealthStatus", "description": "Health of the Lightning provider service" } } }, "HealthStatus": { "type": "string", "description": "Health of a single system dependency.", "enum": [ "Operational", "Unavailable", "Maintenance" ] }, "InternalPayment": { "type": "object", "description": "Details of a payment settled internally between wallets on the same instance.", "properties": { "btc_address": { "type": [ "string", "null" ], "description": "Bitcoin Address. Populated for internal Bitcoin address payments", "example": "bc1q..." }, "ln_address": { "type": [ "string", "null" ], "description": "Lightning Address. Populated for internal LN Address payments", "example": "hello@numeraire.tech" }, "payment_hash": { "type": [ "string", "null" ], "description": "Payment hash. Populated for internal bolt11 payments", "example": "b587c7f76339e3fb87ad2b..." } } }, "Invoice": { "type": "object", "description": "An incoming payment request, over Lightning and/or on-chain.", "required": [ "id", "wallet_id", "timestamp", "status", "ledger", "created_at" ], "properties": { "amount_msat": { "type": [ "integer", "null" ], "format": "int64", "description": "Amount requested in millisatoshis.", "minimum": 0 }, "amount_received_msat": { "type": [ "integer", "null" ], "format": "int64", "description": "Amount received in millisatoshis.", "minimum": 0 }, "bitcoin_output": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/BtcOutput", "description": "Bitcoin output details of the invoice" } ] }, "created_at": { "type": "string", "format": "date-time", "description": "Date of creation in database" }, "description": { "type": [ "string", "null" ], "description": "Description" }, "fee_msat": { "type": [ "integer", "null" ], "format": "int64", "description": "Fees paid. Populated when a new channel is opened to receive the funds.", "minimum": 0 }, "id": { "type": "string", "format": "uuid", "description": "Internal ID" }, "ledger": { "$ref": "#/components/schemas/Ledger", "description": "Ledger" }, "ln_address_id": { "type": [ "string", "null" ], "format": "uuid", "description": "Lightning Address. Populated when invoice is generated as part of the LNURL protocol" }, "ln_invoice": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/LnInvoice", "description": "Lightning details of the invoice" } ] }, "payment_time": { "type": [ "string", "null" ], "format": "date-time", "description": "Payment time" }, "status": { "$ref": "#/components/schemas/InvoiceStatus", "description": "Status" }, "timestamp": { "type": "string", "format": "date-time", "description": "Date of creation on the LN node" }, "updated_at": { "type": [ "string", "null" ], "format": "date-time", "description": "Date of update in database" }, "wallet_id": { "type": "string", "format": "uuid", "description": "Wallet ID" } } }, "InvoiceOrderBy": { "type": "string", "description": "Field to order invoices by.", "enum": [ "CreatedAt", "PaymentTime", "UpdatedAt" ] }, "InvoiceStatus": { "type": "string", "description": "Lifecycle status of an invoice.", "enum": [ "Pending", "Settled", "Expired" ] }, "Ledger": { "type": "string", "description": "The ledger a transaction settles on.", "enum": [ "Lightning", "Internal", "Onchain" ] }, "LnAddress": { "type": "object", "description": "Lightning Address", "required": [ "id", "account_id", "wallet_id", "username", "active", "allows_nostr", "created_at" ], "properties": { "account_id": { "type": "string", "format": "uuid", "description": "Owning account ID" }, "active": { "type": "boolean", "description": "Active status. Inactive addresses cannot receive funds" }, "allows_nostr": { "type": "boolean", "description": "Nostr enabled" }, "created_at": { "type": "string", "format": "date-time", "description": "Date of creation in database" }, "id": { "type": "string", "format": "uuid", "description": "Internal ID" }, "nostr_pubkey": { "type": [ "string", "null" ], "description": "Nostr Public key", "example": "d9c2ec59a98c..." }, "updated_at": { "type": [ "string", "null" ], "format": "date-time", "description": "Date of update in database" }, "username": { "type": "string", "description": "Username" }, "wallet_id": { "type": "string", "format": "uuid", "description": "Wallet that receives invoices generated for this address" } } }, "LnInvoice": { "type": "object", "description": "Lightning-specific details of an invoice.", "required": [ "payment_hash", "bolt11", "payee_pubkey", "min_final_cltv_expiry_delta", "payment_secret", "expiry", "expires_at" ], "properties": { "bolt11": { "type": "string", "description": "Bolt11", "example": "lnbcrt1m1png24kasp5..." }, "description_hash": { "type": [ "string", "null" ], "description": "Description hash" }, "expires_at": { "type": "string", "format": "date-time", "description": "Date of expiry" }, "expiry": { "type": "integer", "format": "int64", "description": "Duration of expiry in seconds since creation", "example": 3600, "minimum": 0 }, "min_final_cltv_expiry_delta": { "type": "integer", "format": "int64", "description": "The minimum number of blocks the final hop in the route should wait before allowing the payment to be claimed. This is a security measure to ensure that the payment can be settled properly", "example": 10, "minimum": 0 }, "payee_pubkey": { "type": "string", "description": "Public key of the node receiving the funds", "example": "02086a3f5b67ac4c43..." }, "payment_hash": { "type": "string", "description": "Payment hash", "example": "b587c7f76339e3fb87ad2b..." }, "payment_secret": { "type": "string", "description": "A secret value included in the payment request to mitigate certain types of attacks. The payment secret must be provided by the payer when making the payment", "example": "019a32e03bb375a42bc..." } } }, "LnPayment": { "type": "object", "description": "Lightning-specific details of a payment.", "required": [ "payment_hash" ], "properties": { "ln_address": { "type": [ "string", "null" ], "description": "Lightning Address. Populated when sending to a LN Address", "example": "hello@numeraire.tech" }, "metadata": { "type": [ "string", "null" ], "description": "Metadata" }, "payment_hash": { "type": "string", "description": "Payment hash", "example": "b587c7f76339e3fb87ad2b..." }, "payment_preimage": { "type": [ "string", "null" ], "description": "Payment Preimage" }, "success_action": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/LnUrlSuccessAction", "description": "Success Action. Populated when sending to a LNURL or LN Address" } ] } } }, "LnURLPayRequest": { "type": "object", "description": "LNURL-pay `payRequest` response served at the well-known endpoint (LUD-06).", "required": [ "callback", "maxSendable", "minSendable", "metadata", "commentAllowed", "tag", "allowsNostr" ], "properties": { "allowsNostr": { "type": "boolean", "description": "Nostr enabled" }, "callback": { "type": "string", "description": "The URL from LN SERVICE to accept the pay request", "example": "https://numeraire.tech/lnurlp/dario_nakamoto/callback" }, "commentAllowed": { "type": "integer", "format": "int32", "description": "Optional number of characters accepted for the `comment` query parameter on subsequent callback, defaults to 0 if not provided. (no comment allowed). See ", "example": 255, "minimum": 0 }, "maxSendable": { "type": "integer", "format": "int64", "description": "Max amount in milli-satoshis LN SERVICE is willing to receive", "example": 1000000000, "minimum": 0 }, "metadata": { "type": "string", "description": "Metadata json which must be presented as raw string here, this is required to pass signature verification at a later step", "example": "[[\"text/plain\",\"dario_nakamoto never refuses sats\"],[\"text/identifier\",\"dario_nakamoto@numeraire.tech\"]]" }, "minSendable": { "type": "integer", "format": "int64", "description": "Min amount in milli-satoshis LN SERVICE is willing to receive, can not be less than 1 or more than `maxSendable`", "example": 1000, "minimum": 0 }, "nostrPubkey": { "type": [ "string", "null" ], "description": "Nostr public key", "example": "d9c2ec59a98c..." }, "tag": { "type": "string", "description": "Type of LNURL", "example": "payRequest" } } }, "LnUrlCallback": { "type": "object", "description": "LNURL-pay callback response. Carries the invoice to pay and how to behave on\nsuccess. Wire shape follows LUD-06 (camelCase fields).", "required": [ "pr", "routes" ], "properties": { "disposable": { "type": [ "boolean", "null" ], "description": "An optional flag to let a wallet know whether to persist the link from step 1, if null should be interpreted as true" }, "pr": { "type": "string", "description": "bech32-serialized Lightning invoice", "example": "lnbcrt1m1png24kasp5..." }, "routes": { "type": "array", "items": { "type": "string" }, "description": "array with payment routes, should be left empty if no routes are to be provided" }, "successAction": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/LnUrlSuccessAction", "description": "An optional action to be executed after successfully paying an invoice" } ] } } }, "LnUrlSuccessAction": { "type": "object", "description": "LNURL success action shown to the payer after a successful payment (LUD-09).", "required": [ "tag" ], "properties": { "description": { "type": [ "string", "null" ], "description": "Description" }, "message": { "type": [ "string", "null" ], "description": "Message displayed to the user" }, "tag": { "type": "string", "description": "Action type. One of `url` or `message`" }, "url": { "type": [ "string", "null" ], "description": "URL for the user to open on success" } } }, "NewBtcAddressRequest": { "type": "object", "description": "New Bitcoin Address Request", "properties": { "type": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/BtcAddressType", "description": "Address type" } ] }, "wallet_id": { "type": [ "string", "null" ], "format": "uuid", "description": "Wallet ID to receive into. Required by admin endpoints; derived from the path on wallet-scoped endpoints." } } }, "NewInvoiceRequest": { "type": "object", "description": "New Invoice Request", "required": [ "amount_msat" ], "properties": { "amount_msat": { "type": "integer", "format": "int64", "description": "Amount in millisatoshis", "minimum": 0 }, "description": { "type": [ "string", "null" ], "description": "Description of the invoice. Visible by the payer" }, "expiry": { "type": [ "integer", "null" ], "format": "int32", "description": "Expiration time in seconds", "minimum": 0 }, "wallet_id": { "type": [ "string", "null" ], "format": "uuid", "description": "Wallet ID to receive into. Required by admin endpoints; derived from the path on wallet-scoped endpoints." } } }, "NostrNIP05Response": { "type": "object", "description": "Nostr NIP-05 response. Maps each queried name to its hex-encoded public key.", "required": [ "names" ], "properties": { "names": { "type": "object", "description": "Found names, keyed by username and valued by hex-encoded public key", "additionalProperties": { "type": "string" }, "propertyNames": { "type": "string" } } } }, "OrderDirection": { "type": "string", "description": "Direction of result ordering for list endpoints.", "enum": [ "Asc", "Desc" ] }, "Payment": { "type": "object", "description": "An outgoing payment, over Lightning, on-chain, or internal to the instance.", "required": [ "id", "wallet_id", "amount_msat", "ledger", "status", "created_at" ], "properties": { "amount_msat": { "type": "integer", "format": "int64", "description": "Amount in millisatoshis.", "minimum": 0 }, "bitcoin": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/BtcPayment", "description": "Bitcoin on-chain payment details" } ] }, "created_at": { "type": "string", "format": "date-time", "description": "Date of creation in database" }, "description": { "type": [ "string", "null" ], "description": "Description" }, "error": { "type": [ "string", "null" ], "description": "Error message", "example": "failed to pay error message" }, "fee_msat": { "type": [ "integer", "null" ], "format": "int64", "description": "Fees paid. Populated when a new channel is opened to receive the funds", "minimum": 0 }, "id": { "type": "string", "format": "uuid", "description": "Internal ID" }, "internal": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/InternalPayment", "description": "Internal payment details" } ] }, "ledger": { "$ref": "#/components/schemas/Ledger", "description": "Ledger" }, "lightning": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/LnPayment", "description": "Lightning payment details" } ] }, "payment_time": { "type": [ "string", "null" ], "format": "date-time", "description": "Payment time" }, "status": { "$ref": "#/components/schemas/PaymentStatus", "description": "Status" }, "updated_at": { "type": [ "string", "null" ], "format": "date-time", "description": "Date of update in database" }, "wallet_id": { "type": "string", "format": "uuid", "description": "Wallet ID" } } }, "PaymentFeeEstimate": { "type": "object", "description": "Fee quote for a prospective outgoing payment.\n\n`estimated_fee_msat` is the route or transaction fee expected at quote time.\nIt can be absent when the Lightning node cannot find a graph route while the\nconfigured payment policy still permits an execution attempt. The maximum is\nthe hard cap passed to the Lightning provider (or the prepared on-chain fee).", "required": [ "ledger", "amount_msat", "maximum_fee_msat", "maximum_total_msat" ], "properties": { "amount_msat": { "type": "integer", "format": "int64", "description": "Amount delivered to the recipient, in millisatoshis.", "minimum": 0 }, "estimated_fee_msat": { "type": [ "integer", "null" ], "format": "int64", "description": "Provider-derived fee expected at quote time, in millisatoshis.", "minimum": 0 }, "estimated_total_msat": { "type": [ "integer", "null" ], "format": "int64", "description": "Expected amount plus fee, in millisatoshis.", "minimum": 0 }, "ledger": { "$ref": "#/components/schemas/Ledger", "description": "Ledger selected for this payment input." }, "maximum_fee_msat": { "type": "integer", "format": "int64", "description": "Lightning execution cap or current prepared on-chain fee, in millisatoshis.", "minimum": 0 }, "maximum_total_msat": { "type": "integer", "format": "int64", "description": "Amount plus the Lightning cap or current on-chain fee, in millisatoshis.", "minimum": 0 } } }, "PaymentStatus": { "type": "string", "description": "Lifecycle status of a payment.", "enum": [ "Pending", "Settled", "Failed" ] }, "Permission": { "type": "string", "description": "An API access scope granted to a JWT or API key.", "enum": [ "read:account", "write:account", "read:wallet", "write:wallet", "read:ln_address", "write:ln_address", "read:transaction", "write:transaction", "read:ln_node", "write:ln_node", "read:api_key", "write:api_key", "read:btc_address", "write:btc_address" ] }, "Protocol": { "type": "string", "description": "Asset settlement protocol.", "enum": [ "bitcoin", "taproot_assets" ] }, "RegisterLnAddressRequest": { "type": "object", "description": "Register Lightning Address Request", "required": [ "username" ], "properties": { "account_id": { "type": [ "string", "null" ], "format": "uuid", "description": "Owning account ID. Required for admin routes; account-scoped routes use the authenticated account." }, "allows_nostr": { "type": "boolean", "description": "Nostr enabled" }, "nostr_pubkey": { "type": [ "string", "null" ], "description": "Nostr public key", "example": "npub1m8pwckdf3..." }, "username": { "type": "string", "description": "Username such as `username@domain`" } } }, "SendPaymentRequest": { "type": "object", "description": "Send Payment Request", "required": [ "input" ], "properties": { "amount_msat": { "type": [ "integer", "null" ], "format": "int64", "description": "Amount in millisatoshis. Only necessary if the input does not specify an amount (empty Bolt11, LNURL or LN Address)", "minimum": 0 }, "comment": { "type": [ "string", "null" ], "description": "Comment of the payment. Visible by the recipient for LNURL payments" }, "input": { "type": "string", "description": "Recipient. Can be a Bolt11 invoice, LNURL or LN Address.", "example": "hello@numeraire.tech" }, "wallet_id": { "type": [ "string", "null" ], "format": "uuid", "description": "Wallet ID to pay from. Required by admin endpoints; derived from the path on wallet-scoped endpoints." } } }, "SetupInfo": { "type": "object", "description": "App setup info.", "required": [ "welcome_complete", "sign_up_complete" ], "properties": { "sign_up_complete": { "type": "boolean", "description": "Whether the admin account has been created" }, "welcome_complete": { "type": "boolean", "description": "Whether the welcome flow has been completed" } } }, "SignInRequest": { "type": "object", "description": "Sign In Request", "required": [ "password" ], "properties": { "password": { "type": "string", "description": "User password", "example": "password" } } }, "SignInResponse": { "type": "object", "description": "Sign In Response", "required": [ "token" ], "properties": { "token": { "type": "string", "description": "JWT token", "example": "eyJ0eXAiOiJKV1QiLCJhbGciOiJ..." } } }, "SignUpRequest": { "type": "object", "description": "Sign Up Request", "required": [ "password" ], "properties": { "password": { "type": "string", "description": "User password", "example": "password" } } }, "UpdateAccountPermissionsRequest": { "type": "object", "description": "Replace permissions stored for an account.", "required": [ "permissions" ], "properties": { "permissions": { "type": "array", "items": { "$ref": "#/components/schemas/Permission" }, "description": "Complete permission set to persist for the account." } } }, "UpdateAccountPreferencesRequest": { "type": "object", "description": "Replace account-scoped dashboard preferences.", "required": [ "dashboard_settings" ], "properties": { "dashboard_settings": { "description": "Versioned dashboard settings document stored by the server." } } }, "UpdateAccountRequest": { "type": "object", "description": "Replace the editable account profile fields.", "properties": { "display_name": { "type": [ "string", "null" ], "description": "Human-readable name for the account. Use `null` to clear it.", "example": "Numeraire" } } }, "UpdateLnAddressRequest": { "type": "object", "description": "Update Lightning Address Request", "properties": { "active": { "type": [ "boolean", "null" ], "description": "Active status" }, "allows_nostr": { "type": [ "boolean", "null" ], "description": "Nostr enabled" }, "nostr_pubkey": { "type": [ "string", "null" ], "description": "Nostr public key", "example": "npub1m8pwckdf3..." }, "username": { "type": [ "string", "null" ], "description": "Username such as `username@domain`" } } }, "VersionInfo": { "type": "object", "description": "App version info.", "required": [ "version", "build_time" ], "properties": { "build_time": { "type": "string", "description": "Build time of the software", "example": "2024-07-03T18:13:09.093289+00:00" }, "version": { "type": "string", "description": "Current version of the software", "example": "0.0.1" } } }, "Wallet": { "type": "object", "description": "An account wallet with its balance and linked payments, invoices, Bitcoin addresses and contacts.", "required": [ "id", "account_id", "asset_id", "balance", "payments", "invoices", "btc_addresses", "contacts", "created_at" ], "properties": { "account_id": { "type": "string", "format": "uuid", "description": "Owning account ID" }, "asset": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/Asset", "description": "Asset metadata for this wallet, when included in the response." } ] }, "asset_id": { "type": "string", "format": "uuid", "description": "Spendable asset held by this wallet" }, "balance": { "$ref": "#/components/schemas/Balance", "description": "Wallet balance" }, "btc_addresses": { "type": "array", "items": { "$ref": "#/components/schemas/BtcAddress" }, "description": "List of Bitcoin addresses" }, "contacts": { "type": "array", "items": { "$ref": "#/components/schemas/Contact" }, "description": "List of contacts" }, "created_at": { "type": "string", "format": "date-time", "description": "Date of creation in database" }, "id": { "type": "string", "format": "uuid", "description": "Internal ID" }, "invoices": { "type": "array", "items": { "$ref": "#/components/schemas/Invoice" }, "description": "List of Invoices" }, "label": { "type": [ "string", "null" ], "description": "Optional account-specific display label." }, "ln_address": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/LnAddress", "description": "Lightning Address" } ] }, "payments": { "type": "array", "items": { "$ref": "#/components/schemas/Payment" }, "description": "List of payments" }, "updated_at": { "type": [ "string", "null" ], "format": "date-time", "description": "Date of update in database" } } }, "WalletOverview": { "type": "object", "description": "A lightweight wallet summary with counts in place of the full lists.", "required": [ "id", "account_id", "asset_id", "balance", "n_payments", "n_invoices", "n_contacts", "created_at" ], "properties": { "account_id": { "type": "string", "format": "uuid", "description": "Owning account ID" }, "asset": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/Asset", "description": "Asset metadata for this wallet, when included in the response." } ] }, "asset_id": { "type": "string", "format": "uuid", "description": "Spendable asset held by this wallet" }, "balance": { "$ref": "#/components/schemas/Balance", "description": "Wallet balance" }, "created_at": { "type": "string", "format": "date-time", "description": "Date of creation in database" }, "id": { "type": "string", "format": "uuid", "description": "Internal ID" }, "label": { "type": [ "string", "null" ], "description": "Optional account-specific display label." }, "ln_address": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/LnAddress", "description": "Lightning Address" } ] }, "n_contacts": { "type": "integer", "format": "int32", "description": "Number of contacts", "minimum": 0 }, "n_invoices": { "type": "integer", "format": "int32", "description": "Number of invoices", "minimum": 0 }, "n_payments": { "type": "integer", "format": "int32", "description": "Number of payments", "minimum": 0 }, "updated_at": { "type": [ "string", "null" ], "format": "date-time", "description": "Date of update in database" } } } }, "responses": { "ErrorResponse": { "description": "Application error response", "content": { "application/json": { "schema": { "type": "object", "description": "Application error response", "required": [ "status", "reason" ], "properties": { "reason": { "type": "string", "description": "Error reason", "example": "error message" }, "status": { "type": "string", "description": "Error status", "example": "401 Unauthorized" } } } } } } }, "securitySchemes": { "jwt": { "type": "http", "scheme": "bearer" } } }, "security": [ { "jwt": [] } ], "tags": [ { "name": "Authentication", "description": "Some endpoints are public, but some require authentication. We provide all the required endpoints to create an account and authorize yourself." }, { "name": "Accounts", "description": "Administrative account management. Requires `read:account` or `write:account` permissions." }, { "name": "Me", "description": "Authenticated account endpoints. Wallet operations require an explicit account-owned wallet selector." }, { "name": "Wallets", "description": "Wallet management endpoints. Require `read:wallet` or `write:wallet` permissions." }, { "name": "Invoices", "description": "Invoice management endpoints. Require `read:transaction` or `write:transaction` permissions." }, { "name": "Payments", "description": "Payment management endpoints. Require `read:transaction` or `write:transaction` permissions." }, { "name": "Lightning Addresses", "description": "LN Address management endpoints as defined in the [protocol specification](https://lightningaddress.com/). Require `read:ln_address` or `write:ln_address` permissions." }, { "name": "LNURL", "description": "Public LNURL endpoints as defined in the [protocol specification](https://github.com/lnurl/luds). Allows any active Lightning Address to receive payments" }, { "name": "Nostr", "description": "Public Nostr endpoints as defined in the [protocol specification](https://github.com/nostr-protocol/nips). Allows any Nostr client to identify a user's public keys" }, { "name": "System", "description": "System related endpoints" }, { "name": "API Keys", "description": "API Key Management. Require `read:api_key` or `write:api_key` permissions. " }, { "name": "Bitcoin Addresses", "description": "Bitcoin Address management endpoints. Require `read:btc_address` or `write:btc_address` permissions." } ] }