openapi: 3.1.1
info:
  title: DNSimple API
  version: 2.0.0
  contact:
    name: DNSimple Support
    email: support@dnsimple.com
    url: 'https://dnsimple.com/contact'
  description: '[DNSimple](https://dnsimple.com) provides DNS hosting and domain registration that is simple and friendly. We provide an extensive API and an easy-to-use web interface so you can get your domain registered and set up with a minimal amount of effort.'
  termsOfService: 'https://dnsimple.com/terms'
externalDocs:
  url: 'https://developer.dnsimple.com'
security:
  - basicAuth: [ ]
  - bearerAuth: [ ]
servers:
  - url: 'https://api.dnsimple.com/v2'
    description: DNSimple Production API
    variables: { }
  - url: 'https://api.sandbox.dnsimple.com/v2'
    description: 'DNSimple Sandbox API used for testing'
tags:
  - name: accounts
  - name: billing
  - name: contacts
  - name: domain certificates
  - name: domain dnssec
  - name: domain emailforwards
  - name: domain pushes
  - name: domain services
  - name: domains
  - name: identity
  - name: registrant changes
  - name: registrar
  - name: registrar delegation
  - name: registrar privacy
  - name: registrar registration
  - name: registrar renewal
  - name: registrar restore
  - name: registrar transfer
  - name: secondary dns
  - name: templates
  - name: tlds
  - name: vanity name servers
  - name: webhooks
  - name: zones
