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

# Check a web app before adding it to Cloud Defender

> Check a web app before you add it: whether the domain resolves and already answers through Cloud Defender, whether your origin answers HTTPS for the domain and with which certificate, and whether the domain is already added. It is the check the setup wizard runs. Only public addresses are fetched.



## OpenAPI

````yaml post /api/v1/cloud-defender/precheck
openapi: 3.1.0
info:
  title: Aegister API
  version: 2.10.0
servers: []
security: []
paths:
  /api/v1/cloud-defender/precheck:
    post:
      tags:
        - cloud-defender
      summary: Check a web app before adding it to Cloud Defender
      description: >-
        Resolves and fetches the domain and the origin now: whether the domain
        resolves and already answers through

        Cloud Defender (`domain`), whether the origin answers HTTPS for the
        domain and with which certificate

        (`origin`), and whether the domain is already added (`registered`). Only
        public addresses are fetched.
      operationId: cloud_defender_precheck_create
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                organization:
                  type: integer
                fqdn:
                  type: string
                endpoint:
                  type: string
            examples:
              AWebApp:
                value:
                  organization: 12
                  fqdn: www.example.com
                  endpoint: 203.0.113.20
                summary: A web app
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: integer
                    description: |-
                      Any value different from 0 indicates an error.  
                      More details can be found in `messages`.
                    minimum: 0
                    maximum: 0
                    examples:
                      - 0
                  messages:
                    type: array
                    description: >-
                      If `error` is `1`, contains zero or more details on the
                      error.
                    examples:
                      - []
                  data:
                    type: object
                    properties:
                      domain:
                        type: object
                        properties:
                          addresses:
                            type: array
                            items:
                              type: string
                            description: What the name resolves to now.
                          public:
                            type: boolean
                            description: Every address is public. Only then is it fetched.
                          status:
                            type:
                              - integer
                              - 'null'
                            description: >-
                              The HTTPS status of `/`. Null = not fetched or no
                              answer.
                          protected:
                            type: boolean
                            description: It answers through Cloud Defender.
                      origin:
                        type: object
                        properties:
                          addresses:
                            type: array
                            items:
                              type: string
                            description: What the name resolves to now.
                          public:
                            type: boolean
                            description: Every address is public. Only then is it fetched.
                          status:
                            type:
                              - integer
                              - 'null'
                            description: >-
                              The HTTPS status of `/`. Null = not fetched or no
                              answer.
                          certificate:
                            type:
                              - string
                              - 'null'
                            enum:
                              - valid
                              - invalid
                              - null
                            description: >-
                              `valid` for the domain, `invalid` (it answers
                              HTTPS with a certificate not valid for the domain:
                              Cloud Defender still reaches it) or null (no HTTPS
                              answer).
                      registered:
                        type: boolean
                        description: The domain is already added to Cloud Defender.
              examples:
                NotBehindCloudDefenderYet:
                  value:
                    error: 0
                    messages: []
                    data:
                      domain:
                        addresses:
                          - 203.0.113.20
                        public: true
                        status: 200
                        protected: false
                      origin:
                        addresses:
                          - 203.0.113.20
                        public: true
                        status: 200
                        certificate: valid
                      registered: false
                  summary: Not behind Cloud Defender yet
          description: ''
        '400':
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: integer
                    description: |-
                      Any value different from 0 indicates an error.  
                      More details can be found in `messages`.
                    minimum: 0
                    maximum: 0
                    examples:
                      - 1
                  messages:
                    type: array
                    description: >-
                      If `error` is `1`, contains zero or more details on the
                      error.
                    examples:
                      - - Invalid data provided
          description: ''
        '404':
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: integer
                    description: |-
                      Any value different from 0 indicates an error.  
                      More details can be found in `messages`.
                    minimum: 0
                    maximum: 0
                    examples:
                      - 1
                  messages:
                    type: array
                    description: >-
                      If `error` is `1`, contains zero or more details on the
                      error.
                    examples:
                      - []
          description: ''
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-Aegister-Token

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.