# Records

Endpoints related to records

## Retrieve records for a secondary zone

> Returns the list of records for a secondary zone. Those are the records created for its primary IPs

```json
{"openapi":"3.0.3","info":{"title":"IONOS Cloud - DNS API","version":"1.18.0"},"tags":[{"name":"Records","description":"Endpoints related to records"}],"servers":[{"url":"https://dns.de-fra.ionos.com","description":"Frankfurt"}],"security":[{"tokenAuth":[]}],"components":{"securitySchemes":{"tokenAuth":{"type":"apiKey","description":"Please provide header value as 'Bearer <token>' and don't forget to add 'Bearer' HTTP Authorization Scheme before the token.","name":"Authorization","in":"header"}},"parameters":{"paginationOffset":{"name":"offset","in":"query","description":"The first element (of the total list of elements) to include in the response. Use together with limit for pagination.","required":false,"schema":{"type":"integer","format":"int32","default":0,"minimum":0}},"paginationLimit":{"name":"limit","in":"query","description":"The maximum number of elements to return. Use together with offset for pagination.","required":false,"schema":{"type":"integer","format":"int32","default":100,"minimum":1,"maximum":1000}}},"schemas":{"SecondaryZoneRecordReadList":{"type":"object","required":["id","type","href","metadata","items","offset","limit","_links"],"properties":{"id":{"type":"string","format":"uuid","description":"The resource's unique identifier.","readOnly":true},"type":{"type":"string","enum":["collection"]},"href":{"type":"string","format":"uri","readOnly":true},"metadata":{"type":"object","required":["primaryIps"],"description":"Shows the specific properties for secondary zones","properties":{"primaryIps":{"type":"array","items":{"type":"string","anyOf":[{"format":"ipv4"},{"format":"ipv6"}]},"minItems":1,"uniqueItems":true,"description":"Indicates IP addresses of primary nameservers for a secondary zone. Accepts IPv4 and IPv6 addresses"}}},"items":{"type":"array","items":{"$ref":"#/components/schemas/SecondaryZoneRecordRead"}},"offset":{"$ref":"#/components/schemas/Offset"},"limit":{"$ref":"#/components/schemas/Limit"},"_links":{"$ref":"#/components/schemas/Links"}}},"SecondaryZoneRecordRead":{"type":"object","required":["type","metadata","properties"],"properties":{"type":{"type":"string","enum":["record"]},"metadata":{"$ref":"#/components/schemas/MetadataForSecondaryZoneRecords"},"properties":{"$ref":"#/components/schemas/Record"}}},"MetadataForSecondaryZoneRecords":{"type":"object","description":"Metadata for records of secondary zones.","required":["fqdn","zoneId","rootName"],"properties":{"fqdn":{"type":"string","readOnly":true,"description":"A fully qualified domain name. FQDN consists of two parts - the hostname and the domain name."},"zoneId":{"$ref":"#/components/schemas/zoneId"},"rootName":{"type":"string","description":"Indicates the root name (from the primary zone) for the record"}}},"zoneId":{"type":"string","readOnly":true,"format":"uuid","description":"The ID (UUID) of the DNS zone of which record belongs to."},"Record":{"type":"object","required":["name","type","content"],"properties":{"name":{"type":"string"},"type":{"$ref":"#/components/schemas/RecordType"},"content":{"type":"string"},"ttl":{"type":"integer","default":3600,"minimum":60,"maximum":604800,"description":"Time to live for the record, recommended 3600."},"priority":{"type":"integer","default":3600,"minimum":0,"maximum":65535,"description":"Priority value is between 0 and 65535. Priority is mandatory for MX, SRV and URI record types and ignored for all other types."},"enabled":{"type":"boolean","default":true,"description":"When true - the record is visible for lookup."}}},"RecordType":{"type":"string","description":"Holds supported DNS resource record types. In the DNS context a record is a DNS resource record.","enum":["A","AAAA","CNAME","ALIAS","MX","NS","SRV","TXT","CAA","SSHFP","TLSA","SMIMEA","DS","HTTPS","SVCB","OPENPGPKEY","CERT","URI","RP","LOC"]},"Offset":{"type":"number","description":"Pagination offset.","readOnly":true},"Limit":{"type":"number","description":"Pagination limit.","readOnly":true},"Links":{"description":"URLs to navigate the different pages. As of now we always only return a\nsingle page.\n","type":"object","properties":{"prev":{"description":"URL (with offset and limit parameters) of the previous page; only\npresent if offset is greater than 0.\n","type":"string","format":"uri","readOnly":true},"self":{"description":"URL (with offset and limit parameters) of the current page.\n","type":"string","format":"uri","readOnly":true},"next":{"description":"URL (with offset and limit parameters) of the next page; only\npresent if offset + limit is less than the total number of elements.\n","type":"string","format":"uri","readOnly":true}}},"Error":{"type":"object","additionalProperties":false,"properties":{"httpStatus":{"type":"integer","description":"HTTP status code of the operation as specified by [RFC 7231](https://datatracker.ietf.org/doc/html/rfc7231#section-6).\n"},"messages":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"errorCode":{"type":"string","description":"Internal error code.\n"},"message":{"type":"string","description":"Human readable explanation of the issue.\n"}}}}}}},"responses":{"BadRequest":{"description":"### Bad Request\nThe request send to the API was malformed.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthorized":{"description":"### Unauthorized\nThe request is missing authorization information or the authorization information provided are expired.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotAllowed":{"description":"### Not Allowed\nThe user issuing the request does not have the needed permissions.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalError":{"description":"### Internal Server Error\nAn internal error occurred. We apologize for the inconvenience!\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/secondaryzones/{secondaryZoneId}/records":{"get":{"operationId":"secondaryzonesRecordsGet","summary":"Retrieve records for a secondary zone","tags":["Records"],"description":"Returns the list of records for a secondary zone. Those are the records created for its primary IPs","parameters":[{"name":"secondaryZoneId","in":"path","schema":{"type":"string","format":"uuid"},"required":true,"description":"The ID (UUID) of the DNS secondary zone."},{"$ref":"#/components/parameters/paginationOffset"},{"$ref":"#/components/parameters/paginationLimit"}],"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecondaryZoneRecordReadList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/NotAllowed"},"500":{"$ref":"#/components/responses/InternalError"}}}}}}
```

