# Retrieve Domain Health Score

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v2/domains/health-score:
    get:
      summary: Retrieve Domain Health Score
      deprecated: false
      description: >-
        This endpoint provides a reputation score for your domain based on its
        nameserver reputation. This helps you monitor whether your domain's DNS
        infrastructure is on any abuse lists and assess the overall health of
        your domain.
      tags:
        - domains
      parameters:
        - name: domainId
          in: query
          description: ''
          required: false
          example: ''
          schema:
            type: string
        - name: x-auth-zapmail
          in: header
          description: ''
          required: true
          example: ''
          schema:
            type: string
        - name: x-workspace-key
          in: header
          description: ''
          required: false
          example: ''
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                  message:
                    type: string
                  data:
                    type: object
                    properties:
                      domain:
                        type: object
                        properties:
                          id:
                            type: string
                          domain:
                            type: string
                          dnsManagedBy:
                            type: string
                          status:
                            type: string
                        required:
                          - id
                          - domain
                          - dnsManagedBy
                          - status
                        x-apidog-orders:
                          - id
                          - domain
                          - dnsManagedBy
                          - status
                      averageScore:
                        type: integer
                      isAbused:
                        type: boolean
                    required:
                      - domain
                      - averageScore
                      - isAbused
                    x-apidog-orders:
                      - domain
                      - averageScore
                      - isAbused
                required:
                  - status
                  - message
                  - data
                x-apidog-orders:
                  - status
                  - message
                  - data
              example:
                status: 200
                message: Domain nameserver scores retrieved successfully
                data:
                  domain:
                    id: ba6f38d7
                    domain: domain.org
                    dnsManagedBy: GOOGLE_CLOUD_DNS
                    status: ACTIVE
                  averageScore: 40
                  isAbused: false
          headers: {}
          x-apidog-name: Success
        '400':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        msg:
                          type: string
                        param:
                          type: string
                        location:
                          type: string
                      x-apidog-orders:
                        - msg
                        - param
                        - location
                required:
                  - status
                  - message
                  - errors
                x-apidog-orders:
                  - status
                  - message
                  - errors
              example:
                status: 400
                message: Validation failed
                errors:
                  - msg: Valid domain ID is required
                    param: domainId
                    location: query
          headers: {}
          x-apidog-name: Bad Request
        '401':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                  message:
                    type: string
                  errorId:
                    type: string
                required:
                  - status
                  - message
                  - errorId
                x-apidog-orders:
                  - status
                  - message
                  - errorId
              example:
                status: 401
                message: Invalid API key
                errorId: uuid-v4-error-id
          headers: {}
          x-apidog-name: Unauthorized
        '404':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                  message:
                    type: string
                  data:
                    type: 'null'
                required:
                  - status
                  - message
                  - data
                x-apidog-orders:
                  - status
                  - message
                  - data
              example:
                status: 404
                message: Domain not found or access denied
                data: null
          headers: {}
          x-apidog-name: Not Found
        '500':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                  message:
                    type: string
                  errorId:
                    type: string
                required:
                  - status
                  - message
                  - errorId
                x-apidog-orders:
                  - status
                  - message
                  - errorId
              example:
                status: 500
                message: Internal server error
                errorId: uuid-v4-error-id
          headers: {}
          x-apidog-name: Internal Server Error
      security: []
      x-apidog-folder: domains
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/797058/apis/api-25772162-run
components:
  schemas: {}
  securitySchemes: {}
servers:
  - url: https://api.zapmail.ai/api
    description: Prod Env
security: []

```
