openapi: 3.0.3 info: title: Swell Backend Account Addresses Account Session API version: 2025-01 description: 'Swell Backend API — the server-side REST surface for managing every resource in a Swell commerce store: products, variants, carts, orders, payments, refunds, shipments, returns, subscriptions, accounts (customers), invoices, coupons, promotions, gift cards, content, files, data models, events, and webhooks. Authenticated with a store ID and secret key. The official Node and PHP libraries connect over a custom wire protocol on port 8443 for improved performance; HTTPS REST is available at https://api.swell.store.' contact: name: Swell Developer Support url: https://developers.swell.is email: support@swell.is license: name: API Profile — API Evangelist url: https://apievangelist.com servers: - url: https://api.swell.store description: Production Backend API security: - SwellStoreId: [] SwellSecretKey: [] tags: - name: Account Session description: Login, logout, and session recovery. paths: /api/account/login: post: tags: - Account Session summary: Log In operationId: frontendAccountLogin requestBody: required: true content: application/json: schema: type: object required: - email - password properties: email: type: string format: email password: type: string responses: '200': description: Logged in. content: application/json: schema: $ref: '#/components/schemas/Account' /api/account/logout: post: tags: - Account Session summary: Log Out operationId: frontendAccountLogout responses: '200': description: Logged out. /api/account/recover: post: tags: - Account Session summary: Send Account Recovery Email operationId: frontendAccountRecover requestBody: required: true content: application/json: schema: type: object properties: email: type: string format: email responses: '200': description: Recovery email sent. /api/account/recover/{key}: parameters: - name: key in: path required: true schema: type: string put: tags: - Account Session summary: Reset Account Password operationId: frontendAccountResetPassword requestBody: required: true content: application/json: schema: type: object properties: password: type: string responses: '200': description: Password reset. components: schemas: Account: type: object properties: id: type: string email: type: string format: email first_name: type: string last_name: type: string phone: type: string currency: type: string balance: $ref: '#/components/schemas/Money' Money: type: number format: float securitySchemes: SwellStoreId: type: apiKey in: header name: X-Store-Id description: Your Swell store ID, found in the Developer section of the dashboard. SwellSecretKey: type: apiKey in: header name: Authorization description: 'Secret API key prefixed with `sk_`. Sent as `Authorization: Basic ` or equivalent custom header by official libraries.'