Zone > Dns Record

Store dns record

Changed on

Create a dns record in a given zone

post/2/zones/{zone}/records

Request

  • Base URL
    https://api.infomaniak.com
  • URL
    https://api.infomaniak.com/2/zones/{zone}/records
  • Auth
    HTTP bearer

Path parameters

zonestring required

A domain name or a sub delegated zone

Query parameters

withstring

Optional : Allows loading additional data about a resource, which may include related resources.

Request body

sourcestring nullable

Source of the dns record

targetstring required

Target of the dns record

ttlinteger required

TTL of the dns record

type'A' | 'AAAA' | 'CAA' | 'CNAME' | 'DNAME' | 'DS' | 'MX' | 'NS' | 'SMIMEA' | 'SRV' | 'SSHFP' | 'TLSA' | 'TXT' required

Type of the dns record

Example request

{
  "target": "1.2.3.4"
}

Response

OK

result'success' | 'error' | 'asynchronous' required

Result of the HTTP request

data2f8071fdApiDnsDnsRecord (unresolved $ref)

Changes

    • warning

      changed the pattern of the request property from ^((?!(?!xn)..--)[A-Za-z0-9_*][A-Za-z0-9-_*]{0,62}(?<!-)(?:\.(?!(?!xn)..--)[A-Za-z0-9_*][A-Za-z0-9-*]{0,62}(?<!-))*|\.)$ to ^((?!(?!xn)..--)[A-Za-z0-9_*][A-Za-z0-9-_*]{0,62}(?<!-)(?:\.(?!(?!xn)..--)[A-Za-z0-9_*][A-Za-z0-9-_*]{0,62}(?<!-))*|\.)$