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

# TLS Scan



## OpenAPI

````yaml POST /tlsscan
openapi: 3.1.0
info:
  title: Geekflare
  description: Official OpenAPI specification for all Geekflare endpoints.
  version: 1.0.0
  license:
    name: MIT
servers:
  - url: https://api.geekflare.com
security:
  - x-api-key: []
paths:
  /tlsscan:
    post:
      tags:
        - api-tool
      summary: Perform TLS scan for a given domain
      operationId: tlsScan
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TlsScanDto'
      responses:
        '200':
          description: Successfully retrieved TLS scan information
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TlsScanResponseDto'
        '400':
          description: Invalid URL.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaseErrorResponseDto'
              example:
                timestamp: 1700000000000
                apiStatus: failure
                apiCode: 400
                message: INVALID_URL
                details: The URL must be a valid HTTP or HTTPS URL.
        '422':
          description: TLS handshake failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaseErrorResponseDto'
              example:
                timestamp: 1700000000000
                apiStatus: failure
                apiCode: 422
                message: TLS_HANDSHAKE_FAILED
                details: Unable to establish a TLS connection with the target server.
        '500':
          description: TLS scan failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaseErrorResponseDto'
              example:
                timestamp: 1700000000000
                apiStatus: failure
                apiCode: 500
                message: TLS_SCAN_FAILED
                details: Unable to complete the TLS scan for the target domain.
components:
  schemas:
    TlsScanDto:
      type: object
      properties:
        url:
          type: string
          description: Target URL
          example: https://example.com
      required:
        - url
    TlsScanResponseDto:
      type: object
      properties:
        timestamp:
          type: number
          description: Timestamp of the request in milliseconds
          example: 1783943217189
        apiStatus:
          type: string
          description: API status message
          example: success
          enum:
            - success
            - failure
        apiCode:
          type: number
          description: API status code
          example: 200
        meta:
          description: Metadata about the TLS scan request
          example:
            url: example.com
            test:
              id: 40zt4but04y07ccn4pov5fiolzrxbxdg
          allOf:
            - $ref: '#/components/schemas/TlsScanMetaDto'
        data:
          description: TLS scan result data
          example:
            protocols:
              tls10: false
              tls11: false
              tls12: true
              tls13: true
            certificate:
              commonName: sni.cloudflaressl.com
              subjectAltName: DNS:*.example.com, DNS:sni.cloudflaressl.com, DNS:example.com
              issuer:
                country: US
                organization: Cloudflare, Inc.
                commonName: Cloudflare Inc ECC CA-3
              expiry: Jun  6 23:59:59 2023 GMT
          allOf:
            - $ref: '#/components/schemas/TlsScanDataDto'
      required:
        - timestamp
        - apiStatus
        - apiCode
        - meta
        - data
    BaseErrorResponseDto:
      type: object
      properties:
        timestamp:
          type: number
          description: Timestamp of the request in milliseconds
          example: 1778737930991
        apiStatus:
          type: string
          description: API status message
          example: success
          enum:
            - success
            - failure
        apiCode:
          type: number
          description: API status code
          example: 200
        message:
          type: string
          description: Error message
          example: Invalid URL provided
        details:
          type: string
          description: Detailed error information
          example: The URL must be a valid HTTP or HTTPS URL
      required:
        - timestamp
        - apiStatus
        - apiCode
        - message
    TlsScanMetaDto:
      type: object
      properties:
        url:
          type: string
          description: The target URL checked for TLS support
          example: example.com
        test:
          description: Test metadata object
          example:
            id: 40zt4but04y07ccn4pov5fiolzrxbxdg
          allOf:
            - $ref: '#/components/schemas/TestMetaDto'
      required:
        - url
        - test
    TlsScanDataDto:
      type: object
      properties:
        protocols:
          description: Protocols supported
          allOf:
            - $ref: '#/components/schemas/TlsProtocolsDto'
        certificate:
          description: Certificate details
          allOf:
            - $ref: '#/components/schemas/TlsCertificateDto'
      required:
        - protocols
        - certificate
    TestMetaDto:
      type: object
      properties:
        id:
          type: string
          description: Unique test identifier
          example: mxqx9v9y0742lap6altwdteqd28t23nq
      required:
        - id
    TlsProtocolsDto:
      type: object
      properties:
        tls10:
          type: boolean
          description: Whether TLS 1.0 is supported
          example: false
        tls11:
          type: boolean
          description: Whether TLS 1.1 is supported
          example: false
        tls12:
          type: boolean
          description: Whether TLS 1.2 is supported
          example: true
        tls13:
          type: boolean
          description: Whether TLS 1.3 is supported
          example: true
      required:
        - tls10
        - tls11
        - tls12
        - tls13
    TlsCertificateDto:
      type: object
      properties:
        commonName:
          type: string
          description: Common name (CN) on the certificate
          example: sni.cloudflaressl.com
        subjectAltName:
          type: string
          description: Subject Alternative Names (SAN)
          example: DNS:*.example.com, DNS:sni.cloudflaressl.com, DNS:example.com
        issuer:
          description: Issuer details
          allOf:
            - $ref: '#/components/schemas/TlsCertificateIssuerDto'
        expiry:
          type: string
          description: Certificate expiry date
          example: Jun  6 23:59:59 2023 GMT
      required:
        - commonName
        - subjectAltName
        - issuer
        - expiry
    TlsCertificateIssuerDto:
      type: object
      properties:
        country:
          type: string
          description: Issuer country
          example: US
        organization:
          type: string
          description: Issuer organization
          example: Cloudflare, Inc.
        commonName:
          type: string
          description: Issuer common name
          example: Cloudflare Inc ECC CA-3
      required:
        - country
        - organization
        - commonName
  securitySchemes:
    x-api-key:
      type: apiKey
      in: header
      name: x-api-key
      description: API Key required for all endpoints

````