components:
  securitySchemes:
    BasicAuth: {scheme: basic, type: http}
    BearerAuth: {scheme: bearer, type: http}
info:
  contact: {email: support@mythic-beasts.com}
  description: "\nThis API allows you to manage DNS records for your domains (or \"\
    [zones](#sec-zones)\") \nprogrammatically.  If you are new to using this API,\n\
    we recommend that you start with the [tutorial](dnsv2/tutorial), which\ndemonstrates\
    \ the main features of the API.\n\n_This documentation describes version 2 of\
    \ the API.  If you are using the\nprevious version of the API, you should consult\
    \ the [DNS API v1\ndocumentation](dns)_\n\n\n## Authentication and authorisation\n\
    \nThis API uses our [auth service](auth).  Credentials for using this API can\n\
    be obtained from the [API\nKeys](https://www.mythic-beasts.com/customer/api-users)\
    \ section of the\ncontrol panel.  Credentials can be unrestricted, allowing them\
    \ to manage\nall [zones](#sec-zones) on your account, or restricted to individual\
    \ [zones](#sec-zones), records\nand record types.\n\nAuthentication for the DNS\
    \ API can be done using a \"Bearer token\".  In\nthis, you provide your credentials\
    \ to the [auth service](auth) which will\nreturn a token which can be used in\
    \ subsequent requests.  See the\n[documentation for the auth service](auth) for\
    \ more details.\n\nThe DNS API also support HTTP Basic Auth.  When using Basic\
    \ Auth,\ncredentials are provided directly to the DNS API.  See the\n[tutorial](dnsv2/tutorial)\
    \ for details of how to do this using curl.\n\n_Please note that this API uses\
    \ different credentials to [DNS API\nv1](dns).  Credentials for DNS API v1 will\
    \ not work with this API and\nvice versa._\n\n## API overview\n\n### Terminology:\
    \ zones vs domains {: #sec-zones}\n\nDNS records are divided up into zones.  In\
    \ most cases, zones correspond\ndirectly to domains, so there will be a single\
    \ `example.com` zone for the\n`example.com` domain.\n\nIt is possible to divide\
    \ a single domain into multiple zones, which may be\nused delegate control of\
    \ the DNS for a portion of a domain.  Therefore the\nAPI, and this documentation,\
    \ use the term _zone_ rather than _domain_.\n\n### Selecting records\n\nDNS records\
    \ can be selected by the combination of a hierarchical URL and an optional [filter](#sec-filtering).\n\
    For example the following URL selects the `A` records for `www.example.com`:\n\
    \n```\n/zones/example.com/records/www/A\n```\n\nThe type and hostname can be omitted.\
    \  The following URL will select all records for `www.example.com`, regardless\
    \ of type:\n\n```\n/zones/example.com/records/www\n```\n\nIt also possible to\
    \ get all records for the zone:\n\n```\n/zones/example.com/records\n```\n\nAn\
    \ optional [filter](#sec-filtering) can be added to select records based on any\
    \ [field](#sec-fields).\nFor example, the following will select the same records\
    \ as the first URL:\n\n```\n/zones/example.com/records?host=www&type=A\n```\n\n\
    Filters can be used on other [fields](#sec-fields).  For example, to select all\
    \ MX records with a specific priority, use the `mx_priority` field:\n\n```\n/zones/example.com/records/@/MX?mx_priority=10\n\
    ```\n\n### Interacting with records\n\nHTTP methods can be used to interact with\
    \ selected records:\n\n* A `GET` request will return details of the selected records.\n\
    * A `PUT` request will replace the selected records.\n* A `POST` request will\
    \ add to the selected records.\n* A `DELETE` request will delete the selected\
    \ records.\n\n\n### Input and output formats\n\nThe API supports JSON and [RFC\
    \ 1035](https://tools.ietf.org/html/rfc1035) zone file format for\nboth input\
    \ and output.  The default is JSON (`application/json`).  Zone\nfile format can\
    \ be selected by specifying:\n\n* A `Content-Type: text/dns` header for input\
    \ (`PUT` and `POST` requests)\n* An `Accept: text/dns` header for output (`GET`\
    \ requests)\n\nIn addition, new records can be defined as form data using the\n\
    `application/x-www-form-urlencoded` content type.  This is less powerful\nbecause\
    \ only a single record can be defined in each request.\n\n### Updating records\n\
    \nRecords can be created or updated by making either a `PUT` or `POST`\nrequest,\
    \ and supplying the new records as input.\n\nIn the case of a `POST` request,\
    \ any records provided are added to the\nzone.  In the case of a `PUT` request,\
    \ all records selected by the URL are\nreplaced by the provided input.\n\nNote\
    \ that when performing a `PUT` or `POST` request, new records must match\nany\
    \ host and record type specified by the _hierarchical_ part of URL but\nare not\
    \ required to match the details of any _filters_.  \n\n### Transactions\n\nUpdate\
    \ operations within a request are atomic.  Either all records selected and supplied\n\
    will be updated, or the operation will fail and no records are updated.  It\n\
    is also guaranteed that all records updated in a single request will add to\n\
    the DNS server in a single update.\n\nThe same is not true of updates made over\
    \ multiple requests.  If you delete\nold records in one request, and add new records\
    \ in a subsequent request, it\nis possible that the DNS server will be updated\
    \ between these requests, and\nyour zone will contain neither the old nor new\
    \ records.\n\n#### ANAME records\n\n`ANAME` records are updated by a separate,\
    \ periodic process:\n\n* If you create a new `ANAME` record, generated `A` and\
    \ `AAAA` records will\nnot appear immediately.\n\n* If you replace an `ANAME`\
    \ record with a new `ANAME` record for the same\nhostname, any existing, generated\
    \ `A` and `AAAA` records will remain in\nplace until the next regular update.\n\
    \n* If you remove an `ANAME` record, and do not replace it, generated records\n\
    will be removed immediately.\n\n### Fields {: #sec-fields}\n\nThe different parts\
    \ of a record are referred to as _fields_.  Some fields\nare common to all record\
    \ types:\n\n* `host` - the name of the record being defined, within the zone.\
    \  Note that this name is _relative to the zone name_.\n* `ttl` - the TTL (\"\
    time to live\") specified in seconds.\n* `type` - the record type (e.g. `A` or\
    \ `MX`).\n* `data` - the data defined for the record.\n\nSome record types take\
    \ additional fields.  A full list of supported record\ntypes, and the fields that\
    \ they take, can be obtained from the\n`/record-types` end point.  Note that the\
    \ order that the fields are\nspecified in for each record type corresponds to\
    \ the order of the fields in\nzone file format.\n\n### Filtering {#sec-filtering}\n\
    \nAs noted above, record URLs can be filtered.  This can be done using a\n\"basic\
    \ filter\", specifying the field names directly as query parmeters.\nFor example,\
    \ the following query string will select all MX records with a TTL of 300:\n \
    \   \n```\n?ttl=300&type=MX\n``` \n\n#### Combining filters\n\nIt is also possible\
    \ to combine multiple filters in a single request.  This\nis done by taking a\
    \ basic filter, URL encoding it, and passing it as a\nvalue to the `select` parameter.\
    \  Multiple filters can be specified by\nrepeating the `select` parameter.\n\n\
    The combined filter will return any records that match _all_ of the\ncriteria\
    \ in at least one `select` parameter.  For example:\n\n```\n?select=type%3DA%26host=www4&select=type%3DAAAA%26host=www6\n\
    ```\n\nThe above filter will select all `A` records for `www4` and all `AAAA`\n\
    records for `www6`.\n\nCombining filters makes it possible to select any subset\
    \ of the records in\na zone.\n\n\n\n### Boolean query parameters {: #sec-boolean\
    \ }\n\nThe API has a number of boolean query string parameters.  \"True\" can\
    \ be indicated with `true`, `1` or omitting the value altogether.  For example:\n\
    \n* `?exclude-generated`\n* `?exclude-generated=true`\n* `?exclude-generated=1`\n\
    \n### Base URL {: #sec-base-url }\n\nThe base URL for this service is:\n\n*  **https://api.mythic-beasts.com/dns/v2**\n\
    \nThe endpoints listed below should be appended to the above URL.  In\naddition,\
    \ the service is available on IPv4-only and IPv6-only URLs:\n\n*  **https://ipv4.api.mythic-beasts.com/dns/v2**\n\
    *  **https://ipv6.api.mythic-beasts.com/dns/v2**\n\nThese URLs are intend for\
    \ use with Dynamic DNS, so that your IPv4 or IPv6\naddress can be detected correctly.\n\
    \n"
  termsOfService: https://www.mythic-beasts.com/article/terms
  title: Primary DNS API
  version: 2.0.0
