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

# Toggle DNSSEC

> Enable or disable DNSSEC for a DNS zone.



## OpenAPI

````yaml /api-reference/services_docs_mintlify/dns_api.yaml patch /dns/v2/zones/{name}/dnssec
openapi: 3.1.0
info:
  title: Gcore OpenAPI – DNS API
  description: >-
    This OpenAPI is an aggregated OpenAPI specification that unifies all Gcore
    products into a single file. It covers Cloud, CDN, DNS, WAAP, DDoS
    Protection, Object Storage, Streaming, and FastEdge services.
  version: 1282e760bff2
servers:
  - url: https://api.gcore.com
security:
  - APIKey: []
tags:
  - name: Analyze
  - name: Clients
  - name: DNSSEC
  - name: Locations
  - name: Lookup
  - name: Metrics
  - name: NetworkMappings
  - name: Pickers
  - name: RRsets
  - name: Zones
paths:
  /dns/v2/zones/{name}/dnssec:
    patch:
      tags:
        - DNSSEC
      summary: Toggle DNSSEC
      description: Enable or disable DNSSEC for a DNS zone.
      operationId: ToggleDNSSEC
      parameters:
        - name: name
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ToggleDNSSECRequestBody'
        required: false
      responses:
        '200':
          description: ToggleDNSSECResponse
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ToggleDNSSECResponse'
        '400':
          description: Error message response
          headers:
            error:
              schema:
                type: string
          content: {}
components:
  schemas:
    ToggleDNSSECRequestBody:
      type: object
      properties:
        enabled:
          type: boolean
        force_disable:
          type: boolean
    ToggleDNSSECResponse:
      type: object
      properties:
        algorithm:
          type: string
          description: Specifies the algorithm used for the key.
          example: '13'
        digest:
          type: string
          description: Represents the hashed value of the DS record.
          example: 28D2F00FB7FD127C05D1CE02BFA8660B094CA6728B1619ABA2144234F7221069
        digest_algorithm:
          type: string
          description: Specifies the algorithm used to generate the digest.
          example: SHA256
        digest_type:
          type: string
          description: Specifies the type of the digest algorithm used.
          example: '2'
        ds:
          type: string
          description: Represents the complete DS record.
          example: >-
            zxy.com. 3600 IN DS 26191 13 2
            135E208FF18578AB18C1EB8EA064BE08324DCBA6CF08FF55D76F0DBD4BF49F07
        flags:
          type: integer
          description: Represents the flag for DNSSEC record.
          format: int64
          example: 257
        key_tag:
          type: integer
          description: Represents the identifier of the DNSKEY record.
          format: int64
          example: 26191
        key_type:
          type: string
          description: Specifies the type of the key used in the algorithm.
          example: ECDSAP256SHA256
        message:
          type: string
        public_key:
          type: string
          description: Represents the public key used in the DS record.
          example: >-
            ahD2C5Th+4NIFmErQPgSe/j6yPc2pbuhr3QcOJImCYHtv/mR/2qP2yHjBE1x20ERnmAnp6e6//g0uYAQKTW+DA==
        uuid:
          type: string
  securitySchemes:
    APIKey:
      description: >-
        API key for authentication. Make sure to include the word `apikey`,
        followed by a single space and then your token.

        Example: `apikey 1234$abcdef`
      type: apiKey
      in: header
      name: Authorization

````