# Add DNSSEC security key

This function imports a DNSSEC security key.

Important:

When you disable the DNS role, the system disables this function.

Endpoint: GET /DNSSEC/import_zone_key
Version: 11.136.0.4
Security: BasicAuth

## Query parameters:

  - `domain` (string, required)
    The security key's domain.
    Example: "example.com"

  - `key_data` (string, required)
    The security key data that the pdnsutil
utility's export-zone-key call returns.
    Example: "Private-key-format:%20v1.2%0AAlgorithm:%2013%20\\(ECDSAP256SHA256\\)%0APrivateKey:%20xCM281KtWE9oCsUX8fP1hDZ02/X7JCjp4QZA/DZjfX0=%0A%0A"

  - `key_type` (string, required)
    The security key's type.

* ksk
* zsk
    Enum: "ksk", "zsk"

## Response 200 fields (application/json):

  - `apiversion` (integer)
    The version of the API.
    Example: 3

  - `func` (string)
    The name of the method called.
    Example: "import_zone_key"

  - `module` (string)
    The name of the module called.
    Example: "DNSSEC"

  - `result` (object)

  - `result.data` (object)
    Example: {"domain":"example.com","new_key_id":"1","success":1}

  - `result.data.domain` (string)
    The domain for which the system imported the zone key.
    Example: "example.com"

  - `result.data.error` (string)
    An error message that describes why the system could not import the security key.

Note:

The function only displays this return when the success return is a 0 value.
    Example: "Error: Invalid key_id or domain specified: No such key present for domain."

  - `result.data.new_key_id` (string)
    The security key's ID.
    Example: "1"

  - `result.data.success` (integer)
    Whether the system imported the security key.

* 1 - The system imported the security key.
* 0 - The system failed to import the security key.
    Enum: 0, 1

  - `result.errors` (array,null)
    List of errors if the API failed.

  - `result.messages` (array,null)
    List of messages generated by the API.

  - `result.metadata` (object)

  - `result.status` (integer)
    * 1 - Success
* 0 - Failed: Check the errors field for more details.
    Enum: 0, 1

  - `result.warnings` (array,null)
    List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running a API.