## Retrieve all records from primary zones

> Returns the list of all records for all customer DNS zones with the possibility to filter them.

```json
{"openapi":"3.0.3","info":{"title":"IONOS Cloud - DNS API","version":"1.18.0"},"tags":[{"name":"Records","description":"Endpoints related to records"}],"servers":[{"url":"https://dns.de-fra.ionos.com","description":"Frankfurt"}],"security":[{"tokenAuth":[]}],"components":{"securitySchemes":{"tokenAuth":{"type":"apiKey","description":"Please provide header value as 'Bearer <token>' and don't forget to add 'Bearer' HTTP Authorization Scheme before the token.","name":"Authorization","in":"header"}},"schemas":{"ProvisioningState":{"type":"string","description":"The list of possible provisioning states in which DNS resource could be at the specific time.\n* AVAILABLE - resource exists and is healthy.\n* PROVISIONING - resource is being created or updated.\n* DESTROYING - delete command was issued, the resource is being deleted.\n* FAILED - creation of the resource failed.\n","enum":["PROVISIONING","DESTROYING","AVAILABLE","FAILED"]},"RecordType":{"type":"string","description":"Holds supported DNS resource record types. In the DNS context a record is a DNS resource record.","enum":["A","AAAA","CNAME","ALIAS","MX","NS","SRV","TXT","CAA","SSHFP","TLSA","SMIMEA","DS","HTTPS","SVCB","OPENPGPKEY","CERT","URI","RP","LOC"]},"RecordReadList":{"type":"object","required":["id","type","href","items","offset","limit","_links"],"properties":{"id":{"type":"string","format":"uuid","description":"The resource's unique identifier.","readOnly":true},"type":{"type":"string","enum":["collection"]},"href":{"type":"string","format":"uri","readOnly":true},"items":{"type":"array","items":{"$ref":"#/components/schemas/RecordRead"}},"offset":{"$ref":"#/components/schemas/Offset"},"limit":{"$ref":"#/components/schemas/Limit"},"_links":{"$ref":"#/components/schemas/Links"}}},"RecordRead":{"type":"object","required":["id","type","href","metadata","properties"],"properties":{"id":{"type":"string","format":"uuid","description":"The record ID (UUID).","readOnly":true},"type":{"type":"string","enum":["record"]},"href":{"type":"string","format":"uri","readOnly":true},"metadata":{"$ref":"#/components/schemas/MetadataWithStateFqdnZoneId"},"properties":{"$ref":"#/components/schemas/Record"}}},"MetadataWithStateFqdnZoneId":{"allOf":[{"$ref":"#/components/schemas/Metadata"},{"type":"object","required":["state","fqdn","zoneId"],"properties":{"state":{"$ref":"#/components/schemas/ProvisioningState"},"fqdn":{"type":"string","readOnly":true,"description":"A fully qualified domain name. FQDN consists of two parts - the hostname and the domain name."},"zoneId":{"$ref":"#/components/schemas/zoneId"}}}]},"Metadata":{"type":"object","description":"Metadata of the resource.","properties":{"createdDate":{"type":"string","readOnly":true,"format":"date-time","description":"The creation date formatted as yyyy-MM-dd'T'HH:mm:ss.SSS'Z'."},"createdBy":{"type":"string","description":"Unique name of the identity that created the resource.","readOnly":true},"createdByUserId":{"type":"string","description":"The unique ID of the user who created the resource.","readOnly":true},"lastModifiedDate":{"type":"string","readOnly":true,"format":"date-time","description":"The date of the last change formatted as yyyy-MM-dd'T'HH:mm:ss.SSS'Z'."},"lastModifiedBy":{"type":"string","description":"Unique name of the identity that created the resource.","readOnly":true},"lastModifiedByUserId":{"type":"string","description":"The unique ID of the user who last modified the resource.","readOnly":true},"resourceURN":{"type":"string","description":"Unique name of the resource.","readOnly":true}}},"zoneId":{"type":"string","readOnly":true,"format":"uuid","description":"The ID (UUID) of the DNS zone of which record belongs to."},"Record":{"type":"object","required":["name","type","content"],"properties":{"name":{"type":"string"},"type":{"$ref":"#/components/schemas/RecordType"},"content":{"type":"string"},"ttl":{"type":"integer","default":3600,"minimum":60,"maximum":604800,"description":"Time to live for the record, recommended 3600."},"priority":{"type":"integer","default":3600,"minimum":0,"maximum":65535,"description":"Priority value is between 0 and 65535. Priority is mandatory for MX, SRV and URI record types and ignored for all other types."},"enabled":{"type":"boolean","default":true,"description":"When true - the record is visible for lookup."}}},"Offset":{"type":"number","description":"Pagination offset.","readOnly":true},"Limit":{"type":"number","description":"Pagination limit.","readOnly":true},"Links":{"description":"URLs to navigate the different pages. As of now we always only return a\nsingle page.\n","type":"object","properties":{"prev":{"description":"URL (with offset and limit parameters) of the previous page; only\npresent if offset is greater than 0.\n","type":"string","format":"uri","readOnly":true},"self":{"description":"URL (with offset and limit parameters) of the current page.\n","type":"string","format":"uri","readOnly":true},"next":{"description":"URL (with offset and limit parameters) of the next page; only\npresent if offset + limit is less than the total number of elements.\n","type":"string","format":"uri","readOnly":true}}},"Error":{"type":"object","additionalProperties":false,"properties":{"httpStatus":{"type":"integer","description":"HTTP status code of the operation as specified by [RFC 7231](https://datatracker.ietf.org/doc/html/rfc7231#section-6).\n"},"messages":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"errorCode":{"type":"string","description":"Internal error code.\n"},"message":{"type":"string","description":"Human readable explanation of the issue.\n"}}}}}}},"parameters":{"paginationOffset":{"name":"offset","in":"query","description":"The first element (of the total list of elements) to include in the response. Use together with limit for pagination.","required":false,"schema":{"type":"integer","format":"int32","default":0,"minimum":0}},"paginationLimit":{"name":"limit","in":"query","description":"The maximum number of elements to return. Use together with offset for pagination.","required":false,"schema":{"type":"integer","format":"int32","default":100,"minimum":1,"maximum":1000}}},"responses":{"BadRequest":{"description":"### Bad Request\nThe request send to the API was malformed.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthorized":{"description":"### Unauthorized\nThe request is missing authorization information or the authorization information provided are expired.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotAllowed":{"description":"### Not Allowed\nThe user issuing the request does not have the needed permissions.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalError":{"description":"### Internal Server Error\nAn internal error occurred. We apologize for the inconvenience!\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/records":{"get":{"operationId":"recordsGet","summary":"Retrieve all records from primary zones","tags":["Records"],"description":"Returns the list of all records for all customer DNS zones with the possibility to filter them.","parameters":[{"name":"filter.zoneId","in":"query","schema":{"type":"string","format":"uuid"},"required":false,"description":"Filter used to fetch only the records that contain specified zoneId."},{"name":"filter.name","in":"query","description":"Filter used to fetch only the records that contain specified record name.","required":false,"schema":{"type":"string"},"allowEmptyValue":true},{"name":"filter.state","in":"query","schema":{"$ref":"#/components/schemas/ProvisioningState"},"required":false,"description":"Filter used to fetch only the records that are in certain state."},{"name":"filter.type","in":"query","schema":{"$ref":"#/components/schemas/RecordType"},"required":false,"description":"Filter used to fetch only the records with specified type."},{"$ref":"#/components/parameters/paginationOffset"},{"$ref":"#/components/parameters/paginationLimit"}],"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordReadList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/NotAllowed"},"500":{"$ref":"#/components/responses/InternalError"}}}}}}
```

