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

# Auto-Login

> Generates a short-lived authentication token for an existing customer account, identified by their email address.

**Use case:** Pass the returned `token` as a query parameter in the auto-login redirect URL to log the customer into their account without requiring a password. This is intended for partner-initiated flows — for example, redirecting a customer from your platform directly into their Namify control panel.

**Token expiry:** Tokens are valid for a short window. Redirect the customer immediately after calling this endpoint — do not store or reuse the token.

**Customer requirement:** The email must match an account previously created via `POST /api/v1/customers/signup`. Submitting an unregistered email returns a `422` error.

<Check>
  After generating a token, redirect to the following URL to log in a customer without a password:\
  \
  https\://\[your-subdomain].namify.tech/auto-login?token=\[token]
</Check>


## OpenAPI

````yaml POST /api/v1/customers/auto-login
openapi: 3.1.0
info:
  title: Namify API
  description: >-
    The Namify API gives resellers and platform builders programmatic access to
    domain search, registration, renewal, customer management, and DNS
    configuration — all through a single authenticated REST interface.


    All requests require a bearer token issued from the Namify dashboard
    (Settings > API Key). The API is scoped to your partner account: TLD
    availability, pricing, and order history are all filtered to your configured
    product catalogue.


    **Base URL:** `https://dev.namify.host`


    **Typical integration flow:**

    1. Create a customer account with `POST /api/v1/customers/signup`.

    2. Check domain availability with `GET /api/v1/domains/availability`.

    3. Register the domain with `POST /api/v1/domains/register`.

    4. Activate DNS with `POST /api/v1/dns/activate` and add records as needed.

    5. Renew the domain before expiry with `POST /api/v1/domains/renew`.
  version: 1.0.0
  license:
    name: MIT
servers:
  - url: https://dev.namify.host
security:
  - bearerAuth: []
paths:
  /api/v1/customers/auto-login:
    post:
      tags:
        - Customers
      summary: Generate an auto-login token
      description: >-
        Generates a short-lived authentication token for an existing customer
        account, identified by their email address.


        **Use case:** Pass the returned `token` as a query parameter in the
        auto-login redirect URL to log the customer into their account without
        requiring a password. This is intended for partner-initiated flows — for
        example, redirecting a customer from your platform directly into their
        Namify control panel.


        **Token expiry:** Tokens are valid for a short window. Redirect the
        customer immediately after calling this endpoint — do not store or reuse
        the token.


        **Customer requirement:** The email must match an account previously
        created via `POST /api/v1/customers/signup`. Submitting an unregistered
        email returns a `422` error.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - email
              properties:
                email:
                  type: string
                  format: email
                  description: >-
                    Email address of the customer to generate a token for. Must
                    match an existing customer account created via `POST
                    /api/v1/customers/signup`.
                  example: john.doe@example.com
            example:
              email: john.doe@example.com
      responses:
        '200':
          description: >-
            Token generated successfully. Use the returned `token` in the
            auto-login redirect URL immediately — it expires shortly after
            issuance.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AutoLoginResponse'
              example:
                status: SUCCESS
                email: john.doe@example.com
                token: >-
                  214844e15411d2f6e72b274ca199760656218b57e5329243ce23e6ad7c2e1c97
                expires_at: '2026-04-24 09:48:34'
        '401':
          description: The API key is missing or does not correspond to a known partner.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorUnauthorized'
        '422':
          description: >-
            The supplied email address does not match any existing customer
            account.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorInvalidOrder'
              example:
                status: ERROR
                message: Invalid customer email
components:
  schemas:
    AutoLoginResponse:
      type: object
      properties:
        status:
          type: string
          example: SUCCESS
        email:
          type: string
          format: email
          description: The customer email address the token was issued for.
          example: john.doe@example.com
        token:
          type: string
          description: >-
            Authentication token to be passed as a query parameter in the
            auto-login redirect URL. Valid for a short window — redirect the
            customer immediately.
          example: 214844e15411d2f6e72b274ca199760656218b57e5329243ce23e6ad7c2e1c97
        expires_at:
          type: string
          description: >-
            UTC datetime when the token expires, formatted as YYYY-MM-DD
            HH:MM:SS. The customer must be redirected before this time.
          example: '2026-04-24 09:48:34'
    ErrorUnauthorized:
      type: object
      required:
        - message
      properties:
        message:
          type: string
          example: Unauthorized
    ErrorInvalidOrder:
      type: object
      required:
        - status
        - message
      properties:
        status:
          type: string
          example: ERROR
        message:
          type: string
          example: Invalid order ID
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        A personal access token. Obtain one from the dashboard under Settings >
        API Key. Include it in the `Authorization` header as `Bearer <token>`.
        Unauthenticated requests to protected routes return `401 Unauthorized`.

````