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

# Annulla la rimozione della regola paesi di Cloud Defender

> Rimetti la regola paesi del dominio entro 10 minuti dalla rimozione, com'era. Risponde 400 dopo 10 minuti, o quando il dominio ha già una nuova regola. Proprietari e security officer con licenza attiva.



## OpenAPI

````yaml post /api/v1/cloud-defender/{id}/countries/restore
openapi: 3.1.0
info:
  title: Aegister API
  version: 2.10.0
servers: []
security: []
paths:
  /api/v1/cloud-defender/{id}/countries/restore:
    post:
      tags:
        - cloud-defender
      summary: Undo the removal of a Cloud Defender domain's country rule
      description: >-
        Within 10 minutes of its removal the rule comes back as it was, unless
        the domain has a new one.
      operationId: cloud_defender_countries_restore_create
      parameters:
        - in: path
          name: id
          schema:
            type: integer
          required: true
      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
                      - 'null'
                    description: Null when the domain has no country rule.
                    properties:
                      action:
                        type: string
                        enum:
                          - block
                          - allow
                        description: >-
                          `block`: refuse the countries listed. `allow`: accept
                          only them.
                      countries:
                        type: array
                        items:
                          type: string
                        description: ISO 3166-1 alpha-2 codes.
                      tor:
                        type: boolean
                        description: Also refuse the Tor network.
                      unknown:
                        type: boolean
                        description: Also refuse addresses whose country is unknown.
                      mode:
                        type: string
                        enum:
                          - test
                          - enforced
                        description: >-
                          `test`: requests it would refuse are counted and let
                          through.
                      test_hits:
                        type: integer
                        description: Requests it would have refused since `test_since`.
                      test_since:
                        type:
                          - string
                          - 'null'
                        format: date-time
                      created_at:
                        type: string
                        format: date-time
                      edited_at:
                        type:
                          - string
                          - 'null'
                        format: date-time
              examples:
                BackAsItWas:
                  value:
                    error: 0
                    messages: []
                    data:
                      action: block
                      countries:
                        - KP
                        - RU
                      tor: true
                      unknown: false
                      mode: test
                      test_hits: 0
                      test_since: '2026-10-28T09:30:00Z'
                      created_at: '2026-10-28T09:30:00Z'
                      edited_at: '2026-10-28T09:30:00Z'
                  summary: Back as it was
          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.