## Retrieve records

> Returns the list of records for the specific DNS zone.

```json
{"openapi":"3.0.3","info":{"title":"IONOS Cloud - DNS API","version":"1.18.0"},"tags":[{"name":"Records","description":"Endpoints related to records"}],"servers":[{"url":"https://dns.de-fra.ionos.com","description":"Frankfurt"}],"security":[{"tokenAuth":[]}],"components":{"securitySchemes":{"tokenAuth":{"type":"apiKey","description":"Please provide header value as 'Bearer <token>' and don't forget to add 'Bearer' HTTP Authorization Scheme before the token.","name":"Authorization","in":"header"}},"schemas":{"RecordReadList":{"type":"object","required":["id","type","href","items","offset","limit","_links"],"properties":{"id":{"type":"string","format":"uuid","description":"The resource's unique identifier.","readOnly":true},"type":{"type":"string","enum":["collection"]},"href":{"type":"string","format":"uri","readOnly":true},"items":{"type":"array","items":{"$ref":"#/components/schemas/RecordRead"}},"offset":{"$ref":"#/components/schemas/Offset"},"limit":{"$ref":"#/components/schemas/Limit"},"_links":{"$ref":"#/components/schemas/Links"}}},"RecordRead":{"type":"object","required":["id","type","href","metadata","properties"],"properties":{"id":{"type":"string","format":"uuid","description":"The record ID (UUID).","readOnly":true},"type":{"type":"string","enum":["record"]},"href":{"type":"string","format":"uri","readOnly":true},"metadata":{"$ref":"#/components/schemas/MetadataWithStateFqdnZoneId"},"properties":{"$ref":"#/components/schemas/Record"}}},"MetadataWithStateFqdnZoneId":{"allOf":[{"$ref":"#/components/schemas/Metadata"},{"type":"object","required":["state","fqdn","zoneId"],"properties":{"state":{"$ref":"#/components/schemas/ProvisioningState"},"fqdn":{"type":"string","readOnly":true,"description":"A fully qualified domain name. FQDN consists of two parts - the hostname and the domain name."},"zoneId":{"$ref":"#/components/schemas/zoneId"}}}]},"Metadata":{"type":"object","description":"Metadata of the resource.","properties":{"createdDate":{"type":"string","readOnly":true,"format":"date-time","description":"The creation date formatted as yyyy-MM-dd'T'HH:mm:ss.SSS'Z'."},"createdBy":{"type":"string","description":"Unique name of the identity that created the resource.","readOnly":true},"createdByUserId":{"type":"string","description":"The unique ID of the user who created the resource.","readOnly":true},"lastModifiedDate":{"type":"string","readOnly":true,"format":"date-time","description":"The date of the last change formatted as yyyy-MM-dd'T'HH:mm:ss.SSS'Z'."},"lastModifiedBy":{"type":"string","description":"Unique name of the identity that created the resource.","readOnly":true},"lastModifiedByUserId":{"type":"string","description":"The unique ID of the user who last modified the resource.","readOnly":true},"resourceURN":{"type":"string","description":"Unique name of the resource.","readOnly":true}}},"ProvisioningState":{"type":"string","description":"The list of possible provisioning states in which DNS resource could be at the specific time.\n* AVAILABLE - resource exists and is healthy.\n* PROVISIONING - resource is being created or updated.\n* DESTROYING - delete command was issued, the resource is being deleted.\n* FAILED - creation of the resource failed.\n","enum":["PROVISIONING","DESTROYING","AVAILABLE","FAILED"]},"zoneId":{"type":"string","readOnly":true,"format":"uuid","description":"The ID (UUID) of the DNS zone of which record belongs to."},"Record":{"type":"object","required":["name","type","content"],"properties":{"name":{"type":"string"},"type":{"$ref":"#/components/schemas/RecordType"},"content":{"type":"string"},"ttl":{"type":"integer","default":3600,"minimum":60,"maximum":604800,"description":"Time to live for the record, recommended 3600."},"priority":{"type":"integer","default":3600,"minimum":0,"maximum":65535,"description":"Priority value is between 0 and 65535. Priority is mandatory for MX, SRV and URI record types and ignored for all other types."},"enabled":{"type":"boolean","default":true,"description":"When true - the record is visible for lookup."}}},"RecordType":{"type":"string","description":"Holds supported DNS resource record types. In the DNS context a record is a DNS resource record.","enum":["A","AAAA","CNAME","ALIAS","MX","NS","SRV","TXT","CAA","SSHFP","TLSA","SMIMEA","DS","HTTPS","SVCB","OPENPGPKEY","CERT","URI","RP","LOC"]},"Offset":{"type":"number","description":"Pagination offset.","readOnly":true},"Limit":{"type":"number","description":"Pagination limit.","readOnly":true},"Links":{"description":"URLs to navigate the different pages. As of now we always only return a\nsingle page.\n","type":"object","properties":{"prev":{"description":"URL (with offset and limit parameters) of the previous page; only\npresent if offset is greater than 0.\n","type":"string","format":"uri","readOnly":true},"self":{"description":"URL (with offset and limit parameters) of the current page.\n","type":"string","format":"uri","readOnly":true},"next":{"description":"URL (with offset and limit parameters) of the next page; only\npresent if offset + limit is less than the total number of elements.\n","type":"string","format":"uri","readOnly":true}}},"Error":{"type":"object","additionalProperties":false,"properties":{"httpStatus":{"type":"integer","description":"HTTP status code of the operation as specified by [RFC 7231](https://datatracker.ietf.org/doc/html/rfc7231#section-6).\n"},"messages":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"errorCode":{"type":"string","description":"Internal error code.\n"},"message":{"type":"string","description":"Human readable explanation of the issue.\n"}}}}}}},"responses":{"BadRequest":{"description":"### Bad Request\nThe request send to the API was malformed.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthorized":{"description":"### Unauthorized\nThe request is missing authorization information or the authorization information provided are expired.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotAllowed":{"description":"### Not Allowed\nThe user issuing the request does not have the needed permissions.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalError":{"description":"### Internal Server Error\nAn internal error occurred. We apologize for the inconvenience!\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/zones/{zoneId}/records":{"get":{"operationId":"zonesRecordsGet","summary":"Retrieve records","tags":["Records"],"description":"Returns the list of records for the specific DNS zone.","parameters":[{"name":"zoneId","in":"path","schema":{"type":"string","format":"uuid"},"required":true,"description":"The ID (UUID) of the DNS zone."}],"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordReadList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/NotAllowed"},"500":{"$ref":"#/components/responses/InternalError"}}}}}}
```