paths:
  /accounts:
    get:
      description: Lists the accounts the current authenticated entity has access to.
      parameters: [ ]
      operationId: listAccounts
      tags:
        - accounts
      responses:
        '200':
          description: Depending on how you are authenticated you will see all the accounts you have access to or the account you used to authenticate.
          content:
            application/json:
              schema:
                type: object
                required: [data]
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Account'
      summary: List accounts
  /whoami:
    get:
      description: Retrieves the details about the current authenticated entity used to access the API.
      parameters: [ ]
      operationId: whoami
      tags:
        - identity
      responses:
        '200':
          description: Successful response with user or account.
          content:
            application/json:
              schema:
                type: object
                required: [data]
                properties:
                  data:
                    oneOf:
                      - type: object
                        required: [account, user]
                        properties:
                          account:
                            $ref: '#/components/schemas/Account'
                          user:
                            type: ["object", "null"]
                      - type: object
                        required: [account, user]
                        properties:
                          user:
                            $ref: '#/components/schemas/User'
                          account:
                            type: ["object", "null"]
        '401':
          $ref: '#/components/responses/401'
        '429':
          $ref: '#/components/responses/429'
        default:
          $ref: '#/components/responses/Error'
      summary: Whoami
  /oauth/access_token:
    post:
      summary: Exchange authorization code for access token
      description: |-
        Exchanges an OAuth 2.0 authorization code for an access token.
        Used in the authorization code grant flow.
      operationId: oauthToken
      tags:
        - identity
      security: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required: [client_id, client_secret, code, grant_type, redirect_uri, state]
              properties:
                client_id:
                  type: string
                client_secret:
                  type: string
                code:
                  type: string
                grant_type:
                  type: string
                  example: authorization_code
                redirect_uri:
                  type: string
                  description: Must match the redirect_uri from the authorization request (used for validation only).
                state:
                  type: string
                  description: Must match the state from the authorization request.
      responses:
        '200':
          description: Access token issued.
          content:
            application/json:
              schema:
                type: object
                properties:
                  access_token:
                    type: string
                  token_type:
                    type: string
                    example: bearer
                  scope:
                    type: [string, 'null']
                  account_id:
                    type: integer
        '400':
          description: Invalid or expired authorization code, client_id mismatch, unsupported grant_type, or redirect_uri/state mismatch.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error code per OAuth 2.0 spec (invalid_grant or invalid_request).
                  error_description:
                    type: string
                    description: Human-readable description of the error.
        '401':
          description: Client authentication failed, for example an incorrect client_secret.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error code per OAuth 2.0 spec (invalid_client).
                  error_description:
                    type: string
                    description: Human-readable description of the error.
  '/{account}/billing/charges':
    get:
      description: Lists the billing charges for the account.
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/FilterStartDate'
        - $ref: '#/components/parameters/FilterEndDate'
        - $ref: '#/components/parameters/SortCharges'
      operationId: listCharges
      tags:
        - billing
      summary: List billing charges
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                required: [data, pagination]
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Charge'
                  pagination:
                    $ref: '#/components/schemas/Pagination'
          description: Billing charges listing.
        '401':
          $ref: '#/components/responses/401'
        '429':
          $ref: '#/components/responses/429'
  '/{account}/domains':
    get:
      description: Lists the domains in the account.
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/FilterNameLike'
        - $ref: '#/components/parameters/FilterRegistrantId'
        - $ref: '#/components/parameters/SortDomains'
      operationId: listDomains
      tags:
        - domains
      summary: List domains
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                required: [data, pagination]
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Domain'
                  pagination:
                    $ref: '#/components/schemas/Pagination'
          description: Domain listing.
    post:
      summary: Create a domain
      description: |-
        Creates a domain and the corresponding zone into the account.

        When creating a domain using Solo or Teams subscription, the DNS services
        for the zone will be automatically enabled and this will be charged on your
        following subscription renewal invoices.
      parameters:
        - $ref: '#/components/parameters/Account'
      operationId: createDomain
      tags:
        - domains
      requestBody:
        $ref: '#/components/requestBodies/DomainCreate'
      responses:
        '201':
          description: Domain created.
          content:
            application/json:
              schema:
                type: object
                required: [data]
                properties:
                  data:
                    $ref: '#/components/schemas/Domain'
        '400':
          $ref: '#/components/responses/400'
  '/{account}/domains/{domain}':
    get:
      description: Retrieves the details of an existing domain.
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Domain'
      operationId: getDomain
      tags:
        - domains
      responses:
        '200':
          description: Domain retrieved.
          content:
            application/json:
              schema:
                type: object
                required: [data]
                properties:
                  data:
                    $ref: '#/components/schemas/Domain'
        '400':
          $ref: '#/components/responses/400'
        '404':
          $ref: '#/components/responses/404'
      summary: Retrieve a domain
    delete:
      description: Permanently deletes a domain from the account.
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Domain'
      operationId: deleteDomain
      tags:
        - domains
      responses:
        '204':
          description: Domain deleted.
        '400':
          $ref: '#/components/responses/400'
        '404':
          $ref: '#/components/responses/404'
      summary: Delete a domain
  '/{account}/domains/research/status':
    get:
      description: Research a domain name for availability and registration status information.
      parameters:
        - $ref: '#/components/parameters/Account'
        - name: domain
          in: query
          required: true
          description: The domain name to research
          schema:
            type: string
      operationId: getDomainsResearchStatus
      tags:
        - domains
      summary: Domains research status
      responses:
        '200':
          description: Domain research information retrieved.
          content:
            application/json:
              schema:
                type: object
                required: [data]
                properties:
                  data:
                    $ref: '#/components/schemas/DomainResearch'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '429':
          $ref: '#/components/responses/429'
  '/{account}/domains/{domain}/dnssec':
    get:
      description: Gets the DNSSEC status for an existing domain.
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Domain'
      operationId: getDomainDnssec
      tags:
        - domain dnssec
      responses:
        '200':
          description: Successfully retrieved DNSSEC
          content:
            application/json:
              schema:
                type: object
                required: [data]
                properties:
                  data:
                    $ref: '#/components/schemas/DNSSEC'
        '400':
          $ref: '#/components/responses/400'
        '404':
          $ref: '#/components/responses/404'
      summary: DNSSEC status
    post:
      description: |-
        Enables DNSSEC for the domain.

        It will enable signing of the zone. If the domain is registered with DNSimple, it will also add the DS record to the corresponding registry.
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Domain'
      operationId: enableDomainDnssec
      tags:
        - domain dnssec
      responses:
        '201':
          description: Successfully enabled DNSSEC
          content:
            application/json:
              schema:
                type: object
                required: [data]
                properties:
                  data:
                    $ref: '#/components/schemas/DNSSEC'
        '400':
          $ref: '#/components/responses/400'
        '404':
          $ref: '#/components/responses/404'
      summary: Enable DNSSEC
    delete:
      description: |-
        Disables DNSSEC for the domain.

        It will disable signing of the zone. If the domain is registered with DNSimple, it will also remove the DS record at the registry corresponding to the disabled DNSSEC signing.
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Domain'
      operationId: disableDomainDnssec
      tags:
        - domain dnssec
      responses:
        '204':
          description: Successfully disabled DNSSEC
        '400':
          $ref: '#/components/responses/400'
        '404':
          $ref: '#/components/responses/404'
        '428':
          description: If DNSSEC is not enabled
      summary: Disable DNSSEC
  '/{account}/domains/{domain}/ds_records':
    get:
      description: Lists the DS records for the domain.
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Domain'
        - $ref: '#/components/parameters/SortDelegationSignerRecords'
      operationId: listDomainDelegationSignerRecords
      tags:
        - domain dnssec
      responses:
        '200':
          description: Successfully retrieved delegation signer list
          content:
            application/json:
              schema:
                type: object
                required: [data, pagination]
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/DelegationSigner'
                  pagination:
                    $ref: '#/components/schemas/Pagination'
        '400':
          $ref: '#/components/responses/400'
        '404':
          $ref: '#/components/responses/404'
      summary: List delegation signer records
    post:
      description: Adds a DS record to the domain.
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Domain'
      operationId: createDomainDelegationSignerRecord
      tags:
        - domain dnssec
      requestBody:
        $ref: '#/components/requestBodies/DelegationSignerCreate'
      responses:
        '201':
          description: Successfully added delegation signer record
          content:
            application/json:
              schema:
                type: object
                required: [data]
                properties:
                  data:
                    $ref: '#/components/schemas/DelegationSigner'
        '400':
          $ref: '#/components/responses/400'
        '404':
          $ref: '#/components/responses/404'
      summary: Create a delegation signer record
  '/{account}/domains/{domain}/ds_records/{ds}':
    get:
      description: Retrieves the details of an existing DS record.
      operationId: getDomainDelegationSignerRecord
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Domain'
        - $ref: '#/components/parameters/DelegationSigner'
      tags:
        - domain dnssec
      responses:
        '200':
          description: Successfully retrieved Delegation Signer record
          content:
            application/json:
              schema:
                type: object
                required: [data]
                properties:
                  data:
                    $ref: '#/components/schemas/DelegationSigner'
        '400':
          $ref: '#/components/responses/400'
        '404':
          $ref: '#/components/responses/404'
      summary: Retrieve a delegation signer record
    delete:
      description: Removes a DS record from the domain.
      operationId: deleteDomainDelegationSignerRecord
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Domain'
        - $ref: '#/components/parameters/DelegationSigner'
      tags:
        - domain dnssec
      responses:
        '204':
          description: Successfully removed the delegation signer record.
        '400':
          $ref: '#/components/responses/400'
        '404':
          $ref: '#/components/responses/404'
      summary: Delete a delegation signer record
  '/{account}/domains/{domain}/email_forwards':
    get:
      description: Lists email forwards for the domain.
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Domain'
        - $ref: '#/components/parameters/SortEmailForwards'
      operationId: listEmailForwards
      tags:
        - domain emailforwards
      responses:
        '200':
          description: Successfully retrieved email forward list.
          content:
            application/json:
              schema:
                type: object
                required: [data, pagination]
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/EmailForward'
                  pagination:
                    $ref: '#/components/schemas/Pagination'
        '400':
          $ref: '#/components/responses/400'
        '404':
          $ref: '#/components/responses/404'
      summary: List email forwards
    post:
      description: Creates a new email forward for the domain.
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Domain'
      operationId: createEmailForward
      tags:
        - domain emailforwards
      requestBody:
        $ref: '#/components/requestBodies/EmailForwardCreate'
      responses:
        '201':
          description: Successfully created new email forward.
          content:
            application/json:
              schema:
                type: object
                required: [data]
                properties:
                  data:
                    $ref: '#/components/schemas/EmailForward'
        '400':
          $ref: '#/components/responses/400'
        '404':
          $ref: '#/components/responses/404'
      summary: Create an email forward
  '/{account}/domains/{domain}/email_forwards/{emailforward}':
    get:
      description: Retrieves the details of an existing email forward.
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Domain'
        - $ref: '#/components/parameters/EmailForward'
      operationId: getEmailForward
      tags:
        - domain emailforwards
      responses:
        '200':
          description: Successfully retrieved email forward.
          content:
            application/json:
              schema:
                type: object
                required: [data]
                properties:
                  data:
                    $ref: '#/components/schemas/EmailForward'
        '400':
          $ref: '#/components/responses/400'
        '404':
          $ref: '#/components/responses/404'
      summary: Retrieve an email forward
    delete:
      description: Permanently deletes an email forward.
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Domain'
        - $ref: '#/components/parameters/EmailForward'
      operationId: deleteEmailForward
      tags:
        - domain emailforwards
      responses:
        '204':
          description: Successfully deleted email forward.
        '404':
          $ref: '#/components/responses/404'
      summary: Delete an email forward
  '/{account}/domains/{domain}/pushes':
    post:
      description: Initiates a pust of a domain to another DNSimple account.
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Domain'
      operationId: initiateDomainPush
      tags:
        - domain pushes
      requestBody:
        $ref: '#/components/requestBodies/PushInitiate'
      responses:
        '201':
          description: Successfully initiated the push.
          content:
            application/json:
              schema:
                type: object
                required: [data]
                properties:
                  data:
                    $ref: '#/components/schemas/Push'
        '400':
          $ref: '#/components/responses/400'
        '404':
          $ref: '#/components/responses/404'
      summary: Initiate a push
  '/{account}/pushes':
    get:
      description: List pending pushes for the target account.
      parameters:
        - $ref: '#/components/parameters/Account'
      operationId: listPushes
      tags:
        - domain pushes
      responses:
        '200':
          description: Successfully retrieved pushes for the account.
          content:
            application/json:
              schema:
                type: object
                required: [data, pagination]
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Push'
                  pagination:
                    $ref: '#/components/schemas/Pagination'
      summary: List pushes
  '/{account}/pushes/{push}':
    post:
      description: Accepts a push to the target account.
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Push'
      operationId: acceptPush
      tags:
        - domain pushes
      requestBody:
        $ref: '#/components/requestBodies/PushAccept'
      responses:
        '204':
          description: Successfully accept a push.
        '400':
          $ref: '#/components/responses/400'
        '404':
          $ref: '#/components/responses/404'
      summary: Accept a push
    delete:
      description: Rejects a push to the target account.
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Push'
      operationId: rejectPush
      tags:
        - domain pushes
      responses:
        '204':
          description: Successfully reject a push.
        '400':
          $ref: '#/components/responses/400'
        '404':
          $ref: '#/components/responses/404'
      summary: Reject a push
  '/{account}/domains/{domain}/certificates':
    get:
      description: Lists the certificates for a domain.
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Domain'
        - $ref: '#/components/parameters/SortCertificates'
      operationId: listCertificates
      tags:
        - domain certificates
      responses:
        '200':
          description: Successfully retrieved certificates for a domain.
          content:
            application/json:
              schema:
                type: object
                required: [data, pagination]
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Certificate'
                  pagination:
                    $ref: '#/components/schemas/Pagination'
        '404':
          $ref: '#/components/responses/404'
      summary: List certificates
  '/{account}/domains/{domain}/certificates/{certificate}':
    get:
      description: Retrieves the details of an existing certificate.
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Domain'
        - $ref: '#/components/parameters/Certificate'
      operationId: getCertificate
      tags:
        - domain certificates
      responses:
        '200':
          description: Successfully retrieved a certificate for a domain.
          content:
            application/json:
              schema:
                type: object
                required: [data]
                properties:
                  data:
                    $ref: '#/components/schemas/Certificate'
        '404':
          $ref: '#/components/responses/404'
      summary: Retrieve a certificate
  '/{account}/domains/{domain}/certificates/{certificate}/download':
    get:
      description: 'Gets the PEM-encoded certificate, along with the root certificate and intermediate chain.'
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Domain'
        - $ref: '#/components/parameters/Certificate'
      operationId: downloadCertificate
      tags:
        - domain certificates
      responses:
        '200':
          description: Successfully retrieved the certificate.
          content:
            application/json:
              schema:
                type: object
                required: [data]
                properties:
                  data:
                    $ref: '#/components/schemas/CertificateDownload'
        '404':
          $ref: '#/components/responses/404'
      summary: Download a certificate
  '/{account}/domains/{domain}/certificates/{certificate}/private_key':
    get:
      description: Gets the PEM-encoded certificate private key.
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Domain'
        - $ref: '#/components/parameters/Certificate'
      operationId: getCertificatePrivateKey
      tags:
        - domain certificates
      responses:
        '200':
          description: Successfully retrieved the private key for an issued certificate.
          content:
            application/json:
              schema:
                type: object
                required: [data]
                properties:
                  data:
                    $ref: '#/components/schemas/CertificatePrivateKey'
        '404':
          $ref: '#/components/responses/404'
      summary: Retrieve a certificate private key
  '/{account}/domains/{domain}/certificates/letsencrypt':
    post:
      description: 'Orders a [Let''s Encrypt](https://dnsimple.com/letsencrypt) certificate with DNSimple.'
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Domain'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                auto_renew:
                  description: 'Enable the auto-renewal of the certificate'
                  type: boolean
                  default: false
                name:
                  description: 'The certificate name'
                  type: string
                  default: 'www'
                alternate_names:
                  description: 'The certificate alternate names'
                  type: array
                  items:
                    type: string
                  default: [ ]
                  example: [ 'docs.example.com', 'status.example.com' ]
                signature_algorithm:
                  description: 'Optional string to determine the signature algorithm to be used. Either `ECDSA` or `RSA`'
                  type: string
                  default: 'ECDSA'
      operationId: purchaseLetsencryptCertificate
      tags:
        - domain certificates
      responses:
        '201':
          description: Successfully created the certificate purchase order.
          content:
            application/json:
              schema:
                type: object
                required: [data]
                properties:
                  data:
                    $ref: '#/components/schemas/LetsencryptCertificatePurchase'
        '404':
          $ref: '#/components/responses/404'
      summary: "Let's Encrypt: Order a certificate"
  '/{account}/domains/{domain}/certificates/letsencrypt/{purchaseId}/issue':
    post:
      description: "Issues a [Let's Encrypt](https://dnsimple.com/letsencrypt) certificate ordered with DNSimple."
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Domain'
        - name: purchaseId
          in: path
          required: true
          description: The certificate purchase order id received by `purchaseLetsencryptCertificate`.
          schema:
            type: integer
      operationId: issueLetsencryptCertificate
      tags:
        - domain certificates
      responses:
        '202':
          description: Successfully requested the issuance of the certificate.
          content:
            application/json:
              schema:
                type: object
                required: [data]
                properties:
                  data:
                    $ref: '#/components/schemas/Certificate'
        '404':
          $ref: '#/components/responses/404'
      summary: "Let's Encrypt: Issue a certificate"
  '/{account}/domains/{domain}/certificates/letsencrypt/{certificate}/renewals':
    post:
      description: "Renews a [Let's Encrypt](https://dnsimple.com/letsencrypt) certificate ordered with DNSimple."
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Domain'
        - $ref: '#/components/parameters/Certificate'
      operationId: purchaseRenewalLetsencryptCertificate
      tags:
        - domain certificates
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                auto_renew:
                  description: 'Enable the auto-renewal of the certificate'
                  type: boolean
                  default: false
                signature_algorithm:
                  description: 'Optional string to determine the signature algorithm to be used. Either `ECDSA` or `RSA`'
                  type: string
                  default: 'ECDSA'
      responses:
        '201':
          description: Successfully created the certificate renewal order.
          content:
            application/json:
              schema:
                type: object
                required: [data]
                properties:
                  data:
                    $ref: '#/components/schemas/LetsencryptCertificateRenewal'
        '404':
          $ref: '#/components/responses/404'
      summary: "Let's Encrypt: Order a certificate renewal"
  '/{account}/domains/{domain}/certificates/letsencrypt/{certificate}/renewals/{renewalId}/issue':
    post:
      description: "Issues a [Let's Encrypt](https://dnsimple.com/letsencrypt) certificate renewal ordered with DNSimple."
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Domain'
        - $ref: '#/components/parameters/Certificate'
        - name: renewalId
          in: path
          required: true
          description: The certificate renewal order id received by `purchaseRenewalLetsencryptCertificate`.
          schema:
            type: integer
      operationId: issueRenewalLetsencryptCertificate
      tags:
        - domain certificates
      responses:
        '202':
          description: Successfully requested the issuance of the certificate renewal.
          content:
            application/json:
              schema:
                type: object
                required: [data]
                properties:
                  data:
                    $ref: '#/components/schemas/Certificate'
        '404':
          $ref: '#/components/responses/404'
      summary: "Let's Encrypt: Issue a certificate renewal"
  /tlds:
    get:
      description: Lists TLDs supported for registration or transfer.
      parameters:
        - $ref: '#/components/parameters/SortTLDs'
      operationId: listTlds
      tags:
        - tlds
      responses:
        '200':
          description: Successfully retrieved the TLDs.
          content:
            application/json:
              schema:
                type: object
                required: [data, pagination]
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/TLD'
                  pagination:
                    $ref: '#/components/schemas/Pagination'
      summary: List TLDs
  '/tlds/{tld}':
    get:
      description: Retrieves the details of a TLD.
      parameters:
        - $ref: '#/components/parameters/TLD'
      operationId: getTld
      tags:
        - tlds
      responses:
        '200':
          description: Successfully retrieved the TLD details.
          content:
            application/json:
              schema:
                type: object
                required: [data]
                properties:
                  data:
                    $ref: '#/components/schemas/TLD'
        '404':
          $ref: '#/components/responses/404'
      summary: Retrieve the TLD
  '/tlds/{tld}/extended_attributes':
    get:
      description: |-
        Lists a TLD extended attributes.

        Some TLDs require extended attributes when registering or transferring a domain. This API interface provides information on the extended attributes for any particular TLD. Extended attributes are extra TLD-specific attributes, required by the TLD registry to collect extra information about the registrant or legal agreements.
      parameters:
        - $ref: '#/components/parameters/TLD'
      operationId: getTldExtendedAttributes
      tags:
        - tlds
      responses:
        '200':
          description: Successfully retrieved the extended attributes for the TLD.
          content:
            application/json:
              schema:
                type: object
                required: [data]
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/ExtendedAttribute'
        '404':
          $ref: '#/components/responses/404'
      summary: List TLD extended attributes
  '/{account}/registrar/domains/{domain}/check':
    get:
      description: Checks a domain name for availability.
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Domain'
      operationId: checkDomain
      tags:
        - registrar
      responses:
        '200':
          description: 'The check was successfully executed. Check the result data to determine if it is available for registration. If the domain is premium, please check the premium price before trying to register, renew, transfer.'
          content:
            application/json:
              schema:
                type: object
                required: [data]
                properties:
                  data:
                    $ref: '#/components/schemas/DomainCheckResult'
      summary: Check domain
  '/{account}/registrar/domains/{domain}/prices':
    get:
      description: Retrieve domain prices.
      summary: Get prices for a domain
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Domain'
      operationId: getDomainPrices
      tags:
        - registrar
      responses:
        '200':
          description: Successfully retrieved the domain pricing data
          content:
            application/json:
              schema:
                type: object
                required: [data]
                properties:
                  data:
                    $ref: '#/components/schemas/DomainPrices'
        '400':
          $ref: '#/components/responses/400'
  '/{account}/registrar/domains/{domain}/registrations':
    post:
      description: |-
        Registers a domain name.

        Your account must be active for this command to complete successfully. You will be automatically charged the registration fee upon successful registration, so please be careful with this command.

        When registering a domain using Solo or Teams subscription, the DNS services
        for the zone will be automatically enabled and this will be charged on your
        following subscription renewal invoices.
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Domain'
      operationId: registerDomain
      tags:
        - registrar
      requestBody:
        $ref: '#/components/requestBodies/DomainRegister'
      responses:
        '201':
          description: Domain successfully registered
          content:
            application/json:
              schema:
                type: object
                required: [data]
                properties:
                  data:
                    $ref: '#/components/schemas/DomainRegistration'
        '400':
          $ref: '#/components/responses/400'
      summary: Register a domain
  '/{account}/registrar/domains/{domain}/registrations/{domainregistration}':
    get:
      description: Retrieves the details of an existing domain registration.
      summary: Retrieve a domain registration
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Domain'
        - $ref: '#/components/parameters/DomainRegistration'
      operationId: getDomainRegistration
      tags:
        - registrar registration
      responses:
        '200':
          description: Domain registration details.
          content:
            application/json:
              schema:
                type: object
                required: [data]
                properties:
                  data:
                    $ref: '#/components/schemas/DomainRegistration'
        '404':
          $ref: '#/components/responses/404'
  '/{account}/registrar/domains/{domain}/transfers':
    post:
      description: |-
        Transfers a domain name from another registrar.

        Your account must be active for this command to complete successfully. You will be automatically charged the 1-year transfer fee upon successful transfer, so please be careful with this command. The transfer may take anywhere from a few minutes up to 7 days.

        When transfering a domain using Solo or Teams subscription, the DNS services
        for the zone will be automatically enabled and this will be charged on your
        following subscription renewal invoices.
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Domain'
      operationId: transferDomain
      tags:
        - registrar
      requestBody:
        $ref: '#/components/requestBodies/DomainTransfer'
      responses:
        '201':
          description: Domain transfer created.
          content:
            application/json:
              schema:
                type: object
                required: [data]
                properties:
                  data:
                    $ref: '#/components/schemas/DomainTransfer'
        '400':
          $ref: '#/components/responses/400'
      summary: Transfer a domain
  '/{account}/registrar/domains/{domain}/transfers/{domaintransfer}':
    get:
      description: Retrieves the details of an existing domain transfer.
      summary: Retrieve a domain transfer
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Domain'
        - $ref: '#/components/parameters/DomainTransfer'
      operationId: getDomainTransfer
      tags:
        - registrar transfer
      responses:
        '200':
          description: Domain transfer details.
          content:
            application/json:
              schema:
                type: object
                required: [data]
                properties:
                  data:
                    $ref: '#/components/schemas/DomainTransfer'
        '404':
          $ref: '#/components/responses/404'
    delete:
      description: Cancels an in progress domain transfer.
      summary: Cancel a domain transfer
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Domain'
        - $ref: '#/components/parameters/DomainTransfer'
      operationId: cancelDomainTransfer
      tags:
        - registrar transfer
      responses:
        '202':
          description: Domain transfer cancellation accepted and queued for processing.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/DomainTransfer'
        '404':
          $ref: '#/components/responses/404'
  '/{account}/registrar/domains/{domain}/renewals':
    post:
      description: |-
        Explicitly renews a domain, if the registry supports this function.

        Your account must be active for this command to complete successfully. You will be automatically charged the renewal fee upon successful renewal, so please be careful with this command.
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Domain'
      operationId: domainRenew
      tags:
        - registrar renewal
      requestBody:
        $ref: '#/components/requestBodies/DomainRenew'
      responses:
        '201':
          description: Domain renewal created
          content:
            application/json:
              schema:
                type: object
                required: [data]
                properties:
                  data:
                    $ref: '#/components/schemas/DomainRenewal'
        '400':
          $ref: '#/components/responses/400'
      summary: Renew a domain
  '/{account}/registrar/domains/{domain}/renewals/{domainrenewal}':
    get:
      description: Retrieves the details of an existing domain renewal.
      summary: Retrieve a domain renewal
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Domain'
        - $ref: '#/components/parameters/DomainRenewal'
      operationId: getDomainRenewal
      tags:
        - registrar renewal
      responses:
        '200':
          description: Domain renewal details.
          content:
            application/json:
              schema:
                type: object
                required: [data]
                properties:
                  data:
                    $ref: '#/components/schemas/DomainRenewal'
        '404':
          $ref: '#/components/responses/404'
  '/{account}/registrar/domains/{domain}/restores':
    post:
      description: |-
        Explicitly restores an domain that can not be renewed anymore, if the registry supports this function.

        Your account must be active for this command to complete successfully. You will be automatically charged the restore fee upon successful restore, so please be careful with this command.
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Domain'
      operationId: domainRestore
      tags:
        - registrar restore
      requestBody:
        $ref: '#/components/requestBodies/DomainRestore'
      responses:
        '201':
          description: Domain restore created
          content:
            application/json:
              schema:
                type: object
                required: [data]
                properties:
                  data:
                    $ref: '#/components/schemas/DomainRestore'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '404':
          $ref: '#/components/responses/404'
      summary: Restore a domain
  '/{account}/registrar/domains/{domain}/restores/{domainrestore}':
    get:
      description: Retrieves the details of an existing domain restore.
      summary: Retrieve a domain restore
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Domain'
        - $ref: '#/components/parameters/DomainRestore'
      operationId: getDomainRestore
      tags:
        - registrar restore
      responses:
        '200':
          description: Domain restore details.
          content:
            application/json:
              schema:
                type: object
                required: [data]
                properties:
                  data:
                    $ref: '#/components/schemas/DomainRestore'
        '401':
          $ref: '#/components/responses/401'
        '404':
          $ref: '#/components/responses/404'
  '/{account}/registrar/domains/{domain}/authorize_transfer_out':
    post:
      description: |-
        Prepares a domain for transferring out.

        This will unlock a domain and send the authorization code to the domain's administrative contact.
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Domain'
      operationId: authorizeDomainTransferOut
      tags:
        - registrar
      responses:
        '204':
          description: Domain prepared for transfer out.
        '400':
          $ref: '#/components/responses/400'
      summary: Authorize a domain transfer out
  '/{account}/registrar/domains/{domain}/delegation':
    get:
      description: Lists the name servers for the domain.
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Domain'
      operationId: getDomainDelegation
      tags:
        - registrar delegation
      responses:
        '200':
          description: Successfully retrieved the domain name servers.
          content:
            application/json:
              schema:
                type: object
                required: [data]
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/DomainNameServer'
        '404':
          $ref: '#/components/responses/404'
      summary: List domain name servers
    put:
      description: Changes the domain name servers.
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Domain'
      operationId: changeDomainDelegation
      tags:
        - registrar delegation
      requestBody:
        $ref: '#/components/requestBodies/DomainNameServers'
      responses:
        '200':
          description: Successfully updated the domain name servers.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/DomainNameServer'
        '400':
          $ref: '#/components/responses/400'
        '404':
          $ref: '#/components/responses/404'
      summary: Change domain name servers
  '/{account}/registrar/domains/{domain}/delegation/vanity':
    put:
      description: Delegate a domain to vanity name servers.
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Domain'
      operationId: changeDomainDelegationToVanity
      tags:
        - registrar delegation
      requestBody:
        $ref: '#/components/requestBodies/VanityNameServers'
      responses:
        '200':
          description: Successfully delegated to vanity name servers.
          content:
            application/json:
              schema:
                type: object
                required: [data]
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/NameServer'
        '400':
          $ref: '#/components/responses/400'
        '404':
          $ref: '#/components/responses/404'
        '412':
          $ref: '#/components/responses/412-feature'
      summary: Delegate to vanity name servers
    delete:
      description: De-delegate a domain from vanity name servers.
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Domain'
      operationId: changeDomainDelegationFromVanity
      tags:
        - registrar delegation
      responses:
        '204':
          description: Successfully de-delegated from vanity name servers.
        '400':
          $ref: '#/components/responses/400'
        '404':
          $ref: '#/components/responses/404'
        '412':
          $ref: '#/components/responses/412-feature'
      summary: De-delegate from vanity name servers
  '/{account}/registrar/domains/{domain}/transfer_lock':
    get:
      description: Gets the transfer lock status for a domain.
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Domain'
      operationId: getDomainTransferLock
      tags:
        - registrar transfer
      responses:
        '200':
          description: Successfully retrieved transfer lock details.
          content:
            application/json:
              schema:
                type: object
                required: [data]
                properties:
                  data:
                    $ref: '#/components/schemas/DomainTransferLock'
        '404':
          $ref: '#/components/responses/404'
      summary: Domain transfer lock status
    post:
      description: Locks the domain to prevent unauthorized transfers.
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Domain'
      operationId: enableDomainTransferLock
      tags:
        - registrar transfer
      responses:
        '201':
          description: Successfully locked the domain.
          content:
            application/json:
              schema:
                type: object
                required: [data]
                properties:
                  data:
                    $ref: '#/components/schemas/DomainTransferLock'
        '400':
          $ref: '#/components/responses/400'
        '404':
          $ref: '#/components/responses/404'
      summary: Enable domain transfer lock
    delete:
      description: Unlocks the domain to allow domain transfers.
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Domain'
      operationId: disableDomainTransferLock
      tags:
        - registrar transfer
      responses:
        '200':
          description: Successfully unlocked the domain.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/DomainTransferLock'
        '400':
          $ref: '#/components/responses/400'
        '404':
          $ref: '#/components/responses/404'
      summary: Disable domain transfer lock
  '/{account}/registrar/domains/{domain}/auto_renewal':
    put:
      description: Enables auto renewal for the domain.
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Domain'
      operationId: enableDomainAutoRenewal
      tags:
        - registrar renewal
      responses:
        '204':
          description: Successfully enabled auto-renewal.
        '400':
          $ref: '#/components/responses/400'
        '404':
          $ref: '#/components/responses/404'
      summary: Enable domain auto-renewal
    delete:
      description: Disables auto renewal for the domain.
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Domain'
      operationId: disableDomainAutoRenewal
      tags:
        - registrar renewal
      responses:
        '204':
          description: Successfully disabled auto-renewal.
        '400':
          $ref: '#/components/responses/400'
        '404':
          $ref: '#/components/responses/404'
      summary: Disable domain auto-renewal
  '/{account}/registrar/domains/{domain}/whois_privacy':
    put:
      description: |-
        Enables the WHOIS privacy for the domain.

        Note that if the WHOIS privacy is not purchased for the domain, enabling WHOIS privacy will cause the service to be purchased for a period of 1 year. If WHOIS privacy was previously purchased and disabled, then calling this will enable the WHOIS privacy.
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Domain'
      operationId: enableWhoisPrivacy
      tags:
        - registrar privacy
      responses:
        '200':
          description: Successfully enabled whois privacy.
          content:
            application/json:
              schema:
                type: object
                required: [data]
                properties:
                  data:
                    $ref: '#/components/schemas/WhoisPrivacy'
        '201':
          description: Successfully purchased and enabled whois privacy.
          content:
            application/json:
              schema:
                type: object
                required: [data]
                properties:
                  data:
                    $ref: '#/components/schemas/WhoisPrivacy'
        '404':
          $ref: '#/components/responses/404'
      summary: Enable WHOIS privacy
    delete:
      description: Disables the WHOIS privacy for the domain.
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Domain'
      operationId: disableWhoisPrivacy
      tags:
        - registrar privacy
      responses:
        '200':
          description: Successfully disabled whois privacy.
          content:
            application/json:
              schema:
                type: object
                required: [data]
                properties:
                  data:
                    $ref: '#/components/schemas/WhoisPrivacy'
        '404':
          $ref: '#/components/responses/404'
      summary: Disable WHOIS privacy
  '/{account}/secondary_dns/primaries':
    get:
      summary: List primary servers
      description: List the primary servers in the account.
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/SortPrimaryServers'
      operationId: listPrimaryServers
      tags:
        - secondary dns
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                required: [data, pagination]
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/PrimaryServer'
                  pagination:
                    $ref: '#/components/schemas/Pagination'
          description: Primary Server listing.
    post:
      summary: Create a primary server
      description: Creates a primary server into the account.
      parameters:
        - $ref: '#/components/parameters/Account'
      operationId: createPrimaryServer
      tags:
        - secondary dns
      requestBody:
        $ref: '#/components/requestBodies/PrimaryServerCreate'
      responses:
        '201':
          description: Primary Server created.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/PrimaryServer'
        '400':
          $ref: '#/components/responses/400'
  '/{account}/secondary_dns/primaries/{primaryserver}':
    get:
      description: Retrieves the details of an existing primary server.
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/PrimaryServer'
      operationId: getPrimaryServer
      tags:
        - secondary dns
      responses:
        '200':
          description: Primary Server retrieved.
          content:
            application/json:
              schema:
                type: object
                required: [data]
                properties:
                  data:
                    $ref: '#/components/schemas/PrimaryServer'
        '400':
          $ref: '#/components/responses/400'
        '404':
          $ref: '#/components/responses/404'
      summary: Retrieve a primary server
    delete:
      description: Permanently deletes a primary server.
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/PrimaryServer'
      operationId: removePrimaryServer
      tags:
        - secondary dns
      responses:
        '204':
          description: Successfully deleted primary server.
        '404':
          $ref: '#/components/responses/404'
      summary: Delete a primary server
  '/{account}/secondary_dns/primaries/{primaryserver}/link':
    put:
      description: Link the primary server to a secondary zone.
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/PrimaryServer'
      operationId: linkPrimaryServer
      tags:
        - secondary dns
      responses:
        '200':
          description: Primary Server linked.
          content:
            application/json:
              schema:
                type: object
                required: [data]
                properties:
                  data:
                    $ref: '#/components/schemas/PrimaryServer'
        '400':
          $ref: '#/components/responses/400'
        '404':
          $ref: '#/components/responses/404'
      summary: Link a primary server to a secondary zone

  '/{account}/secondary_dns/primaries/{primaryserver}/unlink':
    put:
      description: Unlink the primary server from a secondary zone.
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/PrimaryServer'
      operationId: unlinkPrimaryServer
      tags:
        - secondary dns
      responses:
        '200':
          description: Primary Server unlinked.
          content:
            application/json:
              schema:
                type: object
                required: [data]
                properties:
                  data:
                    $ref: '#/components/schemas/PrimaryServer'
        '400':
          $ref: '#/components/responses/400'
        '404':
          $ref: '#/components/responses/404'
      summary: Unlink a primary server from a secondary zone

  '/{account}/secondary_dns/zones':
    post:
      summary: Create a secondary zone
      description: |-
        Creates a secondary zone into the account.

        When creating a secondary zone using Solo or Teams subscription, the DNS
        services for the zone will be automatically enabled and this will be charged
        on your following subscription renewal invoices.
      parameters:
        - $ref: '#/components/parameters/Account'
      operationId: createSecondaryZone
      tags:
        - secondary dns
      requestBody:
        $ref: '#/components/requestBodies/SecondaryZoneCreate'
      responses:
        '201':
          description: Secondary Zone created.
          content:
            application/json:
              schema:
                type: object
                required: [data]
                properties:
                  data:
                    $ref: '#/components/schemas/Zone'
        '400':
          $ref: '#/components/responses/400'
  '/{account}/zones':
    get:
      description: Lists the zones in the account.
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/FilterNameLike'
        - $ref: '#/components/parameters/SortZones'
      operationId: listZones
      tags:
        - zones
      responses:
        '200':
          description: Successfully retrieved account zone list.
          content:
            application/json:
              schema:
                type: object
                required: [data, pagination]
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Zone'
                  pagination:
                    $ref: '#/components/schemas/Pagination'
      summary: List zones
  '/{account}/zones/{zone}':
    get:
      description: Retrieves the details of an existing zone.
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Zone'
      operationId: getZone
      tags:
        - zones
      responses:
        '200':
          description: Successfully retrieved zone.
          content:
            application/json:
              schema:
                type: object
                required: [data]
                properties:
                  data:
                    $ref: '#/components/schemas/Zone'
        '404':
          $ref: '#/components/responses/404'
      summary: Retrieve a zone
  '/{account}/zones/{zone}/file':
    get:
      description: Download the zonefile for an existing zone.
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Zone'
      operationId: getZoneFile
      tags:
        - zones
      responses:
        '200':
          description: Successfully retrieved zone file.
          content:
            application/json:
              schema:
                type: object
                required: [data]
                properties:
                  data:
                    $ref: '#/components/schemas/ZoneFile'
        '404':
          $ref: '#/components/responses/404'
      summary: Download a zone file
  '/{account}/zones/{zone}/distribution':
    get:
      description: Checks if a zone is fully distributed to all our name servers across the globe.
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Zone'
      operationId: checkZoneDistribution
      tags:
        - zones
      responses:
        '200':
          description: Successfully checked zone distribution.
          content:
            application/json:
              schema:
                type: object
                required: [data]
                properties:
                  data:
                    $ref: '#/components/schemas/ZoneDistribution'
        '404':
          $ref: '#/components/responses/404'
        '504':
          description: The server failed to perform the check.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      summary: Check zone distribution
  '/{account}/zones/{zone}/ns_records':
    put:
      description: Updates the zone's NS records
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Zone'
      requestBody:
        $ref: '#/components/requestBodies/ZoneNsRecordsUpdate'
      operationId: updateZoneNsRecords
      tags:
        - zones
      responses:
        '200':
          description: Successfully updated the zone name servers.
          content:
            application/json:
              schema:
                type: object
                required: [data]
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/ZoneRecord'
        '404':
          $ref: '#/components/responses/404'
      summary: Update a zone's NS records
  '/{account}/zones/{zone}/records':
    get:
      description: Lists the records for a zone.
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Zone'
        - $ref: '#/components/parameters/FilterNameLike'
        - $ref: '#/components/parameters/FilterName'
        - $ref: '#/components/parameters/FilterType'
        - $ref: '#/components/parameters/SortZoneRecords'
      operationId: listZoneRecords
      tags:
        - zones
      responses:
        '200':
          description: Successfully retrieved zone records list.
          content:
            application/json:
              schema:
                type: object
                required: [data, pagination]
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/ZoneRecord'
                  pagination:
                    $ref: '#/components/schemas/Pagination'
      summary: List zone records
    post:
      description: Creates a new zone record.
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Zone'
      operationId: createZoneRecord
      tags:
        - zones
      requestBody:
        $ref: '#/components/requestBodies/ZoneRecordCreate'
      responses:
        '201':
          description: Successfully created zone record.
          content:
            application/json:
              schema:
                type: object
                required: [data]
                properties:
                  data:
                    $ref: '#/components/schemas/ZoneRecord'
        '400':
          $ref: '#/components/responses/400'
        '404':
          $ref: '#/components/responses/404'
      summary: Create a zone record
  '/{account}/zones/{zone}/records/{zonerecord}':
    get:
      description: Retrieves the details of an existing zone record.
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Zone'
        - $ref: '#/components/parameters/ZoneRecord'
      operationId: getZoneRecord
      tags:
        - zones
      responses:
        '200':
          description: Successfully get zone record.
          content:
            application/json:
              schema:
                type: object
                required: [data]
                properties:
                  data:
                    $ref: '#/components/schemas/ZoneRecord'
        '404':
          $ref: '#/components/responses/404'
      summary: Retrieve a zone record
    patch:
      description: Updates the zone record details.
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Zone'
        - $ref: '#/components/parameters/ZoneRecord'
      operationId: updateZoneRecord
      tags:
        - zones
      requestBody:
        $ref: '#/components/requestBodies/ZoneRecordUpdate'
      responses:
        '200':
          description: Successfully updated zone record.
          content:
            application/json:
              schema:
                type: object
                required: [data]
                properties:
                  data:
                    $ref: '#/components/schemas/ZoneRecord'
        '400':
          $ref: '#/components/responses/400'
        '404':
          $ref: '#/components/responses/404'
      summary: Update a zone record
    delete:
      description: Permanently deletes a zone record.
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Zone'
        - $ref: '#/components/parameters/ZoneRecord'
      operationId: deleteZoneRecord
      tags:
        - zones
      responses:
        '204':
          description: Successfully deleted zone record.
        '404':
          $ref: '#/components/responses/404'
      summary: Delete a zone record
  '/{account}/zones/{zone}/batch':
    post:
      description: |-
        Performs multiple record operations (create, update and/or delete) for a zone in a single request for atomicity and efficiency.
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Zone'
      operationId: batchChangeZoneRecords
      tags:
        - zones
      requestBody:
        $ref: '#/components/requestBodies/BatchChangeZoneRecords'
      responses:
        '200':
          description: Successfully processed batched zone record changes.
          content:
            application/json:
              schema:
                type: object
                required: [data]
                properties:
                  data:
                    $ref: '#/components/schemas/BatchChangeZoneRecordsResponse'
        '400':
          description: Invalid batch change zone records request error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchChangeZoneRecordsInvalidRequestError'
        '404':
          $ref: '#/components/responses/404'
      summary: Batch create, update, and/or delete records in a zone
  '/{account}/zones/{zone}/records/{zonerecord}/distribution':
    get:
      description: Checks if a zone record is fully distributed to all our name servers across the globe.
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Zone'
        - $ref: '#/components/parameters/ZoneRecord'
      operationId: checkZoneRecordDistribution
      tags:
        - zones
      responses:
        '200':
          description: Successfully checked zone record distribution.
          content:
            application/json:
              schema:
                type: object
                required: [data]
                properties:
                  data:
                    $ref: '#/components/schemas/ZoneDistribution'
        '404':
          $ref: '#/components/responses/404'
        '504':
          description: The server failed to perform the check.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      summary: Check zone record distribution
  '/{account}/zones/{zone}/activation':
    put:
      description: |-
        Activate DNS services for the zone.

        Under Solo and Teams plans, active zones are charged when renewing your subscription to
        DNSimple
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Zone'
      operationId: activateZoneService
      tags:
        - zones
      responses:
        '200':
          description: Successful activation of DNS services on the zone.
          content:
            application/json:
              schema:
                type: object
                required: [data]
                properties:
                  data:
                    $ref: '#/components/schemas/Zone'
        '404':
          $ref: '#/components/responses/404'
      summary: Activate a zone DNS service
    delete:
      description: |-
        Deactivates DNS services for the zone.

        Under Solo and Teams plans, active zones are charged when renewing your subscription to
        DNSimple
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Zone'
      operationId: deactivateZoneService
      tags:
        - zones
      responses:
        '200':
          description: Successfully deactivate DNS services on the zone.
          content:
            application/json:
              schema:
                type: object
                required: [data]
                properties:
                  data:
                    $ref: '#/components/schemas/Zone'
        '404':
          $ref: '#/components/responses/404'
      summary: Deactivate a zone DNS service
  '/{account}/contacts':
    get:
      description: List contacts in the account.
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/SortContacts'
      operationId: listContacts
      tags:
        - contacts
      responses:
        '200':
          description: Successfully retrieved account contact list.
          content:
            application/json:
              schema:
                type: object
                required: [data, pagination]
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Contact'
                  pagination:
                    $ref: '#/components/schemas/Pagination'
      summary: List contacts
    post:
      description: Creates a contact.
      parameters:
        - $ref: '#/components/parameters/Account'
      operationId: createContact
      tags:
        - contacts
      requestBody:
        $ref: '#/components/requestBodies/ContactCreate'
      responses:
        '201':
          description: Successfully created contact.
          content:
            application/json:
              schema:
                type: object
                required: [data]
                properties:
                  data:
                    $ref: '#/components/schemas/Contact'
        '400':
          $ref: '#/components/responses/400'
      summary: Create a contact
  '/{account}/contacts/{contact}':
    get:
      description: Retrieves the details of an existing contact.
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Contact'
      operationId: getContact
      tags:
        - contacts
      responses:
        '200':
          description: Successfully retrieved the contact.
          content:
            application/json:
              schema:
                type: object
                required: [data]
                properties:
                  data:
                    $ref: '#/components/schemas/Contact'
        '404':
          $ref: '#/components/responses/404'
      summary: Retrieve a contact
    patch:
      description: Updates the contact details.
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Contact'
      operationId: updateContact
      tags:
        - contacts
      requestBody:
        $ref: '#/components/requestBodies/ContactUpdate'
      responses:
        '200':
          description: Successfully updated contact.
          content:
            application/json:
              schema:
                type: object
                required: [data]
                properties:
                  data:
                    $ref: '#/components/schemas/Contact'
        '400':
          $ref: '#/components/responses/400'
        '404':
          $ref: '#/components/responses/404'
      summary: Update a contact
    delete:
      description: Permanently deletes a contact from the account.
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Contact'
      operationId: deleteContact
      tags:
        - contacts
      responses:
        '204':
          description: Successfully deleted contact.
        '404':
          $ref: '#/components/responses/404'
      summary: Delete a contact
  '/{account}/registrar/registrant_changes':
    get:
      description: List registrant changes in the account.
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/SortRegistrantChanges'
        - $ref: '#/components/parameters/FilterRegistrantChangeState'
        - $ref: '#/components/parameters/FilterDomainId'
        - $ref: '#/components/parameters/FilterContactId'
      operationId: listRegistrantChanges
      tags:
        - registrant changes
      responses:
        '200':
          description: Successfully retrieved registrant change list.
          content:
            application/json:
              schema:
                type: object
                required: [data, pagination]
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/RegistrantChange'
                  pagination:
                    $ref: '#/components/schemas/Pagination'
        '400':
          $ref: '#/components/responses/400'
      summary: List registrant changes
    post:
      description: Start registrant change.
      parameters:
        - $ref: '#/components/parameters/Account'
      operationId: createRegistrantChange
      tags:
        - registrant changes
      requestBody:
        $ref: '#/components/requestBodies/RegistrantChangeCreate'
      responses:
        '201':
          description: Successfully changed the contact.
          content:
            application/json:
              schema:
                type: object
                required: [data]
                properties:
                  data:
                    $ref: '#/components/schemas/RegistrantChange'
        '202':
          description: The contact change has started and pending completion.
          content:
            application/json:
              schema:
                type: object
                required: [data]
                properties:
                  data:
                    $ref: '#/components/schemas/RegistrantChange'
        '400':
          $ref: '#/components/responses/400'
      summary: Start registrant change
  '/{account}/registrar/registrant_changes/check':
    post:
      description: Retrieves the requirements of a registrant change.
      parameters:
        - $ref: '#/components/parameters/Account'
      operationId: checkRegistrantChange
      tags:
        - registrant changes
      requestBody:
        $ref: '#/components/requestBodies/RegistrantChangeCheck'
      responses:
        '200':
          description: Successfully returned the registrant change requirements.
          content:
            application/json:
              schema:
                type: object
                required: [data]
                properties:
                  data:
                    $ref: '#/components/schemas/RegistrantChangeCheck'
        '400':
          $ref: '#/components/responses/400'
      summary: Check registrant change requirements
  '/{account}/registrar/registrant_changes/{registrantchange}':
    get:
      description: Retrieves the details of an existing registrant change.
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/RegistrantChange'
      operationId: getRegistrantChange
      tags:
        - registrant changes
      responses:
        '200':
          description: Successfully retrieved the registrant change.
          content:
            application/json:
              schema:
                type: object
                required: [data]
                properties:
                  data:
                    $ref: '#/components/schemas/RegistrantChange'
        '404':
          $ref: '#/components/responses/404'
      summary: Retrieve a registrant change
    delete:
      description: Cancel an ongoing registrant change from the account.
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/RegistrantChange'
      operationId: deleteRegistrantChange
      tags:
        - registrant changes
      responses:
        '204':
          description: Successfully cancelled registrant change.
        '202':
          description: The registrant change is cancelling.
          content:
            application/json:
              schema:
                type: object
                required: [data]
                properties:
                  data:
                    $ref: '#/components/schemas/RegistrantChange'
        '400':
          $ref: '#/components/responses/400'
        '404':
          $ref: '#/components/responses/404'
      summary: Cancel a registrant change
  /services:
    get:
      description: List all available one-click services.
      parameters:
        - $ref: '#/components/parameters/SortServices'
      operationId: listServices
      tags:
        - domain services
      responses:
        '200':
          description: Successfully retrieved service list.
          content:
            application/json:
              schema:
                type: object
                required: [data, pagination]
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Service'
                  pagination:
                    $ref: '#/components/schemas/Pagination'
      summary: List services
  '/services/{service}':
    get:
      description: Retrieves the details of a one-click service.
      parameters:
        - $ref: '#/components/parameters/Service'
      operationId: getService
      tags:
        - domain services
      responses:
        '200':
          description: Successfully retrieved service.
          content:
            application/json:
              schema:
                type: object
                required: [data]
                properties:
                  data:
                    $ref: '#/components/schemas/Service'
        '404':
          $ref: '#/components/responses/404'
      summary: Retrieve a service
  '/{account}/domains/{domain}/services':
    get:
      description: List services applied to a domain.
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Domain'
      operationId: listDomainAppliedServices
      tags:
        - domain services
      responses:
        '200':
          description: Successfully retrieved list of applied services.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Service'
                  pagination:
                    $ref: '#/components/schemas/Pagination'
        '404':
          $ref: '#/components/responses/404'
      summary: List applied services
  '/{account}/domains/{domain}/services/{service}':
    post:
      description: Applies a service to a domain.
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Domain'
        - $ref: '#/components/parameters/Service'
      operationId: applyServiceToDomain
      tags:
        - domain services
      requestBody:
        $ref: '#/components/requestBodies/ServiceApply'
      responses:
        '204':
          description: Successfully applied a service to a domain.
        '400':
          $ref: '#/components/responses/400'
        '404':
          $ref: '#/components/responses/404'
      summary: Apply a service
    delete:
      description: Unapplies a service from a domain.
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Domain'
        - $ref: '#/components/parameters/Service'
      operationId: unapplyServiceFromDomain
      tags:
        - domain services
      responses:
        '204':
          description: Successfully unapplied a service to a domain.
        '400':
          $ref: '#/components/responses/400'
        '404':
          $ref: '#/components/responses/404'
      summary: Unapply a service
  '/{account}/templates':
    get:
      description: Lists the templates in the account.
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/SortTemplates'
      operationId: listTemplates
      tags:
        - templates
      responses:
        '200':
          description: Successfully retrieved account template list.
          content:
            application/json:
              schema:
                type: object
                required: [data, pagination]
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Template'
                  pagination:
                    $ref: '#/components/schemas/Pagination'
      summary: List templates
    post:
      description: Creates a template.
      parameters:
        - $ref: '#/components/parameters/Account'
      operationId: createTemplate
      tags:
        - templates
      requestBody:
        $ref: '#/components/requestBodies/TemplateCreate'
      responses:
        '201':
          description: Successfully created a template.
          content:
            application/json:
              schema:
                type: object
                required: [data]
                properties:
                  data:
                    $ref: '#/components/schemas/Template'
        '400':
          $ref: '#/components/responses/400'
      summary: Create a template
  '/{account}/templates/{template}':
    get:
      description: Retrieves the details of an existing template.
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Template'
      operationId: getTemplate
      tags:
        - templates
      responses:
        '200':
          description: Successfully retrieved a template.
          content:
            application/json:
              schema:
                type: object
                required: [data]
                properties:
                  data:
                    $ref: '#/components/schemas/Template'
        '404':
          $ref: '#/components/responses/404'
      summary: Retrieve a template
    patch:
      description: Updates the template details.
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Template'
      operationId: updateTemplate
      tags:
        - templates
      requestBody:
        $ref: '#/components/requestBodies/TemplateUpdate'
      responses:
        '200':
          description: Successfully updated a template.
          content:
            application/json:
              schema:
                type: object
                required: [data]
                properties:
                  data:
                    $ref: '#/components/schemas/Template'
        '404':
          $ref: '#/components/responses/404'
      summary: Update a template
    delete:
      description: Permanently deletes a template.
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Template'
      operationId: deleteTemplate
      tags:
        - templates
      responses:
        '204':
          description: Successfully deleted a template
      summary: Delete a template
  '/{account}/templates/{template}/records':
    get:
      description: Lists the records for a template.
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Template'
        - $ref: '#/components/parameters/SortTemplateRecords'
      operationId: listTemplateRecords
      tags:
        - templates
      responses:
        '200':
          description: Successfully retrieved the template records list.
          content:
            application/json:
              schema:
                type: object
                required: [data]
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/TemplateRecord'
                  pagination:
                    $ref: '#/components/schemas/Pagination'
      summary: List template records
    post:
      description: Creates a new template record.
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Template'
      operationId: createTemplateRecord
      tags:
        - templates
      requestBody:
        $ref: '#/components/requestBodies/TemplateRecordCreateOrUpdate'
      responses:
        '201':
          description: Successfully create a template record.
          content:
            application/json:
              schema:
                type: object
                required: [data]
                properties:
                  data:
                    $ref: '#/components/schemas/TemplateRecord'
      summary: Create a template record
  '/{account}/templates/{template}/records/{templaterecord}':
    get:
      description: Retrieves the details of an existing template record.
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Template'
        - $ref: '#/components/parameters/TemplateRecord'
      operationId: getTemplateRecord
      tags:
        - templates
      responses:
        '200':
          description: Successfully retrieved a template record.
          content:
            application/json:
              schema:
                type: object
                required: [data]
                properties:
                  data:
                    $ref: '#/components/schemas/TemplateRecord'
        '404':
          $ref: '#/components/responses/404'
      summary: Retrieve a template record
    delete:
      description: Permanently deletes a template record.
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Template'
        - $ref: '#/components/parameters/TemplateRecord'
      operationId: deleteTemplateRecord
      tags:
        - templates
      responses:
        '204':
          description: Successfully deleted a template record.
        '404':
          $ref: '#/components/responses/404'
      summary: Delete a template record
  '/{account}/domains/{domain}/templates/{template}':
    post:
      description: Applies a template to a domain.
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Domain'
        - $ref: '#/components/parameters/Template'
      operationId: applyTemplateToDomain
      tags:
        - templates
      responses:
        '204':
          description: Successfully applied a template to the domain.
        '404':
          $ref: '#/components/responses/404'
      summary: Apply a template
  '/{account}/vanity/{domain}':
    put:
      description: |-
        Enables Vanity Name Servers for the domain.

        This method sets up the appropriate A and AAAA records for the domain to provide vanity name servers, but it does not change the delegation for the domain. To change the delegation for domains to vanity name servers use the endpoints to Delegate to Vanity Name Servers or Dedelegate from Vanity Name Servers.
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Domain'
      operationId: enableVanityNameServers
      tags:
        - vanity name servers
      responses:
        '200':
          description: Successfully enabled vanity name servers on the domain.
          content:
            application/json:
              schema:
                type: object
                required: [data]
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/VanityNameServer'
        '400':
          $ref: '#/components/responses/400'
        '404':
          $ref: '#/components/responses/404'
      summary: Enable vanity name servers
    delete:
      description: |-
        Disables Vanity Name Servers for the domain.

        This method removes the A and AAAA records required for the domain to provide vanity name servers, but it does not change the delegation for the domain. To change the delegation for domains to vanity name servers use the endpoints to Delegate to Vanity Name Servers or Dedelegate from Vanity Name Servers.
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Domain'
      operationId: disableVanityNameServers
      tags:
        - vanity name servers
      responses:
        '204':
          description: Successfully disabled vanity name servers on the domain.
        '400':
          $ref: '#/components/responses/400'
        '404':
          $ref: '#/components/responses/404'
      summary: Disable vanity name servers
  '/{account}/webhooks':
    get:
      description: List the webhooks in the account.
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/SortWebhooks'
      operationId: listWebhooks
      tags:
        - webhooks
      responses:
        '200':
          description: Successfully retrieved account webhooks list.
          content:
            application/json:
              schema:
                type: object
                required: [data]
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Webhook'
      summary: List webhooks
    post:
      description: Registers a webhook endpoint.
      parameters:
        - $ref: '#/components/parameters/Account'
      operationId: createWebhook
      tags:
        - webhooks
      responses:
        '201':
          description: Successfully created a webhook.
          content:
            application/json:
              schema:
                type: object
                required: [data]
                properties:
                  data:
                    $ref: '#/components/schemas/Webhook'
        '400':
          $ref: '#/components/responses/400'
      callbacks:
        webhook:
          '{$request.body#/url}':
            post:
              operationId: receiveWebhook
              summary: Receive webhook notification
              requestBody:
                required: true
                description: Webhook payload
                content:
                  application/json:
                    schema:
                      $ref: '#/components/schemas/WebhookPayload'
              responses:
                '200':
                  description: Webhook successfully processed
      summary: Create a webhook
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required: [url]
              properties:
                url:
                  type: string
                  format: uri
  '/{account}/webhooks/{webhook}':
    get:
      description: Retrieves the details of a registered webhook.
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Webhook'
      operationId: getWebhook
      tags:
        - webhooks
      responses:
        '200':
          description: Successfully retrieved a webhook.
          content:
            application/json:
              schema:
                type: object
                required: [data]
                properties:
                  data:
                    $ref: '#/components/schemas/Webhook'
      summary: Retrieve a webhook
    delete:
      description: De-registers a webhook endpoint.
      parameters:
        - $ref: '#/components/parameters/Account'
        - $ref: '#/components/parameters/Webhook'
      operationId: deleteWebhook
      tags:
        - webhooks
      responses:
        '204':
          description: Successfully deleted a webhook.
      summary: Delete a webhook
  '/{account}/dns_analytics':
    get:
      description:
        Queries and returns DNS Analytics data available for the provided query parameters.
        This API is currently in Public Beta. During the Public Beta period, changes may occur at any time.
      parameters:
        - $ref: '#/components/parameters/Account'
        - name: start_date
          description:
            Only include results after the given date. Format is ISO8601 (YYYY-MM-DD).
            It can be a max of 31 days away from the end_date.
            If omitted, it defaults to 31 days ago.
          style: form
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/Date'
        - name: end_date
          description:
            Only include results before the given date. Format is ISO8601 (YYYY-MM-DD).
            It can be a max of 31 days away from the start_date.
            If omitted, it defaults to 1 day ago.
          style: form
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/Date'
        - name: groupings
          description:
            How to group the results of the account's DNS analytics.
            No groupings will be applied by default unless specified.
            Multiple groupings can be provided, separated by a comma.
            Applying groupings to the query will add columns to the response payload.
          style: form
          in: query
          required: false
          schema:
            type: string
            enum:
              - 'date'
              - 'volume'
              - 'zone_name'
        - $ref: '#/components/parameters/SortDNSAnalytics'
        - $ref: '#/components/parameters/PaginationPage'
        - $ref: '#/components/parameters/PaginationPerPage'
      responses:
        '200':
          description: Successfully retrieved DNS analytics data.
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                  - query
                  - pagination
                properties:
                  data:
                    type: object
                    required:
                      - rows
                      - headers
                    properties:
                      rows:
                        type: array
                        items:
                          anyOf:
                            - type: integer
                            - type: string
                            - $ref: '#/components/schemas/Date'
                          example: ["example.com", "2024-08-01", 102985]
                      headers:
                        type: array
                        items:
                          type: string
                          example: "zone_name,volume"
                  query:
                    type: object
                    required:
                      - account_id
                      - start_date
                      - end_date
                      - sort
                      - groupings
                      - page
                      - per_page
                    properties:
                      account_id:
                        type: integer
                      start_date:
                        $ref: '#/components/schemas/NullableDate'
                      end_date:
                        $ref: '#/components/schemas/NullableDate'
                      sort:
                        type: string
                        description: Sorting applied to the returned data.
                        example: "date:asc,zone_name:asc"
                      groupings:
                        type: ["string", "null"]
                        description: Grouping applied to the returned data.
                        example: "date,zone_name"
                      page:
                        type: integer
                        description: The returned page number.
                        example: 1
                      per_page:
                        type: integer
                        description: The page size used to generate the data.
                        example: 1000
                  pagination:
                    $ref: '#/components/schemas/Pagination'
      operationId: queryDnsAnalytics
      tags:
        - billing
        - zones
      summary: Analytics about DNS queries
