{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","description":"To create a new record to a domain, send a POST request to\n`/v2/domains/$DOMAIN_NAME/records`.\n\nThe request must include all of the required fields for the domain record type\nbeing added.\n\nSee the [attribute table](#tag/Domain-Records) for details regarding record\ntypes and their respective required attributes.\n","properties":{"path":{"type":"object","properties":{"domain_name":{"type":"string","examples":["example.com"],"description":"The name of the domain itself."}},"required":["domain_name"],"additionalProperties":false},"body":{"anyOf":[{"$ref":"#/definitions/domain_record_a"},{"$ref":"#/definitions/domain_record_aaaa"},{"$ref":"#/definitions/domain_record_caa"},{"$ref":"#/definitions/domain_record_cname"},{"$ref":"#/definitions/domain_record_mx"},{"$ref":"#/definitions/domain_record_ns"},{"$ref":"#/definitions/domain_record_soa"},{"$ref":"#/definitions/domain_record_srv"},{"$ref":"#/definitions/domain_record_txt"}],"examples":[{"type":"A","name":"www","data":"162.10.66.0","ttl":1800}]}},"required":["path"],"additionalProperties":false,"definitions":{"domain_record_a":{"allOf":[{"$ref":"#/definitions/domain_record"},{"required":["type","name","data"]}]},"domain_record_aaaa":{"allOf":[{"$ref":"#/definitions/domain_record"},{"required":["type","name","data"]}]},"domain_record_caa":{"allOf":[{"$ref":"#/definitions/domain_record"},{"required":["type","name","data","flags","tag"]}]},"domain_record_cname":{"allOf":[{"$ref":"#/definitions/domain_record"},{"required":["type","name","data"]}]},"domain_record_mx":{"allOf":[{"$ref":"#/definitions/domain_record"},{"required":["type","data","priority"]}]},"domain_record_ns":{"allOf":[{"$ref":"#/definitions/domain_record"},{"required":["type","name","data","flags","tag"]}]},"domain_record_soa":{"allOf":[{"$ref":"#/definitions/domain_record"},{"required":["type","ttl"]}]},"domain_record_srv":{"allOf":[{"$ref":"#/definitions/domain_record"},{"required":["type","name","data","priority","port","flags","tag"]}]},"domain_record_txt":{"allOf":[{"$ref":"#/definitions/domain_record"},{"required":["type","name","data","flags","tag"]}]},"domain_record":{"type":"object","required":["type"],"properties":{"type":{"type":"string","description":"The type of the DNS record. For example: A, CNAME, TXT, ...","examples":["NS"]},"name":{"type":"string","description":"The host name, alias, or service being defined by the record.","examples":["@"]},"data":{"type":"string","description":"Variable data depending on record type. For example, the \"data\" value for an A record would be the IPv4 address to which the domain will be mapped. For a CAA record, it would contain the domain name of the CA being granted permission to issue certificates.","examples":["ns1.digitalocean.com"]},"priority":{"type":["integer","null"],"description":"The priority for SRV and MX records.","examples":[null]},"port":{"type":["integer","null"],"description":"The port for SRV records.","examples":[null]},"ttl":{"type":"integer","description":"This value is the time to live for the record, in seconds. This defines the time frame that clients can cache queried information before a refresh should be requested.","examples":[1800]},"weight":{"type":["integer","null"],"description":"The weight for SRV records.","examples":[null]},"flags":{"type":["integer","null"],"description":"An unsigned integer between 0-255 used for CAA records.","examples":[null]},"tag":{"type":["string","null"],"description":"The parameter tag for CAA records. Valid values are \"issue\", \"issuewild\", or \"iodef\"","examples":[null]}}}}},"name":"Create a New Domain Record","id":"digitalocean.domains_create_record","example":{"path":{"domain_name":"example.com"}},"maxRequests":1,"summary":false}}