## Create a record

> Creates a new record for the DNS zone.

```json
{"openapi":"3.0.3","info":{"title":"IONOS Cloud - DNS API","version":"1.18.0"},"tags":[{"name":"Records","description":"Endpoints related to records"}],"servers":[{"url":"https://dns.de-fra.ionos.com","description":"Frankfurt"}],"security":[{"tokenAuth":[]}],"components":{"securitySchemes":{"tokenAuth":{"type":"apiKey","description":"Please provide header value as 'Bearer <token>' and don't forget to add 'Bearer' HTTP Authorization Scheme before the token.","name":"Authorization","in":"header"}},"schemas":{"RecordCreate":{"required":["properties"],"properties":{"properties":{"$ref":"#/components/schemas/Record"}}},"Record":{"type":"object","required":["name","type","content"],"properties":{"name":{"type":"string"},"type":{"$ref":"#/components/schemas/RecordType"},"content":{"type":"string"},"ttl":{"type":"integer","default":3600,"minimum":60,"maximum":604800,"description":"Time to live for the record, recommended 3600."},"priority":{"type":"integer","default":3600,"minimum":0,"maximum":65535,"description":"Priority value is between 0 and 65535. Priority is mandatory for MX, SRV and URI record types and ignored for all other types."},"enabled":{"type":"boolean","default":true,"description":"When true - the record is visible for lookup."}}},"RecordType":{"type":"string","description":"Holds supported DNS resource record types. In the DNS context a record is a DNS resource record.","enum":["A","AAAA","CNAME","ALIAS","MX","NS","SRV","TXT","CAA","SSHFP","TLSA","SMIMEA","DS","HTTPS","SVCB","OPENPGPKEY","CERT","URI","RP","LOC"]},"RecordRead":{"type":"object","required":["id","type","href","metadata","properties"],"properties":{"id":{"type":"string","format":"uuid","description":"The record ID (UUID).","readOnly":true},"type":{"type":"string","enum":["record"]},"href":{"type":"string","format":"uri","readOnly":true},"metadata":{"$ref":"#/components/schemas/MetadataWithStateFqdnZoneId"},"properties":{"$ref":"#/components/schemas/Record"}}},"MetadataWithStateFqdnZoneId":{"allOf":[{"$ref":"#/components/schemas/Metadata"},{"type":"object","required":["state","fqdn","zoneId"],"properties":{"state":{"$ref":"#/components/schemas/ProvisioningState"},"fqdn":{"type":"string","readOnly":true,"description":"A fully qualified domain name. FQDN consists of two parts - the hostname and the domain name."},"zoneId":{"$ref":"#/components/schemas/zoneId"}}}]},"Metadata":{"type":"object","description":"Metadata of the resource.","properties":{"createdDate":{"type":"string","readOnly":true,"format":"date-time","description":"The creation date formatted as yyyy-MM-dd'T'HH:mm:ss.SSS'Z'."},"createdBy":{"type":"string","description":"Unique name of the identity that created the resource.","readOnly":true},"createdByUserId":{"type":"string","description":"The unique ID of the user who created the resource.","readOnly":true},"lastModifiedDate":{"type":"string","readOnly":true,"format":"date-time","description":"The date of the last change formatted as yyyy-MM-dd'T'HH:mm:ss.SSS'Z'."},"lastModifiedBy":{"type":"string","description":"Unique name of the identity that created the resource.","readOnly":true},"lastModifiedByUserId":{"type":"string","description":"The unique ID of the user who last modified the resource.","readOnly":true},"resourceURN":{"type":"string","description":"Unique name of the resource.","readOnly":true}}},"ProvisioningState":{"type":"string","description":"The list of possible provisioning states in which DNS resource could be at the specific time.\n* AVAILABLE - resource exists and is healthy.\n* PROVISIONING - resource is being created or updated.\n* DESTROYING - delete command was issued, the resource is being deleted.\n* FAILED - creation of the resource failed.\n","enum":["PROVISIONING","DESTROYING","AVAILABLE","FAILED"]},"zoneId":{"type":"string","readOnly":true,"format":"uuid","description":"The ID (UUID) of the DNS zone of which record belongs to."},"Error":{"type":"object","additionalProperties":false,"properties":{"httpStatus":{"type":"integer","description":"HTTP status code of the operation as specified by [RFC 7231](https://datatracker.ietf.org/doc/html/rfc7231#section-6).\n"},"messages":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"errorCode":{"type":"string","description":"Internal error code.\n"},"message":{"type":"string","description":"Human readable explanation of the issue.\n"}}}}}}},"responses":{"BadRequest":{"description":"### Bad Request\nThe request send to the API was malformed.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthorized":{"description":"### Unauthorized\nThe request is missing authorization information or the authorization information provided are expired.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotAllowed":{"description":"### Not Allowed\nThe user issuing the request does not have the needed permissions.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"ConflictInRecordCreation":{"description":"### Conflict Error\nThis record cannot be modified/created because it conflicts with another record.\nThis can happen if you try to create a record with the same name and type as an existing record.\n#### Common causes:\n  - **CNAME conflicts**:  A CNAME record cannot coexist with other records of the same name according \nto DNS specifications (RFC 1034 section 3.6.2, RFC 1912 section 2.4)\n  - **TXT SPF**: A TXT record cannot have more than one SPF key in the record. Try to join them.\n    \n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalError":{"description":"### Internal Server Error\nAn internal error occurred. We apologize for the inconvenience!\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/zones/{zoneId}/records":{"post":{"operationId":"zonesRecordsPost","summary":"Create a record","tags":["Records"],"description":"Creates a new record for the DNS zone.","parameters":[{"name":"zoneId","in":"path","schema":{"type":"string","format":"uuid"},"required":true,"description":"The ID (UUID) of the DNS zone."}],"requestBody":{"description":"record","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordCreate"}}}},"responses":{"202":{"description":"Successful operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordRead"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/NotAllowed"},"409":{"$ref":"#/components/responses/ConflictInRecordCreation"},"500":{"$ref":"#/components/responses/InternalError"}}}}}}
```