components:
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
    bearerAuth:
      type: http
      scheme: bearer
  parameters:
    Account:
      name: account
      in: path
      required: true
      description: The account id
      schema:
        type: integer
    Certificate:
      name: certificate
      in: path
      required: true
      description: The certificate id
      schema:
        type: integer
    Contact:
      name: contact
      in: path
      required: true
      description: The contact id
      schema:
        type: integer
    DelegationSigner:
      name: ds
      in: path
      required: true
      description: The delegation signer record id
      schema:
        type: integer
    Domain:
      name: domain
      in: path
      required: true
      description: The domain name or id
      schema:
        type: string
    DomainRegistration:
      name: domainregistration
      in: path
      required: true
      description: The domain registration id
      schema:
        type: integer
    DomainRenewal:
      name: domainrenewal
      in: path
      required: true
      description: The domain renewal id
      schema:
        type: integer
    DomainRestore:
      name: domainrestore
      in: path
      required: true
      description: The domain restore id
      schema:
        type: integer
    DomainTransfer:
      name: domaintransfer
      in: path
      required: true
      description: The domain transfer id
      schema:
        type: integer
    EmailForward:
      name: emailforward
      in: path
      required: true
      description: The email forward id
      schema:
        type: integer
    PrimaryServer:
      name: primaryserver
      in: path
      required: true
      description: The primary server id
      schema:
        type: integer
    Push:
      name: push
      in: path
      required: true
      description: The push id
      schema:
        type: integer
    RegistrantChange:
      name: registrantchange
      in: path
      required: true
      description: The registrant change id
      schema:
        type: integer
    Service:
      name: service
      in: path
      required: true
      description: The service sid or id
      schema:
        type: string
    Template:
      name: template
      in: path
      required: true
      description: The template id or short name
      schema:
        type: string
    TemplateRecord:
      name: templaterecord
      in: path
      required: true
      description: The template record id
      schema:
        type: integer
    TLD:
      name: tld
      in: path
      required: true
      description: The TLD string
      schema:
        type: string
    Webhook:
      name: webhook
      in: path
      required: true
      description: The webhoook id
      schema:
        type: integer
    Zone:
      name: zone
      in: path
      required: true
      description: The zone name
      schema:
        type: string
    ZoneRecord:
      name: zonerecord
      in: path
      required: true
      description: The zone record id
      schema:
        type: integer
    FilterName:
      name: name
      in: query
      required: false
      description: Only include results with a name field exactly matching the given string
      schema:
        type: string
    FilterNameLike:
      name: name_like
      in: query
      required: false
      description: Only include results with a name field containing the given string
      schema:
        type: string
    FilterRegistrantId:
      name: registrant_id
      in: query
      required: false
      description: Only include results with the registrant_id field matching the given value
      schema:
        type: integer
    FilterStartDate:
      name: start_date
      in: query
      required: false
      description: Only include results after the given date. Format is ISO8601 (YYYY-MM-DD).
      schema:
        $ref: '#/components/schemas/Date'
    FilterEndDate:
      name: end_date
      in: query
      required: false
      description: Only include results before the given date. Format is ISO8601 (YYYY-MM-DD).
      schema:
        $ref: '#/components/schemas/Date'
    FilterType:
      name: type
      in: query
      required: false
      description: Only include results with a type field exactly matching the given string
      schema:
        type: string
    FilterRegistrantChangeState:
      name: state
      in: query
      required: false
      description: Only include results with a state field exactly matching the given string
      schema:
        type: string
        enum:
          - 'new'
          - 'pending'
          - 'completed'
          - 'cancelling'
          - 'cancelled'
    FilterDomainId:
      name: domain_id
      in: query
      required: false
      description: Only include results with a domain_id field exactly matching the given string
      schema:
        type: string
    FilterContactId:
      name: contact_id
      in: query
      required: false
      description: Only include results with a contact_id field exactly matching the given string
      schema:
        type: string
    PaginationPage:
      description: The page of the results requested. Defaults to 1.
      name: page
      style: form
      in: query
      required: false
      schema:
        type: integer
    PaginationPerPage:
      description:
        The amount of rows to return in each page.
        The default is usually 100.
        There are endpoints that override this default to accommodate specific use cases.
      name: per_page
      style: form
      in: query
      required: false
      schema:
        type: integer
    SortCertificates:
      description: Sort results. Default sorting is by id.
      name: sort
      style: form
      in: query
      required: false
      schema:
        type: string
        enum:
          - 'id:asc'
          - 'id:desc'
          - 'common_name:asc'
          - 'common_name:desc'
          - 'expiration:asc'
          - 'expiration:desc'
    SortCharges:
      description: Sort results. Default sorting is by invoiced ascending.
      name: sort
      style: form
      in: query
      required: false
      schema:
        type: string
        enum:
          - 'invoiced:asc'
          - 'invoiced:desc'
    SortContacts:
      description: Sort results. Default sorting is by id ascending.
      name: sort
      style: form
      in: query
      required: false
      schema:
        type: string
        enum:
          - 'id:asc'
          - 'id:desc'
          - 'label:asc'
          - 'label:desc'
          - 'email:asc'
          - 'email:desc'
    SortDNSAnalytics:
      description: Sort results. Default sorting policy is by ascending date, then ascending zone_name.
      name: sort
      style: form
      in: query
      required: false
      schema:
        type: string
        example: 'volume:desc,zone_name:asc'
    SortDomains:
      description: Sort results. Default sorting is ascending by name.
      name: sort
      style: form
      in: query
      required: false
      schema:
        type: string
        enum:
          - 'id:asc'
          - 'id:desc'
          - 'name:asc'
          - 'name:desc'
          - 'expiration:asc'
          - 'expiration:desc'
    SortDelegationSignerRecords:
      description: Sort results. Default sorting is by id.
      name: sort
      style: form
      in: query
      required: false
      schema:
        type: string
        enum:
          - 'id:asc'
          - 'id:desc'
          - 'created_at:asc'
          - 'created_at:desc'
    SortEmailForwards:
      description: Sort results. Default sorting is by id.
      name: sort
      style: form
      in: query
      required: false
      schema:
        type: string
        enum:
          - 'id:asc'
          - 'id:desc'
          - 'alias_email:asc'
          - 'alias_email:desc'
          - 'destination_email:asc'
          - 'destination_email:desc'
    SortPrimaryServers:
      description: Sort results. Default sorting is ascending by id.
      name: sort
      style: form
      in: query
      required: false
      schema:
        type: string
        enum:
          - 'id:asc'
          - 'id:desc'
          - 'name:asc'
          - 'name:desc'
    SortRegistrantChanges:
      description: Sort results. Default sorting is by id.
      name: sort
      style: form
      in: query
      required: false
      schema:
        type: string
        enum:
          - 'id:asc'
          - 'id:desc'
    SortServices:
      description: Sort results. Default sorting is by id ascending.
      name: sort
      style: form
      in: query
      required: false
      schema:
        type: string
        enum:
          - 'id:asc'
          - 'id:desc'
          - 'sid:asc'
          - 'sid:desc'
    SortTemplates:
      description: Sort results. Default sorting is by id ascending.
      name: sort
      style: form
      in: query
      required: false
      schema:
        type: string
        enum:
          - 'id:asc'
          - 'id:desc'
          - 'name:asc'
          - 'name:desc'
          - 'sid:asc'
          - 'sid:desc'
    SortTemplateRecords:
      description: Sort results. Default sorting is by id ascending.
      name: sort
      style: form
      in: query
      required: false
      schema:
        type: string
        enum:
          - 'id:asc'
          - 'id:desc'
          - 'name:asc'
          - 'name:desc'
          - 'content:asc'
          - 'content:desc'
          - 'type:asc'
          - 'type:desc'
    SortTLDs:
      description: Sort results. Default sorting is by tld ascending.
      name: sort
      style: form
      in: query
      required: false
      schema:
        type: string
        enum:
          - 'tld:asc'
          - 'tld:desc'
    SortWebhooks:
      description: Sort results. Default sorting is by name ascending.
      name: sort
      style: form
      in: query
      required: false
      schema:
        type: string
        enum:
          - 'id:asc'
          - 'id:desc'
    SortZones:
      description: Sort results. Default sorting is by name ascending.
      name: sort
      style: form
      in: query
      required: false
      schema:
        type: string
        enum:
          - 'id:asc'
          - 'id:desc'
          - 'name:asc'
          - 'name:desc'
    SortZoneRecords:
      description: Sort results. Default sorting is by name ascending.
      name: sort
      style: form
      in: query
      required: false
      schema:
        type: string
        enum:
          - 'id:asc'
          - 'id:desc'
          - 'name:asc'
          - 'name:desc'
          - 'content:asc'
          - 'content:desc'
          - 'type:asc'
          - 'type:desc'
  schemas:
    Date:
      type: string
      format: date
      example: '2010-01-01'
      description: A date value formatted as ISO 8601.
    DateTime:
      type: string
      format: date-time
      example: '2010-01-01T01:00:00Z'
      description: A date-time value formatted as ISO 8601.
    DateTimeCreatedAt:
      type: string
      format: date-time
      example: '2010-01-01T01:00:00Z'
      description: A date-time value, representing when the entry was created, formatted as ISO 8601.
    DateTimeUpdatedAt:
      type: string
      format: date-time
      example: '2010-01-01T01:00:00Z'
      description: A date-time value, representing when the entry was last updated, formatted as ISO 8601.
    NullableDate:
      type: ["string", "null"]
      format: date
      description: 'A nullable date-time value. The value can be null, when present the value is formatted according to the ISO 8601 specification.'
    NullableDateTime:
      type: ["string", "null"]
      format: date-time
      description: 'A nullable date-time value. The value can be null, when present the value is formatted according to the ISO 8601 specification.'
    Error:
      type: object
      required: [message]
      properties:
        message:
          type: string
    Pagination:
      type: object
      required:
        - current_page
        - per_page
        - total_entries
        - total_pages
      properties:
        current_page:
          type: integer
        per_page:
          type: integer
        total_entries:
          type: integer
        total_pages:
          type: integer
      example:
        current_page: 1
        per_page: 30
        total_entries: 2
        total_pages: 1
    Account:
      type: object
      required:
        - id
        - email
        - plan_identifier
        - created_at
        - updated_at
      properties:
        id:
          type: integer
        email:
          type: string
        plan_identifier:
          type: string
        created_at:
          $ref: '#/components/schemas/DateTimeCreatedAt'
        updated_at:
          $ref: '#/components/schemas/DateTimeUpdatedAt'
      example:
        id: 1
        email: example-account@example.com
        plan_identifier: teams-v1-monthly
        created_at: '2015-09-18T23:04:37Z'
        updated_at: '2016-06-09T20:03:39Z'
    WebhookAccount:
      type: object
      required:
        - id
        - display
        - identifier
      properties:
        id:
          type: integer
        display:
          type: string
        identifier:
          type: string
      example:
        id: 1
        display: Personal
        identifier: example@example.com
    AccountIdentityProvider:
      type: object
      required:
        - organization_identifier
      properties:
        organization_identifier:
          type: string
    AccountInvitation:
      type: object
      required:
        - id
        - account_id
        - email
        - token
        - invitation_sent_at
        - invitation_accepted_at
        - created_at
        - updated_at
      properties:
        id:
          type: integer
        account_id:
          type: integer
        email:
          type: string
        token:
          type: string
        invitation_sent_at:
          $ref: '#/components/schemas/DateTime'
        invitation_accepted_at:
          $ref: '#/components/schemas/NullableDateTime'
        created_at:
          $ref: '#/components/schemas/DateTimeCreatedAt'
        updated_at:
          $ref: '#/components/schemas/DateTimeUpdatedAt'
    Actor:
      type: object
      required:
        - id
        - identifier
        - pretty
      properties:
        id:
          type: integer
        identifier:
          type: string
        pretty:
          type: string
    BatchChangeZoneRecordsResponse:
      type: object
      description: Response from batch change of zone records
      required:
        - creates
        - updates
        - deletes
      properties:
        creates:
          type: array
          description: Zone records that were created
          items:
            $ref: '#/components/schemas/ZoneRecord'
        updates:
          type: array
          description: Zone records that were updated
          items:
            $ref: '#/components/schemas/ZoneRecord'
        deletes:
          type: array
          description: Zone records that were deleted
          items:
            type: object
            required:
              - id
            properties:
              id:
                type: integer
                description: ID of the deleted zone record
      example:
        creates:
          - id: 67623409
            zone_id: example.com
            parent_id: null
            name: ab
            content: 3.2.3.4
            ttl: 3600
            priority: null
            type: A
            regions:
              - global
            system_record: false
            created_at: '2025-09-05T05:25:00Z'
            updated_at: '2025-09-05T05:25:00Z'
        updates:
          - id: 67622534
            zone_id: example.com
            parent_id: null
            name: update1-1757049890
            content: 3.2.3.40
            ttl: 3600
            priority: null
            type: A
            regions:
              - global
            system_record: false
            created_at: '2025-09-05T04:40:15Z'
            updated_at: '2025-09-05T05:25:00Z'
        deletes:
          - id: 67622509
    BatchChangeZoneRecordsInvalidRequestError:
      type: object
      description: Client request error for batch change of zone records
      required:
        - message
        - errors
      properties:
        message:
          type: string
        errors:
          type: object
          properties:
            creates:
              type: array
              items:
                type: object
                required:
                  - index
                  - message
                properties:
                  index:
                    type: integer
                    description: Index of the failed create operation
                  message:
                    type: string
                    description: Error message for this operation
                  errors:
                    type: object
                    description: Optional detailed validation errors
                    additionalProperties:
                      type: array
                      items:
                        type: string
            updates:
              type: array
              items:
                type: object
                required:
                  - index
                  - message
                properties:
                  index:
                    type: integer
                    description: Index of the failed update operation
                  message:
                    type: string
                    description: Error message for this operation
                  errors:
                    type: object
                    description: Optional detailed validation errors
                    additionalProperties:
                      type: array
                      items:
                        type: string
            deletes:
              type: array
              items:
                type: object
                required:
                  - index
                  - message
                properties:
                  index:
                    type: integer
                    description: Index of the failed delete operation
                  message:
                    type: string
                    description: Error message for this operation
                  errors:
                    type: object
                    description: Optional detailed validation errors
                    additionalProperties:
                      type: array
                      items:
                        type: string
      examples:
        - message: Validation failed
          errors:
            creates:
              - index: 0
                message: Validation failed
                errors:
                  base:
                    - Matching record already exists for this zone
        - message: Validation failed
          errors:
            creates:
              - index: 0
                message: Region selection is not allowed for your plan
    BillingSettings:
      type: object
    Certificate:
      type: object
      required:
        - id
        - domain_id
        - name
        - common_name
        - years
        - csr
        - state
        - auto_renew
        - alternate_names
        - authority_identifier
        - created_at
        - updated_at
        - expires_at
        - expires_on
      properties:
        id:
          type: integer
        domain_id:
          type: integer
        name:
          type: string
        common_name:
          type: string
        years:
          type: integer
        csr:
          type: string
        state:
          type: string
          enum:
            - new
            - purchased
            - configured
            - submitted
            - issued
            - rejected
            - refunded
            - cancelled
            - requesting
            - failed
        auto_renew:
          type: boolean
        alternate_names:
          type: array
          items:
            type: string
        authority_identifier:
          type: string
          enum:
            - comodo
            - rapidssl
            - letsencrypt
        created_at:
          $ref: '#/components/schemas/DateTimeCreatedAt'
        updated_at:
          $ref: '#/components/schemas/DateTimeUpdatedAt'
        expires_at:
          $ref: '#/components/schemas/DateTime'
        expires_on:
          $ref: '#/components/schemas/Date'
      example:
        id: 1
        domain_id: 2
        name: www
        common_name: www.weppos.net
        years: 1
        csr: |
          -----BEGIN CERTIFICATE REQUEST-----
          MIICljCCAX4CAQAwGTEXMBUGA1UEAwwOd3d3LndlcHBvcy5uZXQwggEiMA0GCSqG
          SIb3DQEBAQUAA4IBDwAwggEKAoIBAQC3MJwx9ahBG3kAwRjQdRvYZqtovUaxY6jp
          hd09975gO+2eYPDbc1yhNftVJ4KBT0zdEqzX0CwIlxE1MsnZ2YOsC7IJO531hMBp
          dBxM4tSG07xPz70AVUi9rY6YCUoJHmxoFbclpHFbtXZocR393WyzUK8047uM2mlz
          03AZKcMdyfeuo2/9TcxpTSCkklGqwqS9wtTogckaDHJDoBunAkMioGfOSMe7Yi6E
          YRtG4yPJYsDaq2yPJWV8+i0PFR1Wi5RCnPt0YdQWstHuZrxABi45+XVkzKtz3TUc
          YxrvPBucVa6uzd953u8CixNFkiOefvb/dajsv1GIwH6/Cvc1ftz1AgMBAAGgODA2
          BgkqhkiG9w0BCQ4xKTAnMCUGA1UdEQQeMByCDnd3dy53ZXBwb3MubmV0ggp3ZXBw
          b3MubmV0MA0GCSqGSIb3DQEBCwUAA4IBAQCDnVBO9RdJX0eFeZzlv5c8yG8duhKP
          l0Vl+V88fJylb/cbNj9qFPkKTK0vTXmS2XUFBChKPtLucp8+Z754UswX+QCsdc7U
          TTSG0CkyilcSubdZUERGej1XfrVQhrokk7Fu0Jh3BdT6REP0SIDTpA8ku/aRQiAp
          p+h19M37S7+w/DMGDAq2LSX8jOpJ1yIokRDyLZpmwyLxutC21DXMGoJ3xZeUFrUT
          qRNwzkn2dJzgTrPkzhaXalUBqv+nfXHqHaWljZa/O0NVCFrHCdTdd53/6EE2Yabv
          q5SFTkRCpaxrvM/7a8Tr4ixD1/VKD6rw3+WC00000000000000000000
          -----END CERTIFICATE REQUEST-----
        state: issued
        authority_identifier: letsencrypt
        created_at: '2016-06-11T18:47:08Z'
        updated_at: '2016-06-11T18:47:37Z'
        expires_at: '2016-09-09T18:47:37Z'
        expires_on: '2016-09-09'
    CertificateDownload:
      type: object
      required:
        - server
        - root
        - chain
      properties:
        server:
          type: string
        root:
          type: ["string", "null"]
        chain:
          type: array
          items:
            type: string
      example:
        server: |
          -----BEGIN CERTIFICATE-----
          MIIE7TCCA9WgAwIBAgITAPpTe4O3vjuQ9L4gLsogi/ukujANBgkqhkiG9w0BAQsF
          ADAiMSAwHgYDVQQDDBdGYWtlIExFIEludGVybWVkaWF0ZSBYMTAeFw0xNjA2MTEx
          NzQ4MDBaFw0xNjA5MDkxNzQ4MDBaMBkxFzAVBgNVBAMTDnd3dy53ZXBwb3MubmV0
          MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtzCcMfWoQRt5AMEY0HUb
          2GaraL1GsWOo6YXdPfe+YDvtnmDw23NcoTX7VSeCgU9M3RKs19AsCJcRNTLJ2dmD
          rAuyCTud9YTAaXQcTOLUhtO8T8+9AFVIva2OmAlKCR5saBW3JaRxW7V2aHEd/d1s
          s1CvNOO7jNppc9NwGSnDHcn3rqNv/U3MaU0gpJJRqsKkvcLU6IHJGgxyQ6AbpwJD
          IqBnzkjHu2IuhGEbRuMjyWLA2qtsjyVlfPotDxUdVouUQpz7dGHUFrLR7ma8QAYu
          Ofl1ZMyrc901HGMa7zwbnFWurs3fed7vAosTRZIjnn72/3Wo7L9RiMB+vwr3NX7c
          9QIDAQABo4ICIzCCAh8wDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUF
          BwMBBggrBgEFBQcDAjAMBgNVHRMBAf8EAjAAMB0GA1UdDgQWBBRh9q/3Zxbk4yA/
          t7j+8xA+rkiZBTAfBgNVHSMEGDAWgBTAzANGuVggzFxycPPhLssgpvVoOjB4Bggr
          BgEFBQcBAQRsMGowMwYIKwYBBQUHMAGGJ2h0dHA6Ly9vY3NwLnN0Zy1pbnQteDEu
          bGV0c2VuY3J5cHQub3JnLzAzBggrBgEFBQcwAoYnaHR0cDovL2NlcnQuc3RnLWlu
          dC14MS5sZXRzZW5jcnlwdC5vcmcvMCUGA1UdEQQeMByCCndlcHBvcy5uZXSCDnd3
          dy53ZXBwb3MubmV0MIH+BgNVHSAEgfYwgfMwCAYGZ4EMAQIBMIHmBgsrBgEEAYLf
          EwEBATCB1jAmBggrBgEFBQcCARYaaHR0cDovL2Nwcy5sZXRzZW5jcnlwdC5vcmcw
          gasGCCsGAQUFBwICMIGeDIGbVGhpcyBDZXJ0aWZpY2F0ZSBtYXkgb25seSBiZSBy
          ZWxpZWQgdXBvbiBieSBSZWx5aW5nIFBhcnRpZXMgYW5kIG9ubHkgaW4gYWNjb3Jk
          YW5jZSB3aXRoIHRoZSBDZXJ0aWZpY2F0ZSBQb2xpY3kgZm91bmQgYXQgaHR0cHM6
          Ly9sZXRzZW5jcnlwdC5vcmcvcmVwb3NpdG9yeS8wDQYJKoZIhvcNAQELBQADggEB
          AEqMdWrmdIyQxthWsX3iHmM2h/wXwEesD0VIaA+Pq4mjwmKBkoPSmHGQ/O4v8RaK
          B6gl8v+qmvCwwqC1SkBmm+9C2yt/P6WhAiA/DD+WppYgJWfcz2lEKrgufFlHPukB
          DzE0mJDuXm09QTApWlaTZWYfWKY50T5uOT/rs+OwGFFCO/8o7v5AZRAHos6uzjvq
          AtFZj/FEnXXMjSSlQ7YKTXToVpnAYH4e3/UMsi6/O4orkVz82ZfhKwMWHV8dXlRw
          tQaemFWTjGPgSLXJAtQO30DgNJBHX/fJEaHv6Wy8TF3J0wOGpzGbOwaTX8YAmEzC
          lzzjs+clg5MN5rd1g4POJtU=
          -----END CERTIFICATE-----
        root: null
        chain:
          - |-
            -----BEGIN CERTIFICATE-----
            MIIEqzCCApOgAwIBAgIRAIvhKg5ZRO08VGQx8JdhT+UwDQYJKoZIhvcNAQELBQAw
            GjEYMBYGA1UEAwwPRmFrZSBMRSBSb290IFgxMB4XDTE2MDUyMzIyMDc1OVoXDTM2
            MDUyMzIyMDc1OVowIjEgMB4GA1UEAwwXRmFrZSBMRSBJbnRlcm1lZGlhdGUgWDEw
            ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDtWKySDn7rWZc5ggjz3ZB0
            8jO4xti3uzINfD5sQ7Lj7hzetUT+wQob+iXSZkhnvx+IvdbXF5/yt8aWPpUKnPym
            oLxsYiI5gQBLxNDzIec0OIaflWqAr29m7J8+NNtApEN8nZFnf3bhehZW7AxmS1m0
            ZnSsdHw0Fw+bgixPg2MQ9k9oefFeqa+7Kqdlz5bbrUYV2volxhDFtnI4Mh8BiWCN
            xDH1Hizq+GKCcHsinDZWurCqder/afJBnQs+SBSL6MVApHt+d35zjBD92fO2Je56
            dhMfzCgOKXeJ340WhW3TjD1zqLZXeaCyUNRnfOmWZV8nEhtHOFbUCU7r/KkjMZO9
            AgMBAAGjgeMwgeAwDgYDVR0PAQH/BAQDAgGGMBIGA1UdEwEB/wQIMAYBAf8CAQAw
            HQYDVR0OBBYEFMDMA0a5WCDMXHJw8+EuyyCm9Wg6MHoGCCsGAQUFBwEBBG4wbDA0
            BggrBgEFBQcwAYYoaHR0cDovL29jc3Auc3RnLXJvb3QteDEubGV0c2VuY3J5cHQu
            b3JnLzA0BggrBgEFBQcwAoYoaHR0cDovL2NlcnQuc3RnLXJvb3QteDEubGV0c2Vu
            Y3J5cHQub3JnLzAfBgNVHSMEGDAWgBTBJnSkikSg5vogKNhcI5pFiBh54DANBgkq
            hkiG9w0BAQsFAAOCAgEABYSu4Il+fI0MYU42OTmEj+1HqQ5DvyAeyCA6sGuZdwjF
            UGeVOv3NnLyfofuUOjEbY5irFCDtnv+0ckukUZN9lz4Q2YjWGUpW4TTu3ieTsaC9
            AFvCSgNHJyWSVtWvB5XDxsqawl1KzHzzwr132bF2rtGtazSqVqK9E07sGHMCf+zp
            DQVDVVGtqZPHwX3KqUtefE621b8RI6VCl4oD30Olf8pjuzG4JKBFRFclzLRjo/h7
            IkkfjZ8wDa7faOjVXx6n+eUQ29cIMCzr8/rNWHS9pYGGQKJiY2xmVC9h12H99Xyf
            zWE9vb5zKP3MVG6neX1hSdo7PEAb9fqRhHkqVsqUvJlIRmvXvVKTwNCP3eCjRCCI
            PTAvjV+4ni786iXwwFYNz8l3PmPLCyQXWGohnJ8iBm+5nk7O2ynaPVW0U2W+pt2w
            SVuvdDM5zGv2f9ltNWUiYZHJ1mmO97jSY/6YfdOUH66iRtQtDkHBRdkNBsMbD+Em
            2TgBldtHNSJBfB3pm9FblgOcJ0FSWcUDWJ7vO0+NTXlgrRofRT6pVywzxVo6dND0
            WzYlTWeUVsO40xJqhgUQRER9YLOLxJ0O6C8i0xFxAMKOtSdodMB3RIwt7RFQ0uyt
            n5Z5MqkYhlMI3J1tPRTp1nEt9fyGspBOO05gi148Qasp+3N+svqKomoQglNoAxU=
            -----END CERTIFICATE-----
    CertificatePrivateKey:
      type: object
      required: [private_key]
      properties:
        private_key:
          type: string
      example:
        private_key: |
          -----BEGIN RSA PRIVATE KEY-----
          MIIEowIBAAKCAQEAtzCcMfWoQRt5AMEY0HUb2GaraL1GsWOo6YXdPfe+YDvtnmDw
          23NcoTX7VSeCgU9M3RKs19AsCJcRNTLJ2dmDrAuyCTud9YTAaXQcTOLUhtO8T8+9
          AFVIva2OmAlKCR5saBW3JaRxW7V2aHEd/d1ss1CvNOO7jNppc9NwGSnDHcn3rqNv
          /U3MaU0gpJJRqsKkvcLU6IHJGgxyQ6AbpwJDIqBnzkjHu2IuhGEbRuMjyWLA2qts
          jyVlfPotDxUdVouUQpz7dGHUFrLR7ma8QAYuOfl1ZMyrc901HGMa7zwbnFWurs3f
          ed7vAosTRZIjnn72/3Wo7L9RiMB+vwr3NX7c9QIDAQABAoIBAEQx32OlzK34GTKT
          r7Yicmw7xEGofIGa1Q2h3Lut13whsxKLif5X0rrcyqRnoeibacS+qXXrJolIG4rP
          Tl8/3wmUDQHs5J+6fJqFM+fXZUCP4AFiFzzhgsPBsVyd0KbWYYrZ0qU7s0ttoRe+
          TGjuHgIe3ip1QKNtx2Xr50YmytDydknmro79J5Gfrub1l2iA8SDm1eBrQ4SFaNQ2
          U709pHeSwX8pTihUX2Zy0ifpr0O1wYQjGLneMoG4rrNQJG/z6iUdhYczwwt1kDRQ
          4WkM2sovFOyxbBfoCQ3Gy/eem7OXfjNKUe47DAVLnPkKbqL/3Lo9FD7kcB8K87Ap
          r/vYrl0CgYEA413RAk7571w5dM+VftrdbFZ+Yi1OPhUshlPSehavro8kMGDEG5Ts
          74wEz2X3cfMxauMpMrBk/XnUCZ20AnWQClK73RB5fzPw5XNv473Tt/AFmt7eLOzl
          OcYrhpEHegtsD/ZaljlGtPqsjQAL9Ijhao03m1cGB1+uxI7FgacdckcCgYEAzkKP
          6xu9+WqOol73cnlYPS3sSZssyUF+eqWSzq2YJGRmfr1fbdtHqAS1ZbyC5fZVNZYV
          ml1vfXi2LDcU0qS04JazurVyQr2rJZMTlCWVET1vhik7Y87wgCkLwKpbwamPDmlI
          9GY+fLNEa4yfAOOpvpTJpenUScxyKWH2cdYFOOMCgYBhrJnvffINC/d64Pp+BpP8
          yKN+lav5K6t3AWd4H2rVeJS5W7ijiLTIq8QdPNayUyE1o+S8695WrhGTF/aO3+ZD
          KQufikZHiQ7B43d7xL7BVBF0WK3lateGnEVyh7dIjMOdj92Wj4B6mv2pjQ2VvX/p
          AEWVLCtg24/+zL64VgxmXQKBgGosyXj1Zu2ldJcQ28AJxup3YVLilkNje4AXC2No
          6RCSvlAvm5gpcNGE2vvr9lX6YBKdl7FGt8WXBe/sysNEFfgmm45ZKOBCUn+dHk78
          qaeeQHKHdxMBy7utZWdgSqt+ZS299NgaacA3Z9kVIiSLDS4V2VeW7riujXXP/9TJ
          nxaRAoGBAMWXOfNVzfTyrKff6gvDWH+hqNICLyzvkEn2utNY9Q6WwqGuY9fvP/4Z
          Xzc48AOBzUr8OeA4sHKJ79sJirOiWHNfD1swtvyVzsFZb6moiNwD3Ce/FzYCa3lQ
          U8blTH/uqpR2pSC6whzJ/lnSdqHUqhyp00000000000000000000
          -----END RSA PRIVATE KEY-----
    Contact:
      type: object
      required:
        - id
        - account_id
        - label
        - first_name
        - last_name
        - organization_name
        - job_title
        - address1
        - address2
        - city
        - state_province
        - postal_code
        - country
        - phone
        - fax
        - email
        - created_at
        - updated_at
      properties:
        id:
          type: integer
        account_id:
          type: integer
        label:
          type: string
        first_name:
          type: string
        last_name:
          type: string
        organization_name:
          type: string
        job_title:
          type: string
        address1:
          type: string
        address2:
          type: string
        city:
          type: string
        state_province:
          type: string
        postal_code:
          type: string
          description: The ISO 3166-1 alpha-2 country code, upper case (eg. DE).
        country:
          type: string
        phone:
          type: string
        fax:
          type: string
        email:
          type: string
        created_at:
          $ref: '#/components/schemas/DateTimeCreatedAt'
        updated_at:
          $ref: '#/components/schemas/DateTimeUpdatedAt'
      example:
        id: 1
        account_id: 1010
        label: Default
        first_name: First
        last_name: User
        organization_name: Awesome Company
        job_title: CEO
        address1: 'Italian Street, 10'
        address2: ''
        city: Roma
        state_province: RM
        postal_code: '00100'
        country: IT
        phone: '+1.8001234567'
        fax: '+1.8011234567'
        email: first@example.com
        created_at: '2013-11-08T17:23:15Z'
        updated_at: '2015-01-08T21:30:50Z'
    Charge:
      type: object
      required:
        - invoiced_at
        - total_amount
        - balance_amount
        - reference
        - state
        - items
      properties:
        invoiced_at:
          $ref: '#/components/schemas/DateTime'
        total_amount:
          type: string
          description: The aggregate amount of all line items, that need to be paid.
        balance_amount:
          type: string
          description: The amount that was paid via wallet.
        reference:
          type: string
          description: The reference number of the invoice.
        state:
          type: string
          enum:
            - collected
            - refunded
        items:
          type: array
          items:
            $ref: '#/components/schemas/ChargeItem'
      example:
        invoiced_at: '2017-03-03T13:49:58.000Z'
        total_amount: '50.00'
        balance_amount: '50.00'
        reference: '20170303-0001'
        state: collected
        items:
          - description: 'Auto Renew example.com'
            amount: '50.00'
            product_id: 153
            product_type: domain-renewal
            product_reference: example.com
    ChargeItem:
      type: object
      required:
        - description
        - amount
        - product_id
        - product_type
        - product_reference
      properties:
        description:
          type: string
        amount:
          type: string
        product_id:
          type: ["integer", "null"]
          description: The ID of the product that was charged. Null when the product type is "manual".
        product_type:
          type: string
          description: The type of the product that was charged.
        product_reference:
          type: ["string", "null"]
          description: |
            A unique or representative reference. For example, the domain name that was charged.
            Or the ID of the subscription or the order ID of the product. Null when the product
            type is "manual"
      example:
        description: 'Auto Renew example.com'
        amount: '50.00'
        product_id: 153
        product_type: domain-renewal
        product_reference: example.com
    DelegationSigner:
      type: object
      required:
        - id
        - domain_id
        - algorithm
        - digest
        - digest_type
        - keytag
        - public_key
        - created_at
        - updated_at
      example:
        id: 24
        domain_id: 1010
        algorithm: '8'
        digest: C1F6E04A5A61FBF65BF9DC8294C363CF11C89E802D926BDAB79C55D27BEFA94F
        digest_type: '2'
        keytag: '44620'
        public_key: null
        created_at: '2017-03-03T13:49:58.000Z'
        updated_at: '2017-03-03T13:49:58.000Z'
      properties:
        id:
          type: integer
        domain_id:
          type: integer
        algorithm:
          type: string
        digest:
          type: string
        digest_type:
          type: string
        keytag:
          type: string
        public_key:
          type: string
        created_at:
          $ref: '#/components/schemas/DateTimeCreatedAt'
        updated_at:
          $ref: '#/components/schemas/DateTimeUpdatedAt'
    Domain:
      type: object
      required:
        - id
        - account_id
        - registrant_id
        - name
        - unicode_name
        - state
        - auto_renew
        - private_whois
        - expires_at
        - trustee
        - created_at
        - updated_at
      example:
        id: 1
        account_id: 1010
        registrant_id: null
        name: example-alpha.com
        unicode_name: example-alpha.com
        state: hosted
        auto_renew: false
        private_whois: false
        expires_at: null
        trustee: false
        created_at: '2014-12-06T15:56:55Z'
        updated_at: '2015-12-09T00:20:56Z'
      properties:
        id:
          type: integer
        account_id:
          type: integer
        registrant_id:
          type: ["integer", "null"]
        name:
          type: string
        unicode_name:
          type: string
        state:
          type: string
          enum:
            - hosted
            - registered
            - expired
        auto_renew:
          type: boolean
        private_whois:
          type: boolean
        expires_at:
          $ref: '#/components/schemas/NullableDateTime'
        trustee:
          type: boolean
        expires_on:
          $ref: '#/components/schemas/Date'
        created_at:
          $ref: '#/components/schemas/DateTimeCreatedAt'
        updated_at:
          $ref: '#/components/schemas/DateTimeUpdatedAt'
    DomainCheckResult:
      type: object
      required:
        - domain
        - available
        - premium
        - trustee
      properties:
        domain:
          type: string
          description: The domain name that was checked
        available:
          type: boolean
          description: True if the domain is available to register
        premium:
          type: boolean
          description: 'True if the domain is a premium domain and thus will have a non-standard registration, renewal, and/or transfer fee.'
        trustee:
          type: boolean
          description: 'True if trustee service is enabled for this domain.'
      example:
        domain: ruby.codes
        available: true
        premium: true
        trustee: true
    DomainNameServer:
      type: string
    DomainPrices:
      type: object
      required:
        - domain
        - premium
        - registration_price
        - renewal_price
        - restore_price
      properties:
        domain:
          type: string
          description: The domain name that was checked.
        premium:
          type: boolean
          description: 'True if the domain is a premium domain and thus will have a non-standard registration, renewal, and/or transfer fee.'
        registration_price:
          type: number
          format: float
          description: The domain registration price represented as a USD amount with dollars and cents.
        renewal_price:
          type: number
          format: float
          description: The domain renewal price represented as a USD amount with dollars and cents.
        transfer_price:
          type: number
          format: float
          description: The domain transfer price represented as a USD amount with dollars and cents.
        restore_price:
          type: number
          format: float
          description: The domain restore price represented as a USD amount with dollars and cents.
        trustee_price:
          type: number
          format: float
          description: The trustee service price represented as a USD amount with dollars and cents.
      example:
        domain: ruby.codes
        premium: false
        registration_price: 12.0
        renewal_price: 15.0
        restore_price: 25.0
        trustee_price: 10.0
    DomainRegistration:
      type: object
      required:
        - id
        - domain_id
        - registrant_id
        - period
        - state
        - auto_renew
        - whois_privacy
        - trustee
        - created_at
        - updated_at
      properties:
        id:
          type: integer
        domain_id:
          type: integer
        registrant_id:
          type: integer
        period:
          type: integer
          minimum: 1
          maximum: 10
        state:
          type: string
          enum:
            - cancelled
            - new
            - registering
            - registered
            - failed
        auto_renew:
          type: boolean
        whois_privacy:
          type: boolean
        trustee:
          type: boolean
        created_at:
          $ref: '#/components/schemas/DateTimeCreatedAt'
        updated_at:
          $ref: '#/components/schemas/DateTimeUpdatedAt'
      example:
        id: 1
        domain_id: 999
        registrant_id: 2
        period: 1
        state: new
        auto_renew: false
        whois_privacy: false
        trustee: false
        created_at: '2016-12-09T19:35:31Z'
        updated_at: '2016-12-09T19:35:31Z'
    DomainResearch:
      type: object
      required:
        - request_id
        - domain
        - availability
        - errors
      properties:
        request_id:
          type: string
          description: UUID identifier for this research request
        domain:
          type: string
          description: The domain name that was researched
        availability:
          type: string
          enum:
            - available
            - unavailable
            - unknown
          description: The availability status
        errors:
          type: array
          items:
            type: string
          description: Array of error messages if the domain cannot be registered or researched
      example:
        request_id: 'f453dabc-a27e-4bf1-a93e-f263577ffaae'
        domain: 'example.com'
        availability: 'unavailable'
        errors: []
    DomainRenewal:
      type: object
      required:
        - id
        - domain_id
        - period
        - state
        - created_at
        - updated_at
      properties:
        id:
          type: integer
        domain_id:
          type: integer
        period:
          type: integer
          minimum: 1
          maximum: 9
        state:
          type: string
          enum:
            - cancelled
            - new
            - renewing
            - renewed
            - failed
        created_at:
          $ref: '#/components/schemas/DateTimeCreatedAt'
        updated_at:
          $ref: '#/components/schemas/DateTimeUpdatedAt'
      example:
        id: 1
        domain_id: 999
        period: 1
        state: new
        created_at: '2016-12-09T19:46:45Z'
        updated_at: '2016-12-09T19:46:45Z'
    DomainRestore:
      type: object
      required:
        - id
        - domain_id
        - state
        - created_at
        - updated_at
      properties:
        id:
          type: integer
        domain_id:
          type: integer
        state:
          type: string
          enum:
            - new
            - restoring
            - restored
            - cancelled
        created_at:
          $ref: '#/components/schemas/DateTimeCreatedAt'
        updated_at:
          $ref: '#/components/schemas/DateTimeUpdatedAt'
      example:
        id: 1
        domain_id: 999
        state: new
        created_at: '2016-12-09T19:46:45Z'
        updated_at: '2016-12-09T19:46:45Z'
    DomainStateChangeTransition:
      type: object
      description: Prior and new domain registration states and reason for a domain.state_change webhook
      required: [from, to, reason]
      properties:
        from:
          type: string
          enum: [hosted, registered, expired]
        to:
          type: string
          enum: [hosted, registered, expired]
        reason:
          type: string
          enum:
            - registration
            - transfer_in
            - expiration
            - transfer_out
            - renewal
            - restoration
            - registration_removed
    DomainTransfer:
      type: object
      required:
        - id
        - domain_id
        - registrant_id
        - state
        - auto_renew
        - whois_privacy
        - trustee
        - created_at
        - updated_at
      properties:
        id:
          type: integer
        domain_id:
          type: integer
        registrant_id:
          type: integer
        state:
          type: string
          enum:
            - cancelled
            - new
            - transferring
            - transferred
            - failed
        auto_renew:
          type: boolean
        whois_privacy:
          type: boolean
        trustee:
          type: boolean
        status_description:
          type: string
        created_at:
          $ref: '#/components/schemas/DateTimeCreatedAt'
        updated_at:
          $ref: '#/components/schemas/DateTimeUpdatedAt'
      example:
        id: 1
        domain_id: 999
        registrant_id: 2
        state: transferring
        auto_renew: false
        whois_privacy: false
        trustee: false
        created_at: '2016-12-09T19:43:41Z'
        updated_at: '2016-12-09T19:43:43Z'
    DomainTransferLock:
      type: object
      required: [enabled]
      properties:
        enabled:
          type: boolean
      example:
        enabled: true
    DNSSEC:
      type: object
      required:
        - enabled
        - created_at
        - updated_at
      properties:
        enabled:
          type: boolean
        active:
          type: boolean
        created_at:
          $ref: '#/components/schemas/DateTimeCreatedAt'
        updated_at:
          $ref: '#/components/schemas/DateTimeUpdatedAt'
      example:
        enabled: true
        active: true
        created_at: '2017-02-03T17:43:22.000Z'
        updated_at: '2017-02-03T17:43:22.000Z'
    EmailForward:
      type: object
      required:
        - id
        - domain_id
        - alias_email
        - destination_email
        - created_at
        - updated_at
        - active
      example:
        id: 1
        domain_id: 2
        alias_email: john.doe@a-domain.com
        destination_email: john@example.com
        created_at: '2016-02-04T14:26:50Z'
        updated_at: '2016-02-04T14:26:50Z'
        active: true
      properties:
        id:
          type: integer
        domain_id:
          type: integer
        alias_email:
          type: string
          format: email
          description: The receiving email recipient.
        destination_email:
          type: string
          format: email
          description: The email recipient the messages are delivered to.
        created_at:
          $ref: '#/components/schemas/DateTimeCreatedAt'
        updated_at:
          $ref: '#/components/schemas/DateTimeUpdatedAt'
    EventAccountAddSSOUser:
      type: object
      description: Payload for account.sso_user_add event.
      required:
        - account
        - account_identity_provider
        - user
      properties:
        account:
          $ref: '#/components/schemas/Account'
        account_identity_provider:
          $ref: '#/components/schemas/AccountIdentityProvider'
        user:
          $ref: '#/components/schemas/User'
    EventAccountBillingSettingsUpdate:
      type: object
      description: Payload for account.billing_settings_update event.
      required:
        - account
        - billing_settings
      properties:
        account:
          $ref: '#/components/schemas/Account'
        billing_settings:
          $ref: '#/components/schemas/BillingSettings'
    EventAccountPaymentDetailsUpdate:
      type: object
      description: Payload for account.payment_details_update event.
      required: [account]
      properties:
        account:
          $ref: '#/components/schemas/Account'
    EventAccountRemoveUser:
      type: object
      description: Payload for account.remove_user event.
      required:
        - account
        - user
      properties:
        account:
          $ref: '#/components/schemas/Account'
        user:
          $ref: '#/components/schemas/User'
    EventAccountUpdate:
      type: object
      description: Payload for account.update event.
      required: [account]
      properties:
        account:
          $ref: '#/components/schemas/Account'
    EventAccountInvitationAccept:
      type: object
      description: Payload for account_invitation.accept event.
      required:
        - account
        - account_invitation
      properties:
        account:
          $ref: '#/components/schemas/Account'
        account_invitation:
          $ref: '#/components/schemas/AccountInvitation'
    EventAccountInvitationCreate:
      type: object
      description: Payload for account_invitation.create event.
      required:
        - account
        - account_invitation
      properties:
        account:
          $ref: '#/components/schemas/Account'
        account_invitation:
          $ref: '#/components/schemas/AccountInvitation'
    EventAccountInvitationRemove:
      type: object
      description: Payload for account_invitation.remove event.
      required:
        - account
        - account_invitation
      properties:
        account:
          $ref: '#/components/schemas/Account'
        account_invitation:
          $ref: '#/components/schemas/AccountInvitation'
    EventAccountInvitationResend:
      type: object
      description: Payload for account_invitation.resend event.
      required:
        - account
        - account_invitation
      properties:
        account:
          $ref: '#/components/schemas/Account'
        account_invitation:
          $ref: '#/components/schemas/AccountInvitation'
    EventCertificateAutoRenewalDisable:
      type: object
      description: Payload for certificate.auto_renewal_disable
      required: [certificate]
      properties:
        certificate:
          $ref: '#/components/schemas/Certificate'
    EventCertificateAutoRenewalEnable:
      type: object
      description: Payload for certificate.auto_renewal_enable
      required: [certificate]
      properties:
        certificate:
          $ref: '#/components/schemas/Certificate'
    EventCertificateAutoRenewalFailed:
      type: object
      description: Payload for certificate.auto_renewal_failed
      required: [certificate]
      properties:
        certificate:
          $ref: '#/components/schemas/Certificate'
    EventCertificateIssue:
      type: object
      description: Payload for certificate.issue
      required: [certificate]
      properties:
        certificate:
          $ref: '#/components/schemas/Certificate'
    EventCertificateReissue:
      type: object
      description: Payload for certificate.reissue
      required: [certificate]
      properties:
        certificate:
          $ref: '#/components/schemas/Certificate'
    EventCertificateRemovePrivateKey:
      type: object
      description: Payload for certificate.remove_private_key
      required: [certificate]
      properties:
        certificate:
          $ref: '#/components/schemas/Certificate'
    EventContactCreate:
      type: object
      description: Payload for contact.create
      required: [contact]
      properties:
        contact:
          $ref: '#/components/schemas/Contact'
    EventContactDelete:
      type: object
      description: Payload for contact.delete
      required: [contact]
      properties:
        contact:
          $ref: '#/components/schemas/Contact'
    EventContactUpdate:
      type: object
      description: Payload for contact.udpate
      required: [contact]
      properties:
        contact:
          $ref: '#/components/schemas/Contact'
    EventDNSSECCreate:
      type: object
      description: Payload for dnssec.create
      required:
        - dnssec
        - zone
      properties:
        dnssec:
          $ref: '#/components/schemas/DNSSEC'
        zone:
          $ref: '#/components/schemas/Zone'
    EventDNSSECDelete:
      type: object
      description: Payload for dnssec.delete
      required:
        - dnssec
        - zone
      properties:
        dnssec:
          $ref: '#/components/schemas/DNSSEC'
        zone:
          $ref: '#/components/schemas/Zone'
    EventDNSSECRotationStart:
      type: object
      description: Payload for dnssec.rotation_start
      required:
        - delegation_signer_record
        - dnssec
        - zone
      properties:
        delegation_signer_record:
          $ref: '#/components/schemas/DelegationSigner'
        dnssec:
          $ref: '#/components/schemas/DNSSEC'
        zone:
          $ref: '#/components/schemas/Zone'
    EventDNSSECRotationComplete:
      type: object
      description: Payload for dnssec.rotation_complete
      required:
        - delegation_signer_record
        - dnssec
        - zone
      properties:
        delegation_signer_record:
          $ref: '#/components/schemas/DelegationSigner'
        dnssec:
          $ref: '#/components/schemas/DNSSEC'
        zone:
          $ref: '#/components/schemas/Zone'
    EventDomainAutoRenewalDisable:
      type: object
      description: Payload for domain.auto_renewal_disable
      required: [domain]
      properties:
        domain:
          $ref: '#/components/schemas/Domain'
    EventDomainAutoRenewalEnable:
      type: object
      description: Payload for domain.auto_renewal_enable
      required: [domain]
      properties:
        domain:
          $ref: '#/components/schemas/Domain'
    EventDomainCreate:
      type: object
      description: Payload for domain.create
      required: [domain]
      properties:
        domain:
          $ref: '#/components/schemas/Domain'
    EventDomainDelete:
      type: object
      description: Payload for domain.delete
      required: [domain]
      properties:
        domain:
          $ref: '#/components/schemas/Domain'
    EventDomainRegisterStarted:
      type: object
      description: Payload for domain.register:started
      required: [domain]
      properties:
        domain:
          $ref: '#/components/schemas/Domain'
    EventDomainRegister:
      type: object
      required: [domain]
      properties:
        domain:
          $ref: '#/components/schemas/Domain'
    EventDomainRegisterCancelled:
      type: object
      description: Payload for domain.register:cancelled
      required: [domain]
      properties:
        domain:
          $ref: '#/components/schemas/Domain'
    EventDomainRenewStarted:
      type: object
      description: Payload for domain.renew:started
      required:
        - auto
        - domain
      properties:
        auto:
          type: boolean
        domain:
          $ref: '#/components/schemas/Domain'
    EventDomainRenew:
      type: object
      description: Payload for domain.renew
      required:
        - auto
        - domain
      properties:
        auto:
          type: boolean
        domain:
          $ref: '#/components/schemas/Domain'
    EventDomainRenewCancelled:
      type: object
      description: Payload for domain.renew:cancelled
      required:
        - auto
        - domain
      properties:
        auto:
          type: boolean
        domain:
          $ref: '#/components/schemas/Domain'
    EventDomainRestoreStarted:
      type: object
      description: Payload for domain.restore:started
      required:
        - auto
        - domain
      properties:
        auto:
          type: boolean
        domain:
          $ref: '#/components/schemas/Domain'
    EventDomainRestore:
      type: object
      description: Payload for domain.restore
      required:
        - auto
        - domain
      properties:
        auto:
          type: boolean
        domain:
          $ref: '#/components/schemas/Domain'
    EventDomainRestoreCancelled:
      type: object
      description: Payload for domain.restore:cancelled
      required:
        - auto
        - domain
      properties:
        auto:
          type: boolean
        domain:
          $ref: '#/components/schemas/Domain'
    EventDomainDelegationChange:
      type: object
      description: Payload for domain.delegation_change
      required:
        - domain
        - name_servers
      properties:
        domain:
          $ref: '#/components/schemas/Domain'
        name_servers:
          type: array
          items:
            $ref: '#/components/schemas/NameServer'
    EventDomainRegistrantChangeStarted:
      type: object
      description: Payload for domain.registrant_change:started
      required:
        - domain
        - registrant
      properties:
        domain:
          $ref: '#/components/schemas/Domain'
        registrant:
          $ref: '#/components/schemas/Contact'
    EventDomainRegistrantChange:
      type: object
      description: Payload for domain.registrant_change
      required:
        - domain
        - registrant
      properties:
        domain:
          $ref: '#/components/schemas/Domain'
        registrant:
          $ref: '#/components/schemas/Contact'
    EventDomainRegistrantChangeCancelled:
      type: object
      description: Payload for domain.registrant_change:cancelled
      required:
        - domain
        - registrant
      properties:
        domain:
          $ref: '#/components/schemas/Domain'
        registrant:
          $ref: '#/components/schemas/Contact'
    EventDomainResolutionDisable:
      type: object
      description: Payload for domain.resolution_disable
      required: [domain]
      properties:
        domain:
          $ref: '#/components/schemas/Domain'
    EventDomainResolutionEnable:
      type: object
      description: Payload for domain.resolution_enable
      required: [domain]
      properties:
        domain:
          $ref: '#/components/schemas/Domain'
    EventDomainTransferStarted:
      type: object
      description: Payload for domain.transfer:started
      required: [domain]
      properties:
        domain:
          $ref: '#/components/schemas/Domain'
    EventDomainTransfer:
      type: object
      description: Payload for domain.transfer
      required: [domain]
      properties:
        domain:
          $ref: '#/components/schemas/Domain'
    EventDomainTransferCancelled:
      type: object
      description: Payload for domain.transfer:cancelled
      required: [domain]
      properties:
        domain:
          $ref: '#/components/schemas/Domain'
    EventDomainTransferLockDisable:
      type: object
      description: Payload for domain.transfer_lock_disable
      required: [domain]
      properties:
        domain:
          $ref: '#/components/schemas/Domain'
    EventDomainTransferLockEnable:
      type: object
      description: Payload for domain.transfer_lock_enable
      required: [domain]
      properties:
        domain:
          $ref: '#/components/schemas/Domain'
    EventDomainStateChange:
      type: object
      description: Payload for domain.state_change.
      required: [domain, state_change]
      properties:
        domain:
          $ref: '#/components/schemas/Domain'
        state_change:
          $ref: '#/components/schemas/DomainStateChangeTransition'
    EventEmailForwardActivate:
      type: object
      description: Payload for email_forward.activate
      properties:
        email_forward:
          $ref: '#/components/schemas/EmailForward'
    EventEmailForwardCreate:
      type: object
      description: Payload for email_forward.create
      required: [email_forward]
      properties:
        email_forward:
          $ref: '#/components/schemas/EmailForward'
    EventEmailForwardDeactivate:
      type: object
      description: Payload for email_forward.deactivate
      required: [email_forward]
      properties:
        email_forward:
          $ref: '#/components/schemas/EmailForward'
    EventEmailForwardDelete:
      type: object
      description: Payload for email_forward.delete
      required: [email_forward]
      properties:
        email_forward:
          $ref: '#/components/schemas/EmailForward'
    EventEmailForwardUpdate:
      type: object
      description: Payload for email_forward.update
      required: [email_forward]
      properties:
        email_forward:
          $ref: '#/components/schemas/EmailForward'
    EventInvoiceCollect:
      type: object
      description: Payload for invoice.collect
      required: [invoice]
      properties:
        invoice:
          $ref: '#/components/schemas/Invoice'
    EventNameServerDeregister:
      type: object
      description: Payload for name_server.deregister
      required: [name_server]
      properties:
        name_server:
          type: object
          required: [name]
          properties:
            name:
              type: string
    EventNameServerRegister:
      type: object
      description: Payload for name_server.register
      required: [name_server]
      properties:
        name_server:
          type: object
          required: [name]
          properties:
            name:
              type: string
    EventOauthApplicationCreate:
      type: object
      description: Payload for oauth_application.create
      required: [oauth_application]
      properties:
        oauth_application:
          $ref: '#/components/schemas/OauthApplication'
    EventOauthApplicationDelete:
      type: object
      description: Payload for oauth_application.delete
      required: [oauth_application]
      properties:
        oauth_application:
          $ref: '#/components/schemas/OauthApplication'
    EventOauthApplicationResetClientSecret:
      type: object
      description: Payload for oauth_application.reset_client_secret
      required: [oauth_application]
      properties:
        oauth_application:
          $ref: '#/components/schemas/OauthApplication'
    EventOauthApplicationRevokeAccessTokens:
      type: object
      description: Payload for oauth_application.revoke_access_tokens
      required: [oauth_application]
      properties:
        oauth_application:
          $ref: '#/components/schemas/OauthApplication'
    EventOauthApplicationUpdate:
      type: object
      description: Payload for oauth_application.update
      required: [oauth_application]
      properties:
        oauth_application:
          $ref: '#/components/schemas/OauthApplication'
    EventPushAccept:
      type: object
      description: Payload for push.accept
      required: [push]
      properties:
        push:
          $ref: '#/components/schemas/Push'
    EventPushInitiate:
      type: object
      description: Payload for push.initiate
      required: [push]
      properties:
        push:
          $ref: '#/components/schemas/Push'
    EventPushReject:
      type: object
      description: Payload for push.reject
      required: [push]
      properties:
        push:
          $ref: '#/components/schemas/Push'
    EventRecordCreate:
      type: object
      description: Payload for record.create
      required: [zone_record]
      properties:
        zone_record:
          $ref: '#/components/schemas/ZoneRecord'
    EventRecordDelete:
      type: object
      description: Payload for record.delete
      required: [zone_record]
      properties:
        zone_record:
          $ref: '#/components/schemas/ZoneRecord'
    EventRecordUpdate:
      type: object
      description: Payload for record.update
      required: [zone_record]
      properties:
        zone_record:
          $ref: '#/components/schemas/ZoneRecord'
    EventSecondaryDNSCreate:
      type: object
      description: Payload for secondary_dns.create
      required: [configuration]
      properties:
        configuration:
          $ref: '#/components/schemas/SecondaryDNS'
    EventSecondaryDNSDelete:
      type: object
      description: Payload for secondary_dns.delete
      required: [configuration]
      properties:
        configuration:
          $ref: '#/components/schemas/SecondaryDNS'
    EventSecondaryDNSUpdate:
      type: object
      description: Payload for secondary_dns.update
      required: [configuration]
      properties:
        configuration:
          $ref: '#/components/schemas/SecondaryDNS'
    EventSubscriptionMigrate:
      type: object
      description: Payload for subscription.migrate
      required: [subscription]
      properties:
        subscription:
          $ref: '#/components/schemas/Subscription'
    EventSubscriptionRenew:
      type: object
      description: Payload for subscription.renew
      required: [subscription]
      properties:
        subscription:
          $ref: '#/components/schemas/Subscription'
    EventSubscriptionSubscribe:
      type: object
      description: Payload for subscription.subscribe
      required: [subscription]
      properties:
        subscription:
          $ref: '#/components/schemas/Subscription'
    EventSubscriptionUnsubscribe:
      type: object
      description: Payload for subscription.unsubscribe
      required: [subscription]
      properties:
        subscription:
          $ref: '#/components/schemas/Subscription'
    EventTemplateApply:
      type: object
      description: Payload for template.apply
      required:
        - template
        - zone
      properties:
        template:
          $ref: '#/components/schemas/Template'
        zone:
          $ref: '#/components/schemas/Zone'
    EventTemplateCreate:
      type: object
      description: Payload for template.create
      required: [template]
      properties:
        template:
          $ref: '#/components/schemas/Template'
    EventTemplateDelete:
      type: object
      description: Payload for template.delete
      required: [template]
      properties:
        template:
          $ref: '#/components/schemas/Template'
    EventTemplateUpdate:
      type: object
      description: Payload for template.update
      required: [template]
      properties:
        template:
          $ref: '#/components/schemas/Template'
    EventTemplateRecordCreate:
      type: object
      description: Payload for template_record.create
      required: [template_record]
      properties:
        template_record:
          $ref: '#/components/schemas/TemplateRecord'
    EventTemplateRecordDelete:
      type: object
      description: Payload for template_record.delete
      required: [template_record]
      properties:
        template_record:
          $ref: '#/components/schemas/TemplateRecord'
    EventVanityDisable:
      type: object
      description: Payload for vanity.disable
      required: [domain]
      properties:
        domain:
          $ref: '#/components/schemas/Domain'
    EventVanityEnable:
      type: object
      description: Payload for vanity.enable
      required: [domain]
      properties:
        domain:
          $ref: '#/components/schemas/Domain'
    EventWebhookCreate:
      type: object
      description: Payload for webhook.create
      required: [webhook]
      properties:
        webhook:
          $ref: '#/components/schemas/Webhook'
    EventWebhookDelete:
      type: object
      description: Payload for webhook.delete
      required: [webhook]
      properties:
        webhook:
          $ref: '#/components/schemas/Webhook'
    EventWhoisPrivacyDisable:
      type: object
      description: Payload for whois_privacy.disable
      required:
        - domain
        - whois_privacy
      properties:
        domain:
          $ref: '#/components/schemas/Domain'
        whois_privacy:
          $ref: '#/components/schemas/WhoisPrivacy'
    EventWhoisPrivacyEnable:
      type: object
      description: Payload for whois_privacy.enable
      required:
        - domain
        - whois_privacy
      properties:
        domain:
          $ref: '#/components/schemas/Domain'
        whois_privacy:
          $ref: '#/components/schemas/WhoisPrivacy'
    EventWhoisPrivacyPurchase:
      type: object
      description: Payload for whois_privacy.purchase
      required:
        - domain
        - whois_privacy
      properties:
        domain:
          $ref: '#/components/schemas/Domain'
        whois_privacy:
          $ref: '#/components/schemas/WhoisPrivacy'
    EventWhoisPrivacyRenew:
      type: object
      description: Payload for whois_privacy.renew
      required:
        - domain
        - whois_privacy
      properties:
        domain:
          $ref: '#/components/schemas/Domain'
        whois_privacy:
          $ref: '#/components/schemas/WhoisPrivacy'
    EventZoneCreate:
      type: object
      description: Payload for zone.create
      required: [zone]
      properties:
        zone:
          $ref: '#/components/schemas/Zone'
    EventZoneDelete:
      type: object
      description: Payload for zone.delete
      required: [zone]
      properties:
        zone:
          $ref: '#/components/schemas/Zone'
    ExtendedAttribute:
      type: object
      required:
        - name
        - description
        - required
        - options
        - title
      properties:
        name:
          type: string
        description:
          type: string
        required:
          type: boolean
        options:
          type: array
          items:
            $ref: '#/components/schemas/ExtendedAttributeOption'
        title:
          type: string
      example:
        name: uk_legal_type
        description: Legal type of registrant contact
        required: true
        options:
          - title: UK Individual
            value: IND
            description: UK Individual (our default value)
          - title: Non-UK Individual (representing self)
            value: FIND
            description: Non-UK Individual (representing self)
        title: UK Legal Type
    TradeExtendedAttributes:
      type: object
      additionalProperties:
        type: string
      example:
        x-fi-registrant-idnumber: "1234"
        x-cat-accept-highly-regulated-tac: "1"
    ExtendedAttributeOption:
      type: object
      required:
        - title
        - value
        - description
      properties:
        title:
          type: string
        value:
          type: string
        description:
          type: string
      example:
        title: UK Individual
        value: IND
        description: UK Individual (our default value)
    Invoice:
      type: object
      required:
        - id
        - invoice_number
        - created_at
        - updated_at
      properties:
        id:
          type: integer
        invoice_number:
          type: string
        created_at:
          $ref: '#/components/schemas/DateTimeCreatedAt'
        updated_at:
          $ref: '#/components/schemas/DateTimeUpdatedAt'
    LetsencryptCertificatePurchase:
      type: object
      required:
        - id
        - certificate_id
        - state
        - auto_renew
        - created_at
        - updated_at
      properties:
        id:
          type: integer
        certificate_id:
          type: integer
        state:
          type: string
          enum:
            - new
            - purchased
            - configured
            - submitted
            - issued
            - rejected
            - refunded
            - cancelled
            - requesting
            - failed
        auto_renew:
          type: boolean
        created_at:
          $ref: '#/components/schemas/DateTimeCreatedAt'
        updated_at:
          $ref: '#/components/schemas/DateTimeUpdatedAt'
      example:
        id: 1
        certificate_id: 1
        state: new
        auto_renew: true
        created_at: '2016-06-11T18:47:08Z'
        updated_at: '2016-06-11T18:47:37Z'
    LetsencryptCertificateRenewal:
      type: object
      properties:
        id:
          type: integer
        old_certificate_id:
          type: integer
        new_certificate_id:
          type: integer
        state:
          type: string
          enum:
            - cancelled
            - new
            - renewing
            - renewed
            - failed
        auto_renew:
          type: boolean
        created_at:
          $ref: '#/components/schemas/DateTimeCreatedAt'
        updated_at:
          $ref: '#/components/schemas/DateTimeUpdatedAt'
      example:
        id: 999
        old_certificate_id: 200
        new_certificate_id: 300
        state: new
        auto_renewal: true
        created_at: '2017-10-19T08:18:53Z'
        updated_at: '2017-10-19T08:18:53Z'
    NameServer:
      type: object
      required:
        - id
        - name
        - ipv4
        - ipv6
        - created_at
        - updated_at
      properties:
        id:
          type: integer
        name:
          type: string
        ipv4:
          type: string
        ipv6:
          type: string
        created_at:
          $ref: '#/components/schemas/DateTimeCreatedAt'
        updated_at:
          $ref: '#/components/schemas/DateTimeUpdatedAt'
      example:
        id: 1
        name: ns1.example.com
        ipv4: 127.0.0.1
        ipv6: '::1'
        created_at: '2016-07-11T09:40:19Z'
        updated_at: '2016-07-11T09:40:19Z'
    OauthApplication:
      type: object
      required:
        - id
        - name
        - description
        - homepage_url
        - created_at
        - updated_at
      properties:
        id:
          type: integer
        name:
          type: string
        description:
          type: string
        homepage_url:
          type: string
        created_at:
          $ref: '#/components/schemas/DateTimeCreatedAt'
        updated_at:
          $ref: '#/components/schemas/DateTimeUpdatedAt'
    PrimaryServer:
      type: object
      required:
        - id
        - account_id
        - name
        - ip
        - port
        - linked_secondary_zones
        - created_at
        - updated_at
      properties:
        id:
          type: integer
        account_id:
          type: integer
        name:
          type: string
        ip:
          type: string
        port:
          type: integer
        linked_secondary_zones:
          type: array
          items:
            type: string
        created_at:
          $ref: '#/components/schemas/DateTimeCreatedAt'
        updated_at:
          $ref: '#/components/schemas/DateTimeUpdatedAt'
      example:
        id: 1
        account_id: 2020
        name: 'Primary Server'
        ip: '1.1.1.1'
        port: 4567
        linked_secondary_zones: [ 'example.com' ]
        created_at: '2016-08-11T10:16:03Z'
        updated_at: '2016-08-11T10:16:03Z'
    Push:
      type: object
      required:
        - id
        - domain_id
        - contact_id
        - account_id
        - created_at
        - updated_at
        - accepted_at
      properties:
        id:
          type: integer
        domain_id:
          type: integer
        contact_id:
          type: integer
        account_id:
          type: integer
        created_at:
          $ref: '#/components/schemas/DateTimeCreatedAt'
        updated_at:
          $ref: '#/components/schemas/DateTimeUpdatedAt'
        accepted_at:
          $ref: '#/components/schemas/NullableDateTime'
      example:
        id: 1
        domain_id: 100
        contact_id: 2
        account_id: 2020
        created_at: '2016-08-11T10:16:03Z'
        updated_at: '2016-08-11T10:16:03Z'
        accepted_at: null
    RegistrantChange:
      type: object
      required:
        - id
        - account_id
        - contact_id
        - domain_id
        - state
        - extended_attributes
        - registry_owner_change
        - irt_lock_lifted_by
        - created_at
        - updated_at
      properties:
        id:
          type: integer
        account_id:
          type: integer
        contact_id:
          type: integer
        domain_id:
          type: integer
        state:
          type: string
          enum:
            - new
            - pending
            - cancelling
            - cancelled
            - completed
        extended_attributes:
          $ref: '#/components/schemas/TradeExtendedAttributes'
        registry_owner_change:
          type: boolean
        irt_lock_lifted_by:
          $ref: '#/components/schemas/Date'
        created_at:
          $ref: '#/components/schemas/DateTimeCreatedAt'
        updated_at:
          $ref: '#/components/schemas/DateTimeUpdatedAt'
      example:
        id: 1
        account_id: 1010
        contact_id: 2
        domain_id: 2
        state: completed
        extended_attributes: { "x-fi-registrant-idnumber": "1234" }
        registry_owner_change: false
        irt_lock_lifted_by: '2013-12-08'
        created_at: '2013-11-08T17:23:15Z'
        updated_at: '2015-01-08T21:30:50Z'
    RegistrantChangeCheck:
      type: object
      properties:
        contact_id:
          type: integer
        domain_id:
          type: integer
        extended_attributes:
          type: array
          items:
            $ref: '#/components/schemas/ExtendedAttribute'
        registry_owner_change:
          type: boolean
      example:
        contact_id: 2
        domain_id: 2
        extended_attributes: [ { "name": "x-fi-registrant-birth-date" ,"title": "The registrant's birth date", "description": "Format is: YYYY-MM-DD.","required": false,"options": [ ] } ]
        registry_owner_change: false
    SecondaryDNS:
      type: object
      required:
        - id
        - zone_id
        - name_servers
        - whitelisted_ips
        - created_at
        - updated_at
      properties:
        id:
          type: integer
        zone_id:
          type: string
        name_servers:
          type: array
          items:
            type: string
        whitelisted_ips:
          type: array
          items:
            type: string
        created_at:
          $ref: '#/components/schemas/DateTimeCreatedAt'
        updated_at:
          $ref: '#/components/schemas/DateTimeUpdatedAt'
    Service:
      type: object
      required:
        - id
        - name
        - sid
        - description
        - setup_description
        - requires_setup
        - default_subdomain
        - created_at
        - updated_at
        - settings
      example:
        id: 2
        name: Service 2
        sid: service2
        description: Second service example.
        setup_description: null
        requires_setup: true
        default_subdomain: null
        created_at: '2014-02-14T19:15:19Z'
        updated_at: '2016-03-04T09:23:27Z'
        settings:
          - name: username
            label: Service 2 Account Username
            append: .service2.com
            description: Your Service2 username is used to connect services to your account.
            example: username
            password: false
      properties:
        id:
          type: integer
          description: A unique identifier
        name:
          type: string
          description: A human-readable name
        sid:
          type: string
          description: A string identifier that can be used in URLs (always lowercase)
        description:
          type: string
          description: A human-readable description of the one-click service
        setup_description:
          type: ["string", "null"]
          description: Describes setup requirements
        requires_setup:
          type: boolean
          description: Flag indicating whether setup is required
        default_subdomain:
          type: ["string", "null"]
          description: The default subdomain used when creating DNS records
        created_at:
          $ref: '#/components/schemas/DateTimeCreatedAt'
        updated_at:
          $ref: '#/components/schemas/DateTimeUpdatedAt'
        settings:
          type: array
          items:
            $ref: '#/components/schemas/ServiceSetting'
    ServiceSetting:
      type: object
      required:
        - name
        - label
        - append
        - description
        - example
        - password
      properties:
        name:
          type: string
          description: The form name for the setting
        label:
          type: string
          description: The human-readable label value
        append:
          type: ["string", "null"]
          description: Additional text to append to the input field
        description:
          type: string
          description: Description of the setting
        example:
          type: string
          description: An example value
        password:
          type: boolean
          description: true if the value is a password (and thus should not be visible in the field)
          default: false
      example:
        name: username
        label: Service 2 Account Username
        append: .service2.com
        description: Your Service2 username is used to connect services to your account.
        example: username
        password: false
    Subscription:
      type: object
      required:
        - id
        - plan_name
        - state
        - created_at
        - updated_at
      properties:
        id:
          type: integer
        plan_name:
          type: string
          enum:
            - Silver
            - Gold
            - Silver v1 Yearly
            - Bronze Yearly
            - Gold v1 Yearly
            - No DNS
            - Professional Yearly
            - Platinum Yearly
            - Personal Yearly
            - Silver Yearly
            - Business
            - Bronze Yearly v1
            - Bronze
            - Business Yearly
            - Personal
            - Basic Reseller Yearly
            - Expert Reseller
            - Expert Reseller Yearly
            - Silver v1
            - Master Reseller Yearly
            - Basic Reseller
            - Gold Yearly
            - Bronze v1
            - Professional
            - Master Reseller
            - Gold v1
            - Platinum
        state:
          type: string
          enum:
            - new
            - subscribing
            - subscribed
            - unsubscribed
            - not_subscribed
        created_at:
          $ref: '#/components/schemas/DateTimeCreatedAt'
        updated_at:
          $ref: '#/components/schemas/DateTimeUpdatedAt'
    Template:
      type: object
      required:
        - id
        - account_id
        - name
        - sid
        - description
        - created_at
        - updated_at
      properties:
        id:
          type: integer
        account_id:
          type: integer
        name:
          type: string
        sid:
          type: string
        description:
          type: string
        created_at:
          $ref: '#/components/schemas/DateTimeCreatedAt'
        updated_at:
          $ref: '#/components/schemas/DateTimeUpdatedAt'
      example:
        id: 1
        account_id: 1010
        name: Alpha
        sid: alpha
        description: An alpha template.
        created_at: '2016-03-22T11:08:58Z'
        updated_at: '2016-03-22T11:08:58Z'
    TemplateRecord:
      type: object
      required:
        - id
        - template_id
        - name
        - content
        - ttl
        - priority
        - type
        - created_at
        - updated_at
      properties:
        id:
          type: integer
        template_id:
          type: integer
        name:
          type: string
        content:
          type: string
        ttl:
          $ref: '#/components/schemas/TTL'
        priority:
          type: ["string", "null"]
        type:
          $ref: '#/components/schemas/TemplateRecordType'
        created_at:
          $ref: '#/components/schemas/DateTimeCreatedAt'
        updated_at:
          $ref: '#/components/schemas/DateTimeUpdatedAt'
      example:
        id: 296
        template_id: 268
        name: ''
        content: 192.168.1.1
        ttl: 3600
        priority: null
        type: A
        created_at: '2016-04-26T08:23:54Z'
        updated_at: '2016-04-26T08:23:54Z'
    TemplateRecordType:
      type: string
      description: Supported DNS record types for templates.
      enum:
        - A
        - AAAA
        - ALIAS
        - CAA
        - CNAME
        - DNSKEY
        - DS
        - HINFO
        - MX
        - NAPTR
        - NS
        - POOL
        - PTR
        - SOA
        - SPF
        - SRV
        - SSHFP
        - TXT
        - URL
    TLD:
      type: object
      required:
        - tld
        - tld_type
        - whois_privacy
        - auto_renew_only
        - idn
        - minimum_registration
        - registration_enabled
        - renewal_enabled
        - transfer_enabled
        - dnssec_interface_type
        - name_server_min
        - name_server_max
        - trustee_service_enabled
        - trustee_service_required
      properties:
        tld:
          type: string
          description: 'The registerable suffix. In most cases the suffix matches a TLD, but there are some cases where the suffix is a subzone of the TLD (e.g. com.au).'
        tld_type:
          $ref: '#/components/schemas/TLDType'
        whois_privacy:
          type: boolean
          description: true if the suffix allows WHOIS privacy as a separate component. Some registries may provide WHOIS privacy at registry level by limiting the visibility of certain attributes in the WHOIS response.
        auto_renew_only:
          type: boolean
          description: true if the suffix requires auto-renewal and can't be renewed manually
        idn:
          type: boolean
          description: true if the suffix supports Internationalized Domain Names (IDN)
        minimum_registration:
          type: integer
        registration_enabled:
          type: boolean
          description: true if DNSimple supports registrations for this TLD
        renewal_enabled:
          type: boolean
          description: true if DNSimple supports renewals for this TLD
        transfer_enabled:
          type: boolean
          description: true if DNSimple supports inbound transfers for this TLD
        dnssec_interface_type:
          type: string
          description: type of data interface required for DNSSEC
          enum:
            - ds
            - key
        name_server_min:
          type: integer
          description: minimum number of name servers required for this TLD
        name_server_max:
          type: integer
          description: maximum number of name servers allowed for this TLD
        trustee_service_enabled:
          type: boolean
          description: true if trustee service is enabled by default for this TLD
        trustee_service_required:
          type: boolean
          description: true if trustee is required for this TLD
      example:
        tld: ac
        tld_type: 2
        whois_privacy: false
        auto_renew_only: true
        idn: false
        minimum_registration: 1
        registration_enabled: true
        renewal_enabled: true
        transfer_enabled: false
        dnssec_interface_type: 'ds'
        name_server_min: 2
        trustee_service_enabled: false
        trustee_service_required: false
    TLDType:
      type: integer
      description: 'TLD types are: * 1 - gTLD (global TLD) * 2 - ccTLD (country-code TLD) * 3 - newTLD (new global TLD)'
      enum:
        - 1
        - 2
        - 3
    TTL:
      type: integer
      description: The Time To Live (TTL) value for the entry, in seconds.
      minimum: 0
      default: 3600
    User:
      type: object
      required:
        - id
        - email
        - created_at
        - updated_at
      properties:
        id:
          type: integer
        email:
          type: string
        created_at:
          $ref: '#/components/schemas/DateTimeCreatedAt'
        updated_at:
          $ref: '#/components/schemas/DateTimeUpdatedAt'
      example:
        id: 1
        email: example-user@example.com
        created_at: '2015-09-18T23:04:37Z'
        updated_at: '2016-06-09T20:03:39Z'
    VanityNameServer:
      type: object
      required:
        - id
        - name
        - ipv4
        - ipv6
        - created_at
        - updated_at
      properties:
        id:
          type: integer
        name:
          type: string
        ipv4:
          type: string
        ipv6:
          type: string
        created_at:
          $ref: '#/components/schemas/DateTimeCreatedAt'
        updated_at:
          $ref: '#/components/schemas/DateTimeUpdatedAt'
    Webhook:
      type: object
      required:
        - id
        - url
        - suppressed_at
      properties:
        id:
          type: integer
        url:
          type: string
          format: uri
        suppressed_at:
          $ref: '#/components/schemas/NullableDateTime'
      example:
        id: 1
        url: 'https://webhook.test'
        suppressed_at: '2022-06-07T17:45:13Z'
    WebhookPayload:
      type: object
      required:
        - name
        - api_version
        - request_identifier
        - data
        - account
        - actor
      properties:
        name:
          type: string
          description: 'The name attribute contains a string representing the name of event that occurred. It will always have an object and action separated by a period. It may optionally include a state for objects that go through state changes, for example `domain.registration:started`.'
          enum:
            - account_invitation.accept
            - account_invitation.create
            - account_invitation.remove
            - account_invitation.resend
            - account.billing_settings_update
            - account.payment_details_update
            - account.remove_user
            - account.sso_user_add
            - account.update
            - account.user_invitation_accept
            - account.user_invitation_revoke
            - account.user_invite
            - account.user_remove
            - certificate.auto_renewal_disable
            - certificate.auto_renewal_enable
            - certificate.auto_renewal_failed
            - certificate.issue
            - certificate.reissue
            - certificate.remove_private_key
            - contact.create
            - contact.delete
            - contact.update
            - dnssec.create
            - dnssec.delete
            - dnssec.rotation_complete
            - dnssec.rotation_start
            - domain.auto_renewal_disable
            - domain.auto_renewal_enable
            - domain.create
            - domain.delegation_change
            - domain.delete
            - domain.register
            - domain.register:cancelled
            - domain.register:started
            - domain.registrant_change
            - domain.registrant_change:cancelled
            - domain.registrant_change:started
            - domain.renew
            - domain.renew:cancelled
            - domain.renew:started
            - domain.resolution_disable
            - domain.resolution_enable
            - domain.restore
            - domain.restore:cancelled
            - domain.restore:started
            - domain.transfer
            - domain.transfer_lock_disable
            - domain.transfer_lock_enable
            - domain.transfer:cancelled
            - domain.transfer:started
            - domain.state_change
            - email_forward.create
            - email_forward.delete
            - email_forward.update
            - name_server.deregister
            - name_server.register
            - oauth_application.create
            - oauth_application.delete
            - oauth_application.reset_client_secret
            - oauth_application.revoke_access_tokens
            - platform_status.create
            - push.accept
            - push.initiate
            - push.reject
            - secondary_dns.create
            - secondary_dns.delete
            - secondary_dns.update
            - subscription.migrate
            - subscription.renew
            - subscription.subscribe
            - subscription.unsubscribe
            - template_record.create
            - template_record.delete
            - template.create
            - template.delete
            - template.update
            - vanity.disable
            - vanity.enable
            - webhook.create
            - webhook.delete
            - whois_privacy.disable
            - whois_privacy.enable
            - whois_privacy.purchase
            - whois_privacy.renew
            - zone_record.create
            - zone_record.delete
            - zone_record.update
            - zone.create
            - zone.delete
        api_version:
          type: string
          description: 'The api_version is the API version used to serialize the data in the payload. For version 2 of the API, this is the string v2. For example, you can expect a domain object to be serialized using the same domain attributes described in the corresponding API page.'
          enum:
            - v2
        request_identifier:
          type: string
          description: The request_identifier attribute is a UUID that provides a way to identify this request. You may use this UUID to ensure a webhook is processed once and only once by keeping a persistent history of the identifiers sent and never handling a webhook which was already processed.
        data:
          anyOf:
            - $ref: '#/components/schemas/EventAccountAddSSOUser'
            - $ref: '#/components/schemas/EventAccountBillingSettingsUpdate'
            - $ref: '#/components/schemas/EventAccountInvitationAccept'
            - $ref: '#/components/schemas/EventAccountInvitationCreate'
            - $ref: '#/components/schemas/EventAccountInvitationRemove'
            - $ref: '#/components/schemas/EventAccountInvitationResend'
            - $ref: '#/components/schemas/EventAccountPaymentDetailsUpdate'
            - $ref: '#/components/schemas/EventAccountRemoveUser'
            - $ref: '#/components/schemas/EventAccountUpdate'
            - $ref: '#/components/schemas/EventCertificateAutoRenewalDisable'
            - $ref: '#/components/schemas/EventCertificateAutoRenewalEnable'
            - $ref: '#/components/schemas/EventCertificateAutoRenewalFailed'
            - $ref: '#/components/schemas/EventCertificateIssue'
            - $ref: '#/components/schemas/EventCertificateReissue'
            - $ref: '#/components/schemas/EventCertificateRemovePrivateKey'
            - $ref: '#/components/schemas/EventContactCreate'
            - $ref: '#/components/schemas/EventContactDelete'
            - $ref: '#/components/schemas/EventContactUpdate'
            - $ref: '#/components/schemas/EventDNSSECCreate'
            - $ref: '#/components/schemas/EventDNSSECDelete'
            - $ref: '#/components/schemas/EventDNSSECRotationComplete'
            - $ref: '#/components/schemas/EventDNSSECRotationStart'
            - $ref: '#/components/schemas/EventDomainAutoRenewalDisable'
            - $ref: '#/components/schemas/EventDomainAutoRenewalEnable'
            - $ref: '#/components/schemas/EventDomainCreate'
            - $ref: '#/components/schemas/EventDomainDelegationChange'
            - $ref: '#/components/schemas/EventDomainDelete'
            - $ref: '#/components/schemas/EventDomainRegister'
            - $ref: '#/components/schemas/EventDomainRegisterCancelled'
            - $ref: '#/components/schemas/EventDomainRegisterStarted'
            - $ref: '#/components/schemas/EventDomainRegistrantChange'
            - $ref: '#/components/schemas/EventDomainRegistrantChangeCancelled'
            - $ref: '#/components/schemas/EventDomainRegistrantChangeStarted'
            - $ref: '#/components/schemas/EventDomainRenew'
            - $ref: '#/components/schemas/EventDomainRenewCancelled'
            - $ref: '#/components/schemas/EventDomainRenewStarted'
            - $ref: '#/components/schemas/EventDomainResolutionDisable'
            - $ref: '#/components/schemas/EventDomainResolutionEnable'
            - $ref: '#/components/schemas/EventDomainRestore'
            - $ref: '#/components/schemas/EventDomainRestoreCancelled'
            - $ref: '#/components/schemas/EventDomainRestoreStarted'
            - $ref: '#/components/schemas/EventDomainTransfer'
            - $ref: '#/components/schemas/EventDomainTransferCancelled'
            - $ref: '#/components/schemas/EventDomainTransferLockDisable'
            - $ref: '#/components/schemas/EventDomainTransferLockEnable'
            - $ref: '#/components/schemas/EventDomainTransferStarted'
            - $ref: '#/components/schemas/EventDomainStateChange'
            - $ref: '#/components/schemas/EventEmailForwardCreate'
            - $ref: '#/components/schemas/EventEmailForwardDelete'
            - $ref: '#/components/schemas/EventEmailForwardUpdate'
            - $ref: '#/components/schemas/EventInvoiceCollect'
            - $ref: '#/components/schemas/EventNameServerDeregister'
            - $ref: '#/components/schemas/EventNameServerRegister'
            - $ref: '#/components/schemas/EventOauthApplicationCreate'
            - $ref: '#/components/schemas/EventOauthApplicationDelete'
            - $ref: '#/components/schemas/EventOauthApplicationResetClientSecret'
            - $ref: '#/components/schemas/EventOauthApplicationRevokeAccessTokens'
            - $ref: '#/components/schemas/EventOauthApplicationUpdate'
            - $ref: '#/components/schemas/EventPushAccept'
            - $ref: '#/components/schemas/EventPushInitiate'
            - $ref: '#/components/schemas/EventPushReject'
            - $ref: '#/components/schemas/EventRecordCreate'
            - $ref: '#/components/schemas/EventRecordDelete'
            - $ref: '#/components/schemas/EventRecordUpdate'
            - $ref: '#/components/schemas/EventSecondaryDNSCreate'
            - $ref: '#/components/schemas/EventSecondaryDNSDelete'
            - $ref: '#/components/schemas/EventSecondaryDNSUpdate'
            - $ref: '#/components/schemas/EventSubscriptionMigrate'
            - $ref: '#/components/schemas/EventSubscriptionRenew'
            - $ref: '#/components/schemas/EventSubscriptionSubscribe'
            - $ref: '#/components/schemas/EventSubscriptionUnsubscribe'
            - $ref: '#/components/schemas/EventTemplateApply'
            - $ref: '#/components/schemas/EventTemplateCreate'
            - $ref: '#/components/schemas/EventTemplateDelete'
            - $ref: '#/components/schemas/EventTemplateRecordCreate'
            - $ref: '#/components/schemas/EventTemplateRecordDelete'
            - $ref: '#/components/schemas/EventTemplateUpdate'
            - $ref: '#/components/schemas/EventVanityDisable'
            - $ref: '#/components/schemas/EventVanityEnable'
            - $ref: '#/components/schemas/EventWebhookCreate'
            - $ref: '#/components/schemas/EventWebhookDelete'
            - $ref: '#/components/schemas/EventWhoisPrivacyDisable'
            - $ref: '#/components/schemas/EventWhoisPrivacyEnable'
            - $ref: '#/components/schemas/EventWhoisPrivacyPurchase'
            - $ref: '#/components/schemas/EventWhoisPrivacyRenew'
            - $ref: '#/components/schemas/EventZoneCreate'
            - $ref: '#/components/schemas/EventZoneDelete'
          description: The data attribute contains any data for the object or objects related to the event. Each object in the data object will be keyed on an object type name.
        account:
          description: 'The account is an object describing which account the event occurred in. It is a lightweight representation of the account and includes the id, a unique identifier and a display text representation.'
          allOf:
            - $ref: '#/components/schemas/WebhookAccount'
        actor:
          description: 'The actor is an object describing the entity that triggered the event. This may be a user if the event was triggered due to activity via the UI or API, or it may be a system entity if the activity occurred as part of an asynchronous process. The actor object has three attributes: id, which is a unique identifier for the actor, entity which describes what type the actor is, and pretty, which is a printable representation of the actor for use in display.'
          allOf:
            - $ref: '#/components/schemas/Actor'
      example:
        name: domain.create
        api_version: v2
        request_identifier: fca1f30a-4219-4278-9272-c00e5cc2eb5c
        data:
          domain:
            id: 1
            account_id: 1010
            registrant_id: null
            name: example-alpha.com
            unicode_name: example-alpha.com
            state: hosted
            auto_renew: false
            private_whois: false
            expires_at: null
            trustee: false
            created_at: '2014-12-06T15:56:55Z'
            updated_at: '2015-12-09T00:20:56Z'
        account:
          id: 123
          display: Personal
          identifier: example@example.com
        actor:
          id: 1120
          entity: user
          pretty: example@example.com
    WhoisPrivacy:
      type: object
      required:
        - id
        - domain_id
        - enabled
        - expires_on
        - created_at
        - updated_at
      properties:
        id:
          type: integer
        domain_id:
          type: integer
        enabled:
          type: boolean
        expires_on:
          $ref: '#/components/schemas/Date'
        created_at:
          $ref: '#/components/schemas/DateTimeCreatedAt'
        updated_at:
          $ref: '#/components/schemas/DateTimeUpdatedAt'
      example:
        id: 1
        domain_id: 2
        expires_on: '2017-02-13'
        enabled: true
        created_at: '2016-02-13T14:34:50Z'
        updated_at: '2016-02-13T14:34:52Z'
    Zone:
      type: object
      description: Represents a DNS zone.
      required:
        - id
        - account_id
        - name
        - reverse
        - secondary
        - last_transferred_at
        - active
        - created_at
        - updated_at
      properties:
        id:
          type: integer
        account_id:
          type: integer
        name:
          type: string
        reverse:
          type: boolean
          description: 'Returns true for a reverse zone, false for a forward zone.'
        secondary:
          type: boolean
          description: 'Returns true for a secondary zone, false for a primary zone.'
        last_transferred_at:
          type: ["string", "null"]
          format: date-time
          example: '2010-01-01T01:00:00Z'
          description: Returns the date the zone was last transferred. Used if it is a secondary zone.
        active:
          type: boolean
          description: 'Returns true if DNS services are active for the zone. If false, DNS services are disabled and DNS records will not be resolved.'
        created_at:
          $ref: '#/components/schemas/DateTimeCreatedAt'
        updated_at:
          $ref: '#/components/schemas/DateTimeUpdatedAt'
      example:
        id: 1
        account_id: 1010
        name: example-alpha.com
        reverse: false
        secondary: false
        last_transferred_at: null
        active: true
        created_at: '2015-04-23T07:40:03Z'
        updated_at: '2015-04-23T07:40:03Z'
    ZoneFile:
      type: object
      description: A DNS zone file.
      required: [zone]
      properties:
        zone:
          type: string
      example:
        zone: |
          $ORIGIN example.com.
          $TTL 1h
          example.com. 3600 IN SOA ns1.dnsimple.com. admin.dnsimple.com. 1453132552 86400 7200 604800 300
          example.com. 3600 IN NS ns1.dnsimple.com.
          example.com. 3600 IN NS ns2.dnsimple.com.
          example.com. 3600 IN NS ns3.dnsimple.com.
          example.com. 3600 IN NS ns4.dnsimple.com.
    ZoneDistribution:
      type: object
      description: Zone distribution check
      required: [distributed]
      properties:
        distributed:
          type: boolean
          description: 'Returns true if the zone is fully distributed, false if not.'
      example:
        distributed: true
    ZoneRecord:
      type: object
      description: A single DNS record in a zone.
      required:
        - id
        - zone_id
        - parent_id
        - name
        - content
        - ttl
        - priority
        - type
        - regions
        - system_record
        - created_at
        - updated_at
      example:
        id: 1
        zone_id: example.com
        parent_id: null
        name: ''
        content: ns1.dnsimple.com admin.dnsimple.com 1458642070 86400 7200 604800 300
        ttl: 3600
        priority: null
        type: SOA
        regions:
          - global
        system_record: true
        created_at: '2016-03-22T10:20:53Z'
        updated_at: '2016-10-05T09:26:38Z'
      properties:
        id:
          type: integer
          description: The unique identifier for the record.
        zone_id:
          type: string
          description: The unique identifier of the zone this record belongs to
        parent_id:
          type: ["integer", "null"]
          description: If present represents the zone record this record relates to. The parent record is the master record, when the parent is updated or deleted the related record is also updated or deleted. An example of child record is the TXT descriptive record created for an ALIAS record.
        name:
          type: string
          description: The name of the record (e.g., "www" for www.example.com).
        content:
          type: string
          description: The content/value of the record (e.g., IP address for A records, hostname for CNAME records).
        ttl:
          $ref: '#/components/schemas/TTL'
        priority:
          type: ["integer", "null"]
          description: The priority value for MX and SRV records. Lower values have higher priority.
          default: 0
        type:
          $ref: '#/components/schemas/ZoneRecordType'
        regions:
          type: array
          description: The regions where this record is active. If empty, the record is active in all regions.
          items:
            $ref: '#/components/schemas/ZoneRecordRegion'
        system_record:
          type: boolean
          description: Returns true if a record is a system generated record and thus is not modifiable.
        created_at:
          $ref: '#/components/schemas/DateTimeCreatedAt'
        updated_at:
          $ref: '#/components/schemas/DateTimeUpdatedAt'
    ZoneRecordRegion:
      type: string
      enum:
        - global
        - SV1
        - ORD
        - IAD
        - AMS
        - TKO
        - SYD
        - CDG
        - FRA
    ZoneRecordType:
      type: string
      description: The type of DNS record. Supported DNS record types are listed below. Note that some record types may only be available on specific plans.
      enum:
        - A
        - AAAA
        - ALIAS
        - CAA
        - CNAME
        - DNSKEY
        - DS
        - HINFO
        - MX
        - NAPTR
        - NS
        - POOL
        - PTR
        - SOA
        - SPF
        - SRV
        - SSHFP
        - TXT
        - URL
  responses:
    '400':
      description: A required parameter is missing or the request is invalid.
      content:
        application/json:
          schema:
            type: object
            required:
              - message
              - errors
            properties:
              message:
                type: string
              errors:
                type: object
                additionalProperties:
                  type: object
                  properties:
                    field:
                      type: integer
                    errors:
                      type: array
                      items:
                        type: string
          examples:
            example-1:
              value:
                message: string
                errors:
                  property1:
                    field: string
                    errors:
                      - string
                  property2:
                    field: string
                    errors:
                      - string
            example-2:
              value:
                message: Validation failed
                errors:
                  address1:
                    - can't be blank
                  city:
                    - can't be blank
                  country:
                    - can't be blank
                  email:
                    - can't be blank
                    - is an invalid email address
                  first_name:
                    - can't be blank
                  last_name:
                    - can't be blank
                  phone:
                    - can't be blank
                    - is probably not a phone number
                  postal_code:
                    - can't be blank
                  state_province:
                    - can't be blank
    '401':
      description: The authentication credentials are invalid.
      content:
        application/json:
          schema:
            type: object
            required: [message]
            properties:
              message:
                type: string
          examples:
            example-1:
              value:
                message: Authentication failed
    '402':
      description: Your account is not subscribed or not in good standing.
      content:
        application/json:
          schema:
            type: object
            required: [message]
            properties:
              message:
                type: string
          examples:
            example-1:
              value:
                message: 'This action cannot be completed because you have purchase invoices that need to be paid for: 12345-1010. Please retry the payment following these instructions https://support.dnsimple.com/articles/account-invoice-history/#retrying.'
    '404':
      description: The requested resource doesn't exist.
      content:
        application/json:
          schema:
            type: object
            required: [message]
            properties:
              message:
                type: string
          examples:
            example-1:
              value:
                message: Not Found
    '412':
      description: A precondition failed while trying to access a resource.
    '429':
      description: You exceeded the allowed number of requests per hour and your request has temporarily been throttled.
      headers:
        X-RateLimit-Limit:
          $ref: '#/components/headers/X-RateLimit-Limit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/X-RateLimit-Remaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/X-RateLimit-Reset'
      content:
        application/json:
          schema:
            type: object
            required: [message]
            properties:
              message:
                type: string
          examples:
            example-1:
              value:
                message: quota exceeded
    412-feature:
      description: Feature is not available on your plan.
    Error:
      description: An error occurred
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  requestBodies:
    BatchChangeZoneRecords:
      description: Batch change zone records input attributes
      required: true
      content:
        application/json:
          schema:
            type: object
            properties:
              creates:
                type: array
                description: Zone records to create
                items:
                  type: object
                  required:
                    - name
                    - type
                    - content
                  properties:
                    name:
                      type: string
                    type:
                      $ref: '#/components/schemas/ZoneRecordType'
                    content:
                      type: string
                    ttl:
                      $ref: '#/components/schemas/TTL'
                    priority:
                      type: integer
                    regions:
                      type: array
                      items:
                        $ref: '#/components/schemas/ZoneRecordRegion'
              updates:
                type: array
                description: Zone records to update
                items:
                  type: object
                  required:
                    - id
                  properties:
                    id:
                      type: integer
                      description: ID of the zone record to update
                    name:
                      type: string
                    content:
                      type: string
                    ttl:
                      $ref: '#/components/schemas/TTL'
                    priority:
                      type: integer
                    regions:
                      type: array
                      items:
                        $ref: '#/components/schemas/ZoneRecordRegion'
              deletes:
                type: array
                description: Zone record IDs to delete
                items:
                  type: object
                  required:
                    - id
                  properties:
                    id:
                      type: integer
                      description: ID of the zone record to delete
            example:
              creates:
                - name: ab
                  type: A
                  content: 3.2.3.4
                  ttl: 3600
              updates:
                - id: 67622534
                  content: 3.2.3.40
              deletes:
                - id: 67622509
    ContactCreate:
      description: Contact create attributes
      required: true
      content:
        application/json:
          schema:
            type: object
            required:
              - first_name
              - last_name
              - email
              - phone
              - address1
              - city
              - state_province
              - postal_code
              - country
            properties:
              label:
                type: string
                default: ''
              first_name:
                type: string
              last_name:
                type: string
              address1:
                type: string
              address2:
                type: ["string", "null"]
              city:
                type: string
              state_province:
                type: string
              postal_code:
                type: string
              country:
                type: string
              email:
                type: string
              phone:
                type: string
              fax:
                type: ["string", "null"]
              organization_name:
                type: string
                description: 'The company name. If the organization_name is specified, then you must also include job_title.'
              job_title:
                type: string
                description: The contact's job title. Required if the organization_name is specified.
            example:
              label: Default
              first_name: First
              last_name: User
              job_title: CEO
              organization_name: Awesome Company
              email: first@example.com
              phone: '+18001234567'
              fax: '+18011234567'
              address1: 'Italian Street, 10'
              city: Roma
              state_province: RM
              postal_code: '00100'
              country: IT
    ContactUpdate:
      description: Contact update attributes
      required: true
      content:
        application/json:
          schema:
            type: object
            properties:
              label:
                type: string
                default: ''
              first_name:
                type: string
              last_name:
                type: string
              address1:
                type: string
              address2:
                type: ["string", "null"]
              city:
                type: string
              state_province:
                type: string
              postal_code:
                type: string
              country:
                type: string
              email:
                type: string
              phone:
                type: string
              fax:
                type: ["string", "null"]
              organization_name:
                type: string
                description: 'The company name. If the organization_name is specified, then you must also include job_title.'
              job_title:
                type: string
                description: The contact's job title. Required if the organization_name is specified.
            example:
              label: Default
              first_name: First
              last_name: User
              job_title: CEO
              organization_name: Awesome Company
              email: first@example.com
              phone: '+18001234567'
              fax: '+18011234567'
              address1: 'Italian Street, 10'
              city: Roma
              state_province: RM
              postal_code: '00100'
              country: IT
    DelegationSignerCreate:
      description: Delegation signer attributes
      required: true
      content:
        application/json:
          schema:
            type: object
            properties:
              algorithm:
                type: string
              digest:
                type: string
              digest_type:
                type: string
              keytag:
                type: string
              public_key:
                type: string
    DomainCreate:
      description: Domain attributes
      required: true
      content:
        application/json:
          schema:
            type: object
            required: [name]
            properties:
              name:
                type: string
          example:
            name: example.com
    DomainNameServers:
      description: A collection of domain name servers
      required: true
      content:
        application/json:
          schema:
            type: array
            items:
              type: string
            example:
              - ns1.dnsimple.com
              - ns2.dnsimple.com
              - ns3.dnsimple.com
              - ns4.dnsimple.com
    ZoneNsRecordsUpdate:
      description: Zone name server attributes
      content:
        application/json:
          schema:
            anyOf:
              - type: object
                required: [ns_names]
                properties:
                  ns_names:
                    type: array
                    items:
                      type: string
                    example:
                      - ns1.dnsimple.com
                      - ns2.dnsimple.com
                      - ns3.dnsimple.com
                      - ns4.dnsimple.com
                  ns_set_ids:
                    type: array
                    items:
                      type: integer
                    example:
                      - 1
                      - 2
              - type: object
                required: [ns_set_ids]
                properties:
                  ns_names:
                    type: array
                    items:
                      type: string
                    example:
                      - ns1.dnsimple.com
                      - ns2.dnsimple.com
                      - ns3.dnsimple.com
                      - ns4.dnsimple.com
                  ns_set_ids:
                    type: array
                    items:
                      type: integer
                    example:
                      - 1
                      - 2
    DomainRegister:
      description: Domain registration attributes
      required: true
      content:
        application/json:
          schema:
            type: object
            required: [registrant_id]
            properties:
              registrant_id:
                type: integer
                description: The ID of an existing contact in your account.
              whois_privacy:
                type: boolean
                description: 'Set to true will attempt to purchase/enable the whois privacy as part of the registration. An extra cost may apply. Default: false.'
              auto_renew:
                type: boolean
                description: 'Set to true to enable the auto-renewal of the domain. Default: false.'
              trustee:
                type: boolean
                description: 'Set to true will attempt to purchase/enable trustee service as part of the registration. An extra cost may apply. Default: false.'
              extended_attributes:
                type: object
                description: Required for TLDs that require extended attributes.
              premium_price:
                type: string
                description: 'Required as confirmation of the price, only if the domain is premium.'
              linked_provider:
                type: string
                description: 'The nickname of a linked provider to register the domain through. If left blank, registration will go through DNSimple.'
            example:
              registrant_id: 1
              trustee: true
    DomainRenew:
      description: Domain renewal attributes
      required: true
      content:
        application/json:
          schema:
            type: object
            required: [period]
            properties:
              period:
                type: integer
              premium_price:
                type: string
                description: 'Required as confirmation of the price, only if the domain is premium.'
            example:
              period: 2
    DomainRestore:
      description: Domain restore attributes
      required: true
      content:
        application/json:
          schema:
            type: object
            properties:
              premium_price:
                type: string
                description: 'Required as confirmation of the price, only if the domain is premium.'
            example:
              premium_price: '109.00'
    DomainTransfer:
      description: Domain transfer attributes
      required: true
      content:
        application/json:
          schema:
            type: object
            required:
              - registrant_id
              - auth_code
            properties:
              registrant_id:
                type: integer
                description: The ID of an existing contact in your account.
              auth_code:
                type: string
                description: Required for TLDS that require authorization-based transfer (the vast majority of TLDs).
              whois_privacy:
                type: boolean
                description: 'Set to true will attempt to purchase/enable the whois privacy as part of the transfer. An extra cost may apply. Default: false.'
              auto_renew:
                type: boolean
                description: 'Set to true to enable the auto-renewal of the domain. Default: false.'
              trustee:
                type: boolean
                description: 'Set to true to use a trustee service for the transfer. An extra cost may apply. Default: false.'
              extended_attributes:
                type: object
                description: Required for TLDs that require extended attributes.
              premium_price:
                type: string
                description: 'Required as confirmation of the price, only if the domain is premium.'
    EmailForwardCreate:
      description: Email forward attributes
      required: true
      content:
        application/json:
          schema:
            type: object
            properties:
              alias_name:
                type: string
                description: The receiving email recipient, the name part only without the domain. The domain is automatically appended.
              destination_email:
                type: string
                format: email
                description: The email recipient the messages are delivered to.
            example:
              alias_name: john.doe
              destination_email: john@example.com
    PushInitiate:
      description: Push attributes
      required: true
      content:
        application/json:
          schema:
            type: object
            properties:
              new_account_email:
                type: string
                deprecated: true
                description: Deprecated - use new_account_identifier instead
              new_account_identifier:
                type: string
                description: The account identifier of the target DNSimple account
            example:
              new_account_identifier: xxxxxxxx-xxxx-7xxx-xxxx-xxxxxxxxxxxx
    PushAccept:
      description: Attributes required to accept a push
      required: true
      content:
        application/json:
          schema:
            type: object
            required: [contact_id]
            properties:
              contact_id:
                type: integer
            example:
              contact_id: 2
    PrimaryServerCreate:
      description: Primary Server attributes
      required: true
      content:
        application/json:
          schema:
            type: object
            required:
              - name
              - ip
            properties:
              name:
                type: string
              ip:
                type: string
              port:
                type: string
    RegistrantChangeCreate:
      description: Contact change attributes
      required: true
      content:
        application/json:
          schema:
            type: object
            required:
              - domain_id
              - contact_id
            properties:
              domain_id:
                oneOf:
                  - type: string
                  - type: integer
              contact_id:
                oneOf:
                  - type: string
                  - type: integer
              extended_attributes:
                $ref: '#/components/schemas/TradeExtendedAttributes'
            example:
              domain_id: "example.com"
              contact_id: "2"
              extended_attributes: { "x-fi-registrant-idnumber": "1234" }
    RegistrantChangeCheck:
      description: Contact change attributes
      required: true
      content:
        application/json:
          schema:
            type: object
            required:
              - domain_id
              - contact_id
            properties:
              domain_id:
                oneOf:
                  - type: string
                  - type: integer
              contact_id:
                oneOf:
                  - type: string
                  - type: integer
            example:
              domain_id: "dnsimple.com"
              contact_id: "2"
    SecondaryZoneCreate:
      description: Secondary Zone attributes
      required: true
      content:
        application/json:
          schema:
            type: object
            required:
              - name
            properties:
              name:
                type: string
    ServiceApply:
      description: 'Optional hash of settings for some specific services, corresponding to the service fields. For instance, Heroku requires a settings[app] setting.'
      required: false
      content:
        application/json:
          schema:
            type: object
            example:
              app: my-app-name
    TemplateCreate:
      description: Attributes for creating a template.
      required: true
      content:
        application/json:
          schema:
            type: object
            required:
              - sid
              - name
            properties:
              sid:
                type: string
              name:
                type: string
              description:
                type: string
            example:
              name: Alpha
              sid: alpha
              description: This is an Alpha template.
    TemplateUpdate:
      description: Attributes for updating a template.
      required: true
      content:
        application/json:
          schema:
            type: object
            properties:
              sid:
                type: string
              name:
                type: string
              description:
                type: string
            example:
              name: Alpha
              sid: alpha
              description: This is an Alpha template.
    TemplateRecordCreateOrUpdate:
      description: Attributes for creating a template record
      required: true
      content:
        application/json:
          schema:
            type: object
            required:
              - name
              - type
              - content
            properties:
              name:
                type: string
              type:
                type: string
              content:
                type: string
              ttl:
                type: integer
              priority:
                type: integer
            example:
              name: ''
              type: MX
              content: mx.example.com
              ttl: 600
              priority: 10
    VanityNameServers:
      description: A collection of vanity name servers
      required: true
      content:
        application/json:
          schema:
            type: array
            items:
              type: string
            example:
              - ns1.example.com
              - ns2.example.com
              - ns3.example.com
              - ns4.example.com
    ZoneRecordCreate:
      description: Zone record attributes
      required: true
      content:
        application/json:
          schema:
            type: object
            required:
              - name
              - type
              - content
            properties:
              name:
                type: string
              type:
                $ref: '#/components/schemas/ZoneRecordType'
              content:
                type: string
              ttl:
                $ref: '#/components/schemas/TTL'
              priority:
                type: integer
              regions:
                type: array
                items:
                  $ref: '#/components/schemas/ZoneRecordRegion'
              integrated_zones:
                type: array
                items:
                  type: integer
                example:
                  - 1
                  - 2
            example:
              name: ''
              type: MX
              content: mxa.example.com
              ttl: 600
              priority: 10
              regions:
                - SV1
                - IAD
    ZoneRecordUpdate:
      description: Zone record update attributes
      required: true
      content:
        application/json:
          schema:
            type: object
            properties:
              name:
                type: string
              content:
                type: string
              ttl:
                $ref: '#/components/schemas/TTL'
              priority:
                type: integer
              regions:
                type: array
                items:
                  $ref: '#/components/schemas/ZoneRecordRegion'
              integrated_zones:
                type: array
                items:
                  type: integer
                example:
                  - 1
                  - 2
            example:
              content: mxb.example.com
              ttl: 3600
              priority: 20
              regions:
                - global
  headers:
    X-RateLimit-Limit:
      description: The maximum number of requests you can perform per hour.
      schema:
        type: integer
    X-RateLimit-Remaining:
      description: The number of requests remaining in the current rate limit window.
      schema:
        type: integer
    X-RateLimit-Reset:
      description: The time at which the current rate limit window in Unix time format.
      schema:
        type: integer