openapi: 3.0.0
paths:
  /dynamic/{host}:
    put:
      description: "This end point will create or update an `A` or `AAAA` record with\
        \ the\nspecified hostname, with the data set to the IP address of the client\n\
        using the API.\n\nThe type of the record will be determined by the type of\
        \ the IP\naddress.  If you connect over IPv6, an AAAA record wil be created.\n\
        If you connect over IPv4, an A record will be created.  You can\ncontrol how\
        \ you connect by using the [family-specific hostnames](#sec-base-url).\n\n\
        The TTL of the record is set to 60 seconds.\n\nThis end point also supports\
        \ `GET` and `POST` methods with identical behaviour.  \n\nIn addition to the\
        \ Basic and Bearer HTTP authentication mechanisms\nsupported by other end\
        \ points, this endpoint allows the username and\npassword to be provided directly\
        \ as either form parameters or query\nstring parameters (the latter is not\
        \ recommended).\n\n"
      parameters:
      - description: The hostname to create or update.  If a zone is specified then
          this can be either the hostname within the zone (e.g. `www`) or a fully-qualified
          host name (e.g. `www.example.com`)
        in: path
        name: host
        required: true
        schema: {type: string}
      requestBody:
        content:
          x-www-form-urlencoded:
            schema:
              properties:
                password: {description: 'API key secret.  This can also be provided
                    as a query parameter, but this is not recommended.', example: 1234_abcdef,
                  type: string}
                username: {description: 'API key username.  This can also be provided
                    as a query parameter, but this is not recommended.', example: abcdef1234,
                  type: string}
      responses:
        '200':
          content:
            application/json:
              schema:
                example: {message: 'Dynamic DNS for test set to 2001:db8::1'}
                properties:
                  message: {description: Response message, type: string}
                type: object
          description: 'DNS record updated


            '
        '400':
          content:
            application/json:
              schema:
                example:
                  errors: [Unknown record type 'FOO', SSHFP fingerprint must be an
                      even number of hexadecimal characters.]
                properties:
                  errors:
                    description: List of errors
                    items: {type: string}
                    type: array
                type: object
          description: Request cannot be completed due to errors in input.
          x-mythic-error-summary: Bad input
        '401':
          content:
            application/json:
              schema:
                properties:
                  error: {description: Error message, example: Malformed or missing
                      auth data, type: string}
                type: object
          description: User is not authenticated.
          x-mythic-error-summary: Not authenticated
        '403':
          content:
            application/json:
              schema:
                properties:
                  error: {description: Error message, example: Auth token has no DNS
                      permits, type: string}
                type: object
          description: Not authorised to access this API.
          x-mythic-error-summary: Not authorised
      security:
      - BasicAuth: []
      - BearerAuth: []
      summary: Dynamic DNS update
  /record-types:
    get:
      description: 'Lists the supported record types, and the field names applicable
        to each type.

        '
      parameters: []
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  record_types:
                    additionalProperties:
                      description: Available field names for record type
                      items: {type: string}
                      type: array
                    description: Available field names by record type
                    example:
                      A: [host, ttl, type, data]
                      AAAA: [host, ttl, type, data]
                      MX: [host, ttl, type, mx_priority, data]
                    type: object
                type: object
          description: 'List of supported record types, and the field names application
            to

            each type.  If the `verify` parameter was specified, this indicates

            that all authoritative servers returned the latest version of the

            selected records, as included in the response.


            '
      security: []
      summary: List record types
  /zones:
    get:
      description: 'List all zones to which the current API key has at least some
        level of access.


        If the key is unrestricted, it will list all zones on the customer account.


        '
      parameters: []
      responses:
        '200':
          content:
            application/json:
              schema:
                example:
                  zones: [example1.com, example2.com]
                properties:
                  zones:
                    description: List of zones
                    items: {type: string}
                    type: array
                type: object
          description: 'List of zones


            '
        '401':
          content:
            application/json:
              schema:
                properties:
                  error: {description: Error message, example: Malformed or missing
                      auth data, type: string}
                type: object
          description: User is not authenticated.
          x-mythic-error-summary: Not authenticated
        '403':
          content:
            application/json:
              schema:
                properties:
                  error: {description: Error message, example: Auth token has no DNS
                      permits, type: string}
                type: object
          description: Not authorised to access this API.
          x-mythic-error-summary: Not authorised
      security:
      - BasicAuth: []
      - BearerAuth: []
      summary: List zones
  /zones/{zone}/dynamic/{host}:
    put:
      description: "This end point will create or update an `A` or `AAAA` record with\
        \ the\nspecified hostname, with the data set to the IP address of the client\n\
        using the API.\n\nThe type of the record will be determined by the type of\
        \ the IP\naddress.  If you connect over IPv6, an AAAA record wil be created.\n\
        If you connect over IPv4, an A record will be created.  You can\ncontrol how\
        \ you connect by using the [family-specific hostnames](#sec-base-url).\n\n\
        The TTL of the record is set to 60 seconds.\n\nThis end point also supports\
        \ `GET` and `POST` methods with identical behaviour.  \n\nIn addition to the\
        \ Basic and Bearer HTTP authentication mechanisms\nsupported by other end\
        \ points, this endpoint allows the username and\npassword to be provided directly\
        \ as either form parameters or query\nstring parameters (the latter is not\
        \ recommended).\n\n"
      parameters:
      - description: The hostname to create or update.  If a zone is specified then
          this can be either the hostname within the zone (e.g. `www`) or a fully-qualified
          host name (e.g. `www.example.com`)
        in: path
        name: host
        required: true
        schema: {type: string}
      - description: The name of the zone.  If `host` is a fully-qualified host name,
          then this parameter (and the `/zones/` prefix) can be omitted.
        in: path
        name: zone
        required: true
        schema: {type: string}
      requestBody:
        content:
          x-www-form-urlencoded:
            schema:
              properties:
                password: {description: 'API key secret.  This can also be provided
                    as a query parameter, but this is not recommended.', example: 1234_abcdef,
                  type: string}
                username: {description: 'API key username.  This can also be provided
                    as a query parameter, but this is not recommended.', example: abcdef1234,
                  type: string}
      responses:
        '200':
          content:
            application/json:
              schema:
                example: {message: 'Dynamic DNS for test set to 2001:db8::1'}
                properties:
                  message: {description: Response message, type: string}
                type: object
          description: 'DNS record updated


            '
        '400':
          content:
            application/json:
              schema:
                example:
                  errors: [Unknown record type 'FOO', SSHFP fingerprint must be an
                      even number of hexadecimal characters.]
                properties:
                  errors:
                    description: List of errors
                    items: {type: string}
                    type: array
                type: object
          description: Request cannot be completed due to errors in input.
          x-mythic-error-summary: Bad input
        '401':
          content:
            application/json:
              schema:
                properties:
                  error: {description: Error message, example: Malformed or missing
                      auth data, type: string}
                type: object
          description: User is not authenticated.
          x-mythic-error-summary: Not authenticated
        '403':
          content:
            application/json:
              schema:
                properties:
                  error: {description: Error message, example: Auth token has no DNS
                      permits, type: string}
                type: object
          description: Not authorised to access this API.
          x-mythic-error-summary: Not authorised
      security:
      - BasicAuth: []
      - BearerAuth: []
      summary: Dynamic DNS update
  /zones/{zone}/records:
    delete:
      description: '

        Deletes all records selected by the path and any specified filters.

        See the [list records](#ep-get-zones-zone-records) endpoint for details

        of how records are selected.


        If no records are selected, the request will return a `200` response

        and indicate that no records have been removed in the `records_removed`

        field.


        '
      parameters:
      - description: The name of the zone.
        in: path
        name: zone
        required: true
        schema: {type: string}
      - description: Exclude generated records.  See [boolean query parameters](#sec-boolean).
        in: query
        name: exclude-generated
        schema: {type: boolean}
      - description: Exclude template records.  See [boolean query parameters](#sec-boolean).
        in: query
        name: exclude-template
        schema: {type: boolean}
      - description: "Comment out ANAME pseudo-records in zone file export\n\nIf set\
          \ to true, ANAME records will be prefixed with `;` when\nexported, so that\
          \ they appear as comments in the zone file export.\nNote that this option\
          \ only affects zone file format responses\n(`text/dns`), and has no effect\
          \ on JSON format responses.  \n\nAny `A` or `AAAA` records generated from\
          \ `ANAME` records will\nstill be included uncommented in the response, unless\n\
          `exclude-generated` is also specified, in which case they will be\nomitted\
          \ altogether.\n\nSee [boolean query parameters](#sec-boolean).\n\n"
        in: query
        name: comment-aname
        schema: {type: boolean}
      - description: "Filter selected records.  \n\nTakes a URL-encoded set of [record\
          \ filter query string parameters](#param-group-recordFilters).  Only records\
          \ matching all specified values will be returned.  The `select` parameter\
          \ may be repeated in which case, records matching all of the values in any\
          \ `select` parameter will be returned.  If any [record filters](#param-group-recordFilters)\
          \ are specified directly as query parameters, then these must match in addition\
          \ to any filters specified in `select` parameters. See [filtering](#sec-filtering)\
          \ for more details.  \n\n"
        in: query
        name: select
        schema: {type: string}
      - description: Record hostname
        in: query
        name: host
        schema: {type: string}
      - description: Record type
        example: A
        in: query
        name: type
        schema: {type: string}
      - description: Time-to-live (TTL).  Number of seconds for which the record can
          be cached
        example: 300
        in: query
        name: ttl
        schema: {type: number}
      - description: Record data
        in: query
        name: data
        schema: {type: string}
      - description: Record priority (MX records)
        in: query
        name: mx_priority
        schema: {type: number}
      - description: Record priority (SRV records)
        in: query
        name: srv_priority
        schema: {type: number}
      - description: Record weight (SRV records)
        in: query
        name: srv_weight
        schema: {type: number}
      - description: Port number (SRV records)
        in: query
        name: srv_port
        schema: {type: number}
      - description: Algorithm for SSH fingerprint (SSHFP records)
        in: query
        name: sshfp_algorithm
        schema: {type: number}
      - description: SSH fingerprint type (SSHFP records)
        in: query
        name: sshfp_type
        schema: {type: number}
      - description: Flags value (CAA records)
        in: query
        name: caa_flags
        schema: {type: number}
      - description: CAA tag value (CAA records)
        in: query
        name: caa_tag
        schema: {type: string}
      - description: TLSA usage (0-3) (TLSA records)
        in: query
        name: tlsa_usage
        schema: {type: number}
      - description: TLSA selector (0 or 1) (TLSA records)
        in: query
        name: tlsa_selector
        schema: {type: number}
      - description: TLSA match method (0-2) (TLSA records)
        in: query
        name: tlsa_matching
        schema: {type: number}
      responses:
        '200':
          content:
            application/json:
              schema:
                example: {message: 3 records removed, records_removed: 3}
                properties:
                  message: {description: Response message, type: string}
                  records_removed: {description: Number of records removed, type: integer}
                type: object
          description: 'Records deleted

            '
        '400':
          content:
            application/json:
              schema:
                example:
                  errors: [Unknown record type 'FOO', SSHFP fingerprint must be an
                      even number of hexadecimal characters.]
                properties:
                  errors:
                    description: List of errors
                    items: {type: string}
                    type: array
                type: object
          description: Request cannot be completed due to errors in input.
          x-mythic-error-summary: Bad input
        '401':
          content:
            application/json:
              schema:
                properties:
                  error: {description: Error message, example: Malformed or missing
                      auth data, type: string}
                type: object
          description: User is not authenticated.
          x-mythic-error-summary: Not authenticated
        '403':
          content:
            application/json:
              schema:
                properties:
                  error: {description: Error message, example: Auth token has no DNS
                      permits, type: string}
                type: object
          description: Not authorised to access this API.
          x-mythic-error-summary: Not authorised
      security:
      - BasicAuth: []
      - BearerAuth: []
      summary: Delete records
    get:
      description: 'List records in the zone.


        This will return all records that match the specified path, filtered

        according to query string parameters.  The response can be returned in

        JSON format, or RFC 1035 zone file format.  The response format can be

        selected using an `Accept` header of `application/json` or `text/dns`,

        respectively.


        '
      parameters:
      - description: The name of the zone.
        in: path
        name: zone
        required: true
        schema: {type: string}
      - description: "Verify that all authoritative servers are returning the latest\n\
          record details.  \n\nIf all authoritative servers return the latest version\
          \ of the selected records, this will give a `200` response, with details\
          \ of the records.\n\nOtherwise, this will give a `409` response, with details\
          \ of the differences between live and expected records.\n\nThis parameter\
          \ can only be used if `host` and `type` are specified in the request URL.\n\
          \n"
        in: query
        name: verify
        schema: {type: boolean}
      - description: Exclude generated records.  See [boolean query parameters](#sec-boolean).
        in: query
        name: exclude-generated
        schema: {type: boolean}
      - description: Exclude template records.  See [boolean query parameters](#sec-boolean).
        in: query
        name: exclude-template
        schema: {type: boolean}
      - description: "Comment out ANAME pseudo-records in zone file export\n\nIf set\
          \ to true, ANAME records will be prefixed with `;` when\nexported, so that\
          \ they appear as comments in the zone file export.\nNote that this option\
          \ only affects zone file format responses\n(`text/dns`), and has no effect\
          \ on JSON format responses.  \n\nAny `A` or `AAAA` records generated from\
          \ `ANAME` records will\nstill be included uncommented in the response, unless\n\
          `exclude-generated` is also specified, in which case they will be\nomitted\
          \ altogether.\n\nSee [boolean query parameters](#sec-boolean).\n\n"
        in: query
        name: comment-aname
        schema: {type: boolean}
      - description: "Filter selected records.  \n\nTakes a URL-encoded set of [record\
          \ filter query string parameters](#param-group-recordFilters).  Only records\
          \ matching all specified values will be returned.  The `select` parameter\
          \ may be repeated in which case, records matching all of the values in any\
          \ `select` parameter will be returned.  If any [record filters](#param-group-recordFilters)\
          \ are specified directly as query parameters, then these must match in addition\
          \ to any filters specified in `select` parameters. See [filtering](#sec-filtering)\
          \ for more details.  \n\n"
        in: query
        name: select
        schema: {type: string}
      - description: Record hostname
        in: query
        name: host
        schema: {type: string}
      - description: Record type
        example: A
        in: query
        name: type
        schema: {type: string}
      - description: Time-to-live (TTL).  Number of seconds for which the record can
          be cached
        example: 300
        in: query
        name: ttl
        schema: {type: number}
      - description: Record data
        in: query
        name: data
        schema: {type: string}
      - description: Record priority (MX records)
        in: query
        name: mx_priority
        schema: {type: number}
      - description: Record priority (SRV records)
        in: query
        name: srv_priority
        schema: {type: number}
      - description: Record weight (SRV records)
        in: query
        name: srv_weight
        schema: {type: number}
      - description: Port number (SRV records)
        in: query
        name: srv_port
        schema: {type: number}
      - description: Algorithm for SSH fingerprint (SSHFP records)
        in: query
        name: sshfp_algorithm
        schema: {type: number}
      - description: SSH fingerprint type (SSHFP records)
        in: query
        name: sshfp_type
        schema: {type: number}
      - description: Flags value (CAA records)
        in: query
        name: caa_flags
        schema: {type: number}
      - description: CAA tag value (CAA records)
        in: query
        name: caa_tag
        schema: {type: string}
      - description: TLSA usage (0-3) (TLSA records)
        in: query
        name: tlsa_usage
        schema: {type: number}
      - description: TLSA selector (0 or 1) (TLSA records)
        in: query
        name: tlsa_selector
        schema: {type: number}
      - description: TLSA match method (0-2) (TLSA records)
        in: query
        name: tlsa_matching
        schema: {type: number}
      responses:
        '200':
          content:
            application/json:
              schema:
                example:
                  records:
                  - {data: 1.2.3.4, host: www, ttl: 300, type: A}
                  - {data: mx.mythic-beasts.com., host: '@', mx_priority: 10, ttl: 300,
                    type: MX}
                properties:
                  records:
                    description: List of records
                    items: {type: string}
                    type: array
                type: object
            text/dns:
              example: "www 300  A   1.2.3.4\n@   300  MX  10 mx.mythic-beasts.com.\
                \ \n"
              schema: {type: string}
          description: 'List of records


            '
        '401':
          content:
            application/json:
              schema:
                properties:
                  error: {description: Error message, example: Malformed or missing
                      auth data, type: string}
                type: object
          description: User is not authenticated.
          x-mythic-error-summary: Not authenticated
        '403':
          content:
            application/json:
              schema:
                properties:
                  error: {description: Error message, example: Auth token has no DNS
                      permits, type: string}
                type: object
          description: Not authorised to access this API.
          x-mythic-error-summary: Not authorised
        '409':
          content:
            application/json:
              schema:
                example:
                  errors: ['''1.2.3.4'' not found in response from ns1.mythic-beasts.com.']
                properties:
                  errors:
                    description: List of errors
                    items: {type: string}
                    type: array
                type: object
          description: 'Indicates that the response from one or more authoritative

            nameservers does not match the latest version of the selected

            records.  Only returned if the `verify` parameter is specified.


            '
      security:
      - BasicAuth: []
      - BearerAuth: []
      summary: Get records
    post:
      description: "Add new records to a zone.  \n\nNew records can be provided as\
        \ JSON (`application/json`), RFC1035 format (`text/dns`), or form parameters\
        \ (`application/x-www-form-urlencoded`).\n\nIf the URL path contains `host`\
        \ or `type` parameters, new records must match these values.\n\nChanges are\
        \ applied atomically; either all new records will be added, or none of them\
        \ will and an error will be returned (see [transactions](#sec-transactions)).\n\
        \n"
      parameters:
      - description: The name of the zone.
        in: path
        name: zone
        required: true
        schema: {type: string}
      - description: Exclude generated records.  See [boolean query parameters](#sec-boolean).
        in: query
        name: exclude-generated
        schema: {type: boolean}
      - description: Exclude template records.  See [boolean query parameters](#sec-boolean).
        in: query
        name: exclude-template
        schema: {type: boolean}
      - description: "Comment out ANAME pseudo-records in zone file export\n\nIf set\
          \ to true, ANAME records will be prefixed with `;` when\nexported, so that\
          \ they appear as comments in the zone file export.\nNote that this option\
          \ only affects zone file format responses\n(`text/dns`), and has no effect\
          \ on JSON format responses.  \n\nAny `A` or `AAAA` records generated from\
          \ `ANAME` records will\nstill be included uncommented in the response, unless\n\
          `exclude-generated` is also specified, in which case they will be\nomitted\
          \ altogether.\n\nSee [boolean query parameters](#sec-boolean).\n\n"
        in: query
        name: comment-aname
        schema: {type: boolean}
      - description: "Filter selected records.  \n\nTakes a URL-encoded set of [record\
          \ filter query string parameters](#param-group-recordFilters).  Only records\
          \ matching all specified values will be returned.  The `select` parameter\
          \ may be repeated in which case, records matching all of the values in any\
          \ `select` parameter will be returned.  If any [record filters](#param-group-recordFilters)\
          \ are specified directly as query parameters, then these must match in addition\
          \ to any filters specified in `select` parameters. See [filtering](#sec-filtering)\
          \ for more details.  \n\n"
        in: query
        name: select
        schema: {type: string}
      - description: Record hostname
        in: query
        name: host
        schema: {type: string}
      - description: Record type
        example: A
        in: query
        name: type
        schema: {type: string}
      - description: Time-to-live (TTL).  Number of seconds for which the record can
          be cached
        example: 300
        in: query
        name: ttl
        schema: {type: number}
      - description: Record data
        in: query
        name: data
        schema: {type: string}
      - description: Record priority (MX records)
        in: query
        name: mx_priority
        schema: {type: number}
      - description: Record priority (SRV records)
        in: query
        name: srv_priority
        schema: {type: number}
      - description: Record weight (SRV records)
        in: query
        name: srv_weight
        schema: {type: number}
      - description: Port number (SRV records)
        in: query
        name: srv_port
        schema: {type: number}
      - description: Algorithm for SSH fingerprint (SSHFP records)
        in: query
        name: sshfp_algorithm
        schema: {type: number}
      - description: SSH fingerprint type (SSHFP records)
        in: query
        name: sshfp_type
        schema: {type: number}
      - description: Flags value (CAA records)
        in: query
        name: caa_flags
        schema: {type: number}
      - description: CAA tag value (CAA records)
        in: query
        name: caa_tag
        schema: {type: string}
      - description: TLSA usage (0-3) (TLSA records)
        in: query
        name: tlsa_usage
        schema: {type: number}
      - description: TLSA selector (0 or 1) (TLSA records)
        in: query
        name: tlsa_selector
        schema: {type: number}
      - description: TLSA match method (0-2) (TLSA records)
        in: query
        name: tlsa_matching
        schema: {type: number}
      requestBody:
        content:
          application/json:
            schema:
              example:
                records:
                - {data: proxy.mythic-beasts.com., host: www, ttl: 300, type: CNAME}
              properties:
                records:
                  description: List of records to add.
                  items:
                    properties:
                      data: {description: Record data.  `A` and `AAAA` records can
                          additionally take the special value `DYNAMIC_IP` which uses
                          the client's IP address as the field value.  Hex strings
                          (for SSHFP and TLSA) must be in lower-case., example: 1.2.3.4,
                        type: string}
                      host: {description: Hostname of record to add., example: www,
                        type: string}
                      ttl: {description: TTL (time-to-live) value, example: 300, type: number}
                      type: {description: Record type, example: AAAA, type: string}
                    required: [host, type, data]
                    type: object
                  type: array
              required: [records]
          text/dns:
            schema: {example: "www 300  A   1.2.3.4\n@   300  MX  10 mx.mythic-beasts.com.\
                \ \n", type: string}
            x-mythic-description: 'Data may be submitted as an

              [RFC1035](https://tools.ietf.org/html/rfc1035) formatted zone

              file.  The order of TTL and record type is interchangeable.  TTL

              may be omitted.  If a line starts with space, the previous

              hostname will be used.  The order of otherwise be as returned by

              the [record types](#ep-get-record-types) end point.

              '
          x-www-form-urlencoded:
            schema:
              example:
                records:
                - {data: proxy.mythic-beasts.com., host: www, ttl: 300, type: CNAME}
              properties:
                data: {description: 'Record data.  This parameter may be repeated,
                    which will create multiple records with the same name and type
                    (and the same values for any additional fields).  Hex strings
                    (for SSHFP and TLSA) must be in lower-case.', example: 1.2.3.4,
                  type: string}
                host: {description: Hostname of record to add.  Required if not specified
                    in the URL., example: www, type: string}
                ttl: {description: TTL (time-to-live) value, example: 300, type: number}
                type: {description: Record type.  Required if not specified in the
                    URL., example: AAAA, type: string}
              required: [data]
      responses:
        '200':
          content:
            application/json:
              schema:
                example: {message: 4 records added, records_added: 4}
                properties:
                  message: {description: Response message, type: string}
                  records_added: {description: Number of records added, type: integer}
                type: object
          description: 'Records added


            '
        '400':
          content:
            application/json:
              schema:
                example:
                  errors: [Unknown record type 'FOO', SSHFP fingerprint must be an
                      even number of hexadecimal characters.]
                properties:
                  errors:
                    description: List of errors
                    items: {type: string}
                    type: array
                type: object
          description: Request cannot be completed due to errors in input.
          x-mythic-error-summary: Bad input
        '401':
          content:
            application/json:
              schema:
                properties:
                  error: {description: Error message, example: Malformed or missing
                      auth data, type: string}
                type: object
          description: User is not authenticated.
          x-mythic-error-summary: Not authenticated
        '403':
          content:
            application/json:
              schema:
                properties:
                  error: {description: Error message, example: Auth token has no DNS
                      permits, type: string}
                type: object
          description: Not authorised to access this API.
          x-mythic-error-summary: Not authorised
      security:
      - BasicAuth: []
      - BearerAuth: []
      summary: Add new records
    put:
      description: 'Replaces all records selected by the path and any filters with
        the provided new records.  If no records are matched by the path and filters,
        the new records will still be added.


        New records can be provided as JSON (`application/json`), RFC1035 format (`text/dns`),
        or form parameters (`application/x-www-form-urlencoded`).


        If the URL path contains `host` or `type` parameters, new records must match
        these values.


        Changes are applied atomically; either all selected records will be replaced
        with all new records, or no changes will be made and an error will be returned
        (see [transactions](#sec-transactions)).


        Note that zones may contain generated records (typically generated from

        ANAME records) and template records (common records inherited from a

        standard template).  These records cannot be deleted or replaced, and a

        `PUT` request to a URL that would select any such records will result

        in an error.  To avoid this, specify the `exclude-generated` or

        `exclude-template` query parameters.


        '
      parameters:
      - description: The name of the zone.
        in: path
        name: zone
        required: true
        schema: {type: string}
      - description: Exclude generated records.  See [boolean query parameters](#sec-boolean).
        in: query
        name: exclude-generated
        schema: {type: boolean}
      - description: Exclude template records.  See [boolean query parameters](#sec-boolean).
        in: query
        name: exclude-template
        schema: {type: boolean}
      - description: "Comment out ANAME pseudo-records in zone file export\n\nIf set\
          \ to true, ANAME records will be prefixed with `;` when\nexported, so that\
          \ they appear as comments in the zone file export.\nNote that this option\
          \ only affects zone file format responses\n(`text/dns`), and has no effect\
          \ on JSON format responses.  \n\nAny `A` or `AAAA` records generated from\
          \ `ANAME` records will\nstill be included uncommented in the response, unless\n\
          `exclude-generated` is also specified, in which case they will be\nomitted\
          \ altogether.\n\nSee [boolean query parameters](#sec-boolean).\n\n"
        in: query
        name: comment-aname
        schema: {type: boolean}
      - description: "Filter selected records.  \n\nTakes a URL-encoded set of [record\
          \ filter query string parameters](#param-group-recordFilters).  Only records\
          \ matching all specified values will be returned.  The `select` parameter\
          \ may be repeated in which case, records matching all of the values in any\
          \ `select` parameter will be returned.  If any [record filters](#param-group-recordFilters)\
          \ are specified directly as query parameters, then these must match in addition\
          \ to any filters specified in `select` parameters. See [filtering](#sec-filtering)\
          \ for more details.  \n\n"
        in: query
        name: select
        schema: {type: string}
      - description: Record hostname
        in: query
        name: host
        schema: {type: string}
      - description: Record type
        example: A
        in: query
        name: type
        schema: {type: string}
      - description: Time-to-live (TTL).  Number of seconds for which the record can
          be cached
        example: 300
        in: query
        name: ttl
        schema: {type: number}
      - description: Record data
        in: query
        name: data
        schema: {type: string}
      - description: Record priority (MX records)
        in: query
        name: mx_priority
        schema: {type: number}
      - description: Record priority (SRV records)
        in: query
        name: srv_priority
        schema: {type: number}
      - description: Record weight (SRV records)
        in: query
        name: srv_weight
        schema: {type: number}
      - description: Port number (SRV records)
        in: query
        name: srv_port
        schema: {type: number}
      - description: Algorithm for SSH fingerprint (SSHFP records)
        in: query
        name: sshfp_algorithm
        schema: {type: number}
      - description: SSH fingerprint type (SSHFP records)
        in: query
        name: sshfp_type
        schema: {type: number}
      - description: Flags value (CAA records)
        in: query
        name: caa_flags
        schema: {type: number}
      - description: CAA tag value (CAA records)
        in: query
        name: caa_tag
        schema: {type: string}
      - description: TLSA usage (0-3) (TLSA records)
        in: query
        name: tlsa_usage
        schema: {type: number}
      - description: TLSA selector (0 or 1) (TLSA records)
        in: query
        name: tlsa_selector
        schema: {type: number}
      - description: TLSA match method (0-2) (TLSA records)
        in: query
        name: tlsa_matching
        schema: {type: number}
      requestBody:
        content:
          application/json:
            schema:
              example:
                records:
                - {data: proxy.mythic-beasts.com., host: www, ttl: 300, type: CNAME}
              properties:
                records:
                  description: List of records to add.
                  items:
                    properties:
                      data: {description: Record data.  `A` and `AAAA` records can
                          additionally take the special value `DYNAMIC_IP` which uses
                          the client's IP address as the field value.  Hex strings
                          (for SSHFP and TLSA) must be in lower-case., example: 1.2.3.4,
                        type: string}
                      host: {description: Hostname of record to add., example: www,
                        type: string}
                      ttl: {description: TTL (time-to-live) value, example: 300, type: number}
                      type: {description: Record type, example: AAAA, type: string}
                    required: [host, type, data]
                    type: object
                  type: array
              required: [records]
          text/dns:
            schema: {example: "www 300  A   1.2.3.4\n@   300  MX  10 mx.mythic-beasts.com.\
                \ \n", type: string}
            x-mythic-description: 'Data may be submitted as an

              [RFC1035](https://tools.ietf.org/html/rfc1035) formatted zone

              file.  The order of TTL and record type is interchangeable.  TTL

              may be omitted.  If a line starts with space, the previous

              hostname will be used.  The order of otherwise be as returned by

              the [record types](#ep-get-record-types) end point.

              '
          x-www-form-urlencoded:
            schema:
              example:
                records:
                - {data: proxy.mythic-beasts.com., host: www, ttl: 300, type: CNAME}
              properties:
                data: {description: 'Record data.  This parameter may be repeated,
                    which will create multiple records with the same name and type
                    (and the same values for any additional fields).  Hex strings
                    (for SSHFP and TLSA) must be in lower-case.', example: 1.2.3.4,
                  type: string}
                host: {description: Hostname of record to add.  Required if not specified
                    in the URL., example: www, type: string}
                ttl: {description: TTL (time-to-live) value, example: 300, type: number}
                type: {description: Record type.  Required if not specified in the
                    URL., example: AAAA, type: string}
              required: [data]
      responses:
        '200':
          content:
            application/json:
              schema:
                example: {message: 4 records added, records_added: 4, records_removed: 3}
                properties:
                  message: {description: Response message, type: string}
                  records_added: {description: Number of records added, type: integer}
                  records_removed: {description: Number of records removed, type: integer}
                type: object
          description: 'Records replaced

            '
        '400':
          content:
            application/json:
              schema:
                example:
                  errors: [Unknown record type 'FOO', SSHFP fingerprint must be an
                      even number of hexadecimal characters.]
                properties:
                  errors:
                    description: List of errors
                    items: {type: string}
                    type: array
                type: object
          description: Request cannot be completed due to errors in input.
          x-mythic-error-summary: Bad input
        '401':
          content:
            application/json:
              schema:
                properties:
                  error: {description: Error message, example: Malformed or missing
                      auth data, type: string}
                type: object
          description: User is not authenticated.
          x-mythic-error-summary: Not authenticated
        '403':
          content:
            application/json:
              schema:
                properties:
                  error: {description: Error message, example: Auth token has no DNS
                      permits, type: string}
                type: object
          description: Not authorised to access this API.
          x-mythic-error-summary: Not authorised
      security:
      - BasicAuth: []
      - BearerAuth: []
      summary: Replace records
  /zones/{zone}/records/{host}:
    delete:
      description: '

        Deletes all records selected by the path and any specified filters.

        See the [list records](#ep-get-zones-zone-records) endpoint for details

        of how records are selected.


        If no records are selected, the request will return a `200` response

        and indicate that no records have been removed in the `records_removed`

        field.


        '
      parameters:
      - description: The name of the zone.
        in: path
        name: zone
        required: true
        schema: {type: string}
      - description: The host for records to return.  Use `@` to return records for
          the bare domain (apex).
        in: path
        name: host
        required: true
        schema: {type: string}
      - description: Exclude generated records.  See [boolean query parameters](#sec-boolean).
        in: query
        name: exclude-generated
        schema: {type: boolean}
      - description: Exclude template records.  See [boolean query parameters](#sec-boolean).
        in: query
        name: exclude-template
        schema: {type: boolean}
      - description: "Comment out ANAME pseudo-records in zone file export\n\nIf set\
          \ to true, ANAME records will be prefixed with `;` when\nexported, so that\
          \ they appear as comments in the zone file export.\nNote that this option\
          \ only affects zone file format responses\n(`text/dns`), and has no effect\
          \ on JSON format responses.  \n\nAny `A` or `AAAA` records generated from\
          \ `ANAME` records will\nstill be included uncommented in the response, unless\n\
          `exclude-generated` is also specified, in which case they will be\nomitted\
          \ altogether.\n\nSee [boolean query parameters](#sec-boolean).\n\n"
        in: query
        name: comment-aname
        schema: {type: boolean}
      - description: "Filter selected records.  \n\nTakes a URL-encoded set of [record\
          \ filter query string parameters](#param-group-recordFilters).  Only records\
          \ matching all specified values will be returned.  The `select` parameter\
          \ may be repeated in which case, records matching all of the values in any\
          \ `select` parameter will be returned.  If any [record filters](#param-group-recordFilters)\
          \ are specified directly as query parameters, then these must match in addition\
          \ to any filters specified in `select` parameters. See [filtering](#sec-filtering)\
          \ for more details.  \n\n"
        in: query
        name: select
        schema: {type: string}
      - description: Record hostname
        in: query
        name: host
        schema: {type: string}
      - description: Record type
        example: A
        in: query
        name: type
        schema: {type: string}
      - description: Time-to-live (TTL).  Number of seconds for which the record can
          be cached
        example: 300
        in: query
        name: ttl
        schema: {type: number}
      - description: Record data
        in: query
        name: data
        schema: {type: string}
      - description: Record priority (MX records)
        in: query
        name: mx_priority
        schema: {type: number}
      - description: Record priority (SRV records)
        in: query
        name: srv_priority
        schema: {type: number}
      - description: Record weight (SRV records)
        in: query
        name: srv_weight
        schema: {type: number}
      - description: Port number (SRV records)
        in: query
        name: srv_port
        schema: {type: number}
      - description: Algorithm for SSH fingerprint (SSHFP records)
        in: query
        name: sshfp_algorithm
        schema: {type: number}
      - description: SSH fingerprint type (SSHFP records)
        in: query
        name: sshfp_type
        schema: {type: number}
      - description: Flags value (CAA records)
        in: query
        name: caa_flags
        schema: {type: number}
      - description: CAA tag value (CAA records)
        in: query
        name: caa_tag
        schema: {type: string}
      - description: TLSA usage (0-3) (TLSA records)
        in: query
        name: tlsa_usage
        schema: {type: number}
      - description: TLSA selector (0 or 1) (TLSA records)
        in: query
        name: tlsa_selector
        schema: {type: number}
      - description: TLSA match method (0-2) (TLSA records)
        in: query
        name: tlsa_matching
        schema: {type: number}
      responses:
        '200':
          content:
            application/json:
              schema:
                example: {message: 3 records removed, records_removed: 3}
                properties:
                  message: {description: Response message, type: string}
                  records_removed: {description: Number of records removed, type: integer}
                type: object
          description: 'Records deleted

            '
        '400':
          content:
            application/json:
              schema:
                example:
                  errors: [Unknown record type 'FOO', SSHFP fingerprint must be an
                      even number of hexadecimal characters.]
                properties:
                  errors:
                    description: List of errors
                    items: {type: string}
                    type: array
                type: object
          description: Request cannot be completed due to errors in input.
          x-mythic-error-summary: Bad input
        '401':
          content:
            application/json:
              schema:
                properties:
                  error: {description: Error message, example: Malformed or missing
                      auth data, type: string}
                type: object
          description: User is not authenticated.
          x-mythic-error-summary: Not authenticated
        '403':
          content:
            application/json:
              schema:
                properties:
                  error: {description: Error message, example: Auth token has no DNS
                      permits, type: string}
                type: object
          description: Not authorised to access this API.
          x-mythic-error-summary: Not authorised
      security:
      - BasicAuth: []
      - BearerAuth: []
      summary: Delete records
    get:
      description: 'List records in the zone.


        This will return all records that match the specified path, filtered

        according to query string parameters.  The response can be returned in

        JSON format, or RFC 1035 zone file format.  The response format can be

        selected using an `Accept` header of `application/json` or `text/dns`,

        respectively.


        '
      parameters:
      - description: The name of the zone.
        in: path
        name: zone
        required: true
        schema: {type: string}
      - description: The host for records to return.  Use `@` to return records for
          the bare domain (apex).
        in: path
        name: host
        required: true
        schema: {type: string}
      - description: "Verify that all authoritative servers are returning the latest\n\
          record details.  \n\nIf all authoritative servers return the latest version\
          \ of the selected records, this will give a `200` response, with details\
          \ of the records.\n\nOtherwise, this will give a `409` response, with details\
          \ of the differences between live and expected records.\n\nThis parameter\
          \ can only be used if `host` and `type` are specified in the request URL.\n\
          \n"
        in: query
        name: verify
        schema: {type: boolean}
      - description: Exclude generated records.  See [boolean query parameters](#sec-boolean).
        in: query
        name: exclude-generated
        schema: {type: boolean}
      - description: Exclude template records.  See [boolean query parameters](#sec-boolean).
        in: query
        name: exclude-template
        schema: {type: boolean}
      - description: "Comment out ANAME pseudo-records in zone file export\n\nIf set\
          \ to true, ANAME records will be prefixed with `;` when\nexported, so that\
          \ they appear as comments in the zone file export.\nNote that this option\
          \ only affects zone file format responses\n(`text/dns`), and has no effect\
          \ on JSON format responses.  \n\nAny `A` or `AAAA` records generated from\
          \ `ANAME` records will\nstill be included uncommented in the response, unless\n\
          `exclude-generated` is also specified, in which case they will be\nomitted\
          \ altogether.\n\nSee [boolean query parameters](#sec-boolean).\n\n"
        in: query
        name: comment-aname
        schema: {type: boolean}
      - description: "Filter selected records.  \n\nTakes a URL-encoded set of [record\
          \ filter query string parameters](#param-group-recordFilters).  Only records\
          \ matching all specified values will be returned.  The `select` parameter\
          \ may be repeated in which case, records matching all of the values in any\
          \ `select` parameter will be returned.  If any [record filters](#param-group-recordFilters)\
          \ are specified directly as query parameters, then these must match in addition\
          \ to any filters specified in `select` parameters. See [filtering](#sec-filtering)\
          \ for more details.  \n\n"
        in: query
        name: select
        schema: {type: string}
      - description: Record hostname
        in: query
        name: host
        schema: {type: string}
      - description: Record type
        example: A
        in: query
        name: type
        schema: {type: string}
      - description: Time-to-live (TTL).  Number of seconds for which the record can
          be cached
        example: 300
        in: query
        name: ttl
        schema: {type: number}
      - description: Record data
        in: query
        name: data
        schema: {type: string}
      - description: Record priority (MX records)
        in: query
        name: mx_priority
        schema: {type: number}
      - description: Record priority (SRV records)
        in: query
        name: srv_priority
        schema: {type: number}
      - description: Record weight (SRV records)
        in: query
        name: srv_weight
        schema: {type: number}
      - description: Port number (SRV records)
        in: query
        name: srv_port
        schema: {type: number}
      - description: Algorithm for SSH fingerprint (SSHFP records)
        in: query
        name: sshfp_algorithm
        schema: {type: number}
      - description: SSH fingerprint type (SSHFP records)
        in: query
        name: sshfp_type
        schema: {type: number}
      - description: Flags value (CAA records)
        in: query
        name: caa_flags
        schema: {type: number}
      - description: CAA tag value (CAA records)
        in: query
        name: caa_tag
        schema: {type: string}
      - description: TLSA usage (0-3) (TLSA records)
        in: query
        name: tlsa_usage
        schema: {type: number}
      - description: TLSA selector (0 or 1) (TLSA records)
        in: query
        name: tlsa_selector
        schema: {type: number}
      - description: TLSA match method (0-2) (TLSA records)
        in: query
        name: tlsa_matching
        schema: {type: number}
      responses:
        '200':
          content:
            application/json:
              schema:
                example:
                  records:
                  - {data: 1.2.3.4, host: www, ttl: 300, type: A}
                  - {data: mx.mythic-beasts.com., host: '@', mx_priority: 10, ttl: 300,
                    type: MX}
                properties:
                  records:
                    description: List of records
                    items: {type: string}
                    type: array
                type: object
            text/dns:
              example: "www 300  A   1.2.3.4\n@   300  MX  10 mx.mythic-beasts.com.\
                \ \n"
              schema: {type: string}
          description: 'List of records


            '
        '401':
          content:
            application/json:
              schema:
                properties:
                  error: {description: Error message, example: Malformed or missing
                      auth data, type: string}
                type: object
          description: User is not authenticated.
          x-mythic-error-summary: Not authenticated
        '403':
          content:
            application/json:
              schema:
                properties:
                  error: {description: Error message, example: Auth token has no DNS
                      permits, type: string}
                type: object
          description: Not authorised to access this API.
          x-mythic-error-summary: Not authorised
        '409':
          content:
            application/json:
              schema:
                example:
                  errors: ['''1.2.3.4'' not found in response from ns1.mythic-beasts.com.']
                properties:
                  errors:
                    description: List of errors
                    items: {type: string}
                    type: array
                type: object
          description: 'Indicates that the response from one or more authoritative

            nameservers does not match the latest version of the selected

            records.  Only returned if the `verify` parameter is specified.


            '
      security:
      - BasicAuth: []
      - BearerAuth: []
      summary: Get records
    post:
      description: "Add new records to a zone.  \n\nNew records can be provided as\
        \ JSON (`application/json`), RFC1035 format (`text/dns`), or form parameters\
        \ (`application/x-www-form-urlencoded`).\n\nIf the URL path contains `host`\
        \ or `type` parameters, new records must match these values.\n\nChanges are\
        \ applied atomically; either all new records will be added, or none of them\
        \ will and an error will be returned (see [transactions](#sec-transactions)).\n\
        \n"
      parameters:
      - description: The name of the zone.
        in: path
        name: zone
        required: true
        schema: {type: string}
      - description: The host for records to return.  Use `@` to return records for
          the bare domain (apex).
        in: path
        name: host
        required: true
        schema: {type: string}
      - description: Exclude generated records.  See [boolean query parameters](#sec-boolean).
        in: query
        name: exclude-generated
        schema: {type: boolean}
      - description: Exclude template records.  See [boolean query parameters](#sec-boolean).
        in: query
        name: exclude-template
        schema: {type: boolean}
      - description: "Comment out ANAME pseudo-records in zone file export\n\nIf set\
          \ to true, ANAME records will be prefixed with `;` when\nexported, so that\
          \ they appear as comments in the zone file export.\nNote that this option\
          \ only affects zone file format responses\n(`text/dns`), and has no effect\
          \ on JSON format responses.  \n\nAny `A` or `AAAA` records generated from\
          \ `ANAME` records will\nstill be included uncommented in the response, unless\n\
          `exclude-generated` is also specified, in which case they will be\nomitted\
          \ altogether.\n\nSee [boolean query parameters](#sec-boolean).\n\n"
        in: query
        name: comment-aname
        schema: {type: boolean}
      - description: "Filter selected records.  \n\nTakes a URL-encoded set of [record\
          \ filter query string parameters](#param-group-recordFilters).  Only records\
          \ matching all specified values will be returned.  The `select` parameter\
          \ may be repeated in which case, records matching all of the values in any\
          \ `select` parameter will be returned.  If any [record filters](#param-group-recordFilters)\
          \ are specified directly as query parameters, then these must match in addition\
          \ to any filters specified in `select` parameters. See [filtering](#sec-filtering)\
          \ for more details.  \n\n"
        in: query
        name: select
        schema: {type: string}
      - description: Record hostname
        in: query
        name: host
        schema: {type: string}
      - description: Record type
        example: A
        in: query
        name: type
        schema: {type: string}
      - description: Time-to-live (TTL).  Number of seconds for which the record can
          be cached
        example: 300
        in: query
        name: ttl
        schema: {type: number}
      - description: Record data
        in: query
        name: data
        schema: {type: string}
      - description: Record priority (MX records)
        in: query
        name: mx_priority
        schema: {type: number}
      - description: Record priority (SRV records)
        in: query
        name: srv_priority
        schema: {type: number}
      - description: Record weight (SRV records)
        in: query
        name: srv_weight
        schema: {type: number}
      - description: Port number (SRV records)
        in: query
        name: srv_port
        schema: {type: number}
      - description: Algorithm for SSH fingerprint (SSHFP records)
        in: query
        name: sshfp_algorithm
        schema: {type: number}
      - description: SSH fingerprint type (SSHFP records)
        in: query
        name: sshfp_type
        schema: {type: number}
      - description: Flags value (CAA records)
        in: query
        name: caa_flags
        schema: {type: number}
      - description: CAA tag value (CAA records)
        in: query
        name: caa_tag
        schema: {type: string}
      - description: TLSA usage (0-3) (TLSA records)
        in: query
        name: tlsa_usage
        schema: {type: number}
      - description: TLSA selector (0 or 1) (TLSA records)
        in: query
        name: tlsa_selector
        schema: {type: number}
      - description: TLSA match method (0-2) (TLSA records)
        in: query
        name: tlsa_matching
        schema: {type: number}
      requestBody:
        content:
          application/json:
            schema:
              example:
                records:
                - {data: proxy.mythic-beasts.com., host: www, ttl: 300, type: CNAME}
              properties:
                records:
                  description: List of records to add.
                  items:
                    properties:
                      data: {description: Record data.  `A` and `AAAA` records can
                          additionally take the special value `DYNAMIC_IP` which uses
                          the client's IP address as the field value.  Hex strings
                          (for SSHFP and TLSA) must be in lower-case., example: 1.2.3.4,
                        type: string}
                      host: {description: Hostname of record to add., example: www,
                        type: string}
                      ttl: {description: TTL (time-to-live) value, example: 300, type: number}
                      type: {description: Record type, example: AAAA, type: string}
                    required: [host, type, data]
                    type: object
                  type: array
              required: [records]
          text/dns:
            schema: {example: "www 300  A   1.2.3.4\n@   300  MX  10 mx.mythic-beasts.com.\
                \ \n", type: string}
            x-mythic-description: 'Data may be submitted as an

              [RFC1035](https://tools.ietf.org/html/rfc1035) formatted zone

              file.  The order of TTL and record type is interchangeable.  TTL

              may be omitted.  If a line starts with space, the previous

              hostname will be used.  The order of otherwise be as returned by

              the [record types](#ep-get-record-types) end point.

              '
          x-www-form-urlencoded:
            schema:
              example:
                records:
                - {data: proxy.mythic-beasts.com., host: www, ttl: 300, type: CNAME}
              properties:
                data: {description: 'Record data.  This parameter may be repeated,
                    which will create multiple records with the same name and type
                    (and the same values for any additional fields).  Hex strings
                    (for SSHFP and TLSA) must be in lower-case.', example: 1.2.3.4,
                  type: string}
                host: {description: Hostname of record to add.  Required if not specified
                    in the URL., example: www, type: string}
                ttl: {description: TTL (time-to-live) value, example: 300, type: number}
                type: {description: Record type.  Required if not specified in the
                    URL., example: AAAA, type: string}
              required: [data]
      responses:
        '200':
          content:
            application/json:
              schema:
                example: {message: 4 records added, records_added: 4}
                properties:
                  message: {description: Response message, type: string}
                  records_added: {description: Number of records added, type: integer}
                type: object
          description: 'Records added


            '
        '400':
          content:
            application/json:
              schema:
                example:
                  errors: [Unknown record type 'FOO', SSHFP fingerprint must be an
                      even number of hexadecimal characters.]
                properties:
                  errors:
                    description: List of errors
                    items: {type: string}
                    type: array
                type: object
          description: Request cannot be completed due to errors in input.
          x-mythic-error-summary: Bad input
        '401':
          content:
            application/json:
              schema:
                properties:
                  error: {description: Error message, example: Malformed or missing
                      auth data, type: string}
                type: object
          description: User is not authenticated.
          x-mythic-error-summary: Not authenticated
        '403':
          content:
            application/json:
              schema:
                properties:
                  error: {description: Error message, example: Auth token has no DNS
                      permits, type: string}
                type: object
          description: Not authorised to access this API.
          x-mythic-error-summary: Not authorised
      security:
      - BasicAuth: []
      - BearerAuth: []
      summary: Add new records
    put:
      description: 'Replaces all records selected by the path and any filters with
        the provided new records.  If no records are matched by the path and filters,
        the new records will still be added.


        New records can be provided as JSON (`application/json`), RFC1035 format (`text/dns`),
        or form parameters (`application/x-www-form-urlencoded`).


        If the URL path contains `host` or `type` parameters, new records must match
        these values.


        Changes are applied atomically; either all selected records will be replaced
        with all new records, or no changes will be made and an error will be returned
        (see [transactions](#sec-transactions)).


        Note that zones may contain generated records (typically generated from

        ANAME records) and template records (common records inherited from a

        standard template).  These records cannot be deleted or replaced, and a

        `PUT` request to a URL that would select any such records will result

        in an error.  To avoid this, specify the `exclude-generated` or

        `exclude-template` query parameters.


        '
      parameters:
      - description: The name of the zone.
        in: path
        name: zone
        required: true
        schema: {type: string}
      - description: The host for records to return.  Use `@` to return records for
          the bare domain (apex).
        in: path
        name: host
        required: true
        schema: {type: string}
      - description: Exclude generated records.  See [boolean query parameters](#sec-boolean).
        in: query
        name: exclude-generated
        schema: {type: boolean}
      - description: Exclude template records.  See [boolean query parameters](#sec-boolean).
        in: query
        name: exclude-template
        schema: {type: boolean}
      - description: "Comment out ANAME pseudo-records in zone file export\n\nIf set\
          \ to true, ANAME records will be prefixed with `;` when\nexported, so that\
          \ they appear as comments in the zone file export.\nNote that this option\
          \ only affects zone file format responses\n(`text/dns`), and has no effect\
          \ on JSON format responses.  \n\nAny `A` or `AAAA` records generated from\
          \ `ANAME` records will\nstill be included uncommented in the response, unless\n\
          `exclude-generated` is also specified, in which case they will be\nomitted\
          \ altogether.\n\nSee [boolean query parameters](#sec-boolean).\n\n"
        in: query
        name: comment-aname
        schema: {type: boolean}
      - description: "Filter selected records.  \n\nTakes a URL-encoded set of [record\
          \ filter query string parameters](#param-group-recordFilters).  Only records\
          \ matching all specified values will be returned.  The `select` parameter\
          \ may be repeated in which case, records matching all of the values in any\
          \ `select` parameter will be returned.  If any [record filters](#param-group-recordFilters)\
          \ are specified directly as query parameters, then these must match in addition\
          \ to any filters specified in `select` parameters. See [filtering](#sec-filtering)\
          \ for more details.  \n\n"
        in: query
        name: select
        schema: {type: string}
      - description: Record hostname
        in: query
        name: host
        schema: {type: string}
      - description: Record type
        example: A
        in: query
        name: type
        schema: {type: string}
      - description: Time-to-live (TTL).  Number of seconds for which the record can
          be cached
        example: 300
        in: query
        name: ttl
        schema: {type: number}
      - description: Record data
        in: query
        name: data
        schema: {type: string}
      - description: Record priority (MX records)
        in: query
        name: mx_priority
        schema: {type: number}
      - description: Record priority (SRV records)
        in: query
        name: srv_priority
        schema: {type: number}
      - description: Record weight (SRV records)
        in: query
        name: srv_weight
        schema: {type: number}
      - description: Port number (SRV records)
        in: query
        name: srv_port
        schema: {type: number}
      - description: Algorithm for SSH fingerprint (SSHFP records)
        in: query
        name: sshfp_algorithm
        schema: {type: number}
      - description: SSH fingerprint type (SSHFP records)
        in: query
        name: sshfp_type
        schema: {type: number}
      - description: Flags value (CAA records)
        in: query
        name: caa_flags
        schema: {type: number}
      - description: CAA tag value (CAA records)
        in: query
        name: caa_tag
        schema: {type: string}
      - description: TLSA usage (0-3) (TLSA records)
        in: query
        name: tlsa_usage
        schema: {type: number}
      - description: TLSA selector (0 or 1) (TLSA records)
        in: query
        name: tlsa_selector
        schema: {type: number}
      - description: TLSA match method (0-2) (TLSA records)
        in: query
        name: tlsa_matching
        schema: {type: number}
      requestBody:
        content:
          application/json:
            schema:
              example:
                records:
                - {data: proxy.mythic-beasts.com., host: www, ttl: 300, type: CNAME}
              properties:
                records:
                  description: List of records to add.
                  items:
                    properties:
                      data: {description: Record data.  `A` and `AAAA` records can
                          additionally take the special value `DYNAMIC_IP` which uses
                          the client's IP address as the field value.  Hex strings
                          (for SSHFP and TLSA) must be in lower-case., example: 1.2.3.4,
                        type: string}
                      host: {description: Hostname of record to add., example: www,
                        type: string}
                      ttl: {description: TTL (time-to-live) value, example: 300, type: number}
                      type: {description: Record type, example: AAAA, type: string}
                    required: [host, type, data]
                    type: object
                  type: array
              required: [records]
          text/dns:
            schema: {example: "www 300  A   1.2.3.4\n@   300  MX  10 mx.mythic-beasts.com.\
                \ \n", type: string}
            x-mythic-description: 'Data may be submitted as an

              [RFC1035](https://tools.ietf.org/html/rfc1035) formatted zone

              file.  The order of TTL and record type is interchangeable.  TTL

              may be omitted.  If a line starts with space, the previous

              hostname will be used.  The order of otherwise be as returned by

              the [record types](#ep-get-record-types) end point.

              '
          x-www-form-urlencoded:
            schema:
              example:
                records:
                - {data: proxy.mythic-beasts.com., host: www, ttl: 300, type: CNAME}
              properties:
                data: {description: 'Record data.  This parameter may be repeated,
                    which will create multiple records with the same name and type
                    (and the same values for any additional fields).  Hex strings
                    (for SSHFP and TLSA) must be in lower-case.', example: 1.2.3.4,
                  type: string}
                host: {description: Hostname of record to add.  Required if not specified
                    in the URL., example: www, type: string}
                ttl: {description: TTL (time-to-live) value, example: 300, type: number}
                type: {description: Record type.  Required if not specified in the
                    URL., example: AAAA, type: string}
              required: [data]
      responses:
        '200':
          content:
            application/json:
              schema:
                example: {message: 4 records added, records_added: 4, records_removed: 3}
                properties:
                  message: {description: Response message, type: string}
                  records_added: {description: Number of records added, type: integer}
                  records_removed: {description: Number of records removed, type: integer}
                type: object
          description: 'Records replaced

            '
        '400':
          content:
            application/json:
              schema:
                example:
                  errors: [Unknown record type 'FOO', SSHFP fingerprint must be an
                      even number of hexadecimal characters.]
                properties:
                  errors:
                    description: List of errors
                    items: {type: string}
                    type: array
                type: object
          description: Request cannot be completed due to errors in input.
          x-mythic-error-summary: Bad input
        '401':
          content:
            application/json:
              schema:
                properties:
                  error: {description: Error message, example: Malformed or missing
                      auth data, type: string}
                type: object
          description: User is not authenticated.
          x-mythic-error-summary: Not authenticated
        '403':
          content:
            application/json:
              schema:
                properties:
                  error: {description: Error message, example: Auth token has no DNS
                      permits, type: string}
                type: object
          description: Not authorised to access this API.
          x-mythic-error-summary: Not authorised
      security:
      - BasicAuth: []
      - BearerAuth: []
      summary: Replace records
  /zones/{zone}/records/{host}/{type}:
    delete:
      description: '

        Deletes all records selected by the path and any specified filters.

        See the [list records](#ep-get-zones-zone-records) endpoint for details

        of how records are selected.


        If no records are selected, the request will return a `200` response

        and indicate that no records have been removed in the `records_removed`

        field.


        '
      parameters:
      - description: The name of the zone.
        in: path
        name: zone
        required: true
        schema: {type: string}
      - description: The record type.  Must be upper case.  See [record types](#ep-get-record-types)
          end point for a list of supported record types.
        example: A
        in: path
        name: type
        required: true
        schema: {type: string}
      - description: The host for records to return.  Use `@` to return records for
          the bare domain (apex).
        in: path
        name: host
        required: true
        schema: {type: string}
      - description: Exclude generated records.  See [boolean query parameters](#sec-boolean).
        in: query
        name: exclude-generated
        schema: {type: boolean}
      - description: Exclude template records.  See [boolean query parameters](#sec-boolean).
        in: query
        name: exclude-template
        schema: {type: boolean}
      - description: "Comment out ANAME pseudo-records in zone file export\n\nIf set\
          \ to true, ANAME records will be prefixed with `;` when\nexported, so that\
          \ they appear as comments in the zone file export.\nNote that this option\
          \ only affects zone file format responses\n(`text/dns`), and has no effect\
          \ on JSON format responses.  \n\nAny `A` or `AAAA` records generated from\
          \ `ANAME` records will\nstill be included uncommented in the response, unless\n\
          `exclude-generated` is also specified, in which case they will be\nomitted\
          \ altogether.\n\nSee [boolean query parameters](#sec-boolean).\n\n"
        in: query
        name: comment-aname
        schema: {type: boolean}
      - description: "Filter selected records.  \n\nTakes a URL-encoded set of [record\
          \ filter query string parameters](#param-group-recordFilters).  Only records\
          \ matching all specified values will be returned.  The `select` parameter\
          \ may be repeated in which case, records matching all of the values in any\
          \ `select` parameter will be returned.  If any [record filters](#param-group-recordFilters)\
          \ are specified directly as query parameters, then these must match in addition\
          \ to any filters specified in `select` parameters. See [filtering](#sec-filtering)\
          \ for more details.  \n\n"
        in: query
        name: select
        schema: {type: string}
      - description: Record hostname
        in: query
        name: host
        schema: {type: string}
      - description: Record type
        example: A
        in: query
        name: type
        schema: {type: string}
      - description: Time-to-live (TTL).  Number of seconds for which the record can
          be cached
        example: 300
        in: query
        name: ttl
        schema: {type: number}
      - description: Record data
        in: query
        name: data
        schema: {type: string}
      - description: Record priority (MX records)
        in: query
        name: mx_priority
        schema: {type: number}
      - description: Record priority (SRV records)
        in: query
        name: srv_priority
        schema: {type: number}
      - description: Record weight (SRV records)
        in: query
        name: srv_weight
        schema: {type: number}
      - description: Port number (SRV records)
        in: query
        name: srv_port
        schema: {type: number}
      - description: Algorithm for SSH fingerprint (SSHFP records)
        in: query
        name: sshfp_algorithm
        schema: {type: number}
      - description: SSH fingerprint type (SSHFP records)
        in: query
        name: sshfp_type
        schema: {type: number}
      - description: Flags value (CAA records)
        in: query
        name: caa_flags
        schema: {type: number}
      - description: CAA tag value (CAA records)
        in: query
        name: caa_tag
        schema: {type: string}
      - description: TLSA usage (0-3) (TLSA records)
        in: query
        name: tlsa_usage
        schema: {type: number}
      - description: TLSA selector (0 or 1) (TLSA records)
        in: query
        name: tlsa_selector
        schema: {type: number}
      - description: TLSA match method (0-2) (TLSA records)
        in: query
        name: tlsa_matching
        schema: {type: number}
      responses:
        '200':
          content:
            application/json:
              schema:
                example: {message: 3 records removed, records_removed: 3}
                properties:
                  message: {description: Response message, type: string}
                  records_removed: {description: Number of records removed, type: integer}
                type: object
          description: 'Records deleted

            '
        '400':
          content:
            application/json:
              schema:
                example:
                  errors: [Unknown record type 'FOO', SSHFP fingerprint must be an
                      even number of hexadecimal characters.]
                properties:
                  errors:
                    description: List of errors
                    items: {type: string}
                    type: array
                type: object
          description: Request cannot be completed due to errors in input.
          x-mythic-error-summary: Bad input
        '401':
          content:
            application/json:
              schema:
                properties:
                  error: {description: Error message, example: Malformed or missing
                      auth data, type: string}
                type: object
          description: User is not authenticated.
          x-mythic-error-summary: Not authenticated
        '403':
          content:
            application/json:
              schema:
                properties:
                  error: {description: Error message, example: Auth token has no DNS
                      permits, type: string}
                type: object
          description: Not authorised to access this API.
          x-mythic-error-summary: Not authorised
      security:
      - BasicAuth: []
      - BearerAuth: []
      summary: Delete records
    get:
      description: 'List records in the zone.


        This will return all records that match the specified path, filtered

        according to query string parameters.  The response can be returned in

        JSON format, or RFC 1035 zone file format.  The response format can be

        selected using an `Accept` header of `application/json` or `text/dns`,

        respectively.


        '
      parameters:
      - description: The name of the zone.
        in: path
        name: zone
        required: true
        schema: {type: string}
      - description: The record type.  Must be upper case.  See [record types](#ep-get-record-types)
          end point for a list of supported record types.
        example: A
        in: path
        name: type
        required: true
        schema: {type: string}
      - description: The host for records to return.  Use `@` to return records for
          the bare domain (apex).
        in: path
        name: host
        required: true
        schema: {type: string}
      - description: "Verify that all authoritative servers are returning the latest\n\
          record details.  \n\nIf all authoritative servers return the latest version\
          \ of the selected records, this will give a `200` response, with details\
          \ of the records.\n\nOtherwise, this will give a `409` response, with details\
          \ of the differences between live and expected records.\n\nThis parameter\
          \ can only be used if `host` and `type` are specified in the request URL.\n\
          \n"
        in: query
        name: verify
        schema: {type: boolean}
      - description: Exclude generated records.  See [boolean query parameters](#sec-boolean).
        in: query
        name: exclude-generated
        schema: {type: boolean}
      - description: Exclude template records.  See [boolean query parameters](#sec-boolean).
        in: query
        name: exclude-template
        schema: {type: boolean}
      - description: "Comment out ANAME pseudo-records in zone file export\n\nIf set\
          \ to true, ANAME records will be prefixed with `;` when\nexported, so that\
          \ they appear as comments in the zone file export.\nNote that this option\
          \ only affects zone file format responses\n(`text/dns`), and has no effect\
          \ on JSON format responses.  \n\nAny `A` or `AAAA` records generated from\
          \ `ANAME` records will\nstill be included uncommented in the response, unless\n\
          `exclude-generated` is also specified, in which case they will be\nomitted\
          \ altogether.\n\nSee [boolean query parameters](#sec-boolean).\n\n"
        in: query
        name: comment-aname
        schema: {type: boolean}
      - description: "Filter selected records.  \n\nTakes a URL-encoded set of [record\
          \ filter query string parameters](#param-group-recordFilters).  Only records\
          \ matching all specified values will be returned.  The `select` parameter\
          \ may be repeated in which case, records matching all of the values in any\
          \ `select` parameter will be returned.  If any [record filters](#param-group-recordFilters)\
          \ are specified directly as query parameters, then these must match in addition\
          \ to any filters specified in `select` parameters. See [filtering](#sec-filtering)\
          \ for more details.  \n\n"
        in: query
        name: select
        schema: {type: string}
      - description: Record hostname
        in: query
        name: host
        schema: {type: string}
      - description: Record type
        example: A
        in: query
        name: type
        schema: {type: string}
      - description: Time-to-live (TTL).  Number of seconds for which the record can
          be cached
        example: 300
        in: query
        name: ttl
        schema: {type: number}
      - description: Record data
        in: query
        name: data
        schema: {type: string}
      - description: Record priority (MX records)
        in: query
        name: mx_priority
        schema: {type: number}
      - description: Record priority (SRV records)
        in: query
        name: srv_priority
        schema: {type: number}
      - description: Record weight (SRV records)
        in: query
        name: srv_weight
        schema: {type: number}
      - description: Port number (SRV records)
        in: query
        name: srv_port
        schema: {type: number}
      - description: Algorithm for SSH fingerprint (SSHFP records)
        in: query
        name: sshfp_algorithm
        schema: {type: number}
      - description: SSH fingerprint type (SSHFP records)
        in: query
        name: sshfp_type
        schema: {type: number}
      - description: Flags value (CAA records)
        in: query
        name: caa_flags
        schema: {type: number}
      - description: CAA tag value (CAA records)
        in: query
        name: caa_tag
        schema: {type: string}
      - description: TLSA usage (0-3) (TLSA records)
        in: query
        name: tlsa_usage
        schema: {type: number}
      - description: TLSA selector (0 or 1) (TLSA records)
        in: query
        name: tlsa_selector
        schema: {type: number}
      - description: TLSA match method (0-2) (TLSA records)
        in: query
        name: tlsa_matching
        schema: {type: number}
      responses:
        '200':
          content:
            application/json:
              schema:
                example:
                  records:
                  - {data: 1.2.3.4, host: www, ttl: 300, type: A}
                  - {data: mx.mythic-beasts.com., host: '@', mx_priority: 10, ttl: 300,
                    type: MX}
                properties:
                  records:
                    description: List of records
                    items: {type: string}
                    type: array
                type: object
            text/dns:
              example: "www 300  A   1.2.3.4\n@   300  MX  10 mx.mythic-beasts.com.\
                \ \n"
              schema: {type: string}
          description: 'List of records


            '
        '401':
          content:
            application/json:
              schema:
                properties:
                  error: {description: Error message, example: Malformed or missing
                      auth data, type: string}
                type: object
          description: User is not authenticated.
          x-mythic-error-summary: Not authenticated
        '403':
          content:
            application/json:
              schema:
                properties:
                  error: {description: Error message, example: Auth token has no DNS
                      permits, type: string}
                type: object
          description: Not authorised to access this API.
          x-mythic-error-summary: Not authorised
        '409':
          content:
            application/json:
              schema:
                example:
                  errors: ['''1.2.3.4'' not found in response from ns1.mythic-beasts.com.']
                properties:
                  errors:
                    description: List of errors
                    items: {type: string}
                    type: array
                type: object
          description: 'Indicates that the response from one or more authoritative

            nameservers does not match the latest version of the selected

            records.  Only returned if the `verify` parameter is specified.


            '
      security:
      - BasicAuth: []
      - BearerAuth: []
      summary: Get records
    post:
      description: "Add new records to a zone.  \n\nNew records can be provided as\
        \ JSON (`application/json`), RFC1035 format (`text/dns`), or form parameters\
        \ (`application/x-www-form-urlencoded`).\n\nIf the URL path contains `host`\
        \ or `type` parameters, new records must match these values.\n\nChanges are\
        \ applied atomically; either all new records will be added, or none of them\
        \ will and an error will be returned (see [transactions](#sec-transactions)).\n\
        \n"
      parameters:
      - description: The name of the zone.
        in: path
        name: zone
        required: true
        schema: {type: string}
      - description: The record type.  Must be upper case.  See [record types](#ep-get-record-types)
          end point for a list of supported record types.
        example: A
        in: path
        name: type
        required: true
        schema: {type: string}
      - description: The host for records to return.  Use `@` to return records for
          the bare domain (apex).
        in: path
        name: host
        required: true
        schema: {type: string}
      - description: Exclude generated records.  See [boolean query parameters](#sec-boolean).
        in: query
        name: exclude-generated
        schema: {type: boolean}
      - description: Exclude template records.  See [boolean query parameters](#sec-boolean).
        in: query
        name: exclude-template
        schema: {type: boolean}
      - description: "Comment out ANAME pseudo-records in zone file export\n\nIf set\
          \ to true, ANAME records will be prefixed with `;` when\nexported, so that\
          \ they appear as comments in the zone file export.\nNote that this option\
          \ only affects zone file format responses\n(`text/dns`), and has no effect\
          \ on JSON format responses.  \n\nAny `A` or `AAAA` records generated from\
          \ `ANAME` records will\nstill be included uncommented in the response, unless\n\
          `exclude-generated` is also specified, in which case they will be\nomitted\
          \ altogether.\n\nSee [boolean query parameters](#sec-boolean).\n\n"
        in: query
        name: comment-aname
        schema: {type: boolean}
      - description: "Filter selected records.  \n\nTakes a URL-encoded set of [record\
          \ filter query string parameters](#param-group-recordFilters).  Only records\
          \ matching all specified values will be returned.  The `select` parameter\
          \ may be repeated in which case, records matching all of the values in any\
          \ `select` parameter will be returned.  If any [record filters](#param-group-recordFilters)\
          \ are specified directly as query parameters, then these must match in addition\
          \ to any filters specified in `select` parameters. See [filtering](#sec-filtering)\
          \ for more details.  \n\n"
        in: query
        name: select
        schema: {type: string}
      - description: Record hostname
        in: query
        name: host
        schema: {type: string}
      - description: Record type
        example: A
        in: query
        name: type
        schema: {type: string}
      - description: Time-to-live (TTL).  Number of seconds for which the record can
          be cached
        example: 300
        in: query
        name: ttl
        schema: {type: number}
      - description: Record data
        in: query
        name: data
        schema: {type: string}
      - description: Record priority (MX records)
        in: query
        name: mx_priority
        schema: {type: number}
      - description: Record priority (SRV records)
        in: query
        name: srv_priority
        schema: {type: number}
      - description: Record weight (SRV records)
        in: query
        name: srv_weight
        schema: {type: number}
      - description: Port number (SRV records)
        in: query
        name: srv_port
        schema: {type: number}
      - description: Algorithm for SSH fingerprint (SSHFP records)
        in: query
        name: sshfp_algorithm
        schema: {type: number}
      - description: SSH fingerprint type (SSHFP records)
        in: query
        name: sshfp_type
        schema: {type: number}
      - description: Flags value (CAA records)
        in: query
        name: caa_flags
        schema: {type: number}
      - description: CAA tag value (CAA records)
        in: query
        name: caa_tag
        schema: {type: string}
      - description: TLSA usage (0-3) (TLSA records)
        in: query
        name: tlsa_usage
        schema: {type: number}
      - description: TLSA selector (0 or 1) (TLSA records)
        in: query
        name: tlsa_selector
        schema: {type: number}
      - description: TLSA match method (0-2) (TLSA records)
        in: query
        name: tlsa_matching
        schema: {type: number}
      requestBody:
        content:
          application/json:
            schema:
              example:
                records:
                - {data: proxy.mythic-beasts.com., host: www, ttl: 300, type: CNAME}
              properties:
                records:
                  description: List of records to add.
                  items:
                    properties:
                      data: {description: Record data.  `A` and `AAAA` records can
                          additionally take the special value `DYNAMIC_IP` which uses
                          the client's IP address as the field value.  Hex strings
                          (for SSHFP and TLSA) must be in lower-case., example: 1.2.3.4,
                        type: string}
                      host: {description: Hostname of record to add., example: www,
                        type: string}
                      ttl: {description: TTL (time-to-live) value, example: 300, type: number}
                      type: {description: Record type, example: AAAA, type: string}
                    required: [host, type, data]
                    type: object
                  type: array
              required: [records]
          text/dns:
            schema: {example: "www 300  A   1.2.3.4\n@   300  MX  10 mx.mythic-beasts.com.\
                \ \n", type: string}
            x-mythic-description: 'Data may be submitted as an

              [RFC1035](https://tools.ietf.org/html/rfc1035) formatted zone

              file.  The order of TTL and record type is interchangeable.  TTL

              may be omitted.  If a line starts with space, the previous

              hostname will be used.  The order of otherwise be as returned by

              the [record types](#ep-get-record-types) end point.

              '
          x-www-form-urlencoded:
            schema:
              example:
                records:
                - {data: proxy.mythic-beasts.com., host: www, ttl: 300, type: CNAME}
              properties:
                data: {description: 'Record data.  This parameter may be repeated,
                    which will create multiple records with the same name and type
                    (and the same values for any additional fields).  Hex strings
                    (for SSHFP and TLSA) must be in lower-case.', example: 1.2.3.4,
                  type: string}
                host: {description: Hostname of record to add.  Required if not specified
                    in the URL., example: www, type: string}
                ttl: {description: TTL (time-to-live) value, example: 300, type: number}
                type: {description: Record type.  Required if not specified in the
                    URL., example: AAAA, type: string}
              required: [data]
      responses:
        '200':
          content:
            application/json:
              schema:
                example: {message: 4 records added, records_added: 4}
                properties:
                  message: {description: Response message, type: string}
                  records_added: {description: Number of records added, type: integer}
                type: object
          description: 'Records added


            '
        '400':
          content:
            application/json:
              schema:
                example:
                  errors: [Unknown record type 'FOO', SSHFP fingerprint must be an
                      even number of hexadecimal characters.]
                properties:
                  errors:
                    description: List of errors
                    items: {type: string}
                    type: array
                type: object
          description: Request cannot be completed due to errors in input.
          x-mythic-error-summary: Bad input
        '401':
          content:
            application/json:
              schema:
                properties:
                  error: {description: Error message, example: Malformed or missing
                      auth data, type: string}
                type: object
          description: User is not authenticated.
          x-mythic-error-summary: Not authenticated
        '403':
          content:
            application/json:
              schema:
                properties:
                  error: {description: Error message, example: Auth token has no DNS
                      permits, type: string}
                type: object
          description: Not authorised to access this API.
          x-mythic-error-summary: Not authorised
      security:
      - BasicAuth: []
      - BearerAuth: []
      summary: Add new records
    put:
      description: 'Replaces all records selected by the path and any filters with
        the provided new records.  If no records are matched by the path and filters,
        the new records will still be added.


        New records can be provided as JSON (`application/json`), RFC1035 format (`text/dns`),
        or form parameters (`application/x-www-form-urlencoded`).


        If the URL path contains `host` or `type` parameters, new records must match
        these values.


        Changes are applied atomically; either all selected records will be replaced
        with all new records, or no changes will be made and an error will be returned
        (see [transactions](#sec-transactions)).


        Note that zones may contain generated records (typically generated from

        ANAME records) and template records (common records inherited from a

        standard template).  These records cannot be deleted or replaced, and a

        `PUT` request to a URL that would select any such records will result

        in an error.  To avoid this, specify the `exclude-generated` or

        `exclude-template` query parameters.


        '
      parameters:
      - description: The name of the zone.
        in: path
        name: zone
        required: true
        schema: {type: string}
      - description: The record type.  Must be upper case.  See [record types](#ep-get-record-types)
          end point for a list of supported record types.
        example: A
        in: path
        name: type
        required: true
        schema: {type: string}
      - description: The host for records to return.  Use `@` to return records for
          the bare domain (apex).
        in: path
        name: host
        required: true
        schema: {type: string}
      - description: Exclude generated records.  See [boolean query parameters](#sec-boolean).
        in: query
        name: exclude-generated
        schema: {type: boolean}
      - description: Exclude template records.  See [boolean query parameters](#sec-boolean).
        in: query
        name: exclude-template
        schema: {type: boolean}
      - description: "Comment out ANAME pseudo-records in zone file export\n\nIf set\
          \ to true, ANAME records will be prefixed with `;` when\nexported, so that\
          \ they appear as comments in the zone file export.\nNote that this option\
          \ only affects zone file format responses\n(`text/dns`), and has no effect\
          \ on JSON format responses.  \n\nAny `A` or `AAAA` records generated from\
          \ `ANAME` records will\nstill be included uncommented in the response, unless\n\
          `exclude-generated` is also specified, in which case they will be\nomitted\
          \ altogether.\n\nSee [boolean query parameters](#sec-boolean).\n\n"
        in: query
        name: comment-aname
        schema: {type: boolean}
      - description: "Filter selected records.  \n\nTakes a URL-encoded set of [record\
          \ filter query string parameters](#param-group-recordFilters).  Only records\
          \ matching all specified values will be returned.  The `select` parameter\
          \ may be repeated in which case, records matching all of the values in any\
          \ `select` parameter will be returned.  If any [record filters](#param-group-recordFilters)\
          \ are specified directly as query parameters, then these must match in addition\
          \ to any filters specified in `select` parameters. See [filtering](#sec-filtering)\
          \ for more details.  \n\n"
        in: query
        name: select
        schema: {type: string}
      - description: Record hostname
        in: query
        name: host
        schema: {type: string}
      - description: Record type
        example: A
        in: query
        name: type
        schema: {type: string}
      - description: Time-to-live (TTL).  Number of seconds for which the record can
          be cached
        example: 300
        in: query
        name: ttl
        schema: {type: number}
      - description: Record data
        in: query
        name: data
        schema: {type: string}
      - description: Record priority (MX records)
        in: query
        name: mx_priority
        schema: {type: number}
      - description: Record priority (SRV records)
        in: query
        name: srv_priority
        schema: {type: number}
      - description: Record weight (SRV records)
        in: query
        name: srv_weight
        schema: {type: number}
      - description: Port number (SRV records)
        in: query
        name: srv_port
        schema: {type: number}
      - description: Algorithm for SSH fingerprint (SSHFP records)
        in: query
        name: sshfp_algorithm
        schema: {type: number}
      - description: SSH fingerprint type (SSHFP records)
        in: query
        name: sshfp_type
        schema: {type: number}
      - description: Flags value (CAA records)
        in: query
        name: caa_flags
        schema: {type: number}
      - description: CAA tag value (CAA records)
        in: query
        name: caa_tag
        schema: {type: string}
      - description: TLSA usage (0-3) (TLSA records)
        in: query
        name: tlsa_usage
        schema: {type: number}
      - description: TLSA selector (0 or 1) (TLSA records)
        in: query
        name: tlsa_selector
        schema: {type: number}
      - description: TLSA match method (0-2) (TLSA records)
        in: query
        name: tlsa_matching
        schema: {type: number}
      requestBody:
        content:
          application/json:
            schema:
              example:
                records:
                - {data: proxy.mythic-beasts.com., host: www, ttl: 300, type: CNAME}
              properties:
                records:
                  description: List of records to add.
                  items:
                    properties:
                      data: {description: Record data.  `A` and `AAAA` records can
                          additionally take the special value `DYNAMIC_IP` which uses
                          the client's IP address as the field value.  Hex strings
                          (for SSHFP and TLSA) must be in lower-case., example: 1.2.3.4,
                        type: string}
                      host: {description: Hostname of record to add., example: www,
                        type: string}
                      ttl: {description: TTL (time-to-live) value, example: 300, type: number}
                      type: {description: Record type, example: AAAA, type: string}
                    required: [host, type, data]
                    type: object
                  type: array
              required: [records]
          text/dns:
            schema: {example: "www 300  A   1.2.3.4\n@   300  MX  10 mx.mythic-beasts.com.\
                \ \n", type: string}
            x-mythic-description: 'Data may be submitted as an

              [RFC1035](https://tools.ietf.org/html/rfc1035) formatted zone

              file.  The order of TTL and record type is interchangeable.  TTL

              may be omitted.  If a line starts with space, the previous

              hostname will be used.  The order of otherwise be as returned by

              the [record types](#ep-get-record-types) end point.

              '
          x-www-form-urlencoded:
            schema:
              example:
                records:
                - {data: proxy.mythic-beasts.com., host: www, ttl: 300, type: CNAME}
              properties:
                data: {description: 'Record data.  This parameter may be repeated,
                    which will create multiple records with the same name and type
                    (and the same values for any additional fields).  Hex strings
                    (for SSHFP and TLSA) must be in lower-case.', example: 1.2.3.4,
                  type: string}
                host: {description: Hostname of record to add.  Required if not specified
                    in the URL., example: www, type: string}
                ttl: {description: TTL (time-to-live) value, example: 300, type: number}
                type: {description: Record type.  Required if not specified in the
                    URL., example: AAAA, type: string}
              required: [data]
      responses:
        '200':
          content:
            application/json:
              schema:
                example: {message: 4 records added, records_added: 4, records_removed: 3}
                properties:
                  message: {description: Response message, type: string}
                  records_added: {description: Number of records added, type: integer}
                  records_removed: {description: Number of records removed, type: integer}
                type: object
          description: 'Records replaced

            '
        '400':
          content:
            application/json:
              schema:
                example:
                  errors: [Unknown record type 'FOO', SSHFP fingerprint must be an
                      even number of hexadecimal characters.]
                properties:
                  errors:
                    description: List of errors
                    items: {type: string}
                    type: array
                type: object
          description: Request cannot be completed due to errors in input.
          x-mythic-error-summary: Bad input
        '401':
          content:
            application/json:
              schema:
                properties:
                  error: {description: Error message, example: Malformed or missing
                      auth data, type: string}
                type: object
          description: User is not authenticated.
          x-mythic-error-summary: Not authenticated
        '403':
          content:
            application/json:
              schema:
                properties:
                  error: {description: Error message, example: Auth token has no DNS
                      permits, type: string}
                type: object
          description: Not authorised to access this API.
          x-mythic-error-summary: Not authorised
      security:
      - BasicAuth: []
      - BearerAuth: []
      summary: Replace records
servers:
- {url: 'https://api.mythic-beasts.com/dns/v2'}
tags:
- {description: Primary DNS API, name: DNS}