## Retrieve a record

> Returns the record with the specified record ID.

```json
{"openapi":"3.0.3","info":{"title":"IONOS Cloud - DNS API","version":"1.18.0"},"tags":[{"name":"Records","description":"Endpoints related to records"}],"servers":[{"url":"https://dns.de-fra.ionos.com","description":"Frankfurt"}],"security":[{"tokenAuth":[]}],"components":{"securitySchemes":{"tokenAuth":{"type":"apiKey","description":"Please provide header value as 'Bearer <token>' and don't forget to add 'Bearer' HTTP Authorization Scheme before the token.","name":"Authorization","in":"header"}},"schemas":{"RecordRead":{"type":"object","required":["id","type","href","metadata","properties"],"properties":{"id":{"type":"string","format":"uuid","description":"The record ID (UUID).","readOnly":true},"type":{"type":"string","enum":["record"]},"href":{"type":"string","format":"uri","readOnly":true},"metadata":{"$ref":"#/components/schemas/MetadataWithStateFqdnZoneId"},"properties":{"$ref":"#/components/schemas/Record"}}},"MetadataWithStateFqdnZoneId":{"allOf":[{"$ref":"#/components/schemas/Metadata"},{"type":"object","required":["state","fqdn","zoneId"],"properties":{"state":{"$ref":"#/components/schemas/ProvisioningState"},"fqdn":{"type":"string","readOnly":true,"description":"A fully qualified domain name. FQDN consists of two parts - the hostname and the domain name."},"zoneId":{"$ref":"#/components/schemas/zoneId"}}}]},"Metadata":{"type":"object","description":"Metadata of the resource.","properties":{"createdDate":{"type":"string","readOnly":true,"format":"date-time","description":"The creation date formatted as yyyy-MM-dd'T'HH:mm:ss.SSS'Z'."},"createdBy":{"type":"string","description":"Unique name of the identity that created the resource.","readOnly":true},"createdByUserId":{"type":"string","description":"The unique ID of the user who created the resource.","readOnly":true},"lastModifiedDate":{"type":"string","readOnly":true,"format":"date-time","description":"The date of the last change formatted as yyyy-MM-dd'T'HH:mm:ss.SSS'Z'."},"lastModifiedBy":{"type":"string","description":"Unique name of the identity that created the resource.","readOnly":true},"lastModifiedByUserId":{"type":"string","description":"The unique ID of the user who last modified the resource.","readOnly":true},"resourceURN":{"type":"string","description":"Unique name of the resource.","readOnly":true}}},"ProvisioningState":{"type":"string","description":"The list of possible provisioning states in which DNS resource could be at the specific time.\n* AVAILABLE - resource exists and is healthy.\n* PROVISIONING - resource is being created or updated.\n* DESTROYING - delete command was issued, the resource is being deleted.\n* FAILED - creation of the resource failed.\n","enum":["PROVISIONING","DESTROYING","AVAILABLE","FAILED"]},"zoneId":{"type":"string","readOnly":true,"format":"uuid","description":"The ID (UUID) of the DNS zone of which record belongs to."},"Record":{"type":"object","required":["name","type","content"],"properties":{"name":{"type":"string"},"type":{"$ref":"#/components/schemas/RecordType"},"content":{"type":"string"},"ttl":{"type":"integer","default":3600,"minimum":60,"maximum":604800,"description":"Time to live for the record, recommended 3600."},"priority":{"type":"integer","default":3600,"minimum":0,"maximum":65535,"description":"Priority value is between 0 and 65535. Priority is mandatory for MX, SRV and URI record types and ignored for all other types."},"enabled":{"type":"boolean","default":true,"description":"When true - the record is visible for lookup."}}},"RecordType":{"type":"string","description":"Holds supported DNS resource record types. In the DNS context a record is a DNS resource record.","enum":["A","AAAA","CNAME","ALIAS","MX","NS","SRV","TXT","CAA","SSHFP","TLSA","SMIMEA","DS","HTTPS","SVCB","OPENPGPKEY","CERT","URI","RP","LOC"]},"Error":{"type":"object","additionalProperties":false,"properties":{"httpStatus":{"type":"integer","description":"HTTP status code of the operation as specified by [RFC 7231](https://datatracker.ietf.org/doc/html/rfc7231#section-6).\n"},"messages":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"errorCode":{"type":"string","description":"Internal error code.\n"},"message":{"type":"string","description":"Human readable explanation of the issue.\n"}}}}}}},"responses":{"BadRequest":{"description":"### Bad Request\nThe request send to the API was malformed.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthorized":{"description":"### Unauthorized\nThe request is missing authorization information or the authorization information provided are expired.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotAllowed":{"description":"### Not Allowed\nThe user issuing the request does not have the needed permissions.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"### Not Found\nThe resource that was requested could not be found.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalError":{"description":"### Internal Server Error\nAn internal error occurred. We apologize for the inconvenience!\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/zones/{zoneId}/records/{recordId}":{"get":{"operationId":"zonesRecordsFindById","summary":"Retrieve a record","tags":["Records"],"description":"Returns the record with the specified record ID.","parameters":[{"name":"zoneId","in":"path","schema":{"type":"string","format":"uuid"},"required":true,"description":"The ID (UUID) of the DNS zone."},{"name":"recordId","in":"path","schema":{"type":"string","format":"uuid"},"required":true,"description":"The ID (UUID) of the record."}],"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordRead"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/NotAllowed"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalError"}}}}}}
```

