{ "paths": { "/api/v1/stores/{storeId}/email": { "get": { "tags": [ "Stores (Email)" ], "summary": "Get store email settings", "parameters": [ { "name": "storeId", "in": "path", "required": true, "description": "The store to fetch", "schema": { "type": "string" } } ], "description": "View email settings of the specified store", "operationId": "Stores_GetStoreEmailSettings", "responses": { "200": { "description": "specified store email settings", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EmailSettingsData" } } } }, "403": { "description": "If you are authenticated but forbidden to view the specified store" }, "404": { "description": "The key is not found for this store" } }, "security": [ { "API_Key": [ "btcpay.store.canmodifystoresettings" ], "Basic": [] } ] }, "put": { "tags": [ "Stores (Email)" ], "summary": "Update store email settings", "parameters": [ { "name": "storeId", "in": "path", "required": true, "description": "The store to update", "schema": { "type": "string" } } ], "description": "Update a store's email settings", "operationId": "Stores_UpdateStoreEmailSettings", "requestBody": { "x-name": "request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EmailSettingsData" } } }, "required": true, "x-position": 1 }, "responses": { "200": { "description": "The settings were updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EmailSettingsData" } } } }, "400": { "description": "A list of errors that occurred when updating the settings", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationProblemDetails" } } } }, "403": { "description": "If you are authenticated but forbidden to modify the store" } }, "security": [ { "API_Key": [ "btcpay.store.canmodifystoresettings" ], "Basic": [] } ] } }, "/api/v1/stores/{storeId}/email/send": { "post": { "operationId": "Stores_SendStoreEmail", "tags": [ "Stores (Email)" ], "summary": "Send an email for a store", "description": "Send an email using the store's SMTP server", "parameters": [ { "name": "storeId", "in": "path", "required": true, "description": "The store to send the email from", "schema": { "type": "string" } } ], "requestBody": { "x-name": "request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EmailData" } } }, "required": true, "x-position": 1 }, "responses": { "200": { "description": "The email was sent (scheduled) successfully" }, "400": { "description": "The store's SMTP is not configured" }, "403": { "description": "If you are authenticated but forbidden to add new stores" }, "404": { "description": "The store was not found" } }, "security": [ { "API_Key": [ "btcpay.store.canmodifystoresettings" ], "Basic": [] } ] } } }, "components": { "schemas": { "EmailData": { "type": "object", "additionalProperties": false, "properties": { "email": { "type": "string", "description": "Email of the recipient" }, "subject": { "type": "string", "description": "Subject of the email" }, "body": { "type": "string", "description": "Body of the email to send as plain text." } } }, "EmailSettingsData": { "type": "object", "additionalProperties": false, "properties": { "server": { "type": "string", "description": "Smtp server host" }, "port": { "type": "number", "description": "Smtp server port" }, "login": { "type": "string", "description": "Smtp server username" }, "password": { "type": "string", "description": "Smtp server password" }, "from": { "type": "string", "format": "email", "description": "Email to send from" }, "fromDisplay": { "type": "string", "description": "The name of the sender" }, "disableCertificateCheck": { "type": "boolean", "default": false, "description": "Disable TLS certificate security checks" } } } } }, "tags": [ { "name": "Stores (Email)", "description": "Store Emails operations" } ] }