> ## 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.

# View DNS Records

> Returns DNS records for a domain. Use `record_type` to filter by type — defaults to `A` if omitted. Supported types: `A`, `AAAA`, `CNAME`, `MX`, `TXT`, `NS`, `SRV`, `SOA`.

**Prerequisite:** DNS service must be activated for the domain via `POST /api/v1/dns/activate` before records can be retrieved.



## OpenAPI

````yaml GET /api/v1/dns/dns-records
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/dns/dns-records:
    get:
      tags:
        - DNS
      summary: Get DNS records
      description: >-
        Returns DNS records for a domain. Use `record_type` to filter by type —
        defaults to `A` if omitted. Supported types: `A`, `AAAA`, `CNAME`, `MX`,
        `TXT`, `NS`, `SRV`, `SOA`.


        **Prerequisite:** DNS service must be activated for the domain via `POST
        /api/v1/dns/activate` before records can be retrieved.
      parameters:
        - name: order_id
          in: query
          required: true
          schema:
            type: integer
          description: Order ID of the domain.
          example: 124680932
        - name: record_type
          in: query
          required: false
          schema:
            type: string
            enum:
              - A
              - AAAA
              - CNAME
              - MX
              - TXT
              - NS
              - SRV
              - SOA
          description: Filter records by type. Defaults to `A` if omitted.
          example: A
      responses:
        '200':
          description: DNS records retrieved successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  dns_records:
                    type: array
                    items:
                      type: object
                      properties:
                        type:
                          type: string
                          description: Record type (e.g. `A`, `MX`, `TXT`).
                          example: A
                        host:
                          type: string
                          description: Subdomain label relative to the zone.
                          example: www
                        value:
                          type: string
                          description: >-
                            Record value (IP address, hostname, or text
                            content).
                          example: 203.0.113.10
                        time_to_live:
                          type: integer
                          description: TTL in seconds.
                          example: 3600
                        status:
                          type: string
                          description: Record status as reported by the DNS provider.
                          example: Active
                        priority:
                          type: integer
                          description: Priority value. Present for MX and SRV records only.
                          example: 10
              example:
                dns_records:
                  - type: A
                    host: www
                    value: 203.0.113.10
                    time_to_live: 3600
                    status: Active
        '401':
          description: API key is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorUnauthorized'
        '422':
          description: >-
            The `order_id` does not belong to this partner. The `message` field
            contains the reason.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorInvalidOrder'
              example:
                status: ERROR
                message: Invalid order ID
components:
  schemas:
    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`.

````