## Update a record

> Updates or creates a DNS record for the provided record ID.

```json
{"openapi":"3.0.3","info":{"title":"IONOS Cloud - DNS API","version":"1.18.0"},"tags":[{"name":"Records","description":"Endpoints related to records"}],"servers":[{"url":"https://dns.de-fra.ionos.com","description":"Frankfurt"}],"security":[{"tokenAuth":[]}],"components":{"securitySchemes":{"tokenAuth":{"type":"apiKey","description":"Please provide header value as 'Bearer <token>' and don't forget to add 'Bearer' HTTP Authorization Scheme before the token.","name":"Authorization","in":"header"}},"schemas":{"RecordEnsure":{"type":"object","required":["properties"],"properties":{"properties":{"$ref":"#/components/schemas/Record"}}},"Record":{"type":"object","required":["name","type","content"],"properties":{"name":{"type":"string"},"type":{"$ref":"#/components/schemas/RecordType"},"content":{"type":"string"},"ttl":{"type":"integer","default":3600,"minimum":60,"maximum":604800,"description":"Time to live for the record, recommended 3600."},"priority":{"type":"integer","default":3600,"minimum":0,"maximum":65535,"description":"Priority value is between 0 and 65535. Priority is mandatory for MX, SRV and URI record types and ignored for all other types."},"enabled":{"type":"boolean","default":true,"description":"When true - the record is visible for lookup."}}},"RecordType":{"type":"string","description":"Holds supported DNS resource record types. In the DNS context a record is a DNS resource record.","enum":["A","AAAA","CNAME","ALIAS","MX","NS","SRV","TXT","CAA","SSHFP","TLSA","SMIMEA","DS","HTTPS","SVCB","OPENPGPKEY","CERT","URI","RP","LOC"]},"RecordRead":{"type":"object","required":["id","type","href","metadata","properties"],"properties":{"id":{"type":"string","format":"uuid","description":"The record ID (UUID).","readOnly":true},"type":{"type":"string","enum":["record"]},"href":{"type":"string","format":"uri","readOnly":true},"metadata":{"$ref":"#/components/schemas/MetadataWithStateFqdnZoneId"},"properties":{"$ref":"#/components/schemas/Record"}}},"MetadataWithStateFqdnZoneId":{"allOf":[{"$ref":"#/components/schemas/Metadata"},{"type":"object","required":["state","fqdn","zoneId"],"properties":{"state":{"$ref":"#/components/schemas/ProvisioningState"},"fqdn":{"type":"string","readOnly":true,"description":"A fully qualified domain name. FQDN consists of two parts - the hostname and the domain name."},"zoneId":{"$ref":"#/components/schemas/zoneId"}}}]},"Metadata":{"type":"object","description":"Metadata of the resource.","properties":{"createdDate":{"type":"string","readOnly":true,"format":"date-time","description":"The creation date formatted as yyyy-MM-dd'T'HH:mm:ss.SSS'Z'."},"createdBy":{"type":"string","description":"Unique name of the identity that created the resource.","readOnly":true},"createdByUserId":{"type":"string","description":"The unique ID of the user who created the resource.","readOnly":true},"lastModifiedDate":{"type":"string","readOnly":true,"format":"date-time","description":"The date of the last change formatted as yyyy-MM-dd'T'HH:mm:ss.SSS'Z'."},"lastModifiedBy":{"type":"string","description":"Unique name of the identity that created the resource.","readOnly":true},"lastModifiedByUserId":{"type":"string","description":"The unique ID of the user who last modified the resource.","readOnly":true},"resourceURN":{"type":"string","description":"Unique name of the resource.","readOnly":true}}},"ProvisioningState":{"type":"string","description":"The list of possible provisioning states in which DNS resource could be at the specific time.\n* AVAILABLE - resource exists and is healthy.\n* PROVISIONING - resource is being created or updated.\n* DESTROYING - delete command was issued, the resource is being deleted.\n* FAILED - creation of the resource failed.\n","enum":["PROVISIONING","DESTROYING","AVAILABLE","FAILED"]},"zoneId":{"type":"string","readOnly":true,"format":"uuid","description":"The ID (UUID) of the DNS zone of which record belongs to."},"Error":{"type":"object","additionalProperties":false,"properties":{"httpStatus":{"type":"integer","description":"HTTP status code of the operation as specified by [RFC 7231](https://datatracker.ietf.org/doc/html/rfc7231#section-6).\n"},"messages":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"errorCode":{"type":"string","description":"Internal error code.\n"},"message":{"type":"string","description":"Human readable explanation of the issue.\n"}}}}}}},"responses":{"BadRequest":{"description":"### Bad Request\nThe request send to the API was malformed.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthorized":{"description":"### Unauthorized\nThe request is missing authorization information or the authorization information provided are expired.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotAllowed":{"description":"### Not Allowed\nThe user issuing the request does not have the needed permissions.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"### Not Found\nThe resource that was requested could not be found.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"ConflictInRecordCreation":{"description":"### Conflict Error\nThis record cannot be modified/created because it conflicts with another record.\nThis can happen if you try to create a record with the same name and type as an existing record.\n#### Common causes:\n  - **CNAME conflicts**:  A CNAME record cannot coexist with other records of the same name according \nto DNS specifications (RFC 1034 section 3.6.2, RFC 1912 section 2.4)\n  - **TXT SPF**: A TXT record cannot have more than one SPF key in the record. Try to join them.\n    \n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalError":{"description":"### Internal Server Error\nAn internal error occurred. We apologize for the inconvenience!\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/zones/{zoneId}/records/{recordId}":{"put":{"operationId":"zonesRecordsPut","summary":"Update a record","tags":["Records"],"description":"Updates or creates a DNS record for the provided record ID.","parameters":[{"name":"zoneId","in":"path","schema":{"type":"string","format":"uuid"},"required":true,"description":"The ID (UUID) of the DNS zone."},{"name":"recordId","in":"path","schema":{"type":"string","format":"uuid"},"required":true,"description":"The ID (UUID) of the DNS record."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordEnsure"}}}},"responses":{"202":{"description":"Successful operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordRead"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/NotAllowed"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/ConflictInRecordCreation"},"500":{"$ref":"#/components/responses/InternalError"}}}}}}
```

