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

# Domain Security

> Checks a given domain or URL for potential security risks using HashDit threat intelligence. The API analyzes the provided URL and returns a risk level along with detailed indicators.

<Info>
  The Domain Security endpoint does not require a chain ID as it analyzes domains and URLs rather than blockchain addresses.
</Info>


## OpenAPI

````yaml POST /v2/hashdit/domain-security
openapi: 3.1.0
info:
  title: HashDit API
  description: >-
    HashDit threat intelligence API for domain security analysis, blockchain
    address classification, address poisoning detection, address security
    assessment, transaction simulation, transaction security, token security,
    and Solana token security
  version: 2.0.0
servers:
  - url: https://service.hashdit.io
security: []
paths:
  /v2/hashdit/domain-security:
    post:
      summary: Domain Security
      description: >-
        Checks a given domain or URL for potential security risks using HashDit
        threat intelligence. The API analyzes the provided URL and returns a
        risk level along with detailed indicators.
      operationId: domainSecurity
      parameters:
        - name: X-API-KEY
          in: header
          description: Your HashDit API key
          required: true
          schema:
            type: string
      requestBody:
        description: Domain or URL to analyze
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DomainSecurityRequest'
            examples:
              Whitelisted Domain:
                summary: Safe domain example
                value:
                  url: https://binance.com/
              Risky Domain:
                summary: Suspicious domain example
                value:
                  url: https://bnb-miner.com/
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DomainSecurityResponse'
              examples:
                Whitelisted Domain:
                  summary: Safe domain response
                  value:
                    code: '0'
                    status: ok
                    data:
                      request_id: 85cb060e-75cf-4d75-887f-c23f2fc45106
                      has_result: true
                      polling_interval: 0
                      risk_level: 0
                      risk_detail:
                        - name: is_in_wlist
                          value: >-
                            The dApp is relatively safe based on the threat
                            intelligence.
                Risky Domain:
                  summary: Risky domain response
                  value:
                    code: '0'
                    status: ok
                    data:
                      request_id: 92db171f-86dg-5e86-998g-d34g3gd56217
                      has_result: true
                      polling_interval: 0
                      risk_level: 3
                      risk_detail:
                        - name: is_in_blist
                          value: >-
                            There are potential risks in the dApp based on the
                            threat intelligence.
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Unauthorized - Invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidAPIKeyErrorResponse'
              examples:
                Invalid API key:
                  summary: Invalid API key error
                  value:
                    code: '403'
                    message: 'invalid apiKey: apiKey invalid'
                    apiKey: ''
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RateLimitExceededErrorResponse'
              examples:
                Rate limit exceeded:
                  summary: Rate limit exceeded error
                  value:
                    code: '429'
                    status: error
                    message: Rate limit exceeded
components:
  schemas:
    DomainSecurityRequest:
      type: object
      required:
        - url
      properties:
        url:
          type: string
          description: The full domain or URL to be analyzed.
          example: https://binance.com/
    DomainSecurityResponse:
      type: object
      properties:
        code:
          type: string
          description: API status code. "0" indicates success.
          example: '0'
        status:
          type: string
          description: Request status (ok or error).
          example: ok
        data:
          $ref: '#/components/schemas/DomainSecurityData'
    ErrorResponse:
      type: object
      properties:
        code:
          type: string
          description: '`400`'
        status:
          type: string
          description: Error status
    InvalidAPIKeyErrorResponse:
      type: object
      properties:
        code:
          type: string
          description: '`403`'
        message:
          type: string
          description: 'invalid apiKey: apiKey invalid'
        apiKey:
          type: string
          description: API key
          example: ''
    RateLimitExceededErrorResponse:
      type: object
      properties:
        code:
          type: string
          description: '`429`'
        status:
          type: string
          description: error
        message:
          type: string
          description: Rate limit exceeded
    DomainSecurityData:
      type: object
      properties:
        request_id:
          type: string
          description: Unique identifier for this request.
          example: 85cb060e-75cf-4d75-887f-c23f2fc45106
        has_result:
          type: boolean
          description: Indicates whether the analysis result is immediately available.
          example: true
        polling_interval:
          type: number
          description: >-
            Polling interval in seconds if results are not immediately
            available.
          example: 0
        risk_level:
          type: number
          description: Risk severity score (0-5). Higher values indicate higher risk.
          minimum: 0
          maximum: 5
          example: 0
        risk_detail:
          type: array
          description: Detailed list of detected risk indicators.
          items:
            $ref: '#/components/schemas/RiskDetail'
    RiskDetail:
      type: object
      properties:
        name:
          type: string
          description: Risk category identifier.
          enum:
            - is_in_wlist
            - is_in_blist
        value:
          type: string
          description: Human-readable explanation of the risk.
          enum:
            - The dApp is relatively safe based on the threat intelligence.
            - >-
              There are potential risks in the dApp based on the threat
              intelligence.

````