{ "swagger": "2.0", "info": { "contact": {} }, "paths": { "/accesskeys": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Get all access keys for the authenticated user", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "access_key" ], "summary": "Get access keys", "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/model.AccessKey" } } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Create a new access key for the authenticated user", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "access_key" ], "summary": "Create access key", "parameters": [ { "description": "Access Key Request", "name": "access_key", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.AccessKeyReq" } } ], "responses": { "200": { "description": "token", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/accesskeys/{id}": { "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "Delete access key by ID", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "access_key" ], "summary": "Delete access key", "parameters": [ { "type": "string", "description": "Access Key ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/alias": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Create alias", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "alias" ], "summary": "Create alias", "parameters": [ { "description": "Alias request", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.AliasReq" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/alias/forget/{id}": { "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "Permanently delete a custom-domain alias, bypassing the soft-delete step entirely", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "alias" ], "summary": "Forget alias", "parameters": [ { "type": "string", "description": "Alias ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/alias/restore/{id}": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Restore alias", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "alias" ], "summary": "Restore alias", "parameters": [ { "type": "string", "description": "Alias ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/alias/wildcard-domain-info": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Get how many Wildcard Aliases the user already has for a domain and which delimiters are used", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "alias" ], "summary": "Get Wildcard Alias domain info", "parameters": [ { "type": "string", "description": "Domain name or custom domain ID", "name": "domain", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/model.WildcardDomainInfo" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/alias/{id}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Get alias by ID", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "alias" ], "summary": "Get alias", "parameters": [ { "type": "string", "description": "Alias ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/model.Alias" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } }, "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "Update alias", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "alias" ], "summary": "Update alias", "parameters": [ { "type": "string", "description": "Alias ID", "name": "id", "in": "path", "required": true }, { "description": "Alias request", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.AliasReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } }, "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "Delete alias", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "alias" ], "summary": "Delete alias", "parameters": [ { "type": "string", "description": "Alias ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/alias/{id}/pin": { "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "Set alias pinned status; pinned aliases are always sorted first in the list", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "alias" ], "summary": "Pin or unpin alias", "parameters": [ { "type": "string", "description": "Alias ID", "name": "id", "in": "path", "required": true }, { "description": "Pin request", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.AliasPinReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/aliases": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Get all aliases", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "alias" ], "summary": "Get aliases", "parameters": [ { "enum": [ "active_inactive", "active", "inactive", "deleted", "all" ], "type": "string", "description": "Filter by alias status", "name": "status", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/model.AliasList" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/aliases/bulk/delete": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Soft-delete multiple aliases at once; fails entirely if any selected alias is already deleted", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "alias" ], "summary": "Bulk delete aliases", "parameters": [ { "description": "Bulk delete request", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.BulkAliasIDsReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/aliases/bulk/enable": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Set enabled status for multiple aliases at once; deleted aliases and aliases left without a recipient are skipped", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "alias" ], "summary": "Bulk activate/deactivate aliases", "parameters": [ { "description": "Bulk enable request", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.BulkAliasEnabledReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/aliases/bulk/forget": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Permanently delete multiple custom-domain aliases at once, bypassing the soft-delete step entirely; fails entirely if any selected alias isn't a custom domain alias", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "alias" ], "summary": "Bulk forget aliases", "parameters": [ { "description": "Bulk forget request", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.BulkAliasIDsReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/aliases/bulk/pin": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Set pinned status for multiple aliases at once; pinned aliases are always sorted first in the list, deleted aliases are skipped", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "alias" ], "summary": "Bulk pin/unpin aliases", "parameters": [ { "description": "Bulk pin request", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.BulkAliasPinReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/aliases/bulk/restore": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Restore multiple soft-deleted aliases at once; fails entirely if any selected alias isn't deleted", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "alias" ], "summary": "Bulk restore aliases", "parameters": [ { "description": "Bulk restore request", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.BulkAliasIDsReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/aliases/export": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Export all aliases as CSV", "consumes": [ "application/json" ], "produces": [ "text/csv" ], "tags": [ "alias" ], "summary": "Export aliases", "responses": { "200": { "description": "CSV data", "schema": { "type": "string" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/announcements": { "get": { "description": "Get list of announcements from the public announcements file", "produces": [ "application/json" ], "summary": "Get announcements", "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/api.Announcement" } } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/api/alias": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Create alias", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "alias" ], "summary": "Create alias", "parameters": [ { "description": "Alias request", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.AliasReq" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/api/alias/forget/{id}": { "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "Permanently delete a custom-domain alias, bypassing the soft-delete step entirely", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "alias" ], "summary": "Forget alias", "parameters": [ { "type": "string", "description": "Alias ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/api/alias/restore/{id}": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Restore alias", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "alias" ], "summary": "Restore alias", "parameters": [ { "type": "string", "description": "Alias ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/api/alias/{id}": { "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "Update alias", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "alias" ], "summary": "Update alias", "parameters": [ { "type": "string", "description": "Alias ID", "name": "id", "in": "path", "required": true }, { "description": "Alias request", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.AliasReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } }, "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "Delete alias", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "alias" ], "summary": "Delete alias", "parameters": [ { "type": "string", "description": "Alias ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/api/alias/{id}/pin": { "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "Set alias pinned status; pinned aliases are always sorted first in the list", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "alias" ], "summary": "Pin or unpin alias", "parameters": [ { "type": "string", "description": "Alias ID", "name": "id", "in": "path", "required": true }, { "description": "Pin request", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.AliasPinReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/api/aliases": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Get all aliases", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "alias" ], "summary": "Get aliases", "parameters": [ { "enum": [ "active_inactive", "active", "inactive", "deleted", "all" ], "type": "string", "description": "Filter by alias status", "name": "status", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/model.AliasList" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/api/authenticate": { "post": { "description": "Authenticate using an access key to obtain a session token", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "access_key" ], "summary": "Authenticate with access key", "parameters": [ { "description": "Authentication Request", "name": "auth_req", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.AuthReq" } } ], "responses": { "200": { "description": "token", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/api/defaults": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Get default settings and recipients for the authenticated user", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "access_key" ], "summary": "Get default settings", "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/api/logout": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Logout the authenticated API user by invalidating their session token", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "access_key" ], "summary": "Logout API user", "responses": { "200": { "description": "message", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/domains": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Get all custom domains for the authenticated user", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "domain" ], "summary": "Get custom domains", "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/model.Domain" } } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } }, "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "Update an existing custom domain for the authenticated user", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "domain" ], "summary": "Update custom domain", "parameters": [ { "description": "Update Custom Domain Request", "name": "domain", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.UpdateDomainReq" } } ], "responses": { "200": { "description": "message", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Create a new custom domain for the authenticated user", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "domain" ], "summary": "Create custom domain", "parameters": [ { "description": "Custom Domain Request", "name": "domain", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.DomainReq" } } ], "responses": { "201": { "description": "message", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/domains/dns-config": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Get the DNS configuration for all custom domains of the authenticated user", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "domain" ], "summary": "Get custom domains DNS config", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/model.DNSConfig" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/domains/{id}": { "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "Delete an existing custom domain for the authenticated user", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "domain" ], "summary": "Delete custom domain", "parameters": [ { "type": "string", "description": "Domain ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "message", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/domains/{id}/verify-dns": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Verify the DNS records for a custom domain of the authenticated user", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "domain" ], "summary": "Verify custom domain DNS records", "parameters": [ { "type": "string", "description": "Domain ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "message, checks", "schema": { "type": "object", "additionalProperties": true } }, "400": { "description": "error, checks", "schema": { "type": "object", "additionalProperties": true } } } } }, "/email": { "post": { "description": "Handle incoming email", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "email" ], "summary": "Email handler", "parameters": [ { "description": "Email body", "name": "email", "in": "body", "required": true, "schema": { "type": "string" } }, { "type": "string", "description": "Envelope recipient for this specific delivery (Postfix ${recipient})", "name": "recipient", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "type": "string" } } } } }, "/email/domain/check": { "post": { "description": "Check if a custom domain exists for the authenticated user", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "domain" ], "summary": "Check custom domain", "parameters": [ { "description": "Custom Domain Request", "name": "domain", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.DomainReq" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/initiatepasswordreset": { "post": { "description": "Initiate password reset", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Initiate password reset", "parameters": [ { "description": "Initiate password reset request", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.EmailReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/log/file/{id}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Get log file by ID for the authenticated user", "consumes": [ "application/json" ], "produces": [ "text/plain" ], "tags": [ "log" ], "summary": "Get log file", "parameters": [ { "type": "string", "description": "Log ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "Log file content", "schema": { "type": "string" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/login": { "post": { "description": "Login user", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Login user", "parameters": [ { "description": "User request", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.UserReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/login/begin": { "post": { "description": "Begin login process", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "webauthn" ], "summary": "Begin login", "parameters": [ { "description": "Email", "name": "email", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.EmailReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/login/finish": { "post": { "description": "Finish login process", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "webauthn" ], "summary": "Finish login", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/login/passkey/begin": { "post": { "description": "Begin usernameless login process using a discoverable passkey", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "webauthn" ], "summary": "Begin passkey login", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/login/passkey/finish": { "post": { "description": "Finish usernameless login process using a discoverable passkey", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "webauthn" ], "summary": "Finish passkey login", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/logs": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Get all logs for the authenticated user", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "log" ], "summary": "Get logs", "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/model.Log" } } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } }, "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "Delete all logs for the authenticated user", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "log" ], "summary": "Delete logs", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/recipient": { "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "Update recipient", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "recipient" ], "summary": "Update recipient", "parameters": [ { "description": "Recipient request", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.RecipientReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Create recipient", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "recipient" ], "summary": "Create recipient", "parameters": [ { "description": "Recipient request", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.EmailReq" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/recipient/activate/{id}": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Activate recipient", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "recipient" ], "summary": "Activate recipient", "parameters": [ { "type": "string", "description": "Recipient ID", "name": "id", "in": "path", "required": true }, { "description": "Activate request", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.ActivateReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/recipient/sendotp/{id}": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Send recipient OTP", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "recipient" ], "summary": "Send recipient OTP", "parameters": [ { "type": "string", "description": "Recipient ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/recipient/{id}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Get recipient by ID", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "recipient" ], "summary": "Get recipient", "parameters": [ { "type": "string", "description": "Recipient ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/model.Recipient" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } }, "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "Delete recipient", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "recipient" ], "summary": "Delete recipient", "parameters": [ { "type": "string", "description": "Recipient ID", "name": "id", "in": "path", "required": true }, { "description": "Delete recipient request", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.DeleteRecipientReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/recipients": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Get all recipients", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "recipient" ], "summary": "Get recipients", "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/model.Recipient" } } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/register": { "post": { "description": "Register user", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Register user", "parameters": [ { "description": "User request", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.SignupUserReq" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/register/add": { "post": { "description": "Begin Add Passkey process", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "webauthn" ], "summary": "Add Passkey", "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/register/add/finish": { "post": { "description": "Finish add Passkey process", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "webauthn" ], "summary": "Finish add Passkey", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/register/begin": { "post": { "description": "Begin registration process", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "webauthn" ], "summary": "Begin registration", "parameters": [ { "description": "Email", "name": "email", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.SignupEmailReq" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/register/finish": { "post": { "description": "Finish registration process", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "webauthn" ], "summary": "Finish registration", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/resetpassword": { "put": { "description": "Reset password", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Reset password", "parameters": [ { "description": "Password reset request", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.ResetPasswordReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/rotatepasession": { "put": { "description": "Rotate pre-auth session ID", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "subscription" ], "summary": "Rotate pre-auth session ID", "parameters": [ { "description": "Rotate pre-auth session request", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.RotatePASessionReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/settings": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Get settings", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "settings" ], "summary": "Get settings", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/model.Settings" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } }, "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "Update settings", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "settings" ], "summary": "Update settings", "parameters": [ { "description": "Settings", "name": "settings", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.SettingsReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/sub": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Get subscription", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "subscription" ], "summary": "Get subscription", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/model.Subscription" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/sub/session": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Add pre-auth session", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "subscription" ], "summary": "Add pre-auth session", "parameters": [ { "description": "Pre-auth session request", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.PASessionReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/subscription/update": { "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "Update subscription", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "subscription" ], "summary": "Update subscription", "parameters": [ { "description": "Subscription request", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.SubscriptionReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/user": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Get user", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Get user", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/model.User" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/user/activate": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Activate user", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Activate user", "parameters": [ { "description": "Activate request", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.ActivateReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/user/changeemail": { "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "Change email", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Change email", "parameters": [ { "description": "Change email request", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.EmailReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/user/changepassword": { "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "Change password", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Change password", "parameters": [ { "description": "Change password request", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.ChangePasswordReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/user/credential/{id}": { "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "Delete credential by ID", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "webauthn" ], "summary": "Delete credential", "parameters": [ { "type": "string", "description": "Credential ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/user/credentials": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Get user credentials", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "webauthn" ], "summary": "Get credentials", "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/model.Credential" } } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/user/delete": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Delete user", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Delete user", "parameters": [ { "description": "Delete user request", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.DeleteUserReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/user/delete/request": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Delete user request", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Delete user request", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/user/logout": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Logout user", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Logout user", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/user/sendotp": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Send user OTP", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Send user OTP", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/user/stats": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Get user stats", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Get user stats", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/model.UserStats" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/user/stepup/passkey/begin": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Begin a WebAuthn assertion ceremony to authorize a pending sensitive action", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Begin step-up verification via passkey", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/user/stepup/passkey/finish": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Finish a WebAuthn assertion ceremony to authorize a pending sensitive action", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Finish step-up verification via passkey", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/user/stepup/password": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Verify the current user's password to authorize a pending sensitive action", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Step-up verification via password", "parameters": [ { "description": "Step-up password request", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.StepUpPasswordReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/user/totp/disable": { "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "Disable TOTP", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Disable TOTP", "parameters": [ { "description": "TOTP confirm request", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.TotpReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.SuccessRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/user/totp/enable": { "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "Enable TOTP", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Enable TOTP", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/model.TOTPNew" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } }, "/user/totp/enable/confirm": { "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "Enable TOTP confirm", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Enable TOTP confirm", "parameters": [ { "description": "TOTP confirm request", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.TotpReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/model.TOTPBackup" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.ErrorRes" } } } } } }, "definitions": { "api.AccessKeyReq": { "type": "object", "required": [ "name" ], "properties": { "expires_at": { "type": "string" }, "name": { "type": "string" } } }, "api.ActivateReq": { "type": "object", "required": [ "otp" ], "properties": { "otp": { "type": "string" } } }, "api.AliasPinReq": { "type": "object", "properties": { "pinned": { "type": "boolean" } } }, "api.AliasReq": { "type": "object", "required": [ "domain", "recipients" ], "properties": { "description": { "type": "string" }, "domain": { "type": "string" }, "enabled": { "type": "boolean" }, "format": { "type": "string" }, "from_name": { "type": "string" }, "local_part": { "type": "string" }, "recipients": { "type": "string" }, "wildcard_delimiter": { "type": "string", "enum": [ "+", "." ] }, "wildcard_local_part": { "type": "string", "maxLength": 12, "minLength": 6 } } }, "api.Announcement": { "type": "object", "properties": { "body": { "type": "string" }, "link": { "type": "string" }, "title": { "type": "string" } } }, "api.AuthReq": { "type": "object", "required": [ "access_key" ], "properties": { "access_key": { "type": "string", "maxLength": 85, "minLength": 85 } } }, "api.BulkAliasEnabledReq": { "type": "object", "required": [ "ids" ], "properties": { "enabled": { "type": "boolean" }, "ids": { "type": "array", "maxItems": 500, "minItems": 1, "items": { "type": "string" } } } }, "api.BulkAliasIDsReq": { "type": "object", "required": [ "ids" ], "properties": { "ids": { "type": "array", "maxItems": 500, "minItems": 1, "items": { "type": "string" } } } }, "api.BulkAliasPinReq": { "type": "object", "required": [ "ids" ], "properties": { "ids": { "type": "array", "maxItems": 500, "minItems": 1, "items": { "type": "string" } }, "pinned": { "type": "boolean" } } }, "api.ChangePasswordReq": { "type": "object", "properties": { "old_password": { "type": "string" }, "password": { "type": "string" } } }, "api.DeleteRecipientReq": { "type": "object", "properties": { "recipients": { "type": "string" } } }, "api.DeleteUserReq": { "type": "object", "required": [ "otp" ], "properties": { "otp": { "type": "string" } } }, "api.DomainReq": { "type": "object", "required": [ "name" ], "properties": { "name": { "type": "string" } } }, "api.EmailReq": { "type": "object", "required": [ "email" ], "properties": { "email": { "type": "string" }, "remember": { "type": "boolean" } } }, "api.ErrorRes": { "type": "object", "properties": { "error": { "type": "string" } } }, "api.PASessionReq": { "type": "object", "required": [ "id", "preauth_id", "token" ], "properties": { "id": { "type": "string" }, "preauth_id": { "type": "string" }, "token": { "type": "string" } } }, "api.RecipientReq": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "string" }, "pgp_enabled": { "type": "boolean" }, "pgp_inline": { "type": "boolean" }, "pgp_key": { "type": "string" } } }, "api.ResetPasswordReq": { "type": "object", "required": [ "otp" ], "properties": { "otp": { "type": "string" }, "password": { "type": "string" } } }, "api.RotatePASessionReq": { "type": "object", "required": [ "sessionid" ], "properties": { "sessionid": { "type": "string" } } }, "api.SettingsReq": { "type": "object", "required": [ "id" ], "properties": { "alias_format": { "type": "string" }, "domain": { "type": "string" }, "from_name": { "type": "string" }, "id": { "type": "string" }, "log_issues": { "type": "boolean" }, "recipient": { "type": "string" }, "remove_header": { "type": "boolean" } } }, "api.SignupEmailReq": { "type": "object", "required": [ "email", "subid" ], "properties": { "email": { "type": "string" }, "subid": { "type": "string" } } }, "api.SignupUserReq": { "type": "object", "required": [ "email", "subid" ], "properties": { "email": { "type": "string" }, "password": { "type": "string" }, "subid": { "type": "string" } } }, "api.StepUpPasswordReq": { "type": "object", "properties": { "password": { "type": "string" } } }, "api.SubscriptionReq": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "string" }, "subid": { "type": "string" } } }, "api.SuccessRes": { "type": "object", "properties": { "message": { "type": "string" } } }, "api.TotpReq": { "type": "object", "required": [ "otp" ], "properties": { "otp": { "type": "string", "maxLength": 10, "minLength": 6 } } }, "api.UpdateDomainReq": { "type": "object", "required": [ "id" ], "properties": { "catch_all": { "type": "boolean" }, "create_alias": { "type": "boolean" }, "description": { "type": "string" }, "enabled": { "type": "boolean" }, "from_name": { "type": "string" }, "id": { "type": "string" }, "recipient": { "type": "string" } } }, "api.UserReq": { "type": "object", "required": [ "email" ], "properties": { "email": { "type": "string" }, "otp": { "type": "string", "maxLength": 10, "minLength": 0 }, "password": { "type": "string" }, "remember": { "type": "boolean" } } }, "model.AccessKey": { "type": "object", "properties": { "created_at": { "type": "string" }, "expires_at": { "description": "nullable", "type": "string" }, "id": { "type": "string" }, "name": { "type": "string" }, "user_id": { "type": "string" } } }, "model.Alias": { "type": "object", "properties": { "created_at": { "type": "string" }, "description": { "type": "string" }, "enabled": { "type": "boolean" }, "from_name": { "type": "string" }, "id": { "type": "string" }, "is_custom_domain": { "type": "boolean" }, "is_domain_enabled": { "type": "boolean" }, "is_domain_verified": { "type": "boolean" }, "name": { "type": "string" }, "origin": { "$ref": "#/definitions/model.AliasOrigin" }, "pinned": { "type": "boolean" }, "recipients": { "type": "string" }, "stats": { "$ref": "#/definitions/model.AliasStats" }, "wildcard": { "type": "boolean" } } }, "model.AliasList": { "type": "object", "properties": { "aliases": { "type": "array", "items": { "$ref": "#/definitions/model.Alias" } }, "total": { "type": "integer" } } }, "model.AliasOrigin": { "type": "integer", "enum": [ 0, 1, 2 ], "x-enum-varnames": [ "Manual", "Inbound", "Import" ] }, "model.AliasStats": { "type": "object", "properties": { "blocks": { "type": "integer" }, "forwards": { "type": "integer" }, "replies": { "type": "integer" }, "sends": { "type": "integer" } } }, "model.Credential": { "type": "object", "properties": { "created_at": { "type": "string" }, "id": { "type": "string" }, "user_id": { "type": "string" } } }, "model.DNSConfig": { "type": "object", "properties": { "dkim_selectors": { "type": "array", "items": { "type": "string" } }, "domain": { "type": "string" }, "mx_hosts": { "type": "array", "items": { "type": "string" } }, "verify": { "type": "string" } } }, "model.Domain": { "type": "object", "properties": { "catch_all": { "type": "boolean" }, "create_alias": { "type": "boolean" }, "created_at": { "type": "string" }, "description": { "type": "string" }, "enabled": { "type": "boolean" }, "from_name": { "type": "string" }, "id": { "type": "string" }, "mx_verified_at": { "description": "nullable", "type": "string" }, "name": { "type": "string" }, "owner_verified_at": { "description": "nullable", "type": "string" }, "recipient": { "type": "string" }, "send_verified_at": { "description": "nullable", "type": "string" } } }, "model.Log": { "type": "object", "properties": { "attempted_at": { "type": "string" }, "created_at": { "type": "string" }, "destination": { "type": "string" }, "from": { "type": "string" }, "id": { "type": "string" }, "log_type": { "$ref": "#/definitions/model.LogType" }, "message": { "type": "string" }, "remote_mta": { "type": "string" }, "status": { "type": "string" } } }, "model.LogType": { "type": "string", "enum": [ "bounce", "deferred_delivery", "failed_delivery", "disabled_alias", "disabled_domain", "unauthorised_send", "inactive_subscription" ], "x-enum-varnames": [ "BounceMessage", "DeferredDelivery", "FailedDelivery", "DisabledAlias", "DisabledDomain", "UnauthorisedSend", "InactiveSubscription" ] }, "model.Recipient": { "type": "object", "properties": { "created_at": { "type": "string" }, "email": { "type": "string" }, "id": { "type": "string" }, "is_active": { "type": "boolean" }, "pgp_enabled": { "type": "boolean" }, "pgp_inline": { "type": "boolean" }, "pgp_key": { "type": "string" } } }, "model.Settings": { "type": "object", "properties": { "alias_format": { "type": "string" }, "created_at": { "type": "string" }, "domain": { "type": "string" }, "from_name": { "type": "string" }, "id": { "type": "string" }, "log_issues": { "type": "boolean" }, "recipient": { "type": "string" }, "remove_header": { "type": "boolean" } } }, "model.Subscription": { "type": "object", "properties": { "active_until": { "type": "string" }, "created_at": { "type": "string" }, "id": { "type": "string" }, "outage": { "type": "boolean" }, "status": { "$ref": "#/definitions/model.SubscriptionStatus" }, "terminated": { "type": "boolean" }, "terminated_at": { "type": "string" }, "tier": { "type": "string" }, "type": { "type": "string" }, "updated_at": { "type": "string" } } }, "model.SubscriptionStatus": { "type": "string", "enum": [ "active", "grace_period", "limited_access", "pending_delete" ], "x-enum-varnames": [ "Active", "GracePeriod", "LimitedAccess", "PendingDelete" ] }, "model.TOTPBackup": { "type": "object", "properties": { "backup": { "type": "string" } } }, "model.TOTPNew": { "type": "object", "properties": { "account": { "type": "string" }, "secret": { "type": "string" }, "uri": { "type": "string" } } }, "model.User": { "type": "object", "properties": { "created_at": { "type": "string" }, "email": { "type": "string" }, "has_password": { "type": "boolean" }, "id": { "type": "string" }, "is_active": { "type": "boolean" }, "totp_enabled": { "type": "boolean" } } }, "model.UserStats": { "type": "object", "properties": { "aliases": { "type": "integer" }, "blocks": { "type": "integer" }, "forwards": { "type": "integer" }, "messages": { "type": "array", "items": {} }, "replies": { "type": "integer" }, "sends": { "type": "integer" } } }, "model.WildcardDomainInfo": { "type": "object", "properties": { "count": { "type": "integer" }, "delimiters_used": { "type": "array", "items": { "type": "string" } }, "limit": { "type": "integer" } } } } }