## Delete a record

> Deletes a specified record from the DNS zone.

```json
{"openapi":"3.0.3","info":{"title":"IONOS Cloud - DNS API","version":"1.18.0"},"tags":[{"name":"Records","description":"Endpoints related to records"}],"servers":[{"url":"https://dns.de-fra.ionos.com","description":"Frankfurt"}],"security":[{"tokenAuth":[]}],"components":{"securitySchemes":{"tokenAuth":{"type":"apiKey","description":"Please provide header value as 'Bearer <token>' and don't forget to add 'Bearer' HTTP Authorization Scheme before the token.","name":"Authorization","in":"header"}},"schemas":{"EmptyBodyResponse":{"type":"object","properties":{}},"Error":{"type":"object","additionalProperties":false,"properties":{"httpStatus":{"type":"integer","description":"HTTP status code of the operation as specified by [RFC 7231](https://datatracker.ietf.org/doc/html/rfc7231#section-6).\n"},"messages":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"errorCode":{"type":"string","description":"Internal error code.\n"},"message":{"type":"string","description":"Human readable explanation of the issue.\n"}}}}}}},"responses":{"BadRequest":{"description":"### Bad Request\nThe request send to the API was malformed.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthorized":{"description":"### Unauthorized\nThe request is missing authorization information or the authorization information provided are expired.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotAllowed":{"description":"### Not Allowed\nThe user issuing the request does not have the needed permissions.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"### Not Found\nThe resource that was requested could not be found.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalError":{"description":"### Internal Server Error\nAn internal error occurred. We apologize for the inconvenience!\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/zones/{zoneId}/records/{recordId}":{"delete":{"operationId":"zonesRecordsDelete","summary":"Delete a record","tags":["Records"],"description":"Deletes a specified record from the DNS zone.","parameters":[{"name":"zoneId","in":"path","schema":{"type":"string","format":"uuid"},"required":true,"description":"The ID (UUID) of the DNS zone."},{"name":"recordId","in":"path","schema":{"type":"string","format":"uuid"},"required":true,"description":"The ID (UUID) of the record."}],"responses":{"202":{"description":"Successful operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmptyBodyResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/NotAllowed"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalError"}}}}}}
```
