> ## Documentation Index
> Fetch the complete documentation index at: https://docs.useduro.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Verify the code, open a session

> Verifies the one-time code and returns a session token (present it as `x-portal-session`), the account, and every subscription grouped by merchant.



## OpenAPI

````yaml /openapi.json post /portal/email/verify
openapi: 3.1.0
info:
  title: Duro API
  version: 1.0.0
  description: >-
    Recovery-first subscription billing. Authenticate with a secret key
    (sk_test_ / sk_live_) as a bearer token. Amounts are in integer minor units
    (kobo).
servers:
  - url: https://api.useduro.com
    description: Production (live)
  - url: https://sandbox.useduro.com
    description: Sandbox (test)
security:
  - bearerAuth: []
tags:
  - name: Plans
  - name: Promo Codes
  - name: Payment Links
  - name: Customers
  - name: Transactions
  - name: Subscriptions
  - name: Invoices
  - name: Recovery
  - name: Settings
  - name: Analytics
  - name: Checkout
  - name: Events
  - name: OAuth
  - name: Customer Checkout
  - name: Customer Identity
  - name: Customer Portal
  - name: Customer Portal Account
paths:
  /portal/email/verify:
    post:
      tags:
        - Customer Portal Account
      summary: Verify the code, open a session
      description: >-
        Verifies the one-time code and returns a session token (present it as
        `x-portal-session`), the account, and every subscription grouped by
        merchant.
      operationId: portalEmailVerify
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - code
              properties:
                token:
                  type: string
                email:
                  type: string
                  format: email
                code:
                  type: string
                  example: '123456'
      responses:
        '200':
          description: Session + account + subscriptions
          content:
            application/json:
              schema:
                type: object
                properties:
                  sessionToken:
                    type: string
                  account:
                    $ref: '#/components/schemas/PortalAccount'
                  subscriptions:
                    type: array
                    items:
                      $ref: '#/components/schemas/PortalMerchantGroup'
      security: []
components:
  schemas:
    PortalAccount:
      type: object
      properties:
        email:
          type: string
        name:
          type: string
          nullable: true
    PortalMerchantGroup:
      type: object
      properties:
        tenantId:
          type: string
        merchantName:
          type: string
        subscriptions:
          type: array
          items:
            $ref: '#/components/schemas/PortalSubscription'
    PortalSubscription:
      type: object
      properties:
        id:
          type: string
        mode:
          type: string
          enum:
            - test
            - live
        status:
          type: string
        cancelAtPeriodEnd:
          type: boolean
        currentPeriodEnd:
          type: string
          nullable: true
        plan:
          $ref: '#/components/schemas/PortalPlan'
    PortalPlan:
      type: object
      nullable: true
      properties:
        id:
          type: string
        name:
          type: string
        amount:
          type: integer
          description: Minor units (kobo).
        currency:
          type: string
        interval:
          type: string
        intervalCount:
          type: integer
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: A secret key (sk_test_… / sk_live_…), OAuth token, or identity token.

````